/* =====================================================================
   Mbros Digital — main.css
   Design system: "The Working Blueprint"
   Two-tone (Cosmic + Vanilla), flat (no shadows), Syne / Inter / JetBrains Mono
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Color */
  --bg: #F1FEC8;
  --vanilla: #F1FEC8;
  --cosmic: #23212C;
  --paper: #FBFCEF;
  --paper-deep: #F6F7E4; /* gradient depth for Paper surfaces (Crisp Gradient Rule) */
  --ash: #6E6E68;
  --ink: #2E2C37;
  --hero-ink: #141319; /* photographic dark base + scrim behind the portrait hero */

  --line: rgba(35, 33, 44, 0.14);
  --line-strong: rgba(35, 33, 44, 0.28);
  --cosmic-70: rgba(35, 33, 44, 0.70);
  --cosmic-muted: rgba(35, 33, 44, 0.66); /* AA-safe (>=4.5:1 on Vanilla/Paper) for small labels & captions */

  /* Type families */
  --font-display: 'Syne', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Type scale — documented in DESIGN.md.
     Display (fluid clamps) */
  --fs-hero: clamp(2.3rem, 1.25rem + 4.5vw, 4.75rem);
  --fs-booktitle: clamp(1.9rem, 1.3rem + 3vw, 3.5rem);
  --fs-quote: clamp(1.6rem, 1.1rem + 2.6vw, 3rem);
  --fs-h2: clamp(1.9rem, 1.2rem + 3vw, 3.25rem);
  --fs-feature-h3: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --fs-tools: clamp(1.05rem, 0.9rem + 0.6vw, 1.4rem);
  --fs-h3: clamp(1.15rem, 1rem + 0.7vw, 1.45rem);
  --fs-faq: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem);
  --fs-lead: clamp(1.05rem, 0.98rem + 0.4vw, 1.3rem);
  /* Fixed steps */
  --fs-2xl: 1.6rem;
  --fs-xl: 1.25rem;
  --fs-lg: 1.05rem;
  --fs-body: 1.0625rem;
  --fs-sm: 0.95rem;
  --fs-xs: 0.85rem;
  /* Mono / utility steps */
  --fs-mono: 0.78rem;
  --fs-mono-md: 0.82rem;
  --fs-mono-sm: 0.72rem;
  --fs-mono-xs: 0.68rem;

  /* Spacing */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2rem;
  --sp-6: 3rem;
  --sp-8: 4rem;
  --sp-section: clamp(4.5rem, 3rem + 7vw, 9rem);
  --container: 1180px;
  --container-narrow: 780px;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* Easing / duration */
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 0.16s;
  --dur-mid: 0.28s;

  /* Z-index scale */
  --z-base: 1;
  --z-sticky: 100;
  --z-nav: 200;
  --z-menu: 300;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Lenis smooth-scroll (disables native smooth so the two don't fight) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--cosmic);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  overflow-x: hidden;
}

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

/* Focus */
:focus-visible {
  outline: 2px solid var(--cosmic);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: var(--z-menu);
  background: var(--cosmic);
  color: var(--vanilla);
  padding: 10px 16px;
  border-radius: var(--r-sm);
  transition: top var(--dur-mid) var(--ease-quart);
}
.skip-link:focus { top: 12px; }

/* ---------- Custom cursor: small invert dot (desktop only) ---------- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference; /* reverses the colour of whatever is beneath it */
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: width 0.22s var(--ease-quart),
              height 0.22s var(--ease-quart),
              opacity 0.2s linear;
  will-change: transform;
}
.cursor.is-on { opacity: 1; }
.cursor.is-hover { width: 34px; height: 34px; } /* subtle grow over links/buttons */

@media (hover: hover) and (pointer: fine) {
  html.has-custom-cursor,
  html.has-custom-cursor * { cursor: none !important; }
}

/* ---------- Shared type ---------- */
.mono-tag {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--cosmic-70);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--cosmic);
}

.section-lead {
  font-size: var(--fs-lead);
  color: var(--cosmic-70);
  max-width: 60ch;
  text-wrap: pretty;
}

