/* =========================================================================
   Remote Revenue - Landing
   Design read: AI/automation agency, dark premium high-tech, LatAm + US.
   Dials: VARIANCE 8 / MOTION 6 / DENSITY 3. Dark theme lock.
   Accent lock: electric lime. Radius lock: btn pill / card 16 / input 10.
   ========================================================================= */

/* ---------- Fonts (self-hosted, swap) ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/spacegrotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "Sora";
  src: url("../fonts/sora.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
  font-style: normal;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #0a0b0d;
  --bg-2: #0e1013;
  --surface: #131619;
  --surface-2: #181c21;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --text: #f3f5f7;
  --text-soft: #c2c7cf;
  --text-mute: #8b929c;

  --accent: #c4f042;          /* electric lime - ACTION + key metrics only */
  --accent-bright: #d4fb5e;
  --accent-deep: #b6e62f;     /* slightly deeper lime for large fills (less scream) */
  --accent-dim: rgba(196, 240, 66, 0.14);
  --accent-line: rgba(196, 240, 66, 0.35);
  --on-accent: #0a0b0d;       /* dark text on lime - WCAG AA pass */

  /* Warm metallic secondary - ordinals, hairlines, eyebrows, premium framing.
     Rule: lime = action & metrics · champagne = numbers, fine lines, labels. */
  --champagne: #d8c7a8;
  --champagne-soft: #e7dcc6;
  --champagne-dim: rgba(216, 199, 168, 0.10);
  --champagne-line: rgba(216, 199, 168, 0.30);

  --r-btn: 999px;
  --r-card: 18px;
  --r-card-inner: 13px;       /* concentric inner radius for nested (double-bezel) cards */
  --r-input: 11px;
  --r-pill: 999px;

  /* Tinted, layered shadows + inner edge highlight (never flat black) */
  --shadow: 0 24px 60px -22px rgba(0, 0, 0, 0.72), 0 2px 8px -4px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 18px 44px -30px rgba(0, 0, 0, 0.7);
  --shadow-accent: 0 18px 50px -16px rgba(196, 240, 66, 0.26);
  --hi: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --hi-strong: inset 0 1px 0 rgba(255, 255, 255, 0.10);
  --card-grad: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 42%);

  --container: 1200px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

img, svg, canvas { display: block; max-width: 100%; }
/* Icons/logos reference symbols via <use>; bind their fill to text color so they inherit color.
   Scoped away from .brand__mark, .flowmap (own fills) and .flag (multi-color flags keep theirs). */
svg:has(> use):not(.flag) { fill: currentColor; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(72px, 11vw, 140px) 0; position: relative; }
.section--tight { padding: clamp(56px, 8vw, 96px) 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--champagne);
  padding: 7px 13px 7px 11px; border-radius: var(--r-pill);
  background: var(--champagne-dim);
  box-shadow: inset 0 0 0 1px var(--champagne-line), var(--hi);
  align-self: flex-start;   /* never stretch inside flex-column heads (e.g. steps) */
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--champagne); box-shadow: 0 0 8px var(--champagne); flex: 0 0 auto; }
/* Hero lead eyebrow is a sentence, not a tag: strip the pill, keep the lime rule line. */
.eyebrow--lead { background: none; box-shadow: none; padding: 0; border-radius: 0; text-transform: none; letter-spacing: 0.005em; font-size: 0.95rem; font-weight: 600; line-height: 1.45; max-width: 42ch; color: var(--text-soft); align-items: flex-start; }
.eyebrow--lead::before { width: 22px; height: 1px; border-radius: 0; background: var(--accent-line); box-shadow: none; margin-top: 0.72em; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.04; letter-spacing: -0.022em; overflow-wrap: break-word; text-wrap: balance; }
.h-sec { font-size: clamp(2rem, 4.4vw, 3.4rem); letter-spacing: -0.028em; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-soft); max-width: 60ch; text-wrap: pretty; }
.muted { color: var(--text-mute); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 11px;
  padding: 14px 18px 14px 26px; border-radius: var(--r-btn);
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; line-height: 1;
  white-space: nowrap; position: relative;
  transition: transform 0.32s var(--ease), background 0.25s, box-shadow 0.3s, border-color 0.25s, color 0.25s;
}
.btn svg { width: 18px; height: 18px; }
/* Button-in-button: trailing icon lives inside its own circular chip (CSS-only, i18n-safe). */
.btn--primary::after {
  content: ""; flex: 0 0 auto; width: 1.7em; height: 1.7em; border-radius: 50%;
  background: rgba(10, 11, 13, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a0b0d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='18' y2='12'/%3E%3Cpolyline points='12 6 18 12 12 18'/%3E%3C/svg%3E") center / 58% no-repeat;
  transition: transform 0.32s var(--ease), background-color 0.25s;
}
.btn--primary {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: var(--on-accent);
  box-shadow: var(--shadow-accent), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: ctaPulse 3.2s ease-in-out infinite;
}
.btn--primary:hover { background: linear-gradient(180deg, #e0ff72, var(--accent-bright)); transform: translateY(-2px); animation-play-state: paused; }
.btn--primary:hover::after { transform: translate(3px, -1px); background-color: rgba(10, 11, 13, 0.24); }
.btn--primary:active { transform: translateY(0) scale(0.985); }
/* Hide any literal trailing arrow icon: the chip replaces it (e.g. form submit). */
.btn--primary > svg { display: none; }
@keyframes ctaPulse {
  0%, 100% { box-shadow: var(--shadow-accent), inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 0 0 rgba(196, 240, 66, 0); }
  50% { box-shadow: var(--shadow-accent), inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 18px 0 rgba(196, 240, 66, 0.22); }
}
.btn--ghost { padding: 14px 24px; border: 1px solid var(--line-strong); color: var(--text); background: rgba(255,255,255,0.025); box-shadow: var(--hi); }
.btn--ghost:hover { border-color: var(--champagne-line); color: var(--champagne-soft); background: rgba(255,255,255,0.04); transform: translateY(-2px); }
.btn--ghost:active { transform: translateY(0) scale(0.985); }
.btn--lg { padding: 17px 22px 17px 32px; font-size: 1.05rem; }
.btn--ghost.btn--lg { padding: 17px 30px; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: 68px; display: flex; align-items: center;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 11, 13, 0.7);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 30px -22px rgba(0, 0, 0, 0.9);
}
section[id], main[id] { scroll-margin-top: 88px; }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; letter-spacing: -0.01em; }
.brand__mark { width: 30px; height: 30px; flex: 0 0 auto; }
.brand b { color: var(--accent); font-weight: 600; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a { font-size: 0.93rem; color: var(--text-soft); transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }
.nav__right { display: flex; align-items: center; gap: 16px; }

/* Language switcher */
.lang {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 3px;
  font-family: var(--font-display);
}
.lang__btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: var(--r-pill);
  font-size: 0.8rem; font-weight: 600; color: var(--text-mute);
  transition: background 0.2s, color 0.2s;
}
.lang__btn .flag { width: auto; height: 13px; border-radius: 2px; display: block; box-shadow: 0 0 0 1px rgba(255,255,255,0.14); }
.lang__btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

.nav__links-cta { display: none; }
.nav__menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; align-items: center; justify-content: center; flex: 0 0 auto; }
.nav__menu-btn svg { width: 20px; height: 20px; }

