/* ============================================
   AILENZ MAGAZINE THEME
   Dark editorial aesthetic matching the PDF
   ============================================ */

:root {
  --gold: #C9A84C;
  --gold-light: #E2C97E;
  --gold-dark: #A07830;
  --navy: #07192E;
  --navy-mid: #0D2340;
  --navy-light: #162D47;
  --cream: #F5F0E8;
  --cream-dark: #E8E2D6;
  --text-primary: #F5F0E8;
  --text-secondary: #A8A090;
  --text-dark: #1A1A1A;
  --rule: rgba(201, 168, 76, 0.3);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Libre Baskerville', Georgia, serif;
  --font-ui: 'Barlow', sans-serif;
}

/* ============================================
   RESET & BASE
   ============================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--navy);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--gold-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(7, 25, 46, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  max-width: 1400px;
  margin: 0 auto;
}

.site-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-wordmark {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: 0.25em;
  color: var(--navy);
  background: linear-gradient(
    160deg,
    #E8C96A 0%,
    #C9A84C 35%,
    #B8942E 65%,
    #D4AE50 100%
  );
  padding: 2px 12px;
  line-height: 1.4;
}

.logo-tagline {
  font-family: var(--font-ui);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 2px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-nav a {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.header-nav a:hover {
  color: var(--gold);
}

.nav-subscribe {
  color: var(--gold) !important;
  border: 1px solid var(--gold);
  padding: 4px 12px;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s !important;
}

.nav-subscribe:hover {
  background: var(--gold) !important;
  color: var(--navy) !important;
}

.header-rule {
  height: 1px;
  background: var(--rule);
}

/* ============================================
   HERO SLIDER
   ============================================ */

.homepage {
  padding-top: 65px;
}

.hero-feature {
  position: relative;
  height: calc(100vh - 65px);
  min-height: 600px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.hero-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  transition: transform 8s ease;
}

.hero-slide.is-active .hero-image {
  transform: scale(1);
}

.hero-image--dark {
  background-color: var(--navy-mid);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(7, 25, 46, 0.92) 0%,
    rgba(7, 25, 46, 0.75) 50%,
    rgba(7, 25, 46, 0.4) 100%
  );
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 4rem 5rem;
  max-width: 680px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.hero-tag {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero-read-time {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--cream);
}

.hero-title a {
  color: inherit;
  text-decoration: none;
}

.hero-title a:hover {
  color: var(--gold-light);
}

.hero-excerpt {
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(245, 240, 232, 0.8);
  margin-bottom: 1.5rem;
  max-width: 520px;
}

.hero-cta {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--gold);
  padding: 10px 24px;
  text-decoration: none;
  transition: background 0.2s;
}

.hero-cta:hover {
  background: var(--gold-light);
  color: var(--navy);
}

/* Dots */
.hero-dots {
  position: absolute;
  bottom: 2rem;
  right: 3rem;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}

.hero-dot.is-active {
  background: var(--gold);
}

/* Arrows */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(7, 25, 46, 0.6);
  border: 1px solid var(--rule);
  color: var(--gold);
  font-size: 1.2rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.hero-arrow:hover {
  background: rgba(201, 168, 76, 0.15);
  border-color: var(--gold);
}

.hero-arrow--prev { left: 1.5rem; }
.hero-arrow--next { right: 1.5rem; }

/* ============================================
   POSTS GRID
   ============================================ */

.posts-section {
  padding: 5rem 0;
  border-top: 1px solid var(--rule);
}

.posts-section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.section-rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.section-title {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  transition: border-color 0.2s;
}

.post-card:hover {
  border-color: var(--gold);
}

.post-card-image-wrap {
  display: block;
  overflow: hidden;
}

.post-card-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}

.post-card:hover .post-card-image {
  transform: scale(1.03);
}

.post-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-tag {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  flex: 1;
}

.post-card-title a {
  color: var(--cream);
  text-decoration: none;
}

.post-card-title a:hover {
  color: var(--gold-light);
}