/* ---------- Highlight: calls out the problem/solution words inside grey copy ---------- */
.hl { color: var(--cosmic); font-weight: 600; }
.hero .hl { color: var(--vanilla); font-weight: 600; } /* light variant for the dark hero */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1;
  padding: 0.85rem 1.5rem;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: background var(--dur-mid) var(--ease-quart),
              color var(--dur-mid) var(--ease-quart),
              transform var(--dur-fast) var(--ease-quart),
              border-color var(--dur-mid) var(--ease-quart);
  white-space: nowrap;
}
.btn--lg { padding: 1.05rem 1.9rem; font-size: var(--fs-lg); }

.btn--primary {
  background: var(--cosmic);
  color: var(--vanilla);
}
.btn--primary:hover { background: var(--ink); transform: translateY(-2px); }
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--cosmic);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--cosmic); transform: translateY(-2px); }

/* ---------- Layout helpers ---------- */
main > section {
  padding-inline: clamp(1.25rem, 5vw, 3.5rem);
  margin-inline: auto;
  max-width: var(--container);
}

/* ===================================================================
   NAV
   =================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-mid) var(--ease-quart),
              background var(--dur-mid) var(--ease-quart);
}
.nav.is-scrolled { border-bottom-color: var(--line); }

.nav__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 0.9rem clamp(1.25rem, 5vw, 3.5rem);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-xl);
  letter-spacing: -0.02em;
  color: var(--cosmic);
  margin-right: auto;
}

.nav__links {
  display: flex;
  gap: 1.75rem;
  font-size: var(--fs-sm);
}
.nav__links a {
  color: var(--cosmic-70);
  position: relative;
  padding: 4px 0;
  transition: color var(--dur-mid) var(--ease-quart);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1.5px;
  background: var(--cosmic);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-mid) var(--ease-quart);
}
.nav__links a:hover { color: var(--cosmic); }
.nav__links a:hover::after { transform: scaleX(1); }

.nav__toggle { display: none; }

.nav__mobile {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem clamp(1.25rem, 5vw, 3.5rem) 1.25rem;
  border-top: 1px solid var(--line);
}
/* Plain links only — must not recolor the CTA button (would make dark text on a dark button) */
.nav__mobile a:not(.btn) { padding: 0.7rem 0; color: var(--cosmic); font-size: var(--fs-lg); }
.nav__mobile .btn { margin-top: 0.5rem; }

/* ===================================================================
   HERO
   =================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
  /* Fill exactly one viewport below the sticky nav, so the whole hero is visible on load.
     --nav-h is set by JS from the real nav height; 72px is a close pre-JS fallback. */
  min-height: calc(100vh - var(--nav-h, 72px));
  min-height: calc(100svh - var(--nav-h, 72px));
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--hero-ink);
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* Mood stand-in until assets/img/paras-hero.jpg is added: dark frame with a
     soft green glow from the left, echoing the portrait so the layout reads now.
     The <img> above covers this completely once the real photo loads. */
  background:
    radial-gradient(115% 95% at 14% 46%, rgba(193, 214, 138, 0.26), transparent 56%),
    linear-gradient(90deg, #191d15 0%, #201f26 46%, var(--hero-ink) 100%);
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 32%; /* keeps the subject (right of frame) in view on any crop */
}
.hero__scrim {
  position: absolute;
  inset: 0;
  /* Darkens the left where the copy sits, so light text always clears AA over any photo */
  background: linear-gradient(90deg,
    rgba(15, 14, 19, 0.92) 0%,
    rgba(15, 14, 19, 0.74) 32%,
    rgba(15, 14, 19, 0.30) 60%,
    rgba(15, 14, 19, 0.04) 100%);
}
.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3.5rem);
  padding-block: clamp(1.25rem, 0.75rem + 1.5vw, 2.25rem);
}
.hero .mono-tag { margin-bottom: 1.5rem; }

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-hero);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 16ch;
  color: var(--cosmic);
}

.hero__lead {
  margin-top: 1.5rem;
  font-size: var(--fs-lead);
  color: var(--cosmic-70);
  max-width: 54ch;
  text-wrap: pretty;
}

