/* ═══════════════════════════════════════════════════════════════
   ChurnSense Landing Page — landing.css
   Sections:
     1.  Design tokens
     2.  Reset & base
     3.  Grain texture
     4.  Navigation
     5.  Hero
     6.  Scroll hint
     7.  Stats ticker
     8.  Section base styles
     9.  Problem section
    10.  How it works
    11.  Mock dashboard
    12.  Features section
    13.  Pricing section
    14.  CTA section
    15.  Footer
    16.  Scroll reveal utility
    17.  Animations (no heartbeat)
═══════════════════════════════════════════════════════════════ */


/* ─────────────────────────────────────────
   1. Design tokens
───────────────────────────────────────── */
:root {
  --ink:        #1a1610;
  --ink2:       #2e2820;
  --ink3:       #5a5040;
  --cream:      #f0ebe0;
  --cream-dim:  rgba(240, 235, 224, 0.6);
  --cream-faint:rgba(240, 235, 224, 0.15);
  --gold:       #c9a84c;
  --gold2:      #e8c97a;
  --gold3:      #f5e4b0;
  --red:        #c06060;
  --amber:      #d4a840;
  --sage:       #70b880;
  --border:     rgba(240, 235, 224, 0.08);
  --border2:    rgba(240, 235, 224, 0.14);

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Jost', sans-serif;
  --font-mono:  'DM Mono', monospace;
}


/* ─────────────────────────────────────────
   2. Reset & base
───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--ink);
  color: var(--cream);
  overflow-x: hidden;
  /* No cursor: none — using default browser cursor */
}

a { text-decoration: none; color: inherit; }

em { font-style: italic; }


/* ─────────────────────────────────────────
   3. Grain texture
───────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 200;
  mix-blend-mode: overlay;
}


/* ─────────────────────────────────────────
   4. Navigation
───────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 48px;
  z-index: 50;
  background: linear-gradient(to bottom, rgba(26,22,16,0.6) 0%, transparent 100%);
  backdrop-filter: blur(0px);
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.3px;
  color: var(--cream);
}

.nav-logo em { color: var(--gold2); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream-dim);
  transition: color 0.2s;
}

.nav-link:hover { color: var(--cream); }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--gold2);
  transition: all 0.2s;
}

.nav-cta:hover {
  background: rgba(201,168,76,0.1);
  border-color: var(--gold2);
}


/* ─────────────────────────────────────────
   5. Hero
───────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 48px 100px;
  overflow: hidden;
  text-align: center;
}

/* Ambient gradient orbs — static, no pulse */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: rgba(139, 46, 46, 0.14);
  top: -100px;
  right: -100px;
  animation: drift 16s ease-in-out infinite;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: rgba(201, 168, 76, 0.09);
  bottom: -50px;
  left: -50px;
  animation: drift 20s ease-in-out infinite reverse;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: rgba(58, 107, 74, 0.09);
  top: 40%;
  left: 30%;
  animation: drift 24s ease-in-out infinite;
  animation-delay: -8s;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s ease both;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  width: 40px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold));
}

.hero-eyebrow::before { transform: scaleX(-1); }

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(56px, 8vw, 116px);
  font-weight: 300;
  letter-spacing: -3px;
  line-height: 0.95;
  color: var(--cream);
  margin-bottom: 32px;
  max-width: 1000px;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s ease both;
}

.hero-title em { color: var(--gold2); }

.hero-sub {
  font-size: 16px;
  font-weight: 300;
  color: var(--cream-dim);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s ease both;
}

.hero-actions {
  display: flex;
  gap: 20px;
  align-items: center;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s ease both;
}


/* ─────────────────────────────────────────
   6. Shared buttons
───────────────────────────────────────── */
.btn-primary {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 16px 36px;
  background: var(--cream);
  color: var(--ink);
  border: none;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold3);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.btn-primary:hover::after { transform: scaleX(1); }

.btn-primary span { position: relative; z-index: 1; }