/* ---------- Background glow (single, subtle, not AI-purple) ---------- */
.bg-fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(196,240,66,0.05), transparent 55%),
    radial-gradient(90% 60% at 100% 100%, rgba(216,199,168,0.04), transparent 60%);
}
.bg-fx::before {
  content: ""; position: absolute; top: -22%; right: -12%;
  width: 60vw; height: 60vw; max-width: 760px; max-height: 760px;
  background: radial-gradient(circle, rgba(196,240,66,0.12), transparent 64%);
  filter: blur(22px);
}
.bg-fx::after {
  content: ""; position: absolute; bottom: -26%; left: -14%;
  width: 52vw; height: 52vw; max-width: 640px; max-height: 640px;
  background: radial-gradient(circle, rgba(216,199,168,0.06), transparent 66%);
  filter: blur(26px);
}
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- HERO (asymmetric split) ---------- */
.hero { min-height: 100dvh; display: flex; align-items: center; padding-top: 96px; padding-bottom: 56px; position: relative; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero__copy { max-width: 640px; }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); margin: 22px 0 0; letter-spacing: -0.035em; }
.hero h1 .hl {
  color: var(--accent);
  background-image: linear-gradient(90deg, var(--champagne-line), var(--accent-line));
  background-repeat: no-repeat; background-position: 0 94%; background-size: 100% 2px;
  padding-bottom: 0.04em;
}
.hero__sub { margin-top: 22px; font-size: clamp(1.05rem, 1.7vw, 1.25rem); color: var(--text-soft); max-width: 50ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; }
.hero__trust li { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-size: 0.85rem; font-weight: 500; color: var(--text-mute); }
.hero__trust .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(196,240,66,0.5); flex: 0 0 auto; }
.hero__visual { position: relative; aspect-ratio: 1 / 1; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__logos { position: absolute; inset: 0; pointer-events: none; }
.hero__logo {
  position: absolute; left: var(--x); top: var(--y);
  width: clamp(44px, 8.5vw, 58px); height: clamp(44px, 8.5vw, 58px);
  display: flex; align-items: center; justify-content: center;
  border-radius: 15px; background: rgba(20, 24, 29, 0.82); backdrop-filter: blur(5px);
  border: 1px solid var(--line-strong); color: #e2e7ed; box-shadow: var(--shadow);
  pointer-events: auto; cursor: default;
  transform: translate(-50%, -50%);
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
  animation: heroFloat var(--d) ease-in-out var(--t) infinite;
}
.hero__logo svg { width: 52%; height: 52%; transition: transform 0.2s var(--ease); }
.hero__logo::after {
  content: attr(data-name); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  font-family: var(--font-display); font-size: 0.7rem; font-weight: 600; white-space: nowrap;
  color: var(--on-accent); background: var(--accent); padding: 3px 9px; border-radius: var(--r-pill);
  opacity: 0; transition: opacity 0.18s; pointer-events: none;
}
.hero__logo:hover { color: #fff; border-color: var(--accent); background: #1d2228; box-shadow: 0 0 0 1px var(--accent), 0 0 22px rgba(196,240,66,0.4); animation-play-state: paused; }
.hero__logo:hover svg { transform: scale(1.16); }
.hero__logo:hover::after { opacity: 1; }
@keyframes heroFloat {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 9px)); }
}