.hero__cta {
  margin-top: 2.25rem;
  display: flex;
  align-items: center;
  gap: 1rem 1.25rem;
  flex-wrap: wrap;
}
.hero__chat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  color: var(--cosmic);
  border-bottom: 1.5px solid var(--line-strong);
  padding-bottom: 2px;
  transition: border-color var(--dur-mid) var(--ease-quart), gap var(--dur-mid) var(--ease-quart);
}
.hero__chat:hover { border-color: var(--cosmic); gap: 0.65rem; }

/* ---------- Flow-line signature ---------- */
.flowline {
  margin-top: clamp(3rem, 2rem + 5vw, 5.5rem);
}
.flowline__track {
  display: flex;
  align-items: center;
  gap: 0;
}
.flowline__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  flex: 0 0 auto;
}
.flowline__dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cosmic);
  position: relative;
}
.flowline__name {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cosmic);
}
.flowline__seg {
  flex: 1 1 auto;
  height: 2px;
  background: var(--line);
  position: relative;
  min-width: 40px;
  margin-bottom: 1.8rem; /* aligns segment with dot row, above labels */
}
.flowline__seg > i {
  position: absolute;
  inset: 0;
  background: var(--cosmic);
  transform: scaleX(0);
  transform-origin: left;
}

/* --- Live pulse: a signal packet travels the line left -> right, and each
   node pings as the packet passes. Runs only after the line is drawn (.is-live). --- */
.flowline__dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px solid var(--cosmic);
  opacity: 0;
  pointer-events: none;
}
.flowline__seg::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--cosmic);
  opacity: 0;
  pointer-events: none;
}
.flowline.is-live .flowline__seg::after { animation: fl-packet-a 2.8s linear infinite; }
.flowline.is-live .flowline__seg:last-of-type::after { animation-name: fl-packet-b; }
.flowline.is-live .flowline__step .flowline__dot::after {
  animation-duration: 2.8s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}
.flowline.is-live .flowline__step[data-node="1"] .flowline__dot::after { animation-name: fl-ring-1; }
.flowline.is-live .flowline__step[data-node="2"] .flowline__dot::after { animation-name: fl-ring-2; }
.flowline.is-live .flowline__step[data-node="3"] .flowline__dot::after { animation-name: fl-ring-3; }

/* Packet crosses segment 1 first (0-44%), then segment 2 (48-92%): continuous left -> right */
@keyframes fl-packet-a {
  0%   { left: 0%;   opacity: 0; }
  6%   { opacity: 1; }
  38%  { opacity: 1; }
  44%  { left: 100%; opacity: 0; }
  100% { left: 100%; opacity: 0; }
}
@keyframes fl-packet-b {
  0%, 48% { left: 0%; opacity: 0; }
  54% { opacity: 1; }
  86% { opacity: 1; }
  92% { left: 100%; opacity: 0; }
  100% { left: 100%; opacity: 0; }
}
/* Node rings ping in sequence as the packet arrives: node1 at start, node2 mid, node3 end */
@keyframes fl-ring-1 {
  0%   { transform: scale(0.55); opacity: 0.5; }
  16%  { transform: scale(1.75); opacity: 0; }
  100% { transform: scale(1.75); opacity: 0; }
}
@keyframes fl-ring-2 {
  0%, 40% { transform: scale(0.55); opacity: 0; }
  42% { transform: scale(0.55); opacity: 0.5; }
  58% { transform: scale(1.75); opacity: 0; }
  100% { transform: scale(1.75); opacity: 0; }
}
@keyframes fl-ring-3 {
  0%, 88% { transform: scale(0.55); opacity: 0; }
  90% { transform: scale(0.55); opacity: 0.5; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* ---------- Hero sits on a dark portrait: flip text + controls to light ---------- */
.hero .mono-tag { color: rgba(241, 254, 200, 0.88); }
.hero__title { color: var(--vanilla); }
.hero__lead { color: rgba(251, 252, 239, 0.9); }

.hero__cta .btn--primary { background: var(--vanilla); color: var(--cosmic); }
.hero__cta .btn--primary:hover { background: var(--bg); }
.hero__cta .btn--ghost { color: var(--vanilla); border-color: rgba(241, 254, 200, 0.45); }
.hero__cta .btn--ghost:hover { border-color: var(--vanilla); }

.hero__chat { color: var(--vanilla); border-bottom-color: rgba(241, 254, 200, 0.4); }
.hero__chat:hover { border-color: var(--vanilla); }

/* Flow-line, light variant — kept inside the dark-scrimmed left region */
.hero .flowline { max-width: 560px; margin-top: clamp(1.5rem, 1rem + 1.5vw, 2.75rem); }
.hero .flowline__dot { background: var(--vanilla); }
.hero .flowline__name { color: rgba(241, 254, 200, 0.9); }
.hero .flowline__seg { background: rgba(241, 254, 200, 0.22); }
.hero .flowline__seg > i { background: var(--vanilla); }
.hero .flowline__dot::after { border-color: var(--vanilla); }
.hero .flowline__seg::after { background: var(--vanilla); }

/* ===================================================================
   TOOLS / CAPABILITY STRIP
   =================================================================== */
.tools {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: var(--sp-4);
  margin-top: var(--sp-6);
}
.tools__label { margin-bottom: 1.1rem; }
.tools__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-tools);
  letter-spacing: -0.01em;
  color: var(--cosmic-muted);
}
.tools__row li { transition: color var(--dur-mid) var(--ease-quart); }
.tools__row li:hover { color: var(--cosmic); }
.tools__code {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-xs);
  letter-spacing: 0;
  color: var(--cosmic);
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
}
.tools__code span { color: var(--cosmic-muted); font-size: var(--fs-mono-sm); }

