/* ==========================================================================
   Stacked · base layer. Tokens, type, layout, buttons, reveal, shared mocks.
   Every section builds on this file. Sections never redefine these tokens.
   ========================================================================== */
:root {
  /* colour */
  --bg: #ffffff;
  --bg-2: #f7f8fa;              /* the only alternate ground: a cool near-white */
  --ink: #0a0b0f;
  --ink-2: #22242c;
  --soft: #5b6070;              /* body copy on white: 6.2:1 */
  --faint: #8a8f9c;             /* meta text only, never body */
  --line: rgba(10, 11, 15, 0.08);
  --line-2: rgba(10, 11, 15, 0.14);
  --blue: #0866ff;              /* the one accent */
  --blue-soft: rgba(8, 102, 255, 0.08);
  --wa: #25d366;                /* WhatsApp green: only inside WhatsApp mocks and "success" states */
  --wa-bg: #efe7de;
  --wa-out: #d9fdd3;
  --danger: #d92d20;             /* form errors only */
  --danger-ink: #b42318;

  /* type */
  --display: "Inter Tight", system-ui, sans-serif;
  --text: "Inter", system-ui, sans-serif;
  --t-h1: clamp(3rem, 1.6rem + 4.6vw, 5.4rem);
  --t-h2: clamp(2.3rem, 1.5rem + 3vw, 4rem);
  --t-h3: clamp(1.35rem, 1.2rem + 0.6vw, 1.75rem);
  --t-lead: clamp(1.1rem, 1rem + 0.35vw, 1.3rem);
  --t-body: 17px;
  --t-small: 15px;
  --t-meta: 13px;

  /* space + layout */
  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 24px);
  --section: clamp(96px, 11vw, 168px);
  --r-sm: 10px; --r-md: 18px; --r-lg: 28px; --r-pill: 999px;

  /* depth: soft, offset, never a coloured halo */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 2px 8px -2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 20px -6px rgba(16, 24, 40, 0.12);
  --shadow-lg: 0 1px 1px rgba(16, 24, 40, 0.04), 0 12px 24px -6px rgba(16, 24, 40, 0.08), 0 40px 80px -20px rgba(16, 24, 40, 0.18);

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
/* Anchor jumps land flush with the section: every section's own top padding
   already clears the 74px nav, so no strip of the previous section shows.
   Focusable controls keep a margin so keyboard focus never hides under the nav. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 0; }
:where(a, button, input, textarea, select, summary, [tabindex]) { scroll-margin-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--text); font-size: var(--t-body); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
::selection { background: var(--blue); color: #fff; }

/* ---- layout ------------------------------------------------------------ */
.wrap { width: min(var(--wrap), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.section { position: relative; padding-block: var(--section); }
.section--alt { background: var(--bg-2); }
/* Shared two-column section header (heading left, lead right) so the lead column
   starts at the same x and sits on the same line in every section that uses one. */
.head-split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); column-gap: 64px; align-items: end; }
@media (max-width: 960px) { .head-split { grid-template-columns: minmax(0, 1fr); row-gap: 20px; } }

/* ---- type -------------------------------------------------------------- */
.h2 { font-family: var(--display); font-weight: 700; font-size: var(--t-h2); line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; }
.h3 { font-family: var(--display); font-weight: 650; font-size: var(--t-h3); line-height: 1.15; letter-spacing: -0.02em; }
.lead { font-size: var(--t-lead); line-height: 1.5; color: var(--soft); max-width: 34em; text-wrap: pretty; }
.muted { color: var(--soft); }
.kicker { font-size: var(--t-small); font-weight: 600; color: var(--blue); letter-spacing: -0.005em; }