/* ---------- Stat band ---------- */
.statband { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-2), var(--bg)); box-shadow: var(--hi); }
.statband__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 48px 0; }
.stat { padding: 0 30px; position: relative; }
.stat:first-child { padding-left: 0; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 1px; background: linear-gradient(180deg, transparent, var(--line-strong), transparent); }
.stat__num { font-family: var(--font-display); font-size: clamp(1.9rem, 3.4vw, 2.9rem); font-weight: 600; color: var(--accent); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat__label { margin-top: 9px; font-size: 0.92rem; color: var(--text-soft); }
.statband__note { padding-bottom: 22px; font-size: 0.78rem; color: var(--text-mute); }

/* ---------- Problem (offset list, full-width band) ---------- */
.problem { background: var(--bg); }
.problem__head { max-width: 720px; margin-bottom: 52px; }
.problem__head h2 { margin-top: 18px; }
.problem__head p { margin-top: 18px; }
.pain { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.pain__item {
  display: flex; gap: 16px; padding: 28px;
  border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--card-grad), var(--surface);
  box-shadow: var(--hi), var(--shadow-soft);
  transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.pain__item:hover { border-color: var(--accent-line); transform: translateY(-4px); box-shadow: var(--hi-strong), var(--shadow), 0 22px 50px -30px rgba(196,240,66,0.22); }
.pain__ic { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px; background: var(--accent-dim); box-shadow: inset 0 0 0 1px var(--accent-line), var(--hi); display: flex; align-items: center; justify-content: center; }
.pain__ic svg { width: 22px; height: 22px; color: var(--accent); }
.pain__item h3 { font-size: 1.12rem; }
.pain__item p { margin-top: 7px; font-size: 0.95rem; color: var(--text-mute); }

/* ---------- Solution (split text + visual) ---------- */
.solution__grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 56px; align-items: center; }
.solution__panel {
  position: relative;
  border: 1px solid var(--line-strong); border-radius: calc(var(--r-card) + 6px);
  background: linear-gradient(160deg, var(--surface-2), var(--bg-2));
  padding: 10px; box-shadow: var(--hi), var(--shadow);
}
/* Inner core of the double-bezel: concentric hairline frame around the orbit. */
.solution__panel::before {
  content: ""; position: absolute; inset: 10px; border-radius: var(--r-card);
  border: 1px solid var(--line); box-shadow: var(--hi);
  background: radial-gradient(120% 100% at 50% 0%, rgba(255,255,255,0.02), transparent 60%);
  pointer-events: none;
}
.flowmap { width: 100%; height: auto; border-radius: 12px; }

/* Integrations orbit hub (replaces static flow diagram) */
.orbit { position: relative; container-type: size; width: 100%; max-width: 480px; aspect-ratio: 1 / 1; margin: 0 auto; display: grid; place-items: center; border-radius: 12px; }
.orbit__deco { position: absolute; inset: 0; pointer-events: none; }
.orbit__deco span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 50%; border: 1px dashed rgba(255,255,255,0.08); }
.orbit__deco span:nth-child(1) { width: 60cqmin; height: 60cqmin; }
.orbit__deco span:nth-child(2) { width: 88cqmin; height: 88cqmin; border-color: rgba(196,240,66,0.1); }
.orbit__core { position: relative; z-index: 4; width: 32cqmin; height: 32cqmin; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, rgba(196,240,66,0.18), rgba(196,240,66,0.04)); border: 1.5px solid var(--accent); box-shadow: 0 0 40px rgba(196,240,66,0.25), inset 0 0 20px rgba(196,240,66,0.1); }
.orbit__core b { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--accent); line-height: 1; }
.orbit__core small { font-family: var(--font-body); font-size: 0.68rem; color: var(--text-mute); margin-top: 2px; }
.orbit__item {
  position: absolute; top: 50%; left: 50%;
  width: var(--chip); height: var(--chip);
  margin: calc(var(--chip) / -2) 0 0 calc(var(--chip) / -2);
  transform: rotate(calc(var(--step) * var(--i))) translateX(var(--r)) rotate(calc(-1 * var(--step) * var(--i)));
  --chip: clamp(40px, 12cqmin, 56px);
}
.orbit__item--in { --r: 29cqmin; --dur: 36s; --step: 72deg; }
.orbit__item--out { --r: 43cqmin; --dur: 52s; --step: 60deg; }
.orbit__chip {
  position: relative;
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line-strong);
  color: #dfe4ea; transition: color 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.orbit__chip svg { width: 54%; height: 54%; }
.orbit__chip::after {
  content: attr(data-name); position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%);
  font-family: var(--font-display); font-size: 0.7rem; font-weight: 600; white-space: nowrap;
  color: var(--on-accent); background: var(--accent); padding: 3px 8px; border-radius: var(--r-pill);
  opacity: 0; transition: opacity 0.18s; pointer-events: none;
}
.orbit__chip:hover { color: #fff; border-color: var(--accent); background: #1d2128; box-shadow: 0 0 0 1px var(--accent), 0 0 20px rgba(196,240,66,0.35); }
.orbit__chip:hover::after { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .orbit__item { animation: orbit var(--dur) linear infinite; animation-delay: calc(var(--dur) / var(--n) * var(--i) * -1); }
  .orbit__item--in { --n: 5; }
  .orbit__item--out { --n: 6; animation-direction: reverse; }
  .orbit:hover .orbit__item { animation-play-state: paused; }
}
@keyframes orbit {
  from { transform: rotate(0deg) translateX(var(--r)) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(var(--r)) rotate(-360deg); }
}
.solution h2 { margin-top: 18px; }
.solution__list { margin-top: 26px; display: grid; gap: 14px; }
.solution__list li { display: flex; gap: 14px; align-items: center; color: var(--text-soft); }
.solution__list svg { flex: 0 0 auto; width: 28px; height: 28px; padding: 6px; border-radius: 50%; background: var(--accent-dim); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-line); }

/* ---------- How it works (numbered rail) ---------- */
.steps__head { display: flex; flex-direction: column; gap: 16px; max-width: 680px; margin-bottom: 56px; }
.steps__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.step { padding: 36px 28px; border-right: 1px solid var(--line); position: relative; }
.step:first-child { padding-left: 0; }
.step:last-child { border-right: none; padding-right: 0; }
.step__n { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--champagne); letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.step__bar { height: 2px; background: var(--line); margin: 18px 0 22px; position: relative; overflow: hidden; border-radius: 2px; }
.step__bar::after { content: ""; position: absolute; inset: 0; width: 0; background: linear-gradient(90deg, var(--champagne), var(--accent)); box-shadow: 0 0 10px rgba(196,240,66,0.4); transition: width 0.9s var(--ease); }
.step.in .step__bar::after { width: 100%; }
.step h3 { font-size: 1.22rem; }
.step p { margin-top: 12px; font-size: 0.94rem; color: var(--text-mute); }