/* ===================================================================
   THE SYSTEM
   =================================================================== */
.system { padding-top: var(--sp-section); padding-bottom: var(--sp-section); }
.system__head { max-width: var(--container-narrow); }
.system__head .section-lead { margin-top: 1.1rem; }

.system__flow { margin-top: clamp(3rem, 2rem + 5vw, 5rem); }

.system__nodes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
/* connector line behind the dots */
.system__nodes::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 9px;
  right: 9px;
  height: 2px;
  background: var(--line);
  z-index: 0;
}
.system__nodes::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 9px;
  right: 9px;
  height: 2px;
  background: var(--cosmic);
  transform: scaleX(var(--flow, 0));
  transform-origin: left;
  z-index: 0;
}
.system__node {
  position: relative;
  padding-top: 2.4rem;
  z-index: var(--z-base);
}
.system__dot {
  position: absolute;
  top: 0; left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cosmic);
}
.system__idx {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cosmic);
  margin-bottom: 0.6rem;
}
.system__node p {
  color: var(--cosmic-70);
  max-width: 34ch;
}

/* ===================================================================
   SERVICES (BENTO)
   =================================================================== */
.services { padding-top: var(--sp-section); padding-bottom: var(--sp-section); }
.services .section-title { max-width: 18ch; margin-bottom: var(--sp-6); }

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
}
.bento__card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur-mid) var(--ease-quart),
              border-color var(--dur-mid) var(--ease-quart),
              background var(--dur-mid) var(--ease-quart);
  position: relative;
  overflow: hidden;
}
/* Asymmetric bento: row 1 = feature(4) + card(2); row 2 = card(3) + card(3) */
.bento__card--feature { grid-column: span 4; }
.bento__card:nth-child(2) { grid-column: span 2; }
.bento__card--feature p { max-width: 40ch; }

.bento__card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: linear-gradient(135deg, var(--paper), var(--paper-deep));
}

.bento__icon {
  width: 44px; height: 44px;
  color: var(--cosmic);
  margin-bottom: 1.25rem;
}
.bento__icon svg { width: 100%; height: 100%; }
.bento__card--feature .bento__icon { width: 52px; height: 52px; }

.bento__card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h3);
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}
.bento__card--feature h3 { font-size: var(--fs-feature-h3); }
.bento__card p { color: var(--cosmic-70); max-width: 46ch; }

