/* ============================================================
   MonkeyWorks — ink dark + banana accent
   Motion layer: scroll-driven, reduced-motion safe, no-JS safe.
   ============================================================ */

:root {
  --bg: #0d0f12;
  --bg-alt: #12151a;
  --surface: #171b21;
  --surface-2: #1b202a;
  --border: #262c35;
  --border-soft: rgba(255, 255, 255, 0.07);
  --text: #e8eaed;
  --muted: #9aa3ae;
  --accent: #f5b301;
  --accent-hi: #ffd15c;
  --accent-soft: rgba(245, 179, 1, 0.12);
  --radius: 16px;
  --radius-lg: 26px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  /* Motion: long-tail expo-out — fast start, settled finish. */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --nav-h: 68px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 600; max-width: 660px; margin-bottom: 40px; }
h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }

a { color: var(--accent); text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.accent { color: var(--accent); }

.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.6;
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.7s var(--ease-out) 0.1s;
}
.is-in .eyebrow::before, .eyebrow.is-in::before { transform: scaleX(1); }
html:not(.motion) .eyebrow::before { transform: scaleX(1); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #0d0f12; padding: 10px 18px; border-radius: 0 0 10px 0;
  font-family: var(--font-head); font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ============================================================
   Ambient backdrop — fixed, parallaxed, brightness-capped
   ============================================================ */
.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.backdrop__grid {
  position: absolute; inset: -60% -20%;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 0%, transparent 78%);
}
.backdrop__blob {
  position: absolute; border-radius: 50%; filter: blur(10px);
}
/* Peak alpha held at 0.14 so the glow never lifts the page above ~#1a1a16. */
.backdrop__blob--a {
  top: -260px; right: -180px; width: 720px; height: 720px;
  background: radial-gradient(circle, rgba(245,179,1,.14) 0%, rgba(245,179,1,.05) 42%, transparent 68%);
}
.backdrop__blob--b {
  top: 46%; left: -300px; width: 640px; height: 640px;
  background: radial-gradient(circle, rgba(120,150,255,.08) 0%, transparent 66%);
}
.backdrop__blob--c {
  bottom: -240px; right: -120px; width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(245,179,1,.09) 0%, transparent 65%);
}

/* ============================================================
   Nav
   ============================================================ */
.nav-wrap {
  position: sticky; top: 0; z-index: 60;
  background: rgba(13, 15, 18, 0.6);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: background 0.45s var(--ease-out), border-color 0.45s var(--ease-out);
}
.nav-wrap.is-scrolled {
  background: rgba(13, 15, 18, 0.82);
  border-bottom-color: var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h);
  transition: height 0.45s var(--ease-out);
}
.nav-wrap.is-scrolled .nav { height: 58px; }

.progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  transform: scaleX(var(--page-p, 0));
  transform-origin: 0 50%;
  opacity: 0; transition: opacity 0.4s var(--ease-out);
}
.nav-wrap.is-scrolled .progress { opacity: 1; }

.logo {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--font-head); font-size: 1.2rem; color: var(--text);
  letter-spacing: -0.02em;
}
.logo__mark { width: 30px; height: 30px; color: var(--accent); flex: none; display: block; }
.logo__mark path { transition: stroke-dashoffset 1.4s var(--ease-out); }
.logo__word { font-weight: 600; }
.logo__word b { font-weight: 700; }
.logo__word span { font-weight: 400; }
.logo:hover .logo__mark { color: var(--accent-hi); }
.logo__mark { transition: color 0.3s var(--ease-out), transform 0.5s var(--ease-out); }
.logo:hover .logo__mark { transform: rotate(-6deg); }

