:root {
  --gold: #c89a4a;
  --gold-light: #e3b96a;
  --gold-pale: #f5e8ce;
  --warm-dark: #1a1208;
  --warm-mid: #2e1f0f;
  --cream: #faf6f0;
  --cream-2: #f3ebe0;
  --ink: #1c1208;
  --ink-2: #3d2e1a;
  --muted: #8a7562;
}

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

html { background: var(--cream); }

body {
  font-family: 'Inter', sans-serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  opacity: 0;
  transition: opacity 0.3s ease;
}
body.loaded {
  opacity: 1;
}

/* ── TYPOGRAPHY ── */
.serif { font-family: 'Cormorant Garamond', serif; }

/* ── NAVBAR ── */
.navbar {
  background: rgba(22, 14, 6, 0.72);
  border: 1px solid rgba(200, 154, 74, 0.18);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* ── HERO ── */
.hero {
  background:
    linear-gradient(180deg,
      rgba(6,3,1,0.10) 0%,
      rgba(6,3,1,0.06) 30%,
      rgba(6,3,1,0.30) 68%,
      rgba(4,2,0,0.72) 100%
    ),
    url('hero.png') center 25% / cover no-repeat;
  background:
    linear-gradient(
      180deg,
      rgba(6,3,1,0.10) 0%,
      rgba(6,3,1,0.06) 30%,
      rgba(6,3,1,0.30) 68%,
      rgba(4,2,0,0.72) 100%
    ),
    image-set(
      url('hero.webp') type('image/webp'),
      url('hero.png') type('image/png')
    ) center 25% / cover no-repeat;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Subtle warm vignette on edges only */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 80% at 50% 50%, transparent 40%, rgba(4,2,0,0.18) 100%);
  pointer-events: none;
}

/* Bottom fade into content */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 35%;
  background: linear-gradient(180deg, transparent, rgba(4,2,0,0.60));
  pointer-events: none;
}

/* Fine grid overlay */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,154,74,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,154,74,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* ── DIVIDER ── */
.gold-rule {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto;
}

/* ── LANGUAGE CONSTELLATION ── */
.flag-constellation {
  position: relative;
  width: min(100%, 480px);
  aspect-ratio: 1;
  margin: 0 auto;
  container-type: inline-size;
}
.flag-globe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(3rem, 18cqi, 5.8rem);
  line-height: 1;
  filter: drop-shadow(0 8px 28px rgba(200,154,74,.45));
  z-index: 2;
}
.flag-globe::before {
  content: '';
  position: absolute;
  inset: -45%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,154,74,.22), transparent 65%);
  z-index: -1;
  pointer-events: none;
}
.flag-anchor {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
}
.flag-anchor.inner {
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-22cqi) rotate(calc(-1 * var(--angle)));
}
.flag-anchor.middle {
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-33cqi) rotate(calc(-1 * var(--angle)));
}
.flag-anchor.outer {
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-44cqi) rotate(calc(-1 * var(--angle)));
}
.flag-chip {
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(32px, 10cqi, 48px);
  height: clamp(32px, 10cqi, 48px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.3rem, 6cqi, 1.9rem);
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
  animation: flag-float var(--dur, 6s) ease-in-out infinite var(--delay, 0s);
  transition: filter .3s ease;
  cursor: pointer;
  will-change: transform;
}
.flag-anchor.middle .flag-chip {
  font-size: clamp(1.15rem, 5.2cqi, 1.6rem);
}
.flag-anchor.outer .flag-chip {
  font-size: clamp(1rem, 4.6cqi, 1.45rem);
}
.flag-chip:hover {
  filter: drop-shadow(0 0 10px rgba(200,154,74,.65)) drop-shadow(0 2px 6px rgba(0,0,0,.5));
  animation-play-state: paused;
  z-index: 5;
}
@keyframes flag-float {
  0%, 100% {
    transform: translate(-50%, -50%);
  }
  50% {
    transform: translate(calc(-50% + var(--fx, 4px)), calc(-50% + var(--fy, -6px)));
  }
}
@media (prefers-reduced-motion: reduce) {
  .flag-chip { animation: none; }
}