/* animated underline sweep that reveals on hover (shows-its-work cue) */
.bento__card::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 3px; width: 100%;
  background: var(--cosmic);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-mid) var(--ease-quart);
}
.bento__card:hover::after { transform: scaleX(1); }

/* ===================================================================
   PROCESS
   =================================================================== */
.process { padding-top: var(--sp-section); padding-bottom: var(--sp-section); }
.process__head { max-width: var(--container-narrow); margin-bottom: var(--sp-6); }
.process__head .section-lead { margin-top: 1rem; }

.process__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem 1.75rem;
}
.process__step {
  border-top: 2px solid var(--cosmic);
  padding-top: 1.1rem;
}
.process__num {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-mono-md);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--cosmic-70);
  margin-bottom: 1.4rem;
}
.process__step h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h3);
  margin-bottom: 0.5rem;
}
.process__step p { color: var(--cosmic-70); }

/* ===================================================================
   COMPARE
   =================================================================== */
.compare { padding-top: var(--sp-section); padding-bottom: var(--sp-section); }
.compare .section-title { max-width: 20ch; margin-bottom: var(--sp-6); }

.compare__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.compare__col {
  border-radius: var(--r-md);
  padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
  border: 1px solid var(--line);
}
.compare__col--weak {
  background: transparent;
}
.compare__col--strong {
  background: var(--cosmic);
  color: var(--vanilla);
  border-color: var(--cosmic);
}
.compare__kicker {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.compare__col--weak .compare__kicker { color: var(--cosmic-muted); }
.compare__col--strong .compare__kicker { color: color-mix(in srgb, var(--vanilla) 75%, transparent); }

.compare__col ul { display: flex; flex-direction: column; gap: 0.9rem; }
.compare__col li {
  position: relative;
  padding-left: 1.9rem;
  line-height: 1.5;
}
.compare__col li::before {
  position: absolute;
  left: 0; top: 0.05em;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
}
.compare__col--weak li { color: var(--cosmic-70); }
.compare__col--weak li::before { content: "✕"; color: var(--ash); }
.compare__col--strong li::before { content: "✓"; color: var(--vanilla); }

.compare__note {
  margin-top: var(--sp-4);
  max-width: 62ch;
  font-size: var(--fs-lead);
  color: var(--cosmic-70);
  text-wrap: pretty;
}

/* ===================================================================
   PORTFOLIO / WORK
   =================================================================== */
.work { padding-top: var(--sp-section); padding-bottom: var(--sp-section); }
.work__head { max-width: var(--container-narrow); margin-bottom: var(--sp-6); }
.work__head .section-lead { margin-top: 1rem; }

.work__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}
.pf { display: flex; flex-direction: column; gap: 1rem; }

.pf-frame {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--paper);
}
.pf-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--cosmic);
}
.pf-bar span {
  width: 9px; height: 9px; border-radius: 50%;
  background: color-mix(in srgb, var(--vanilla) 55%, var(--cosmic));
}
.pf-viewport {
  position: relative;
  height: clamp(320px, 42vh, 460px);
  overflow: hidden;
  background: var(--paper);
}
.pf-shot {
  width: 100%;
  display: block;
  will-change: transform;
}

.pf__cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.pf__name { font-weight: 500; }
.pf__tag {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.pf__tag--client { background: var(--cosmic); color: var(--vanilla); }
.pf__tag--demo {
  background: transparent;
  color: var(--cosmic-70);
  border: 1px solid var(--line-strong);
}

/* ===================================================================
   TESTIMONIAL
   =================================================================== */
.quote {
  padding-top: var(--sp-section);
  padding-bottom: var(--sp-section);
  text-align: center;
  max-width: 960px;
}
.quote__avatar {
  width: 88px;
  height: 88px;
  margin: 0 auto 1.75rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
}
.quote__text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-quote);
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--cosmic);
}
.quote__by {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cosmic-muted);
}
.quote__scores {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
  font-size: var(--fs-sm);
  color: var(--cosmic-70);
}
.quote__scores li { display: inline-flex; align-items: baseline; gap: 0.4rem; }
.quote__score {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  color: var(--cosmic);
}
.quote__rec {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.04em;
  color: var(--cosmic);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 0.3rem 0.8rem;
}

