/* ═══════════════════════════════════════════════════════
   PRORANK v4 — Production CSS
   Architecture: 200vh pinned animation → flowing sections
   ═══════════════════════════════════════════════════════ */

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

:root {
  --black: #050505;
  --white: #f5f5f5;
  --zinc-100: #f4f4f5;
  --zinc-200: #e4e4e7;
  --zinc-300: #d4d4d8;
  --zinc-400: #a1a1aa;
  --zinc-500: #71717a;
  --zinc-600: #52525b;
  --zinc-700: #3f3f46;
  --zinc-800: #27272a;
  --zinc-900: #18181b;
  --emerald: #10b981;
  --emerald-dark: #059669;
  --cyan: #06b6d4;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --red: #ef4444;
  --radius: 14px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { background: var(--black); color: var(--white); font-family: var(--font); overflow-x: hidden; }
::selection { background: rgba(16,185,129,0.3); color: #fff; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--zinc-800); border-radius: 2px; }

img { max-width: 100%; display: block; }
a { color: inherit; }

.text-emerald { color: var(--emerald); }
.text-cyan { color: var(--cyan); }
.text-violet { color: var(--violet); }
.text-pink { color: var(--pink); }
.text-red { color: var(--red); }


/* ═══ LOADER ═══ */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--black);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.loader-logo { width: 48px; height: 48px; border-radius: 12px; background: var(--emerald); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; color: #fff; animation: pulse 1.5s ease-in-out infinite; }
.loader-bar-track { width: 200px; height: 2px; background: rgba(255,255,255,0.06); border-radius: 1px; overflow: hidden; }
.loader-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--emerald), var(--cyan)); transition: width 0.1s linear; }
.loader-text { font-family: var(--mono); font-size: 11px; color: var(--zinc-700); letter-spacing: 0.05em; }


/* ═══ NAV ═══ */
#nav {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 50;
  padding: 0 16px 0 24px; height: 56px; max-width: 900px; width: calc(100% - 48px);
  display: flex; align-items: center;
  background: rgba(20, 20, 20, 0.65);
  backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 100px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: background 0.3s ease;
}
.nav-inner { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--emerald); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: #fff; flex-shrink: 0; box-shadow: 0 2px 8px rgba(16,185,129,0.3); }
.logo-mark--sm { width: 24px; height: 24px; font-size: 12px; border-radius: 6px; box-shadow: none; }
.logo-text { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 32px; }
.nav-link { font-size: 13px; font-weight: 500; color: var(--zinc-400); text-decoration: none; transition: color 0.2s; }
.nav-link:hover { color: var(--white); }
.nav-cta { font-size: 13px; font-weight: 600; color: #fff; background: var(--emerald-dark); padding: 8px 20px; border-radius: 100px; text-decoration: none; transition: all 0.2s; border: 1px solid rgba(255,255,255,0.1); }
.nav-cta:hover { background: var(--emerald); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,0.3); }


/* ═══ PINNED ANIMATION (200vh) ═══ */
#animation-wrapper { position: relative; height: 200vh; }
#scroll-canvas { position: sticky; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; background: var(--black); }
#canvas-overlay {
  position: sticky; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 1;
  pointer-events: none; margin-top: -100vh;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 35%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.1) 100%),
    linear-gradient(0deg, rgba(0,0,0,0.5) 0%, transparent 25%),
    linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 12%);
}
#hero-content {
  position: sticky; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 10;
  margin-top: -100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 0 80px; max-width: 640px; pointer-events: none; transition: opacity 0.3s ease;
}
#hero-content > * { pointer-events: auto; }

/* Mobile video — hidden on desktop */
#mobile-video { display: none; }