.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a:not(.btn) {
  color: var(--muted); font-weight: 500; font-size: 0.95rem;
  transition: color 0.25s var(--ease-out); position: relative;
}
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform 0.4s var(--ease-out);
}
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-links a:not(.btn):hover::after { transform: scaleX(1); transform-origin: 0 50%; }
.nav-links a.is-active { color: var(--text); }
.nav-links a.is-active::after { transform: scaleX(1); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: transform 0.35s var(--ease-out), opacity 0.2s; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  position: relative; overflow: hidden;
  display: inline-block;
  background: var(--accent);
  color: #0d0f12;
  font-family: var(--font-head);
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 999px;
  border: 0;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), background 0.3s;
}
.btn::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(245, 179, 1, 0.22); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0); }
.btn-small { padding: 10px 20px; font-size: 0.9rem; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); box-shadow: none; color: var(--accent); }
.btn-ghost::after { display: none; }
.btn-full { width: 100%; }

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; overflow: hidden; padding: 120px 0 96px; }
.hero-inner { max-width: 880px; }
.hero .lede { font-size: 1.2rem; color: var(--muted); margin: 26px 0 38px; max-width: 580px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* Line-mask reveal for the headline */
.line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.line > span { display: block; }
html.motion .line > span { transform: translate3d(0, 110%, 0); transition: transform 1.05s var(--ease-out) var(--delay, 0s); }
html.motion .is-in .line > span { transform: none; }

/* Scroll-linked hero depth: content recedes as the page moves on. */
html.motion .hero-inner {
  transform: translate3d(0, calc(var(--hero-p, 0) * 72px), 0) scale(calc(1 - var(--hero-p, 0) * 0.035));
  opacity: calc(1 - var(--hero-p, 0) * 1.15);
  will-change: transform, opacity;
}

.hero-scroll {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 0.85rem; font-family: var(--font-head);
  letter-spacing: 0.08em; text-transform: uppercase; margin-top: 54px;
}
.hero-scroll i {
  display: block; position: relative; overflow: hidden;
  width: 1px; height: 34px; background: rgba(255, 255, 255, 0.13);
}
.hero-scroll i::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent, var(--accent));
}
html.motion .hero-scroll i::after { animation: drip 2.4s var(--ease-io) infinite; }
@keyframes drip {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

/* Oversized ghost of the mark — the deepest parallax layer in the hero. */
.hero-ghost {
  position: absolute; top: 16%; right: -11%;
  width: min(40vw, 470px); height: auto;
  color: rgba(245, 179, 1, 0.055);
  pointer-events: none; z-index: 0;
}
@media (max-width: 900px) { .hero-ghost { display: none; } }

/* Column that drifts against its neighbour to separate the two planes. */
.depth { position: relative; }

/* ============================================================
   Marquee strip
   ============================================================ */
.strip {
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: rgba(18, 21, 26, 0.7);
  overflow: hidden; position: relative; z-index: 1;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee { display: flex; width: max-content; padding: 18px 0; }
html.motion .marquee { animation: marquee 38s linear infinite; }
.marquee__group {
  display: flex; align-items: center; gap: 18px; padding-right: 18px;
  font-family: var(--font-head); font-weight: 500; color: var(--muted); font-size: 0.95rem;
  white-space: nowrap;
}
.marquee__group .dot { color: var(--accent); }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }
/* Scroll nudges the belt — motion answers the user's input. */
html.motion .strip__shift { display: block; transform: translate3d(calc(var(--marq, 0) * 1px), 0, 0); }
html:not(.motion) .marquee { width: 100%; flex-wrap: wrap; justify-content: center; }
html:not(.motion) .marquee__group:last-child { display: none; }

/* ============================================================
   Sections
   ============================================================ */
.section { padding: 104px 0; position: relative; z-index: 1; }
.section-alt { background: rgba(18, 21, 26, 0.72); }
.section-alt, .section-contact { border-top: 1px solid var(--border-soft); }
/* Hairline seam that draws itself in as the section arrives. */
.seam {
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,179,1,.5), transparent);
  transform: scaleX(0); transform-origin: 50% 50%;
  transition: transform 1.2s var(--ease-out);
}
.section.is-in > .seam { transform: scaleX(1); }
html:not(.motion) .seam { transform: scaleX(1); }