/* ===================================================================
   FOUNDER / TRUST
   =================================================================== */
.founder {
  padding-top: var(--sp-section);
  padding-bottom: var(--sp-section);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: center;
}
.founder__body .section-title { max-width: 16ch; margin-bottom: 1.25rem; }
.founder__body p { color: var(--cosmic-70); max-width: 48ch; font-size: var(--fs-lead); }

.founder__trust {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.founder__trust li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  font-weight: 500;
}
.founder__trust li:last-child { border-bottom: 1px solid var(--line); }
.founder__trust svg {
  width: 22px; height: 22px;
  flex: 0 0 auto;
  color: var(--cosmic);
}

/* ===================================================================
   FAQ
   =================================================================== */
.faq { padding-top: var(--sp-section); padding-bottom: var(--sp-section); max-width: 860px; }
.faq .section-title { margin-bottom: var(--sp-4); }
.faq__list { border-top: 1px solid var(--line); }

.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.35rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-faq);
  letter-spacing: -0.01em;
  color: var(--cosmic);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__mark {
  position: relative;
  width: 18px; height: 18px;
  flex: 0 0 auto;
}
.faq__mark::before, .faq__mark::after {
  content: "";
  position: absolute;
  background: var(--cosmic);
  transition: transform var(--dur-mid) var(--ease-quart), opacity var(--dur-mid) var(--ease-quart);
}
.faq__mark::before { top: 8px; left: 0; width: 18px; height: 2px; }
.faq__mark::after { top: 0; left: 8px; width: 2px; height: 18px; }
.faq__item[open] .faq__mark::after { transform: scaleY(0); opacity: 0; }

.faq__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-mid) var(--ease-quart);
}
.faq__item[open] .faq__answer { grid-template-rows: 1fr; }
.faq__answer > p {
  overflow: hidden;
  color: var(--cosmic-70);
  max-width: 60ch;
  padding-bottom: 0.1rem;
}
.faq__item[open] .faq__answer > p { padding-bottom: 1.35rem; }

/* ===================================================================
   BOOK / CONVERSION
   =================================================================== */
.book {
  padding-top: var(--sp-section);
  padding-bottom: var(--sp-section);
  text-align: center;
  max-width: 780px;
}
.book__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-booktitle);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 18ch;
  margin-inline: auto;
}
.book__lead { margin-top: 1.1rem; font-size: var(--fs-lead); color: var(--cosmic-70); }

.book__calendar {
  margin-top: 2.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(0.5rem, 0.25rem + 1vw, 1rem);
  background: var(--paper);
  overflow: hidden;
}
.book__calendar iframe {
  width: 100%;
  min-height: 640px;
  border: 0;
  border-radius: var(--r-md);
  display: block;
  background: var(--paper);
}

.book__alt {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}
.book__audit {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  color: var(--cosmic);
  border-bottom: 1.5px solid var(--line-strong);
  padding-bottom: 2px;
  transition: border-color var(--dur-mid) var(--ease-quart), gap var(--dur-mid) var(--ease-quart);
}
.book__audit:hover { border-color: var(--cosmic); gap: 0.65rem; }
.book__whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--cosmic-70);
  font-size: var(--fs-sm);
  transition: color var(--dur-mid) var(--ease-quart);
}
.book__whatsapp:hover { color: var(--cosmic); }

/* ===================================================================
   FOOTER
   =================================================================== */
.footer {
  border-top: 1px solid var(--line);
  max-width: var(--container);
  margin-inline: auto;
  padding: var(--sp-8) clamp(1.25rem, 5vw, 3.5rem) var(--sp-6);
  display: grid;
  gap: 2rem;
}
.footer__top { display: flex; flex-direction: column; gap: 0.5rem; }
.wordmark--footer { font-size: var(--fs-2xl); margin: 0; }
.footer__line { color: var(--cosmic-70); max-width: 40ch; }
.footer__actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer__contact { color: var(--cosmic-70); font-family: var(--font-mono); font-size: var(--fs-mono-md); letter-spacing: 0.03em; transition: color var(--dur-mid) var(--ease-quart); }
.footer__contact:hover { color: var(--cosmic); }
.footer__nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer__nav a { color: var(--cosmic-70); transition: color var(--dur-mid) var(--ease-quart); }
.footer__nav a:hover { color: var(--cosmic); }
.footer__copy { color: var(--cosmic-muted); font-size: var(--fs-xs); }

