/* ==========================================================================
   RevenueAI — main.css
   Design system: deep ink + brass/gold accent, warm bone light sections,
   Fraunces display (light) + Inter body. Editorial, premium, calm.
   Reference bar: high-end boutique hospitality (Xinalani / Majahuitas).
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Colors */
  --c-ink:        #0e1521;   /* deep near-navy ink */
  --c-ink-dk:     #080c14;
  --c-ink-soft:   #17202f;
  --c-bone:       #f6f1e7;   /* warm paper */
  --c-sand:       #e7ddcb;
  --c-brass:      #c39a52;   /* muted gold */
  --c-brass-lt:   #ddc088;
  --c-teal:       #2f7d6e;   /* revenue-positive accent */
  --c-teal-lt:    #4aa896;
  --c-line:       rgba(246,241,231,0.14);
  --c-white:      #ffffff;
  --c-muted:      #9aa4b2;

  /* Typography */
  --f-display: 'Fraunces', Georgia, serif;
  --f-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  8rem;
  --space-2xl: 11rem;

  /* Motion */
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-cinematic: cubic-bezier(0.25, 0.1, 0.25, 1);

  /* Layout */
  --maxw: 1200px;
}

/* --------------------------------------------------------------------------
   1. Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: auto; /* Lenis handles smooth scroll */
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: var(--c-bone);
  background-color: var(--c-ink-dk);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }

::selection { background: var(--c-brass); color: var(--c-ink); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 3rem); }

/* --------------------------------------------------------------------------
   2. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3 { font-family: var(--f-display); font-weight: 300; line-height: 1.08; letter-spacing: -0.015em; }

.eyebrow {
  font-family: var(--f-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-brass-lt);
}

.serif-em { font-style: italic; color: var(--c-brass-lt); }

/* --------------------------------------------------------------------------
   3. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.95rem 1.7rem;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 100px;
  transition: transform .5s var(--ease-out), background-color .4s var(--ease-out), color .4s var(--ease-out), box-shadow .4s var(--ease-out);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--c-brass); color: var(--c-ink); box-shadow: 0 10px 30px -12px rgba(195,154,82,0.7); }
.btn--primary:hover { background: var(--c-brass-lt); box-shadow: 0 18px 40px -14px rgba(195,154,82,0.85); }
.btn--ghost { border: 1px solid var(--c-line); color: var(--c-bone); }
.btn--ghost:hover { border-color: var(--c-brass-lt); color: var(--c-brass-lt); }
.btn--dark { background: var(--c-ink); color: var(--c-bone); }
.btn--dark:hover { background: var(--c-ink-soft); }
.btn .arrow { transition: transform .5s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   4. Navigation
   -------------------------------------------------------------------------- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.3rem clamp(1.25rem, 5vw, 3rem);
  transition: background-color .5s var(--ease-out), backdrop-filter .5s var(--ease-out), padding .5s var(--ease-out), border-color .5s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-nav.scrolled {
  background: rgba(8,12,20,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding-top: 0.95rem; padding-bottom: 0.95rem;
  border-bottom: 1px solid var(--c-line);
}
.brand { display: flex; align-items: center; gap: 0.65rem; font-family: var(--f-display); font-size: 1.32rem; letter-spacing: -0.01em; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c-brass); box-shadow: 0 0 0 4px rgba(195,154,82,0.18); }
.brand b { font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a.navlink { font-size: 0.9rem; color: var(--c-muted); transition: color .3s var(--ease-out); }
.nav-links a.navlink:hover { color: var(--c-bone); }
.nav-cta { padding: 0.6rem 1.2rem; font-size: 0.85rem; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--c-bone); transition: transform .4s var(--ease-out), opacity .3s; }

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding: 8rem 0 4rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(1100px 700px at 78% 18%, rgba(195,154,82,0.16), transparent 60%),
    radial-gradient(900px 600px at 12% 88%, rgba(47,125,110,0.18), transparent 62%),
    linear-gradient(160deg, var(--c-ink) 0%, var(--c-ink-dk) 100%);
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0; opacity: 0.35;
  background-image:
    linear-gradient(var(--c-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--c-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 60% 40%, black, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 60% 40%, black, transparent 72%);
}
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero-copy { max-width: 40ch; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); margin: 1.4rem 0 1.4rem; }
.hero p.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: #cdd4de; max-width: 42ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }
.hero-note { margin-top: 1.5rem; font-size: 0.82rem; color: var(--c-muted); display: flex; align-items: center; gap: 0.5rem; }
.hero-note .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--c-teal-lt); box-shadow: 0 0 0 0 rgba(74,168,150,0.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74,168,150,0.55);} 70% { box-shadow: 0 0 0 10px rgba(74,168,150,0);} 100% { box-shadow: 0 0 0 0 rgba(74,168,150,0);} }

/* Hero product mock — dashboard card */
.hero-mock { position: relative; }
.mock-card {
  background: linear-gradient(180deg, rgba(23,32,47,0.94), rgba(14,21,33,0.94));
  border: 1px solid var(--c-line);
  border-radius: 18px;
  padding: 1.35rem;
  box-shadow: 0 40px 90px -40px rgba(0,0,0,0.8);
  backdrop-filter: blur(6px);
}
.mock-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.mock-head .m-title { font-family: var(--f-display); font-size: 1.05rem; }
.mock-head .m-live { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-teal-lt); display: flex; align-items: center; gap: 0.4rem; }
.mock-head .m-live .pulse { width: 7px; height: 7px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; margin-bottom: 1rem; }
.kpi { background: rgba(255,255,255,0.03); border: 1px solid var(--c-line); border-radius: 12px; padding: 0.85rem 0.9rem; }
.kpi .k-label { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-muted); }
.kpi .k-value { font-family: var(--f-display); font-size: 1.55rem; margin-top: 0.15rem; }
.kpi .k-sub { font-size: 0.68rem; color: var(--c-muted); }
.kpi .k-value.pos { color: var(--c-teal-lt); }
.alerts-title { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-muted); margin: 0.4rem 0 0.6rem; }
.alert-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.55rem 0; border-top: 1px solid var(--c-line); }
.alert-row:first-of-type { border-top: none; }
.alert-row .a-unit { font-size: 0.82rem; font-weight: 500; }
.alert-row .a-reason { font-size: 0.72rem; color: var(--c-muted); }
.alert-row .a-rate { font-family: var(--f-display); font-size: 0.98rem; color: var(--c-brass-lt); white-space: nowrap; }
.mock-glow { position: absolute; inset: -30px; z-index: -1; background: radial-gradient(closest-side, rgba(195,154,82,0.22), transparent); filter: blur(20px); }