.btn-ghost {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.btn-ghost:hover { color: var(--cream); }


/* ─────────────────────────────────────────
   6. Scroll hint
───────────────────────────────────────── */
.scroll-hint {
  position: absolute;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeUp 1s 1.2s ease both;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollAnim 2.4s ease-in-out infinite;
}

.scroll-text {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(240,235,224,0.55); /* was 0.25 — raised for WCAG 1.4.3 contrast */
}


/* ─────────────────────────────────────────
   7. Stats ticker
───────────────────────────────────────── */
.ticker {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  overflow: hidden;
  background: rgba(240,235,224,0.02);
}

.ticker-inner {
  display: flex;
  gap: 80px;
  animation: ticker 22s linear infinite;
  white-space: nowrap;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.ticker-num {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 300;
  color: var(--gold);
}

.ticker-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(240,235,224,0.35);
}


/* ─────────────────────────────────────────
   8. Section base styles
───────────────────────────────────────── */
section { padding: 120px 48px; position: relative; }

.section-inner { max-width: 1100px; margin: 0 auto; }

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4vw, 60px);
  font-weight: 300;
  letter-spacing: -1px;
  color: var(--cream);
  line-height: 1.1;
  margin-bottom: 64px;
}


/* ─────────────────────────────────────────
   9. Problem section
───────────────────────────────────────── */
.problem-section { background: var(--ink); }

.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border2);
  border: 1px solid var(--border2);
}

.problem-card {
  background: var(--ink);
  padding: 40px;
  transition: background 0.25s;
}

.problem-card:hover { background: rgba(240,235,224,0.03); }

.problem-num {
  font-family: var(--font-serif);
  font-size: 56px;
  font-weight: 300;
  font-style: italic;
  color: rgba(192, 96, 96, 0.35);
  line-height: 1;
  margin-bottom: 16px;
}

.problem-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 10px;
}

.problem-desc {
  font-size: 14px;
  font-weight: 300;
  color: rgba(240,235,224,0.4);
  line-height: 1.7;
}


/* ─────────────────────────────────────────
   10. How it works
───────────────────────────────────────── */
.how-section { background: rgba(240,235,224,0.02); }

.how-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.how-steps { position: sticky; top: 120px; }

.step-item {
  /* Fixed height so expanding/collapsing desc never shifts the page */
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.step-item:last-child { border-bottom: none; }

.step-num {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(240,235,224,0.55); /* was 0.25 — raised for WCAG 1.4.3 contrast */
  margin-bottom: 6px;
  transition: color 0.2s;
}

.step-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  color: rgba(240,235,224,0.70); /* was 0.35 — raised for WCAG 1.4.3 contrast */
  margin-bottom: 0;
  transition: color 0.25s;
}

.step-desc {
  font-size: 13px;
  font-weight: 300;
  color: rgba(240,235,224,0.0);
  line-height: 1.7;
  /* Fixed height always reserved — no layout shift */
  height: 72px;
  overflow: hidden;
  margin-top: 10px;
  transition: color 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

/* Active step */
.step-item.active .step-num   { color: var(--gold); }
.step-item.active .step-title { color: var(--cream); }
.step-item.active .step-desc  {
  color: rgba(240,235,224,0.45);
  opacity: 1;
}

.how-visual { position: sticky; top: 120px; }


/* ─────────────────────────────────────────
   11. Mock dashboard
───────────────────────────────────────── */
.mock-dashboard {
  background: rgba(240,235,224,0.03);
  border: 1px solid var(--border2);
  padding: 24px;
}

.mock-header {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(240,235,224,0.3);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.mock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(240,235,224,0.04);
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.mock-row:last-child { border-bottom: none; }
.mock-row.visible    { opacity: 1; transform: translateX(0); }

.mock-company {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--cream);
  min-width: 110px;
}

.mock-bar-bg {
  flex: 1;
  height: 2px;
  background: rgba(240,235,224,0.08);
}

.mock-bar-fill {
  height: 100%;
  width: 0%;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.mock-bar-fill.high { background: var(--red); }
.mock-bar-fill.med  { background: var(--amber); }
.mock-bar-fill.low  { background: var(--sage); }

.mock-score {
  font-family: var(--font-mono);
  font-size: 12px;
  min-width: 36px;
  text-align: right;
  transition: color 0.3s;
}

.mock-score.high { color: var(--red); }
.mock-score.med  { color: var(--amber); }
.mock-score.low  { color: var(--sage); }


/* ─────────────────────────────────────────
   12. Features section
   Note: NO heartbeat / pulse animation here.
   Cards use only opacity + translateY on hover.
───────────────────────────────────────── */
.features-section { background: var(--ink); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border2);
  border: 1px solid var(--border2);
}

.feature-card {
  background: var(--ink);
  padding: 40px 36px;
  /* Only translate on hover — no scale, no pulse */
  transition: background 0.25s, transform 0.25s;
}

.feature-card:hover {
  background: rgba(240,235,224,0.025);
  transform: translateY(-2px);
}

.feature-icon {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(201,168,76,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--gold);
  margin-bottom: 20px;
  /* No animation on the icon */
}

.feature-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 13px;
  font-weight: 300;
  color: rgba(240,235,224,0.4);
  line-height: 1.7;
}