.post-card-excerpt {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.post-card-meta {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  border-top: 1px solid var(--rule);
  padding-top: 0.75rem;
}

/* ============================================
   SUBSCRIBE BANNER
   ============================================ */

.subscribe-banner {
  padding: 5rem 2rem;
  background: var(--navy-mid);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.subscribe-banner-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.subscribe-banner-rule {
  height: 1px;
  background: var(--rule);
  margin: 2rem 0;
}

.subscribe-banner-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 1rem;
}

.subscribe-banner-text {
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.subscribe-banner-btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--gold);
  padding: 14px 32px;
  text-decoration: none;
  transition: background 0.2s;
}

.subscribe-banner-btn:hover {
  background: var(--gold-light);
  color: var(--navy);
}

/* ============================================
   ARTICLE / POST PAGE
   ============================================ */

.post-full {
  padding-top: 65px;
  max-width: 100%;
}

.post-hero-image {
  position: relative;
  height: 480px;
  overflow: hidden;
}

.post-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--navy) 100%);
}

.post-header-content {
  max-width: 740px;
  margin: 0 auto;
  padding: 3rem 2rem 0;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.post-tag {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}

.post-meta-divider {
  color: var(--rule);
}

.post-read-time,
.post-date {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.post-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--cream);
  margin-bottom: 1.25rem;
}

.post-subtitle {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--gold);
}

.post-byline {
  margin-bottom: 1.5rem;
}

.post-byline-label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.post-header-rule {
  height: 1px;
  background: var(--rule);
  margin: 1.5rem 0 0;
}

/* ============================================
   ARTICLE BODY CONTENT
   ============================================ */

.post-content {
  max-width: 740px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* Drop cap on first paragraph */
.post-content > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--gold);
  float: left;
  line-height: 0.8;
  margin-right: 0.1em;
  margin-top: 0.05em;
}

.post-content p {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--cream);
  margin-bottom: 1.5rem;
}

.post-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--cream);
  margin: 3rem 0 1rem;
}

.post-content h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--gold-light);
  margin: 2rem 0 0.75rem;
}

.post-content blockquote {
  margin: 2.5rem 0;
  padding: 1.5rem 2rem;
  border-left: 3px solid var(--gold);
  background: rgba(201, 168, 76, 0.05);
}

.post-content blockquote p {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--gold-light);
  margin: 0;
  line-height: 1.6;
}

.post-content hr {
  border: none;
  height: 1px;
  background: var(--rule);
  margin: 3rem 0;
}

.post-content strong {
  font-weight: 700;
  color: var(--cream);
}

.post-content em {
  font-style: italic;
  color: var(--cream-dark);
}

.post-content a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(201, 168, 76, 0.4);
}

.post-content a:hover {
  color: var(--gold-light);
  text-decoration-color: var(--gold-light);
}

/* Second opinion section - styled like the magazine */
.post-content .kg-callout-card {
  background: var(--navy-light);
  border: 1px solid var(--rule);
  padding: 2rem;
  margin: 3rem 0;
}

/* ============================================
   GHOST CARD WIDTH CLASSES (required)
   ============================================ */

.kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  margin: auto calc(50% - 50vw) * 0.15;
}

.kg-width-full {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.kg-image {
  max-width: 100%;
  height: auto;
}

.kg-image-card img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.kg-image-card.kg-width-wide img,
.kg-image-card.kg-width-full img {
  width: 100%;
}

/* ============================================
   MEMBERS CTA (in article)
   ============================================ */

.post-members-cta {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.members-cta-inner {
  text-align: center;
  padding: 3rem;
  border: 1px solid var(--rule);
  background: var(--navy-mid);
}

.members-cta-rule {
  height: 1px;
  background: var(--rule);
  margin: 1.5rem 0;
}

.members-cta-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--cream);
  margin-bottom: 0.75rem;
}

.members-cta-text {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.members-cta-btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--gold);
  padding: 12px 28px;
  text-decoration: none;
  transition: background 0.2s;
}