/* --------------------------------------------------------------------------
   6. Section scaffolding
   -------------------------------------------------------------------------- */
section { position: relative; }
.section { padding: clamp(4.5rem, 11vw, 9rem) 0; }
.section--bone { background: var(--c-bone); color: var(--c-ink); }
.section--bone .eyebrow { color: var(--c-brass); }
.section--bone .serif-em { color: var(--c-brass); }
.section-head { max-width: 46ch; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.section-head h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); margin-top: 1rem; }
.section-head p { margin-top: 1.1rem; color: var(--c-muted); font-size: 1.05rem; }
.section--bone .section-head p { color: #5c6470; }

.reveal { opacity: 0; transform: translateY(28px); }

/* --------------------------------------------------------------------------
   7. Problem
   -------------------------------------------------------------------------- */
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.prob-card {
  background: var(--c-ink-soft);
  border: 1px solid var(--c-line);
  border-radius: 16px;
  padding: 1.8rem 1.6rem;
}
.prob-card .p-num { font-family: var(--f-display); font-size: 2.2rem; color: var(--c-brass-lt); }
.prob-card h3 { font-size: 1.3rem; margin: 0.6rem 0 0.6rem; }
.prob-card p { font-size: 0.96rem; color: var(--c-muted); }

/* --------------------------------------------------------------------------
   8. How it works — steps
   -------------------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.step {
  position: relative;
  border-top: 1px solid rgba(14,21,33,0.14);
  padding-top: 1.4rem;
}
.step .s-idx { font-family: var(--f-display); font-size: 0.95rem; color: var(--c-brass); letter-spacing: 0.05em; }
.step h3 { font-size: 1.35rem; margin: 0.9rem 0 0.6rem; }
.step p { font-size: 0.95rem; color: #5c6470; }
.step .s-line { position: absolute; top: -1px; left: 0; height: 2px; width: 0; background: var(--c-brass); transition: width 1.1s var(--ease-out); }

/* --------------------------------------------------------------------------
   9. Features — what you get
   -------------------------------------------------------------------------- */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.3rem; }
.feat {
  display: grid; grid-template-columns: auto 1fr; gap: 1.1rem;
  background: var(--c-ink-soft);
  border: 1px solid var(--c-line);
  border-radius: 16px;
  padding: 1.6rem 1.5rem;
  transition: border-color .4s var(--ease-out), transform .5s var(--ease-out);
}
.feat:hover { border-color: rgba(195,154,82,0.5); transform: translateY(-3px); }
.feat .f-icon {
  width: 44px; height: 44px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(195,154,82,0.12); color: var(--c-brass-lt);
}
.feat h3 { font-size: 1.18rem; margin-bottom: 0.4rem; }
.feat p { font-size: 0.94rem; color: var(--c-muted); }