/* ---------- Use cases (interactive cards) ---------- */
.cases__head { max-width: 720px; margin-bottom: 48px; }
.cases__head h2 { margin-top: 18px; }
.cases__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.case {
  text-align: left; border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--card-grad), var(--surface); padding: 30px; position: relative; overflow: hidden;
  box-shadow: var(--hi), var(--shadow-soft);
  transition: border-color 0.3s, transform 0.3s var(--ease), background 0.3s, box-shadow 0.3s;
}
.case::after {
  content: ""; position: absolute; left: 0; top: 0; height: 100%; width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep)); transform: scaleY(0); transform-origin: top; transition: transform 0.3s var(--ease);
}
.case:hover, .case.open { border-color: var(--accent-line); transform: translateY(-4px); box-shadow: var(--hi-strong), var(--shadow), 0 24px 52px -32px rgba(196,240,66,0.24); }
.case.open::after { transform: scaleY(1); }
.case__top { display: flex; align-items: center; gap: 14px; }
.case__ic { width: 48px; height: 48px; border-radius: 13px; background: var(--accent-dim); box-shadow: inset 0 0 0 1px var(--accent-line), var(--hi); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.case__ic svg { width: 24px; height: 24px; color: var(--accent); }
.case h3 { font-size: 1.18rem; }
.case__hint { margin-top: 14px; font-size: 0.92rem; color: var(--text-mute); }
.case__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s var(--ease); }
.case__body > div { overflow: hidden; }
.case.open .case__body { grid-template-rows: 1fr; }
.case__body ul { margin-top: 18px; display: grid; gap: 11px; }
.case__body li { display: flex; gap: 11px; align-items: center; font-size: 0.92rem; color: var(--text-soft); }
.case__body li svg { flex: 0 0 auto; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--accent-dim); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-line); }
.case__plus { position: absolute; top: 26px; right: 26px; width: 26px; height: 26px; color: var(--accent); opacity: 0.65; transition: transform 0.3s var(--ease), opacity 0.2s; }
.case:hover .case__plus { opacity: 1; }
.case.open .case__plus { transform: rotate(45deg); opacity: 1; }

/* ---------- Case studies (real projects, downloadable PDF) ---------- */
.cstudy__head { max-width: 760px; margin-bottom: 48px; }
.cstudy__head h2 { margin-top: 18px; }
.cstudy__lead { margin-top: 18px; max-width: 64ch; font-size: 1.02rem; line-height: 1.55; color: var(--text-soft); }
/* minmax(0,1fr) en vez de 1fr: el track puede encoger por debajo del contenido.
   Sin esto, el texto sin cortes del boton (.btn usa white-space:nowrap) fuerza un
   ancho minimo que desborda la rejilla y toda la pagina en moviles estrechos. */
.cstudy__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.cstudy__card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  padding: 30px; border-radius: var(--r-card);
  background: var(--surface); background-image: var(--card-grad);
  border: 1px solid var(--line); box-shadow: var(--hi), var(--shadow-soft);
  transition: transform 0.35s var(--ease), border-color 0.25s, box-shadow 0.3s;
}
.cstudy__card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--hi-strong), var(--shadow), var(--shadow-accent); }
.cstudy__tag {
  display: inline-flex; align-items: center;
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--champagne-soft);
  padding: 6px 12px; border-radius: var(--r-pill);
  border: 1px solid var(--champagne-line); background: var(--champagne-dim);
}
.cstudy__ic { width: 52px; height: 52px; margin-top: 22px; border-radius: 14px; background: var(--accent-dim); box-shadow: inset 0 0 0 1px var(--accent-line), var(--hi); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.cstudy__ic svg { width: 26px; height: 26px; color: var(--accent); }
.cstudy__card h3 { margin-top: 18px; font-size: 1.34rem; letter-spacing: -0.02em; }
.cstudy__desc { margin-top: 12px; font-size: 0.96rem; line-height: 1.55; color: var(--text-mute); }
.cstudy__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.cstudy__chips li { font-family: var(--font-display); font-size: 0.78rem; font-weight: 500; color: var(--text-soft); padding: 6px 11px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.025); }
.cstudy__btn { margin-top: 26px; }
@media (max-width: 860px) {
  .cstudy__grid { grid-template-columns: minmax(0, 1fr); }
  .cstudy__card { padding: 24px; }
  /* El boton ocupa todo el ancho y su texto puede partir, asi no fuerza el ancho
     de la tarjeta (evita el desbordamiento horizontal de la pagina). */
  .cstudy__btn { width: 100%; justify-content: center; white-space: normal; text-align: center; }
}

/* ---------- Benefits (bento with rhythm) ---------- */
.benefits__head { max-width: 680px; margin-bottom: 48px; }
.benefits__head h2 { margin-top: 18px; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(150px, auto); gap: 18px; }
.bcell { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card-grad), var(--surface); padding: 30px; position: relative; overflow: hidden; box-shadow: var(--hi), var(--shadow-soft); transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s; }
.bcell:hover { border-color: var(--accent-line); transform: translateY(-4px); box-shadow: var(--hi-strong), var(--shadow), 0 22px 50px -32px rgba(196,240,66,0.2); }
.bcell h3 { font-size: 1.15rem; margin-top: 16px; }
.bcell p { margin-top: 9px; font-size: 0.92rem; color: var(--text-mute); }
.bcell__ic { width: 46px; height: 46px; border-radius: 13px; background: var(--accent-dim); box-shadow: inset 0 0 0 1px var(--accent-line), var(--hi); display: flex; align-items: center; justify-content: center; }
.bcell__ic svg { width: 22px; height: 22px; color: var(--accent); }
.bcell--wide { grid-column: span 4; }
.bcell--mid { grid-column: span 3; }
.bcell--third { grid-column: span 2; }
/* Feature cell: true double-bezel — glowing inner core inside a machined shell. */
.bcell--feature { grid-column: span 4; grid-row: span 2; background: linear-gradient(155deg, rgba(196,240,66,0.16), var(--surface) 58%); border-color: var(--accent-line); display: flex; flex-direction: column; justify-content: space-between; }
.bcell--feature::before { content: ""; position: absolute; inset: 0; border-radius: var(--r-card); box-shadow: inset 0 0 0 1px rgba(196,240,66,0.12), inset 0 1px 0 rgba(255,255,255,0.12); pointer-events: none; }
.bcell--feature::after { content: ""; position: absolute; top: -30%; right: -10%; width: 60%; height: 80%; background: radial-gradient(circle, rgba(196,240,66,0.18), transparent 68%); filter: blur(8px); pointer-events: none; }
.bcell--feature > * { position: relative; z-index: 1; }
.bcell--feature .big { font-family: var(--font-display); font-size: clamp(2.7rem, 5vw, 4.1rem); font-weight: 600; color: var(--accent); letter-spacing: -0.035em; line-height: 1; }
.bcell--dark { grid-column: span 2; background: var(--bg-2); box-shadow: var(--hi), inset 0 0 0 1px rgba(255,255,255,0.015), var(--shadow-soft); }
.bcell--dark .bcell__ic { background: var(--champagne-dim); box-shadow: inset 0 0 0 1px var(--champagne-line), var(--hi); }
.bcell--dark .bcell__ic svg { color: var(--champagne-soft); }