.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--emerald); margin-bottom: 20px;
  opacity: 0; transform: translateY(16px);
  animation: fadeUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.3s forwards;
}
.hero-h1 {
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  font-weight: 800; line-height: 1.05; letter-spacing: -0.04em;
  color: #fff; margin-bottom: 20px;
  text-shadow: 0 4px 60px rgba(0,0,0,0.7);
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.45s forwards;
}
.hero-sub {
  font-size: 17px; line-height: 1.65; color: var(--zinc-300);
  max-width: 48ch; margin-bottom: 36px; font-weight: 400;
  text-shadow: 0 2px 30px rgba(0,0,0,0.8);
  opacity: 0; transform: translateY(16px);
  animation: fadeUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.6s forwards;
}
.hero-btns {
  display: flex; gap: 12px; flex-wrap: wrap;
  opacity: 0; transform: translateY(12px);
  animation: fadeUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.75s forwards;
}


/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-size: 14px; font-weight: 600;
  padding: 14px 28px; border-radius: 10px; text-decoration: none;
  transition: all 0.2s ease; cursor: pointer; border: none;
}
.btn--white { background: #fff; color: var(--black); }
.btn--white:hover { box-shadow: 0 0 40px rgba(255,255,255,0.15); transform: translateY(-1px); }
.btn--emerald { background: var(--emerald); color: #fff; }
.btn--emerald:hover { background: var(--emerald-dark); box-shadow: 0 0 40px rgba(16,185,129,0.25); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--zinc-300); border: 1px solid rgba(255,255,255,0.15); }
.btn--ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.25); }
.btn--ghost-dark { background: transparent; color: var(--zinc-600); border: 1px solid var(--zinc-200); }
.btn--ghost-dark:hover { background: var(--zinc-100); color: var(--zinc-900); }
.btn:active { transform: scale(0.98) !important; }


/* ═══ FLOWING SECTIONS ═══ */
.section { position: relative; z-index: 2; padding: 100px 40px; background: #fff; color: var(--zinc-900); }
.section--dark { background: var(--zinc-900); color: var(--white); }
.section--cta { background: var(--zinc-100); color: var(--zinc-900); padding: 120px 40px; }
.container { max-width: 1100px; width: 100%; margin: 0 auto; }
.container--narrow { max-width: 720px; }

.section-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--emerald); margin-bottom: 12px; }
.section-eyebrow--dark { color: var(--emerald-dark); }
.section-h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 48px; }
.section-h2--dark { color: var(--zinc-900); }
.section-caption { font-size: 16px; color: var(--zinc-400); line-height: 1.6; text-align: center; max-width: 500px; margin: 24px auto 0; }


/* Problem Stats */
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 8px; }
.stat-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius); padding: 36px; text-align: center; transition: border-color 0.3s; }
.stat-card:hover { border-color: rgba(255,255,255,0.12); }
.stat-number { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 6px; }
.stat-label { font-size: 14px; color: var(--zinc-400); line-height: 1.5; }