/* ============================================================
   Services grid
   ============================================================ */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.5s var(--ease-out), border-color 0.4s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
/* Pointer-tracked spotlight — a material that reacts to where you are. */
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgba(245,179,1,.10), transparent 62%);
  opacity: 0; transition: opacity 0.45s var(--ease-out);
}
.card:hover { transform: translateY(-5px); border-color: rgba(245,179,1,.45); box-shadow: 0 18px 44px rgba(0,0,0,.38); }
.card:hover::before { opacity: 1; }
.card p { color: var(--muted); font-size: 0.95rem; }
.card-icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  transition: transform 0.5s var(--ease-out), background 0.4s;
}
.card:hover .card-icon { transform: translateY(-2px) scale(1.06); background: rgba(245,179,1,.18); }
.card-icon svg { width: 24px; height: 24px; }

/* ============================================================
   Process — scroll-linked rail
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; position: relative; }
.steps::before, .steps::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
}
.steps::before { background: var(--border); }
.steps::after {
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  transform: scaleX(var(--rail-p, 0)); transform-origin: 0 50%;
}
html:not(.motion) .steps::after { transform: scaleX(1); }
.steps li { padding: 26px 20px 0; position: relative; }
.steps li::before {
  content: ""; position: absolute; top: -4px; left: 0; width: 10px; height: 10px;
  border-radius: 50%; background: var(--border);
  transition: background 0.45s var(--ease-out), transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}
.steps li.is-past::before { background: var(--accent); transform: scale(1.25); box-shadow: 0 0 0 5px rgba(245,179,1,.14); }
.step-num {
  font-family: var(--font-head); font-weight: 700; color: var(--muted);
  font-size: 0.9rem; letter-spacing: 0.1em; display: block; margin-bottom: 12px;
  transition: color 0.45s var(--ease-out);
}
.steps li.is-past .step-num { color: var(--accent); }
.steps p { color: var(--muted); font-size: 0.95rem; }

/* ============================================================
   About
   ============================================================ */
.why-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: start; }
.lede-small { color: var(--muted); font-size: 1.05rem; max-width: 440px; }
.why-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.why-list h3 { position: relative; padding-left: 18px; }
.why-list h3::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.why-list p { color: var(--muted); font-size: 0.95rem; }

/* ============================================================
   Contact
   ============================================================ */
.section-contact { background: rgba(18, 21, 26, 0.72); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: start; }
.contact-mail { margin-top: 20px; color: var(--muted); }
.form {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px;
  box-shadow: 0 24px 60px rgba(0,0,0,.32);
}
.form label { display: block; font-weight: 500; font-size: 0.9rem; margin-bottom: 16px; color: var(--text); }
.form input, .form select, .form textarea {
  display: block; width: 100%; margin-top: 6px;
  background: rgba(13, 15, 18, 0.75); color: var(--text);
  border: 1px solid var(--border); border-radius: 11px;
  padding: 12px 14px; font-family: var(--font-body); font-size: 0.95rem;
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background 0.3s;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,179,1,.14); background: rgba(13,15,18,.95);
}
.form textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hidden-field { position: absolute; left: -9999px; }

/* ============================================================
   Footer
   ============================================================ */
.footer { border-top: 1px solid var(--border-soft); padding: 34px 0; position: relative; z-index: 1; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner p { color: var(--muted); font-size: 0.9rem; }
.logo-footer { font-size: 1.05rem; }
.logo-footer .logo__mark { width: 26px; height: 26px; }

/* ---------- Thanks / 404 ---------- */
.center-page { min-height: 78vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 40px 24px; position: relative; z-index: 1; }
.center-page h1 { margin-bottom: 16px; font-size: clamp(2rem, 5vw, 3rem); }
.center-page p { color: var(--muted); margin-bottom: 28px; }
.center-page .logo { margin-bottom: 28px; }

/* ============================================================
   Reveal system — opt-in, JS-gated, reduced-motion safe
   ============================================================ */
html.motion [data-reveal] {
  opacity: 0;
  transform: translate3d(var(--rx, 0), var(--ry, 30px), 0);
  transition:
    opacity 0.85s var(--ease-out) var(--delay, 0s),
    transform 0.95s var(--ease-out) var(--delay, 0s);
}
html.motion [data-reveal].is-in { opacity: 1; transform: none; }
html.motion [data-parallax] { transform: translate3d(0, calc(var(--p, 0) * 1px), 0); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .why-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 92px 0 76px; }
}