/* ---------- Proof: before/after comparator ---------- */
.proof__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
.proof h2 { margin-top: 18px; }
.proof p.lead { margin-top: 18px; }
.proof__stats { margin-top: 28px; display: grid; gap: 14px; }
.proof__stat { display: flex; align-items: baseline; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.proof__stat b { font-family: var(--font-display); font-size: 1.6rem; color: var(--accent); min-width: 92px; }
.proof__stat span { font-size: 0.95rem; color: var(--text-soft); }

.compare { position: relative; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); user-select: none; background: var(--surface); aspect-ratio: 4 / 3; touch-action: pan-y; }
.compare__pane { position: absolute; inset: 0; padding: 28px 30px; display: flex; flex-direction: column; }
.compare__tag { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 6px 11px; border-radius: var(--r-pill); }
.compare__tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.compare__after { background: linear-gradient(160deg, #11160c, var(--bg-2)); }
.compare__after .compare__tag { color: var(--accent); background: var(--accent-dim); }
.compare__after .compare__tag::before { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.compare__before { background: linear-gradient(160deg, #1c1414, #16100f); clip-path: inset(0 50% 0 0); z-index: 2; }
.compare__before .compare__tag { color: #f0a3a3; background: rgba(224,99,99,0.14); }
.compare__before .compare__tag::before { background: #e06363; }
.compare__rows { margin-top: 20px; display: grid; gap: 12px; }
.crow { display: flex; align-items: center; gap: 11px; font-size: 0.9rem; color: var(--text-soft); opacity: 0; transform: translateY(8px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.compare.in .crow { opacity: 1; transform: none; }
.compare.in .compare__after .crow:nth-child(2) { transition-delay: 0.1s; }
.compare.in .compare__after .crow:nth-child(3) { transition-delay: 0.18s; }
.compare.in .compare__after .crow:nth-child(4) { transition-delay: 0.26s; }
.compare.in .compare__after .crow:nth-child(5) { transition-delay: 0.34s; }
.crow svg { width: 22px; height: 22px; flex: 0 0 auto; padding: 4px; border-radius: 50%; }
.compare__before .crow svg { color: #e06363; background: rgba(224,99,99,0.12); }
.compare__after .crow svg { color: var(--accent); background: var(--accent-dim); }
.compare__foot { margin-top: auto; padding-top: 16px; }
.compare__metric { font-family: var(--font-display); font-weight: 600; line-height: 1.1; }
.compare__metric .v { font-size: 1.5rem; }
.compare__metric .l { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.78rem; letter-spacing: 0; text-transform: none; margin-top: 3px; }
.compare__before .compare__metric .v { color: #e98686; }
.compare__after .compare__metric .v { color: var(--accent); }
.compare__metric .l { color: var(--text-mute); }
.compare__handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--accent); z-index: 3; transform: translateX(-1px); box-shadow: 0 0 14px rgba(196,240,66,0.5); }
.compare__grip { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-accent); }
.compare__grip svg { width: 22px; height: 22px; }
.compare:not(.touched) .compare__grip { animation: gripPulse 1.8s var(--ease) infinite; }
@keyframes gripPulse { 0%,100% { box-shadow: var(--shadow-accent), 0 0 0 0 rgba(196,240,66,0.5); } 50% { box-shadow: var(--shadow-accent), 0 0 0 12px rgba(196,240,66,0); } }
.compare__hint { position: absolute; left: 50%; top: calc(50% + 38px); transform: translateX(-50%); z-index: 5; white-space: nowrap; font-family: var(--font-display); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--on-accent); background: var(--accent); padding: 5px 12px; border-radius: var(--r-pill); pointer-events: none; transition: opacity 0.3s; }
.compare.touched .compare__hint { opacity: 0; }
.compare__range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; z-index: 4; margin: 0; }

/* ---------- Calculator ---------- */
.calc__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line-strong); border-radius: calc(var(--r-card) + 4px); overflow: hidden; background: var(--surface); box-shadow: var(--hi), var(--shadow); }
.calc__inputs { padding: clamp(30px, 4vw, 52px); border-right: 1px solid var(--line); }
.calc__inputs h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.calc__inputs p { margin-top: 12px; font-size: 0.95rem; color: var(--text-mute); }
.field { margin-top: 26px; }
.field label { display: block; font-size: 0.9rem; font-weight: 500; color: var(--text-soft); margin-bottom: 9px; }
.field__row { display: flex; align-items: center; gap: 14px; }
.field input[type="range"] { flex: 1; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px; background: var(--surface-2); }
.field input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 0 0 4px var(--accent-dim); }
.field input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border: none; border-radius: 50%; background: var(--accent); cursor: pointer; }
.field__val { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; min-width: 78px; text-align: right; }
.calc__out { position: relative; padding: clamp(30px, 4vw, 52px); background: linear-gradient(165deg, var(--bg-2), var(--surface)); display: flex; flex-direction: column; justify-content: center; gap: 26px; box-shadow: inset 1px 0 0 rgba(255,255,255,0.03); }
.calc__out::before { content: ""; position: absolute; top: -20%; right: -10%; width: 55%; height: 60%; background: radial-gradient(circle, rgba(196,240,66,0.10), transparent 70%); filter: blur(10px); pointer-events: none; }
.calc__metric { position: relative; }
.calc__metric .k { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--champagne); }
.calc__metric .v { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--accent); letter-spacing: -0.02em; line-height: 1.05; }
.calc__metric .v small { font-size: 0.42em; color: var(--text-soft); font-weight: 500; letter-spacing: 0; }
.calc__disclaimer { font-size: 0.78rem; color: var(--text-mute); line-height: 1.5; }