/* Feature Grid */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fcard { background: var(--zinc-100); border: 1px solid var(--zinc-200); border-radius: var(--radius); padding: 36px; display: flex; flex-direction: column; justify-content: space-between; transition: border-color 0.3s, box-shadow 0.3s; }
.fcard:hover { border-color: var(--zinc-300); box-shadow: 0 4px 24px rgba(0,0,0,0.04); }
.fcard-icon { width: 44px; height: 44px; border-radius: 11px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.fcard-icon--emerald { background: rgba(16,185,129,0.1); color: var(--emerald); }
.fcard-icon--cyan { background: rgba(6,182,212,0.1); color: var(--cyan); }
.fcard-icon--violet { background: rgba(139,92,246,0.1); color: var(--violet); }
.fcard-icon--pink { background: rgba(236,72,153,0.1); color: var(--pink); }
.fcard-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; color: var(--zinc-900); }
.fcard-desc { font-size: 14px; line-height: 1.7; color: var(--zinc-500); margin-bottom: 20px; }
.fcard-proof { display: flex; gap: 24px; padding-top: 16px; border-top: 1px solid var(--zinc-200); }
.proof { display: flex; flex-direction: column; gap: 2px; }
.proof-val { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.proof-lbl { font-size: 11px; color: var(--zinc-500); font-weight: 500; }


/* Growth Chart */
.growth-chart { display: flex; flex-direction: column; gap: 16px; }
.growth-row { display: grid; grid-template-columns: 72px 1fr 44px; align-items: center; gap: 12px; }
.growth-label { font-size: 12px; color: var(--zinc-500); font-family: var(--mono); }
.growth-track { height: 10px; background: rgba(255,255,255,0.04); border-radius: 5px; overflow: hidden; }
.growth-fill { height: 100%; background: var(--emerald); border-radius: 5px; opacity: 0.7; transition: width 0.8s cubic-bezier(0.16,1,0.3,1); }
.growth-fill--full { opacity: 1; box-shadow: 0 0 16px rgba(16,185,129,0.4); }
.growth-val { font-size: 14px; font-weight: 700; color: var(--zinc-400); text-align: right; font-family: var(--mono); }
.growth-val--hl { color: var(--emerald); font-size: 16px; }


/* Revenue Split */
.revenue-split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.revenue-left .section-h2 { margin-bottom: 24px; }
.rev-breakdown { display: flex; flex-direction: column; gap: 14px; }
.rev-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--zinc-500); }
.rev-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rev-dot--red { background: var(--red); }
.rev-dot--green { background: var(--emerald); }
.revenue-right { text-align: center; }
.revenue-big { font-size: 64px; font-weight: 800; color: var(--emerald); letter-spacing: -0.04em; line-height: 1; }
.revenue-suffix { font-size: 22px; font-weight: 500; color: var(--zinc-400); }
.revenue-sub { font-size: 14px; color: var(--zinc-500); margin-top: 8px; }


/* ═══ TESTIMONIALS ═══ */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.t-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 32px;
  display: flex; flex-direction: column; gap: 20px;
  transition: border-color 0.3s, transform 0.3s;
}
.t-card:hover { border-color: rgba(255,255,255,0.12); transform: translateY(-2px); }
.t-stars { color: #facc15; font-size: 14px; letter-spacing: 2px; }
.t-quote { font-size: 14px; line-height: 1.7; color: var(--zinc-300); flex: 1; }
.t-author { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.06); }
.t-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--emerald), var(--cyan)); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0; }
.t-name { font-size: 14px; font-weight: 600; color: var(--white); }
.t-role { font-size: 11px; color: var(--zinc-500); margin-top: 2px; }


/* ROI Grid */
.roi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.roi-item { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; padding: 24px; }
.roi-item--light { background: var(--zinc-100); border-color: var(--zinc-200); }
.roi-label { font-size: 11px; color: var(--zinc-500); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-bottom: 6px; }
.roi-value { font-size: 30px; font-weight: 800; color: #fff; letter-spacing: -0.03em; }
.roi-value--light { color: var(--zinc-900); }
.roi-sm { font-size: 14px; font-weight: 500; color: var(--zinc-500); }
.roi-note { font-size: 13px; color: var(--zinc-500); line-height: 1.6; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.06); }
.roi-note--light { border-color: var(--zinc-200); }


/* CTA */
.cta-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--zinc-900); margin-bottom: 16px; }
.cta-sub { font-size: 15px; color: var(--zinc-500); margin-bottom: 32px; }


/* Footer */
.footer { position: relative; z-index: 2; padding: 32px 40px; background: var(--black); border-top: 1px solid rgba(255,255,255,0.04); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand { font-size: 14px; font-weight: 700; color: var(--zinc-400); margin-left: 8px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 12px; color: var(--zinc-600); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--zinc-300); }
.footer-copy { font-size: 12px; color: var(--zinc-700); }