/* ---- pill + ticks ------------------------------------------------------ */
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border: 1px solid var(--line); border-radius: var(--r-pill); font-size: 14px; color: var(--soft); background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,0.04); }
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 0 3px rgba(37,211,102,0.18); }
.ticks { list-style: none; display: grid; gap: 10px; font-size: var(--t-small); color: var(--soft); }
.ticks li { display: flex; align-items: center; gap: 10px; }
.ticks li::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; background: rgba(8,102,255,0.1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.9' fill='none' stroke='%230866ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.ticks b { color: var(--ink); font-weight: 600; }

/* ---- nav --------------------------------------------------------------- */
.nav {
  position: fixed; top: 14px; left: 50%; translate: -50% 0; z-index: 50;
  width: min(var(--wrap), calc(100% - 24px)); height: 60px; padding: 0 10px 0 20px;
  display: flex; align-items: center; gap: 24px;
  background: rgba(255, 255, 255, 0.9); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border: 1px solid var(--line); border-radius: var(--r-pill); box-shadow: var(--shadow-md);
}
.nav__mark { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; text-decoration: none; }
/* logo: the client's "stacked." wordmark (js/logo.js animates it; the <img> is the no-JS fallback) */
:root { --logo-ink: #1a1a1a; --logo-green: #81d215; --logo-guide: rgba(26, 26, 26, 0.36); }
.nav[data-ground="dark"] { --logo-ink: #fff; --logo-guide: rgba(255, 255, 255, 0.34); }
[data-logo] img, .logo { display: block; height: 29px; width: auto; aspect-ratio: 924 / 196; }
.logo { overflow: visible; }
.logo__ink { fill: var(--logo-ink); }
.logo__line, .logo__dotline { fill: none; stroke: var(--logo-ink); stroke-width: 1.1px; }
.logo__green, .logo__dotfill { fill: var(--logo-green); }
.logo__ring { fill: none; stroke: var(--logo-green); stroke-width: 1.5px; }
.logo__guides line { stroke: var(--logo-guide); stroke-width: 1px; }
.logo__ink, .logo__line, .logo__dotline { transition: fill 0.35s var(--ease), stroke 0.35s var(--ease); }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-pill); font-size: 15px; color: var(--soft); text-decoration: none; transition: color 0.2s, background-color 0.2s; }
.nav__links a:hover, .nav__links a[aria-current="true"] { color: var(--ink); background: rgba(10, 11, 15, 0.04); }
.nav { transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease), transform 0.5s var(--ease), opacity 0.3s var(--ease); }
.nav .btn--sm { height: 44px; white-space: nowrap; }
/* In the form section the pill only repeats the form's own button (and on a phone
   costs the keyboard 74px), so js/base.js tucks it away there: on a phone once the
   section rises past 60% of the view, on desktop once it fills the view. The
   footer carries the links. Keyboard focus inside the nav brings it back. */
.nav.nav--tucked:not(:has(:focus-visible)) { transform: translateY(calc(-100% - 40px)); opacity: 0; pointer-events: none; }
.nav[data-ground="dark"] { background: rgba(16, 17, 22, 0.66); border-color: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.5); }
.nav[data-ground="dark"] .nav__links a { color: rgba(255, 255, 255, 0.72); }
.nav[data-ground="dark"] .nav__links a:hover, .nav[data-ground="dark"] .nav__links a[aria-current="true"] { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav[data-ground="dark"] .btn--dark { background: #fff; color: var(--ink); }

/* ---- buttons ----------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 24px; border: 0; border-radius: var(--r-pill); font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; transition: transform 0.2s var(--ease), background-color 0.2s, box-shadow 0.2s; }
.btn:active { transform: scale(0.97); }
.btn--sm { height: 42px; padding: 0 18px; font-size: 15px; }
.btn--dark { background: var(--ink); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.12); }
.btn--dark:hover { background: var(--ink-2); }
.btn--dark span { transition: transform 0.2s var(--ease); }
.btn--dark:hover span { transform: translateX(3px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: rgba(10, 11, 15, 0.05); }
.btn--line { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--line:hover { box-shadow: inset 0 0 0 1px var(--ink); }

/* ---- reveal-on-enter (js/base.js adds .is-in once, never removes) ------ */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--d, 0) * 1ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js [data-reveal] { transform: none; transition: opacity 0.3s linear; } }

/* ==========================================================================
   Shared product mocks. Reuse these class names; do not restyle them in a
   section file. Compose them, scale them, or wrap them instead.
   ========================================================================== */