/* ---------- Why us (split header replaced with stacked + grid) ---------- */
.why__head { max-width: 720px; margin-bottom: 48px; }
.why__head h2 { margin-top: 18px; }
.why__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.why__item { display: flex; gap: 18px; padding: 30px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card-grad), var(--surface); box-shadow: var(--hi), var(--shadow-soft); transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s; }
.why__item:hover { border-color: var(--champagne-line); transform: translateY(-4px); box-shadow: var(--hi-strong), var(--shadow); }
.why__item .n { font-family: var(--font-display); font-weight: 600; color: var(--champagne); font-size: 1.5rem; line-height: 1; flex: 0 0 auto; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.why__item h3 { font-size: 1.12rem; }
.why__item p { margin-top: 8px; font-size: 0.93rem; color: var(--text-mute); }

/* ---------- FAQ ---------- */
.faq__grid { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: 56px; align-items: start; }
.faq__head h2 { margin-top: 18px; }
.faq__head p { margin-top: 18px; }
.faq__list { display: grid; gap: 0; }
.qa { border-top: 1px solid var(--line); }
.qa:last-child { border-bottom: 1px solid var(--line); }
.qa__q { width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0; font-family: var(--font-display); font-weight: 500; font-size: 1.08rem; transition: color 0.2s; }
.qa__q:hover { color: var(--accent); }
.qa__q svg { flex: 0 0 auto; width: 22px; height: 22px; color: var(--accent); transition: transform 0.3s var(--ease); }
.qa.open .qa__q svg { transform: rotate(45deg); }
.qa__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s var(--ease); }
.qa__a > div { overflow: hidden; }
.qa.open .qa__a { grid-template-rows: 1fr; }
.qa__a p { padding-bottom: 24px; color: var(--text-mute); font-size: 0.97rem; max-width: 65ch; }

/* ---------- Final CTA ---------- */
.final { text-align: center; }
.final__card {
  border: 1px solid var(--accent-line); border-radius: 28px;
  background: linear-gradient(165deg, rgba(196,240,66,0.12), var(--bg-2) 58%);
  padding: clamp(48px, 8vw, 100px) clamp(24px, 5vw, 56px); position: relative; overflow: hidden;
  box-shadow: var(--hi-strong), var(--shadow);
}
/* Inner core ring + ambient glow for the double-bezel showpiece. */
.final__card::before { content: ""; position: absolute; inset: 12px; border-radius: 18px; border: 1px solid rgba(196,240,66,0.14); box-shadow: var(--hi); pointer-events: none; }
.final__card::after { content: ""; position: absolute; top: -25%; left: 50%; transform: translateX(-50%); width: 80%; height: 70%; background: radial-gradient(circle, rgba(196,240,66,0.16), transparent 65%); filter: blur(14px); pointer-events: none; }
.final__card > * { position: relative; z-index: 1; }
.final h2 { font-size: clamp(2.1rem, 5vw, 3.7rem); max-width: 16ch; margin: 0 auto; }
.final p { margin: 22px auto 0; max-width: 52ch; color: var(--text-soft); font-size: 1.1rem; }
.final__cta { margin-top: 36px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.final__micro { margin-top: 20px; font-size: 0.85rem; color: var(--text-mute); }

/* ---------- Contact form ---------- */
.contact-form { max-width: 640px; margin: 38px auto 0; text-align: left; }
.cf__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cf__field { display: flex; flex-direction: column; gap: 8px; }
.cf__field--full { grid-column: 1 / -1; }
.cf__field label { font-size: 0.88rem; font-weight: 500; color: var(--text-soft); }
.cf__field label .opt { color: var(--text-mute); font-weight: 400; }
.cf__field input, .cf__field textarea, .cf__field select {
  font: inherit; color: var(--text); background: rgba(10,11,13,0.5);
  border: 1px solid var(--line-strong); border-radius: var(--r-input);
  padding: 13px 15px; transition: border-color 0.2s, box-shadow 0.2s; resize: vertical;
}
/* Select: same box as inputs, with a custom accent chevron (no native UI). */
.cf__field select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  cursor: pointer; padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23c4f042' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center;
}
.cf__field select option { background: #14161a; color: var(--text); }
.cf__field select:invalid { color: var(--text-mute); }
.cf__field input::placeholder, .cf__field textarea::placeholder { color: var(--text-mute); }
.cf__field input:focus, .cf__field textarea:focus, .cf__field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.cf__field input[aria-invalid="true"], .cf__field textarea[aria-invalid="true"], .cf__field select[aria-invalid="true"] { border-color: #e06363; }
.cf__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cf__submit { width: 100%; margin-top: 18px; }
.cf__submit[data-loading="true"] { opacity: 0.7; pointer-events: none; }
.cf__status { margin-top: 16px; text-align: center; font-size: 0.92rem; min-height: 1.2em; }
.cf__status[data-state="success"] { color: var(--accent); }
.cf__status[data-state="error"] { color: #e98686; }
@media (max-width: 540px) { .cf__grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 40px; background: var(--bg-2); }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.footer__brand { grid-column: span 1; }
.footer__brand p { margin-top: 16px; font-size: 0.9rem; color: var(--text-mute); max-width: 38ch; }
.footer h4 { font-family: var(--font-display); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-mute); margin-bottom: 16px; }
.footer ul { display: grid; gap: 11px; }
.footer a { font-size: 0.92rem; color: var(--text-soft); transition: color 0.2s; }
.footer a:hover { color: var(--accent); }
.footer__bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.84rem; color: var(--text-mute); }

/* Social icons (footer) — rounded chips matching the integration-chip language */
.social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.social__link {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-soft); background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line-strong); box-shadow: var(--hi);
  transition: color 0.2s, border-color 0.25s, background 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.social__link svg { width: 20px; height: 20px; }