/* ── KICKER ── */
.kicker {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ── CTA BUTTON ── */
.btn-gold {
  background: linear-gradient(135deg, #b8881e 0%, #d4a237 50%, #c89a4a 100%);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 8px 24px rgba(180,130,30,0.35);
}
.btn-gold:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-outline {
  border: 1px solid rgba(200,154,74,0.5);
  color: rgba(240,220,180,0.9);
  background: rgba(200,154,74,0.06);
  letter-spacing: 0.06em;
  transition: background 0.2s, border-color 0.2s;
}
.btn-outline:hover {
  background: rgba(200,154,74,0.12);
  border-color: rgba(200,154,74,0.7);
}

/* ── GLASS CARD (dark) ── */
.glass-dark {
  background: rgba(28, 18, 8, 0.56);
  border: 1px solid rgba(200, 154, 74, 0.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* ── CREAM CARD ── */
.card-cream {
  background: linear-gradient(160deg, #fffdf8 0%, #f7efe3 100%);
  border: 1px solid rgba(200,160,90,0.22);
  box-shadow: 0 6px 28px rgba(50,30,8,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card-cream:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 48px rgba(180,130,30,0.13);
  border-color: rgba(200,154,74,0.45);
}

/* ── DARK SECTION ── */
.section-dark {
  background: linear-gradient(180deg, #110c05 0%, #1a1208 100%);
}

/* ── WARM SECTION ── */
.section-warm {
  background: linear-gradient(180deg, #faf6f0 0%, #f3ebe0 100%);
}

.section-mid {
  background: linear-gradient(180deg, #f0e6d6 0%, #e8dcc8 100%);
}

/* ── CHAT ANIMATION ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-msg { opacity: 0; animation: fadeUp 0.45s ease forwards; }
.chat-msg:nth-child(1) { animation-delay: 0.4s; }
.chat-msg:nth-child(2) { animation-delay: 1.2s; }
.chat-msg:nth-child(3) { animation-delay: 2.4s; }
.chat-msg:nth-child(4) { animation-delay: 3.5s; }
.chat-msg:nth-child(5) { animation-delay: 4.8s; }

@keyframes blink { 0%,100%{opacity:.25} 50%{opacity:1} }
.dot1{animation:blink 1.1s ease infinite 0s}
.dot2{animation:blink 1.1s ease infinite .22s}
.dot3{animation:blink 1.1s ease infinite .44s}

/* ── LOGO SHIMMER ── */
@keyframes shimmer { 0%,100%{opacity:.35} 50%{opacity:.6} }
.logo-ph { animation: shimmer 2.2s ease-in-out infinite; }

/* ── TABS ── */
.tab-btn {
  color: var(--muted);
  border: 1px solid transparent;
  transition: all 0.2s;
  font-size: 0.85rem;
  font-weight: 500;
}
.tab-btn.active {
  background: linear-gradient(135deg, #b8881e, #d4a237);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(180,130,30,0.3);
}
.tab-btn:not(.active):hover {
  border-color: rgba(200,154,74,0.4);
  color: var(--ink);
}
.tab-panel:not(.active) { display: none; }
.tab-panel.active { display: grid; }

/* ── CHANNEL CARD ── */
.channel-card {
  background: rgba(35, 22, 8, 0.7);
  border: 1px solid rgba(200, 154, 74, 0.12);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.channel-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  border-color: rgba(200,154,74,0.3);
}

/* ── COMPARISON TABLE ── */
.compare-row:nth-child(even) {
  background: rgba(200,154,74,0.04);
}

/* ── STEP CONNECTOR ── */
.step-line {
  position: absolute;
  top: 28px;
  left: calc(50% + 28px);
  right: calc(-50% + 28px);
  height: 1px;
  background: linear-gradient(90deg, rgba(200,154,74,0.5), rgba(200,154,74,0.15));
}

/* ── FORM ── */
.form-input {
  background: rgba(255,250,240,0.06);
  border: 1px solid rgba(200,154,74,0.2);
  color: #f0e6d0;
  transition: border-color 0.2s, background 0.2s;
}
.form-input::placeholder { color: rgba(180,155,110,0.5); }
.form-input:focus {
  outline: none;
  border-color: rgba(200,154,74,0.6);
  background: rgba(255,250,240,0.09);
}
.form-input option { background: #1a1208; color: #f0e6d0; }

/* ── FEATURE ICON RING ── */
.icon-ring {
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(200,154,74,0.3);
  display: flex; align-items: center; justify-content: center;
  background: rgba(200,154,74,0.08);
}

/* ── FEATURE TABS (vertical rail + preview) ── */
.feature-tabs {
  display: grid;
  grid-template-columns: minmax(0, 38%) minmax(0, 62%);
  gap: 2.5rem;
  align-items: start;
}
.feature-tab-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.feature-tab {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1rem 1rem 1.25rem;
  border-radius: 12px;
  cursor: pointer;
  background: transparent;
  border: none;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  transition: background 0.5s cubic-bezier(.25,.46,.45,.94);
}
.feature-tab::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.15rem;
  bottom: 1.15rem;
  width: 3px;
  border-radius: 2px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.55s cubic-bezier(.25,.46,.45,.94);
}
.feature-tab.is-active::before { transform: scaleY(1); }
.feature-tab.is-active { background: rgba(200,154,74,0.06); }
.feature-tab .icon-ring {
  flex-shrink: 0;
  transition: border-color 0.5s ease, background 0.5s ease;
}
.feature-tab-body {
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-rows: auto 0fr;
  transition: grid-template-rows 0.55s cubic-bezier(.25,.46,.45,.94);
}
.feature-tab.is-active .feature-tab-body { grid-template-rows: auto 1fr; }
.feature-tab h4 {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0;
  transition: color 0.4s ease;
}
.feature-tab.is-active h4 { color: var(--ink); }
.feature-tab-desc {
  overflow: hidden;
  min-height: 0;
}
.feature-tab p {
  color: var(--muted);
  margin: 0;
  padding-top: 0.4rem;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.45s cubic-bezier(.25,.46,.45,.94) 0.05s,
              transform 0.45s cubic-bezier(.25,.46,.45,.94) 0.05s;
}
.feature-tab.is-active p { opacity: 1; transform: translateY(0); }
.feature-preview-wrap { position: sticky; top: 100px; }
.feature-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(160deg, #fffdf8 0%, #f4ecdd 100%);
  border: 1px solid rgba(200,154,74,0.25);
  box-shadow: 0 20px 60px rgba(50,30,8,0.12);
  padding: 1.25rem;
}
.feature-preview-shot {
  position: absolute;
  inset: 1.25rem;
  width: calc(100% - 2.5rem);
  height: calc(100% - 2.5rem);
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.55s cubic-bezier(.25,.46,.45,.94),
              transform 0.7s cubic-bezier(.25,.46,.45,.94);
  border-radius: 8px;
}
.feature-preview-shot.is-active { opacity: 1; transform: scale(1); }
@media (max-width: 1023px) {
  .feature-tabs { grid-template-columns: 1fr; gap: 1.5rem; }
  .feature-preview-wrap { position: static; order: -1; }
  .feature-tab-list {
    flex-direction: row;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .feature-tab {
    flex: 0 0 auto;
    padding: 0.55rem 0.95rem;
    border: 1px solid rgba(200,154,74,0.3);
    border-radius: 999px;
    scroll-snap-align: start;
    gap: 0.55rem;
  }
  .feature-tab::before { display: none; }
  .feature-tab .icon-ring {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }
  .feature-tab .icon-ring svg { width: 14px; height: 14px; }
  .feature-tab.is-active {
    background: rgba(200,154,74,0.14);
    border-color: rgba(200,154,74,0.55);
  }
  .feature-tab p { display: none; }
  .feature-tab h4 {
    font-size: 0.82rem;
    white-space: nowrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .feature-tab, .feature-tab::before, .feature-tab h4, .feature-tab p,
  .feature-preview-shot { transition: none; }
}

/* ── BLOG CARD ── */
.blog-card {
  background: linear-gradient(160deg, #fffdf8, #f7efe3);
  border: 1px solid rgba(200,160,90,0.2);
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(50,30,8,0.1);
}

/* ── QUOTE ── */
blockquote { quotes: '\201C' '\201D'; }
blockquote::before { content: open-quote; }
blockquote::after  { content: close-quote; }

/* ── SCROLL FADE ── (static fallback) ── */
.fade-in { opacity: 1; }

/* ── REVEAL ANIMATIONS ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── STAGGERED CHILDREN ── */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0ms;   opacity: 1; transform: none; }
.reveal-stagger.revealed > *:nth-child(2) { transition-delay: 80ms;  opacity: 1; transform: none; }
.reveal-stagger.revealed > *:nth-child(3) { transition-delay: 160ms; opacity: 1; transform: none; }
.reveal-stagger.revealed > *:nth-child(4) { transition-delay: 240ms; opacity: 1; transform: none; }
.reveal-stagger.revealed > *:nth-child(5) { transition-delay: 320ms; opacity: 1; transform: none; }
.reveal-stagger.revealed > *:nth-child(6) { transition-delay: 400ms; opacity: 1; transform: none; }
.reveal-stagger.revealed > *:nth-child(7) { transition-delay: 480ms; opacity: 1; transform: none; }
.reveal-stagger.revealed > *:nth-child(8) { transition-delay: 560ms; opacity: 1; transform: none; }

.mobile-menu { display: none; }

@media (max-width: 767px) {
  /* ── MOBILE NAV ── */
  .mobile-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 1rem;
    right: 1rem;
    z-index: 49;
    background: rgba(22, 14, 6, 0.97);
    border: 1px solid rgba(200, 154, 74, 0.2);
    border-radius: 1rem;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 1.25rem;
    flex-direction: column;
    gap: 0.25rem;
  }
  .mobile-menu.open {
    display: flex;
  }
  .mobile-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: rgba(200, 180, 150, 0.8);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-radius: 0.5rem;
    transition: background 0.15s, color 0.15s;
  }
  .mobile-menu a:hover {
    background: rgba(200, 154, 74, 0.1);
    color: #fff;
  }
  .mobile-menu .btn-gold {
    display: block;
    text-align: center;
    margin-top: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }

  /* Hamburger icon */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
  }
  .hamburger span {
    display: block;
    height: 2px;
    background: rgba(240, 220, 180, 0.85);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
    transform-origin: center;
  }
  .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hamburger:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    border-radius: 4px;
  }
}

/* ── COMPARISON TABLE MOBILE SCROLL ── */
.compare-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.compare-scroll .card-cream {
  min-width: 520px;
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
  body {
    opacity: 1;
    transition: none;
  }
}