/* Meta ad card */
.ad { width: 250px; color: var(--ink); background: #fff; border-radius: var(--r-md); box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; }
.ad__head { display: flex; gap: 10px; align-items: center; padding: 12px 14px; font-size: 13px; line-height: 1.25; }
.ad__head small { display: block; color: var(--faint); font-size: 11px; }
.ad__logo { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #0a0b0f, #3a3f4d); }
.ad__img { position: relative; height: 170px; background: linear-gradient(160deg, #e8f0ff 0%, #cfe0ff 45%, #b9f0cf 100%); overflow: hidden; }
.ad__img span { position: absolute; border-radius: 10px; background: rgba(255,255,255,0.75); box-shadow: 0 8px 20px -8px rgba(16,24,40,0.2); }
.ad__img span:nth-child(1) { left: 22px; bottom: 26px; width: 150px; height: 26px; }
.ad__img span:nth-child(2) { left: 22px; bottom: 60px; width: 110px; height: 26px; opacity: 0.8; }
.ad__img span:nth-child(3) { left: 22px; bottom: 94px; width: 70px; height: 26px; opacity: 0.6; }
.ad__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: #f5f6f8; font-size: 13px; line-height: 1.25; }
.ad__foot small { display: block; color: var(--faint); font-size: 10px; letter-spacing: 0.04em; }
.ad__btn { padding: 7px 10px; border-radius: 8px; background: #e4e6eb; font-weight: 600; font-size: 12px; white-space: nowrap; }

/* Phone + WhatsApp chat */
.phone { color: var(--ink); width: 300px; height: 612px; padding: 12px; border-radius: 52px; background: #0d0e12; box-shadow: var(--shadow-lg), inset 0 0 0 1.5px #2a2c33; position: relative; }
.phone__notch { position: absolute; top: 22px; left: 50%; translate: -50% 0; width: 92px; height: 26px; border-radius: 20px; background: #000; z-index: 2; }
.wa { height: 100%; border-radius: 40px; overflow: hidden; background: var(--wa-bg); display: flex; flex-direction: column; }
.wa__bar { display: flex; align-items: center; gap: 10px; padding: 52px 14px 12px; background: #fff; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.2; }
.wa__bar small { display: block; font-size: 12px; color: var(--faint); }
.wa__back { font-size: 26px; line-height: 1; color: var(--wa); margin-top: -3px; }
.wa__avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #0a0b0f, #3a3f4d); }
.wa__chat { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.msg { max-width: 84%; padding: 8px 12px; border-radius: 14px; font-size: 14px; line-height: 1.4; box-shadow: 0 1px 1px rgba(0,0,0,0.06); opacity: 0; transform: translateY(10px) scale(0.96); transform-origin: bottom left; transition: opacity 0.45s var(--ease), transform 0.55s var(--ease); display: none; }
.msg--in { align-self: flex-start; background: #fff; border-top-left-radius: 4px; }
.msg--out { align-self: flex-end; background: var(--wa-out); border-top-right-radius: 4px; transform-origin: bottom right; }
.msg.is-shown { display: block; }
.msg.is-on { opacity: 1; transform: none; }
.msg--typing { align-self: flex-end; background: var(--wa-out); padding: 12px 14px; display: none; gap: 4px; }
.msg--typing.is-shown { display: inline-flex; }
.msg--typing i { width: 6px; height: 6px; border-radius: 50%; background: #6b8f6b; animation: dot 1.1s infinite; }
.msg--typing i:nth-child(2) { animation-delay: 0.15s; }
.msg--typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { opacity: 0.3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.wa__input { margin: 0 10px 18px; height: 42px; border-radius: var(--r-pill); background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 6px 0 16px; font-size: 14px; color: var(--faint); }
.wa__input i { width: 32px; height: 32px; border-radius: 50%; background: var(--wa); }

/* Notification toast */
.toast { color: var(--ink); display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; background: rgba(255,255,255,0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); font-size: 14px; line-height: 1.3; white-space: nowrap; }
.toast small { display: block; color: var(--soft); font-size: 12.5px; }
.toast__icon { width: 36px; height: 36px; border-radius: 11px; background: var(--wa) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }

/* Browser window */
.browser { color: var(--ink); background: #fff; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; }
.browser__bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; background: #f5f6f8; border-bottom: 1px solid var(--line); }
.browser__bar i { width: 9px; height: 9px; border-radius: 50%; background: #d9dbe1; }
.browser__url { margin-left: 10px; flex: 1; height: 20px; border-radius: 6px; background: #fff; border: 1px solid var(--line); font-size: 11px; color: var(--faint); display: flex; align-items: center; padding: 0 8px; }

/* ---- responsive nav + reduced motion ---------------------------------- */
@media (max-width: 960px) {
  .nav__links { display: none; }
  .nav { gap: 12px; }
  .nav .btn--sm { margin-left: auto; }
}
@media (max-width: 350px) {
  .nav { padding-left: 14px; }
  .nav .btn--sm { padding: 0 14px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .nav { transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease), opacity 0.2s linear; }
  .nav.nav--tucked:not(:has(:focus-visible)) { transform: none; }
  .msg { transition: none; }
  .msg--typing i { animation: none; }
}