.social__link:hover { color: var(--accent); border-color: var(--accent-line); background: rgba(196, 240, 66, 0.06); transform: translateY(-2px); box-shadow: var(--hi), 0 10px 22px -14px rgba(196, 240, 66, 0.4); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }
.reveal[data-d="4"] { transition-delay: 0.32s; }
.reveal[data-d="5"] { transition-delay: 0.4s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__copy { max-width: 640px; margin-inline: auto; text-align: left; }
  .hero__visual { max-width: 420px; margin-inline: auto; order: 0; }
  .solution__grid, .proof__grid, .faq__grid { grid-template-columns: 1fr; gap: 36px; }
  .cases__grid { grid-template-columns: repeat(2, 1fr); }
  .steps__grid { grid-template-columns: repeat(2, 1fr); }
  .step { border-right: none; border-bottom: 1px solid var(--line); padding: 28px 0; }
  .step:first-child { padding-left: 0; }
  .step:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 26px; }
  .step:nth-child(even) { padding-left: 26px; }
  .bento { grid-template-columns: repeat(4, 1fr); }
  .bcell--feature { grid-column: span 4; grid-row: span 1; }
  .bcell--wide, .bcell--mid { grid-column: span 4; }
  .bcell--third, .bcell--dark { grid-column: span 2; }
}

/* Nav: switch to hamburger at/below lg so tablet portrait never overflows the bar */
@media (max-width: 1024px) {
  .nav__links { display: none; }
  .nav__menu-btn { display: flex; }
  .nav__cta { display: none; }
  .nav.open .nav__links {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; top: 68px; left: 0; right: 0; padding: 14px 22px 22px;
    background: rgba(10,11,13,0.98); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
  }
  .nav.open .nav__links a:not(.nav__links-cta) { padding: 13px 0; width: 100%; }
  .nav.open .nav__links-cta { display: inline-flex; width: 100%; justify-content: center; margin-top: 10px; }
}

@media (min-width: 769px) and (max-width: 980px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px 40px; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .statband__grid { grid-template-columns: repeat(2, 1fr); gap: 22px 18px; padding: 36px 0; }
  .pain, .why__grid { grid-template-columns: 1fr; }
  .cases__grid { grid-template-columns: 1fr; }
  .calc__grid { grid-template-columns: 1fr; }
  .calc__inputs { border-right: none; border-bottom: 1px solid var(--line); }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }

  /* Hero: text first; hide the decorative network on phones (looked sparse/broken,
     and the integrations story is already told by the orbit in the Solution section).
     Hiding it also stops the canvas animation loop on mobile = battery/CPU saved. */
  .hero { padding-top: 88px; padding-bottom: 40px; min-height: auto; }
  .hero h1 { font-size: clamp(1.85rem, 7.6vw, 2.7rem); }
  .hero__sub { font-size: 1.02rem; }
  .hero__visual { display: none; }

  /* Right-size section headings for phones */
  .h-sec { font-size: clamp(1.6rem, 6.4vw, 2.3rem); }
  .final h2 { font-size: clamp(1.8rem, 7vw, 2.6rem); }
  .calc__inputs h2 { font-size: clamp(1.5rem, 6vw, 2rem); }

  /* Comparator taller so the stacked content breathes */
  .compare { aspect-ratio: 4 / 5; }
  .compare__pane { padding: 22px 22px; }
  .crow { font-size: 0.84rem; gap: 9px; }
  .compare__metric .v { font-size: 1.25rem; }

  .proof__stat b { font-size: 1.4rem; min-width: 78px; }
}

@media (max-width: 540px) {
  .container { padding: 0 18px; }
  .steps__grid { grid-template-columns: 1fr; }
  .step:nth-child(odd) { border-right: none; padding-right: 0; }
  .step:nth-child(even) { padding-left: 0; }
  .bento { grid-template-columns: 1fr; }
  .bcell, .bcell--wide, .bcell--mid, .bcell--third, .bcell--dark, .bcell--feature { grid-column: span 1; }

  /* Hero CTAs stack full-width for tap targets */
  .hero__cta { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero__cta .btn { width: 100%; }
  .eyebrow--lead { font-size: 0.9rem; }

  /* Hero logos: smaller, fewer to avoid crowding */
  .hero__visual { max-width: 300px; }
  .hero__logo { width: 42px; height: 42px; }
  .hero__logo:nth-child(5), .hero__logo:nth-child(6) { display: none; }

  /* Orbit: smaller chips + radii so nothing clips/overlaps */
  .orbit { max-width: 320px; }
  .orbit__item { --chip: clamp(34px, 13cqmin, 44px); }
  .orbit__item--in { --r: 27cqmin; }
  .orbit__item--out { --r: 40cqmin; }
  .orbit__core b { font-size: 1.4rem; }

  .final__card { padding: 40px 20px; }
  .section { padding: clamp(56px, 16vw, 90px) 0; }
}

@media (max-width: 400px) {
  .brand { font-size: 1.02rem; }
  .brand__mark { width: 26px; height: 26px; }
  .lang__btn { padding: 6px 8px; font-size: 0.74rem; }
  .nav__right { gap: 10px; }
  .statband__grid { gap: 18px 14px; }
  .hero h1 { font-size: 1.72rem; }
  .stat__num { font-size: 1.7rem; }
}

/* ---------- Assurance strip (risk reversal, sits inside final card) ---------- */
.assure {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  max-width: 720px; margin: 30px auto 0;
}
.assure li {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 16px; border-radius: var(--r-pill);
  background: rgba(10, 11, 13, 0.4); border: 1px solid var(--line-strong);
  box-shadow: var(--hi);
  font-family: var(--font-display); font-weight: 500; font-size: 0.9rem; color: var(--text-soft);
}
.assure li svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--accent); }
.assure li b { color: var(--text); font-weight: 600; }