/* --------------------------------------------------------------------------
   10. Who it's for
   -------------------------------------------------------------------------- */
.segments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.seg {
  border: 1px solid rgba(14,21,33,0.14);
  border-radius: 16px; padding: 1.8rem 1.6rem;
  background: rgba(255,255,255,0.5);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.seg:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgba(14,21,33,0.4); }
.seg .s-tag { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--c-brass); }
.seg h3 { font-size: 1.45rem; margin: 0.7rem 0 0.7rem; }
.seg p { font-size: 0.95rem; color: #5c6470; }

/* --------------------------------------------------------------------------
   11. Live demo band
   -------------------------------------------------------------------------- */
.demo-band { position: relative; overflow: hidden; background: var(--c-ink); }
.demo-band .wrap { position: relative; z-index: 2; text-align: center; padding-top: clamp(4rem, 9vw, 7rem); padding-bottom: clamp(4rem, 9vw, 7rem); }
.demo-band h2 { font-size: clamp(2.1rem, 5vw, 3.6rem); margin: 1rem auto 1.2rem; max-width: 18ch; }
.demo-band p { color: var(--c-muted); max-width: 52ch; margin: 0 auto 2rem; }
.demo-glow {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(700px 400px at 50% 0%, rgba(195,154,82,0.2), transparent 65%),
    radial-gradient(600px 400px at 50% 100%, rgba(47,125,110,0.18), transparent 65%);
}
.demo-props { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.6rem; }
.demo-props .chip { font-size: 0.78rem; color: var(--c-muted); border: 1px solid var(--c-line); border-radius: 100px; padding: 0.4rem 0.95rem; }

/* --------------------------------------------------------------------------
   12. Contact / CTA
   -------------------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.contact h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.contact p { color: var(--c-muted); margin-top: 1.1rem; max-width: 42ch; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.contact-card {
  background: var(--c-ink-soft); border: 1px solid var(--c-line);
  border-radius: 18px; padding: 2rem;
}
.contact-card .cc-row { display: flex; align-items: flex-start; gap: 0.9rem; padding: 1rem 0; border-top: 1px solid var(--c-line); }
.contact-card .cc-row:first-child { border-top: none; padding-top: 0; }
.contact-card .cc-icon { color: var(--c-brass-lt); margin-top: 2px; }
.contact-card .cc-label { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-muted); }
.contact-card .cc-value { font-size: 1.02rem; }
.contact-card a.cc-value:hover { color: var(--c-brass-lt); }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--c-ink-dk); border-top: 1px solid var(--c-line); padding: 3.5rem 0 2.5rem; }
.footer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.footer-brand { max-width: 34ch; }
.footer-brand p { color: var(--c-muted); font-size: 0.92rem; margin-top: 0.8rem; }
.footer-cols { display: flex; gap: 3.5rem; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--f-body); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--c-muted); margin-bottom: 0.9rem; }
.footer-col a { display: block; font-size: 0.92rem; color: #c3cbd6; padding: 0.28rem 0; transition: color .3s; }
.footer-col a:hover { color: var(--c-brass-lt); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.8rem; border-top: 1px solid var(--c-line); font-size: 0.8rem; color: var(--c-muted); }

/* --------------------------------------------------------------------------
   14. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-mock { max-width: 460px; }
  .problem-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .features { grid-template-columns: 1fr; }
  .segments { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1.4rem;
    position: fixed; top: 0; right: 0; bottom: 0; width: 78%;
    background: var(--c-ink); padding: 6rem 2rem 2rem; z-index: 99;
    border-left: 1px solid var(--c-line);
  }
  .steps { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
}

/* --------------------------------------------------------------------------
   15. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .step .s-line { width: 100% !important; }
  .hero-note .pulse, .mock-head .m-live .pulse { animation: none !important; }
}

/* ============================ VIDEO WALKTHROUGH ============================ */
.video-frame {
  max-width: 860px;
  margin: 2.5rem auto 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--c-ink);
  border: 1px solid rgba(14,21,33,0.12);
  box-shadow: 0 30px 70px -30px rgba(14,21,33,0.55), 0 8px 24px -12px rgba(14,21,33,0.35);
  line-height: 0;
}
.video-frame video {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--c-ink);
}
@media (max-width: 640px) {
  .video-frame { margin-top: 1.75rem; border-radius: 12px; }
}

/* Video sitting as the hero visual */
.hero-mock .video-frame { margin: 0; width: 100%; max-width: 100%; box-shadow: 0 40px 90px -40px rgba(0,0,0,0.7), 0 10px 30px -12px rgba(0,0,0,0.5); border-color: rgba(246,241,231,0.10); }