/* ─────────────────────────────────────────
   13. Pricing section
───────────────────────────────────────── */
.pricing-section {
  background: rgba(240,235,224,0.02);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border2);
  border: 1px solid var(--border2);
}

.price-card { background: var(--ink); padding: 40px; }

.price-card.featured { background: rgba(201,168,76,0.04); }

.price-badge {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}

.price-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 300;
  color: var(--cream);
  margin-bottom: 12px;
}

.price-amount {
  font-family: var(--font-serif);
  font-size: 52px;
  font-weight: 300;
  color: var(--cream);
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 4px;
}

.price-period {
  font-size: 12px;
  font-weight: 300;
  color: rgba(240,235,224,0.3);
  margin-bottom: 32px;
}

.price-features {
  list-style: none;
  margin-bottom: 32px;
}

.price-features li {
  font-size: 13px;
  font-weight: 300;
  color: rgba(240,235,224,0.5);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-features li::before {
  content: '—';
  color: var(--gold);
  opacity: 0.5;
  flex-shrink: 0;
}

.price-btn {
  display: block;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 14px;
  border: 1px solid rgba(240,235,224,0.15);
  color: var(--cream);
  transition: all 0.2s;
}

.price-btn:hover,
.price-card.featured .price-btn {
  background: var(--cream);
  color: var(--ink);
  border-color: var(--cream);
}


/* ─────────────────────────────────────────
   14. CTA section
───────────────────────────────────────── */
.cta-section {
  background: var(--ink);
  text-align: center;
  padding: 160px 48px;
  position: relative;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(201,168,76,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.cta-title {
  font-family: var(--font-serif);
  font-size: clamp(44px, 6vw, 92px);
  font-weight: 300;
  letter-spacing: -2px;
  line-height: 1;
  color: var(--cream);
  margin-bottom: 24px;
  position: relative;
}

.cta-title em { color: var(--gold2); }

.cta-sub {
  font-size: 15px;
  font-weight: 300;
  color: rgba(240,235,224,0.4);
  margin-bottom: 40px;
  max-width: 400px;
  margin-inline: auto;
  line-height: 1.7;
  position: relative;
}


/* ─────────────────────────────────────────
   15. Footer
───────────────────────────────────────── */
footer {
  padding: 40px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--cream);
}

.footer-logo em { color: var(--gold); }

.footer-text {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(240,235,224,0.55); /* was 0.20 — raised for WCAG 1.4.3 contrast */
}

.footer-links {
  display: flex;
  gap: 60px;
}

.footer-link {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(240,235,224,0.3);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover { color: var(--gold2); }

/* ─────────────────────────────────────────
   16. Scroll reveal utility
───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible        { opacity: 1; transform: translateY(0); }
.reveal-delay-1.visible { transition-delay: 0.1s; }
.reveal-delay-2.visible { transition-delay: 0.2s; }
.reveal-delay-3.visible { transition-delay: 0.3s; }


/* ─────────────────────────────────────────
   17. Animations — only what's needed
       No heartbeat, no page-move, no pulse.
───────────────────────────────────────── */

/* Orb gentle float — very slow, very subtle */
@keyframes drift {
  0%   { transform: translate(0, 0);        }
  33%  { transform: translate(24px, -32px); }
  66%  { transform: translate(-16px, 16px); }
  100% { transform: translate(0, 0);        }
}

/* Scroll line draw animation */
@keyframes scrollAnim {
  0%   { transform: scaleY(0); transform-origin: top;    opacity: 1; }
  49%  { transform: scaleY(1); transform-origin: top;    opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* Ticker scroll */
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Hero text entrance */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);    }
}


/* ─────────────────────────────────────────
   ACCESSIBILITY FIXES (WCAG 2.1 AA)
───────────────────────────────────────── */

/* Fix 1: Visible focus styles */
:focus-visible {
  outline: 2px solid var(--gold2);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Fix 2: Skip link */
.skip-link {
  position: fixed;
  top: -9999px;
  left: -9999px;
  z-index: 9999;
  background: var(--cream);
  color: var(--ink);
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 13px;
  text-decoration: none;
  border-radius: 3px;
  border: 1px solid var(--gold2);
  transition: none;
}
.skip-link:focus {
  top: 16px;
  left: 16px;
}

/* Fix 5: Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Fix 11: Brand name italic span (not semantic em) */
.brand-em { font-style: italic; }