/* ---------- Founder note (human differentiator, editorial portrait) ---------- */
.founder-sec { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(48px, 7vw, 88px); }
.founder {
  position: relative; display: grid; grid-template-columns: minmax(210px, 270px) 1fr;
  gap: clamp(28px, 4vw, 56px); align-items: center;
  max-width: 940px; margin: 0 auto; text-align: left;
  padding: clamp(26px, 4vw, 44px);
  border: 1px solid var(--line); border-radius: calc(var(--r-card) + 6px);
  background: var(--card-grad), var(--surface);
  box-shadow: var(--hi), var(--shadow);
}
.founder__media { position: relative; }
.founder__media img {
  width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; display: block;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px var(--champagne-line), 0 24px 50px -24px rgba(0,0,0,0.8), 0 0 50px -12px rgba(196,240,66,0.16);
}
.founder__content { position: relative; }
.founder__content::before {
  content: ""; position: absolute; left: -20px; top: 4px; bottom: 4px; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--champagne), transparent);
}
.founder__quote {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.2rem, 2.4vw, 1.75rem); line-height: 1.32; letter-spacing: -0.02em;
  color: var(--text); text-wrap: pretty; margin: 0; max-width: 42ch;
}
.founder__quote .hl { color: var(--accent); }
.founder__by { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin-top: 24px; }
.founder__name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--text); letter-spacing: -0.01em; }
.founder__role { font-size: 0.88rem; color: var(--champagne); }
@media (max-width: 640px) {
  .founder { grid-template-columns: 1fr; gap: 22px; text-align: center; padding: 30px 24px; }
  .founder__media { max-width: 180px; margin: 0 auto; }
  .founder__content::before { display: none; }
  .founder__quote { max-width: none; }
  .founder__by { align-items: center; }
}

/* New components inherit reveal; keep stat separators tidy on small screens */
@media (max-width: 768px) {
  .stat { padding: 0; }
  .stat + .stat::before { display: none; }
  .statband__grid { gap: 22px 18px; }
}

/* ---------- Floating glass nav (desktop only; mobile bar untouched ≤1024) ---------- */
@media (min-width: 1025px) {
  .nav { height: auto; padding: 14px clamp(16px, 3vw, 30px) 0; background: transparent; border-bottom: none; }
  .nav.scrolled { background: transparent; border-bottom-color: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav__inner {
    max-width: 1200px; margin: 0 auto; padding: 11px 16px 11px 22px;
    border-radius: 18px; border: 1px solid var(--line);
    background: rgba(14, 16, 19, 0.5);
    backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: var(--hi), 0 12px 30px -20px rgba(0, 0, 0, 0.85);
    transition: background 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
  }
  .nav.scrolled .nav__inner {
    background: rgba(12, 14, 17, 0.74);
    border-color: var(--champagne-line);
    box-shadow: var(--hi), 0 16px 40px -22px rgba(0, 0, 0, 0.9);
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .step__bar::after { transition: none; }
  .btn--primary, .hero__logo, .orbit__item, .compare__grip { animation: none !important; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.05ms !important; }
}

/* =========================================================================
   Legal pages (terms / privacy) - shares the landing's tokens & chrome
   ========================================================================= */
.legal-hero { padding: clamp(118px, 16vw, 176px) 0 clamp(28px, 5vw, 48px); position: relative; }
.legal-hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); }
.legal-hero .eyebrow { margin-bottom: 18px; }
.legal-updated { margin-top: 16px; font-family: var(--font-display); font-size: 0.85rem; color: var(--text-mute); letter-spacing: 0.01em; }

.legal { padding: clamp(8px, 2vw, 16px) 0 clamp(72px, 11vw, 128px); }
.legal-body { max-width: 800px; }
.legal-body:not(.is-active) { display: none; }
.legal-body > p:first-of-type { color: var(--text); font-size: 1.04rem; line-height: 1.7; }
.legal-body h2 {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.018em;
  font-size: clamp(1.28rem, 2.6vw, 1.7rem); line-height: 1.15;
  margin: 46px 0 14px; padding-top: 6px;
}
.legal-body h2 .num { color: var(--champagne); margin-right: 12px; font-variant-numeric: tabular-nums; }
.legal-body h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.06rem; color: var(--text); margin: 26px 0 10px; }
.legal-body p { color: var(--text-soft); line-height: 1.72; font-size: 0.98rem; margin-bottom: 15px; }
.legal-body ul { list-style: none; display: grid; gap: 10px; margin: 4px 0 18px; }
.legal-body li { position: relative; padding-left: 24px; color: var(--text-soft); line-height: 1.65; font-size: 0.98rem; }
.legal-body li::before { content: ""; position: absolute; left: 5px; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent-line); }
.legal-body strong { color: var(--text); font-weight: 600; }
.legal-body a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-line); transition: border-color 0.2s; }
.legal-body a:hover { border-bottom-color: var(--accent); }

.legal-note {
  margin-top: 44px; padding: 20px 22px;
  border: 1px solid var(--line); border-left: 2px solid var(--champagne-line);
  border-radius: var(--r-card-inner);
  background: var(--surface);
  color: var(--text-mute); font-size: 0.9rem; line-height: 1.65;
}
.legal-back { display: inline-flex; align-items: center; gap: 9px; margin-top: 40px; }
.legal-back svg { width: 18px; height: 18px; transform: rotate(180deg); }

/* ---------- Cookie notice ---------- */
.cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
  margin: 0 auto; max-width: 760px;
  display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); flex-wrap: wrap;
  justify-content: space-between;
  padding: 16px 20px;
  border: 1px solid var(--line-strong); border-radius: var(--r-card);
  background: var(--card-grad), var(--surface-2);
  box-shadow: var(--hi), var(--shadow);
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.cookie.show { opacity: 1; transform: translateY(0); }
.cookie__text { color: var(--text-soft); font-size: 0.9rem; line-height: 1.55; flex: 1 1 320px; }
.cookie__link { color: var(--accent); text-decoration: none; white-space: nowrap; border-bottom: 1px solid var(--accent-line); transition: border-color 0.2s; }
.cookie__link:hover { border-bottom-color: var(--accent); }
.cookie__actions { display: flex; gap: 10px; flex: 0 0 auto; }
.cookie__btn { padding: 10px 20px; font-size: 0.9rem; }
@media (max-width: 560px) {
  .cookie {
    flex-direction: column; align-items: stretch; text-align: left;
    gap: 14px; padding: 14px 16px;
  }
  /* En columna, flex-basis afecta al ALTO: sin esto el texto crece a 320px y
     estira el banner por toda la pantalla. Lo dejamos en tamaño natural. */
  .cookie__text { flex: 0 0 auto; }
  .cookie__actions { justify-content: flex-end; }
  .cookie__btn { flex: 1 1 auto; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie { transition: opacity 0.2s linear; transform: none; }
  .cookie.show { transform: none; }
}