@media (max-width: 640px) {
  .hero { padding: 72px 0 60px; }
  .section { padding: 72px 0; }
  .grid, .steps, .why-list, .form-row { grid-template-columns: 1fr; }
  .steps::before, .steps::after { display: none; }
  .steps li { padding: 22px 0 0 22px; border-left: 2px solid var(--border); }
  .steps li::before { top: 20px; left: -6px; }
  .form { padding: 24px; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start;
    background: rgba(18, 21, 26, 0.97);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 22px 24px; gap: 18px;
  }
  .nav-links.open { display: flex; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Hard stop: user asked the OS for less motion — honour it everywhere. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Legal pages (/terms/, /privacy/, /refunds/) + expanded footer
   ============================================================ */
.legal { padding: calc(var(--nav-h) + 72px) 0 96px; position: relative; z-index: 1; }
.legal__head { max-width: 720px; margin-bottom: 56px; }
.legal__head h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); margin-bottom: 18px; }
.legal__updated { color: var(--muted); font-size: 0.9rem; }
.legal__note {
  margin-top: 26px; padding: 16px 18px; border-radius: var(--radius);
  background: var(--accent-soft); border: 1px solid rgba(245, 179, 1, 0.28);
  color: var(--text); font-size: 0.92rem; line-height: 1.6;
}
.legal__body { max-width: 760px; }
.legal__body section { margin-bottom: 44px; scroll-margin-top: calc(var(--nav-h) + 24px); }
.legal__body h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.55rem); margin-bottom: 16px; max-width: none;
  padding-bottom: 12px; border-bottom: 1px solid var(--border-soft);
}
.legal__body h3 { margin: 26px 0 8px; font-size: 1.02rem; }
.legal__body p, .legal__body li { color: var(--muted); line-height: 1.75; font-size: 0.97rem; }
.legal__body p { margin-bottom: 14px; }
.legal__body ul { margin: 0 0 16px; padding-left: 22px; }
.legal__body li { margin-bottom: 8px; }
.legal__body a { color: var(--accent); }
.legal__body strong { color: var(--text); font-weight: 600; }
.legal__toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 48px; }
.legal__toc a {
  font-size: 0.85rem; color: var(--muted); text-decoration: none;
  padding: 7px 13px; border: 1px solid var(--border); border-radius: 999px;
  transition: color .3s var(--ease-out), border-color .3s var(--ease-out);
}
.legal__toc a:hover { color: var(--accent); border-color: rgba(245, 179, 1, 0.45); }

/* Placeholder tokens Marc still has to fill in — visibly flagged, not hidden. */
.fill {
  color: var(--accent); font-family: var(--font-head); font-weight: 600;
  background: var(--accent-soft); border-radius: 5px; padding: 0 5px;
  white-space: nowrap;
}

/* Expanded footer: legal identity block + policy links */
.footer-legal { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border-soft); }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; list-style: none; margin-bottom: 16px; padding: 0; }
.footer-links a { color: var(--muted); font-size: 0.88rem; text-decoration: none; transition: color .3s var(--ease-out); }
.footer-links a:hover { color: var(--accent); }
.footer-addr { color: var(--muted); font-size: 0.86rem; margin-bottom: 10px; }
.footer-desc { color: var(--muted); font-size: 0.84rem; line-height: 1.65; max-width: 720px; opacity: 0.85; }
@media (max-width: 640px) {
  .legal { padding-top: calc(var(--nav-h) + 44px); }
  .footer-links { gap: 14px; }
}