/* ═══ SUBPAGE LAYOUT ═══ */
.page-hero { position: relative; z-index: 2; padding: 140px 40px 80px; background: var(--black); text-align: center; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -0.04em; color: #fff; margin-bottom: 16px; }
.page-hero p { font-size: 17px; color: var(--zinc-400); max-width: 520px; margin: 0 auto; line-height: 1.6; }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.price-card { background: var(--zinc-100); border: 1px solid var(--zinc-200); border-radius: var(--radius); padding: 36px; transition: all 0.3s; }
.price-card:hover { border-color: var(--zinc-300); box-shadow: 0 8px 32px rgba(0,0,0,0.06); transform: translateY(-2px); }
.price-card--featured { background: var(--zinc-900); border-color: var(--emerald); color: var(--white); }
.price-card--featured .price-name { color: #fff; }
.price-card--featured .price-amount { color: var(--emerald); }
.price-card--featured .price-item { color: var(--zinc-300); border-color: rgba(255,255,255,0.08); }
.price-name { font-size: 18px; font-weight: 700; color: var(--zinc-900); margin-bottom: 4px; }
.price-tag { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--emerald); margin-bottom: 16px; }
.price-amount { font-size: 40px; font-weight: 800; color: var(--zinc-900); letter-spacing: -0.03em; margin-bottom: 4px; }
.price-period { font-size: 13px; color: var(--zinc-500); margin-bottom: 24px; }
.price-list { list-style: none; display: flex; flex-direction: column; gap: 0; margin-bottom: 28px; }
.price-item { font-size: 13px; color: var(--zinc-500); padding: 10px 0; border-bottom: 1px solid var(--zinc-200); display: flex; align-items: center; gap: 8px; }
.price-check { color: var(--emerald); font-weight: 700; }

.legal-page { position: relative; z-index: 2; padding: 140px 40px 80px; background: #fff; color: var(--zinc-900); }
.legal-page h1 { font-size: 2rem; font-weight: 800; margin-bottom: 32px; color: var(--zinc-900); }
.legal-page h2 { font-size: 1.2rem; font-weight: 700; margin: 32px 0 12px; color: var(--zinc-900); }
.legal-page p { font-size: 14px; line-height: 1.8; color: var(--zinc-500); margin-bottom: 16px; }
.legal-page ul { padding-left: 20px; margin-bottom: 16px; }
.legal-page li { font-size: 14px; line-height: 1.8; color: var(--zinc-500); margin-bottom: 4px; }


/* ═══ ANIMATIONS ═══ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}


/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .section { padding: 64px 20px; }

  /* ── Mobile: video replaces scroll animation ──
     Hero text on top, looping video below. No scroll canvas. */
  #animation-wrapper {
    position: relative;
    height: auto;
    display: flex;
    flex-direction: column;
    background: var(--black);
  }

  /* Hide scroll canvas and overlay on mobile */
  #scroll-canvas { display: none !important; }
  #canvas-overlay { display: none !important; }

  /* Show the auto-playing video */
  #mobile-video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 0;
    order: 0;
  }

  /* Hero text flows naturally above the video */
  #hero-content {
    order: -1;
    position: relative;
    height: auto;
    width: 100%;
    max-width: 100%;
    margin-top: 0;
    padding: 96px 24px 28px;
    align-items: center;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    pointer-events: auto;
    opacity: 1 !important;
    transform: none !important;
  }
  #hero-content .hero-sub { max-width: 36ch; }
  #hero-content .hero-btns { justify-content: center; }

  #nav { padding: 0 20px; }
  .nav-links { display: none; }

  .stat-row { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .fcard--large { grid-row: span 1; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .revenue-split { grid-template-columns: 1fr; gap: 40px; }
  .roi-grid { grid-template-columns: 1fr; }
  .revenue-big { font-size: 44px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 120px 20px 60px; }
  .legal-page { padding: 120px 20px 60px; }
}

@media (max-width: 480px) {
  .hero-h1 { font-size: 2.2rem; }
  .hero-sub { font-size: 15px; }
  .stat-number { font-size: 32px; }
  .revenue-big { font-size: 36px; }
  .eyebrow { font-size: 10px; }
}