.members-cta-btn:hover {
  background: var(--gold-light);
  color: var(--navy);
}

/* ============================================
   POST NAVIGATION
   ============================================ */

.post-nav {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
}

.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-decoration: none;
  padding: 1rem;
  border: 1px solid var(--rule);
  transition: border-color 0.2s;
}

.post-nav-item:hover {
  border-color: var(--gold);
}

.post-nav-item--next {
  text-align: right;
}

.post-nav-label {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}

.post-nav-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--cream);
  line-height: 1.4;
}

/* ============================================
   PAGE TEMPLATE
   ============================================ */

.page-full {
  padding-top: 65px;
  max-width: 740px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.page-header {
  padding: 4rem 0 0;
}

.page-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 1rem;
}

.page-header-rule {
  height: 1px;
  background: var(--rule);
  margin: 1.5rem 0 0;
}

.page-content {
  padding: 3rem 0 5rem;
}

.page-content p {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--cream);
  margin-bottom: 1.5rem;
}

.page-content h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--cream);
  margin: 2.5rem 0 1rem;
}

.page-content a {
  color: var(--gold);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background: var(--navy-mid);
  border-top: 1px solid var(--rule);
  padding: 4rem 2rem;
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--navy);
  background: linear-gradient(160deg, #E8C96A 0%, #C9A84C 35%, #B8942E 65%, #D4AE50 100%);
  display: inline-block;
  padding: 3px 14px;
  margin-bottom: 1.5rem;
}

.footer-tagline {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-links a {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-copy {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: rgba(168, 160, 144, 0.5);
  line-height: 1.7;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .header-inner {
    padding: 0 1rem;
    gap: 0.5rem;
  }

  .header-nav {
    gap: 0.75rem;
  }

  .header-nav a {
    font-size: 0.65rem;
  }

  .logo-tagline {
    display: none;
  }

  .hero-content {
    padding: 2rem 1.5rem 5rem;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-arrow {
    display: none;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav-item--next {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .header-nav--left .header-nav a:not(.nav-subscribe) {
    display: none;
  }
}

/* ============================================
   SPLASH SCREEN
   ============================================ */

.splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.splash.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-image {
  position: absolute;
  inset: 0;
  background-image: url('../splash.png');
  background-size: cover;
  background-position: center 30%;
}

.splash-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(7, 25, 46, 0.55) 0%,
    rgba(7, 25, 46, 0.7) 60%,
    rgba(7, 25, 46, 0.92) 100%
  );
}

.splash-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
}

.splash-logo {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 2.8rem;
  letter-spacing: 0.35em;
  color: var(--navy);
  background: linear-gradient(160deg, #E8C96A 0%, #C9A84C 35%, #B8942E 65%, #D4AE50 100%);
  display: inline-block;
  padding: 6px 28px;
  margin-bottom: 1.25rem;
}

.splash-tagline {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 1.5rem;
}

.splash-rule {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 1.25rem;
}

.splash-descriptor {
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: italic;
  color: rgba(245, 240, 232, 0.7);
  margin-bottom: 2.5rem;
}

.splash-enter {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid rgba(201, 168, 76, 0.5);
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 12px 24px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  animation: pulse-border 2.5s ease-in-out infinite;
}

.splash-enter:hover {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.1);
  animation: none;
}

@keyframes pulse-border {
  0%, 100% { border-color: rgba(201, 168, 76, 0.4); }
  50% { border-color: rgba(201, 168, 76, 0.9); }
}

.homepage {
  padding-top: 65px;
}
@media (max-width: 480px) {
  .header-inner {
    padding: 0 0.75rem;
  }
  .header-nav--left a:not(.nav-subscribe) {
    display: none;
  }
  .header-nav--right a:not(.nav-subscribe) {
    display: none;
  }
  .header-nav {
    gap: 0.5rem;
  }
  .nav-subscribe {
    font-size: 0.6rem;
    padding: 4px 8px;
  }
}