/* ===================================================================
   REVEAL
   Content is visible by default. The hero (always above the fold and
   animated on load) is the only element gated in CSS, so it never
   flashes. Scroll-reveal targets are hidden by JS just-in-time instead
   of in CSS, so a non-scrolling render (crawler, background tab) still
   shows every section.
   =================================================================== */
.js-anim [data-hero] {
  opacity: 0;
}

/* ===================================================================
   MOBILE STICKY BOOK CTA
   Hidden on desktop; pinned to the bottom of the viewport on mobile so
   the primary action is always one tap away. JS hides it (data-hide)
   while the real #book section is on screen, so it never sits on top
   of the calendar/CTA that's already there.
   =================================================================== */
.mobile-book { display: none; }

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 900px) {
  .founder { grid-template-columns: 1fr; }
  .process__steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    margin-left: auto;
  }
  .nav__toggle span {
    display: block;
    width: 22px; height: 2px;
    background: var(--cosmic);
    transition: transform var(--dur-mid) var(--ease-quart), opacity var(--dur-mid) var(--ease-quart);
  }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .nav__mobile[data-open] { display: flex; }

  /* Sticky bottom "Book a meeting" bar — always one tap away on mobile. */
  .mobile-book {
    display: block;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: var(--z-sticky);
    padding: 0.75rem clamp(1.25rem, 5vw, 3.5rem) calc(0.75rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: saturate(1.1) blur(8px);
    border-top: 1px solid var(--line);
    transition: transform var(--dur-mid) var(--ease-quart), opacity var(--dur-mid) var(--ease-quart);
  }
  .mobile-book .btn { width: 100%; }
  .mobile-book[data-hide] { transform: translateY(120%); opacity: 0; pointer-events: none; }

  /* Reserve space so the fixed bar never covers the last bit of content. */
  body { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom)); }

  .bento { grid-template-columns: 1fr; }
  .bento__card, .bento__card--feature { grid-column: 1 / -1; }

  .compare__grid { grid-template-columns: 1fr; }

  /* Flow-line stays horizontal on mobile (same left -> right flow as desktop); shrink to fit */
  .flowline { margin-top: clamp(2.5rem, 2rem + 4vw, 4rem); }
  .flowline__step { gap: 0.5rem; }
  .flowline__name { font-size: 0.62rem; letter-spacing: 0.04em; }
  .flowline__dot { width: 14px; height: 14px; }
  .flowline__seg { min-width: 14px; margin-bottom: 1.5rem; }
  .flowline__seg::after { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; }

  /* System stacks; connector becomes vertical */
  .system__nodes { grid-template-columns: 1fr; gap: 0; }
  .system__nodes::before, .system__nodes::after {
    top: 9px; bottom: 9px; left: 9px; right: auto;
    width: 2px; height: auto;
  }
  .system__nodes::after { transform: scaleY(var(--flow, 0)); transform-origin: top; }
  .system__node { padding-top: 0; padding-left: 2.4rem; padding-bottom: 2rem; }
  .system__node:last-child { padding-bottom: 0; }
  .system__dot { top: 0.1rem; }
}

@media (max-width: 520px) {
  .process__steps { grid-template-columns: 1fr; }
  .hero__cta { align-items: stretch; }
  .hero__cta .btn { width: 100%; }
  .footer__actions { flex-direction: column; align-items: flex-start; }
}

/* ===================================================================
   REDUCED MOTION
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js-anim [data-reveal],
  .js-anim [data-hero] { opacity: 1 !important; transform: none !important; }
  .flowline__seg > i { transform: scaleX(1) !important; }
  .system__nodes::after { transform: scaleX(1) !important; }
  .flowline__seg::after,
  .flowline__dot::after { animation: none !important; opacity: 0 !important; }
}
