/* Cotempo public site — design tokens mirror docs/design/design-system.md.
   Self-contained: no /styles.css root dependency, no third-party requests.
   Motion is layered as progressive enhancement and fully disabled under
   prefers-reduced-motion. */

/* Self-hosted Plus Jakarta Sans (latin variable). font-display:swap keeps text
   visible on load (Core Web Vitals). System fallback after Plus Jakarta Sans.
   TODO(prod): add latin-ext + woff fallback only if non-latin coverage is needed. */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin-var.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --background: #faf9f6;
  --surface-low: #f4f3f1;
  --surface: #efeeeb;
  --surface-high: #e3e2e0;
  --text: #1a1c1a;
  --muted: #424841;
  --primary: #436444;
  --primary-dark: #38543a;
  --primary-container: #5b7d5b;
  --secondary: #8e4e14;
  --secondary-container: #ffab69;
  --on-secondary-container: #783d01;
  --tertiary: #336366;
  --outline: #737970;
  --outline-variant: #c2c8be;
  --evt-red: #E57373;
  --evt-orange: #FF8A65;
  --evt-yellow: #FFB74D;
  --evt-green: #66BB6A;
  --evt-blue: #42A5F5;
  --evt-purple: #AB47BC;
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 5vw, 40px);
  --maxw: 1120px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --hairline: rgba(115, 121, 112, 0.28);
  --shadow-soft: 0 18px 45px rgba(67, 100, 68, 0.11);
  --shadow-tight: 0 10px 24px rgba(26, 28, 26, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0) 360vh),
    var(--background);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  /* Guard against any decorative element (rotated phone backdrop, pinned
     phone stage) inflating the layout width on narrow screens. */
  overflow-x: clip;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: 0; margin: 0; overflow-wrap: break-word; }
p { margin: 0; }

a { color: var(--primary); font-weight: 600; }
a:hover { color: var(--primary-dark); }

/* Visible focus for keyboard users (WCAG 2.4.7 / 2.4.13) */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

img, svg { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

/* Skip link (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 246, 0.88);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--outline-variant);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding-block: 10px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  letter-spacing: 0;
}
.brand img { width: 34px; height: 34px; }
.brand .pub { color: var(--muted); font-weight: 500; font-size: 13px; }
.nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 9999px;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.nav-links a:hover { background: var(--surface); color: var(--text); }
.nav-links a[aria-current="page"] {
  background: rgba(67, 100, 68, 0.09);
  color: var(--primary-dark);
}
.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 38px;
  padding: 3px;
  border: 1px solid var(--outline-variant);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.46);
}
.language-switch::before { display: none; }
.language-option,
.nav-links .language-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 9999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.language-switch a.language-option:hover {
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.language-option.is-active {
  background: rgba(67, 100, 68, 0.1);
  color: var(--primary-dark);
  box-shadow: inset 0 0 0 1px rgba(67, 100, 68, 0.18);
}
.nav-menu { margin-left: auto; }
.menu-button { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 9999px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 12px 28px rgba(67, 100, 68, 0.18); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--outline-variant); }
.btn-outline:hover { background: var(--surface-low); color: var(--primary); }

/* Disabled "Coming to Google Play" placeholder CTA */
.btn-comingsoon {
  background: var(--surface-high);
  color: var(--muted);
  border-color: var(--outline-variant);
  cursor: not-allowed;
  flex-direction: column;
  gap: 1px;
  padding-block: 8px;
  line-height: 1.2;
  position: relative;
}
.btn-comingsoon .cs-top { font-size: 12px; font-weight: 600; opacity: 0.85; }
.btn-comingsoon .cs-main { font-size: 16px; font-weight: 700; color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.btn-comingsoon svg { width: 20px; height: 20px; }
/* "listing in progress" pulsing dot — honest, no availability implied */
.btn-comingsoon::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--secondary-container);
  box-shadow: 0 0 0 0 rgba(255, 171, 105, 0.6);
  animation: csPulse 2.4s ease-in-out infinite;
}
@keyframes csPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 171, 105, 0.55); }
  50% { box-shadow: 0 0 0 6px rgba(255, 171, 105, 0); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(30px, 4.5vw, 48px);
  border-bottom: 1px solid var(--hairline);
  background:
    linear-gradient(90deg, rgba(115, 121, 112, 0.045) 1px, transparent 1px) center / 42px 100%,
    radial-gradient(circle at 64% 45%, rgba(67, 100, 68, 0.08), transparent 30%),
    var(--background);
}
.hero-full { min-height: calc(100svh - 65px); display: grid; align-items: center; }
.hero::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(67, 100, 68, 0.28), transparent);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  grid-template-areas:
    "copy visual"
    "actions visual";
  column-gap: clamp(28px, 5vw, 64px);
  row-gap: 0;
  align-items: center;
  min-height: inherit;
}
.hero-copy { grid-area: copy; max-width: 660px; min-width: 0; }
.hero-actions { grid-area: actions; align-self: start; }
.hero h1 { font-size: clamp(34px, 5.4vw, 70px); font-weight: 800; overflow-wrap: break-word; text-wrap: balance; }
.hero h1 .accent { color: var(--primary); }
.hero .lead {
  color: var(--muted);
  font-size: clamp(18px, 2.4vw, 21px);
  margin-top: 20px;
  max-width: 34ch;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.cta-hint { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* Phone mockup column */
.hero-visual { grid-area: visual; position: relative; display: flex; justify-content: center; min-width: 0; }
.phone-stage {
  position: relative;
  isolation: isolate;
  padding: 10px clamp(26px, 4vw, 44px);
  will-change: transform;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.phone-stage::before {
  content: "";
  position: absolute;
  inset: 9% 5% 7% 1%;
  z-index: -1;
  border: 1px solid var(--hairline);
  border-radius: 42px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(239, 238, 235, 0.5)),
    var(--surface-low);
  box-shadow: var(--shadow-soft);
  transform: rotate(-2deg);
}
.phone-shadow {
  position: relative;
  filter: drop-shadow(0 24px 48px rgba(67, 100, 68, 0.18));
}
.phone-shadow svg { width: clamp(232px, 28vw, 300px); height: auto; }

/* Scroll cue at bottom of the full-height hero */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  animation: cueIn 0.5s ease 1.8s forwards;
}
.scroll-cue svg { width: 22px; height: 22px; color: var(--primary); animation: cueBob 1.8s ease-in-out infinite; }
.scroll-cue:hover { color: var(--text); }
@keyframes cueIn { to { opacity: 1; } }
@keyframes cueBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ---------- Hero SVG assemble animation ----------
   Base (no-animation / reduced-motion) state is the final, fully-visible
   render. Animations only add a one-shot entrance. */
.hsvg [class^="hsvg-"] { transform-box: fill-box; }
/* Assemble animation runs only in the hero; the how-it-works copy of the
   calendar is driven by scroll instead (see .how-section). */
.hero .hsvg-month { transform-origin: left center; animation: hsvgUp 0.5s both 0.15s; }
.hero .hsvg-week { animation: hsvgFade 0.4s both 0.35s; }
.hero .hsvg-row { animation: hsvgUp 0.45s both var(--d, 0.45s); }
.hero .hsvg-selected { transform-origin: center; animation: hsvgPop 0.45s cubic-bezier(0.34,1.56,0.64,1) both 0.72s; }
.hero .hsvg-today { transform-origin: center; animation: hsvgPop 0.45s cubic-bezier(0.34,1.56,0.64,1) both 0.82s; }
.hero .hsvg-agenda { animation: hsvgUp 0.45s both 0.92s; }
.hero .hsvg-tile { transform-origin: left center; animation: hsvgSlide 0.5s cubic-bezier(0.22,1,0.36,1) both var(--d, 1s); }
.hero .hsvg-stripe { transform-origin: top center; animation: hsvgStripe 0.45s ease both var(--d, 1.1s); }
.hero .hsvg-fab { transform-origin: center; animation: hsvgPop 0.5s cubic-bezier(0.34,1.56,0.64,1) both 1.35s; }
@keyframes hsvgUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hsvgFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hsvgPop { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }
@keyframes hsvgSlide { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: translateX(0); } }
@keyframes hsvgStripe { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---------- Scroll-reveal system (compositor-thread, progressive) ---------- */
.reveal { opacity: 1; }
@supports ((animation-timeline: view()) and (animation-range: entry 5% cover 22%)) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      opacity: 0;
      animation: revealUp linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 22%;
    }
    .reveal-stagger > * {
      opacity: 0;
      animation: revealUp linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 20%;
    }
  }
}
html.js-reveal-fallback .reveal,
html.js-reveal-fallback .reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
html.js-reveal-fallback .reveal.is-revealed,
html.js-reveal-fallback .reveal-stagger > *.is-revealed {
  opacity: 1;
  transform: translateY(0);
}
@keyframes revealUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Section scaffold ---------- */
section { scroll-margin-top: 80px; }
.section { padding-block: clamp(40px, 6vw, 72px); }
.section-head { max-width: 640px; margin-bottom: clamp(24px, 4vw, 40px); }
.section-head-centered {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}
.section-head .kicker {
  display: block;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}
.section-head h2 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; margin-top: 10px; }
.section-head p { color: var(--muted); font-size: 18px; margin-top: 14px; }

/* ---------- How it works (scroll-locked, frameless step fragments) ----------
   The phone-framed calendar is gone on purpose: "create a calendar" is a
   different screen than the month grid, so each of the 4 steps shows its own
   FRAMELESS UI fragment, recreated to match the real app. A tall track pins
   the stage and the fragments cross-fade as scroll advances, in sync with the
   step captions. Browsers without scroll-driven animation use a JS fallback;
   reduced-motion users get centered static step/screen pairs. */
.how-section {
  padding-block: clamp(40px, 6vw, 72px) 0;
  background:
    linear-gradient(180deg, rgba(244, 243, 241, 0.7), rgba(250, 249, 246, 0.92)),
    var(--surface-low);
  border-top: 1px solid var(--hairline);
}
/* Fallback (no scroll-driven animation): a normal stacked section. */
.how-track { position: relative; }
.how-stage { padding-block: clamp(32px, 5vw, 56px); }
.how-stage-grid {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.how-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: rgba(250, 249, 246, 0.7);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}
.how-step .num {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e8efe6;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}
.how-step h3 { font-size: 19px; font-weight: 800; }
.how-step p { color: var(--muted); font-size: 15px; margin-top: 6px; }

/* Fragment canvas. Default/fallback = a simple stacked column of all 4. */
.how-canvas { position: relative; display: grid; gap: 18px; }
.how-frag { display: flex; justify-content: center; align-items: center; }
.frag-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 24px;
  border-radius: 24px;
  background: var(--background);
  border: 1px solid var(--outline-variant);
  box-shadow: var(--shadow-soft);
}

/* Step 1 — create a calendar */
.frag-label { display: block; font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.frag-field {
  display: flex; align-items: center; min-height: 56px;
  padding: 0 16px; border-radius: 14px;
  border: 1.5px solid var(--primary); background: #eef3ec;
}
.frag-input { display: inline-flex; align-items: center; font-size: 16px; color: var(--text); max-width: 100%; overflow: hidden; }
.type-text { display: inline-block; white-space: nowrap; overflow: hidden; max-width: calc(var(--chars, 20) * 1ch); }
.frag-caret { flex: none; width: 2px; height: 20px; margin-left: 1px; background: var(--primary); }
.frag-btn {
  position: relative;
  -webkit-appearance: none; appearance: none; border: 0; cursor: default;
  font-family: var(--font); font-weight: 700; font-size: 15px;
  width: 100%; min-height: 54px; border-radius: 16px; margin-top: 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.frag-btn svg { width: 18px; height: 18px; }
.frag-btn-label { display: inline-flex; align-items: center; gap: 8px; }
.frag-btn-filled { background: var(--primary); color: #fff; }
.frag-btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--outline); }
/* Loading ring shown briefly on "press" before the step hands off (scroll mode
   only — hidden in the static fallback). Centered over the button via margins so
   it never shifts the label; rotation runs on a time timeline. */
.frag-spin {
  display: none; position: absolute; top: 50%; left: 50%; margin: -9px 0 0 -9px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff;
}
.frag-btn-outline .frag-spin { border-color: rgba(67, 100, 68, 0.28); border-top-color: var(--primary); }

/* Step 2 — invite by link */
.invite-head { display: flex; align-items: flex-start; gap: 12px; }
.invite-ico, .invite-share { flex: none; color: var(--muted); }
.invite-ico svg, .invite-share svg { width: 22px; height: 22px; }
.invite-text { flex: 1 1 auto; min-width: 0; }
.invite-text b { display: block; font-size: 16px; font-weight: 700; color: var(--text); }
.invite-text span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.invite-card .frag-btn { margin-top: 20px; }

/* Step 3 — add the plan (existing events behind the Add event button) */
.frag-plan { display: flex; flex-direction: column; }
.agenda-day { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.frag-agenda { display: flex; flex-direction: column; }
.frag-agenda .evt-tile + .evt-tile { margin-top: 10px; }
.evt-tile {
  position: relative; overflow: hidden;
  display: flex; align-items: center; min-height: 60px;
  padding: 10px 14px 10px 18px;
  border: 1px solid var(--hairline); border-radius: 4px 12px 12px 4px;
  background: var(--surface-low);
}
.evt-tile .evt-stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c, #42A5F5); }
.evt-tile-body { flex: 1 1 auto; min-width: 0; }
.evt-tile b { display: block; font-size: 15px; font-weight: 600; color: var(--text); }
.evt-tile .evt-time { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.evt-people { flex: none; display: inline-flex; margin-left: 10px; }
.evt-avatar {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px; margin-left: -6px;
  border-radius: 50%;
  border: 2px solid var(--surface-low);
  background: var(--avatar-bg, var(--primary));
  color: var(--avatar-fg, #fff);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}
.evt-avatar:first-child { margin-left: 0; }
.frag-fab {
  align-self: flex-end; width: max-content; margin-top: 18px;
  min-height: 46px; padding: 0 22px; border-radius: 9999px;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 14px;
  border: 0; display: inline-flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-tight);
}

/* Step 4 — get reminders (a heads-up notification) */
.frag-notif {
  display: flex; gap: 12px; align-items: center;
  width: 100%; max-width: 360px;
  padding: 13px 16px; border-radius: 18px;
  background: var(--background); border: 1px solid var(--outline-variant);
  box-shadow: 0 18px 38px rgba(26, 28, 26, 0.16);
}
.frag-notif .n-mark { flex: none; width: 30px; height: 30px; }
.frag-notif .n-mark img { width: 30px; height: 30px; }
.frag-notif .n-body { min-width: 0; }
.frag-notif .n-app { display: block; font-size: 11px; font-weight: 700; color: var(--muted); line-height: 1.2; }
.frag-notif .n-title { display: block; font-size: 14px; font-weight: 700; color: var(--text); margin-top: 2px; line-height: 1.22; }
.frag-notif .n-copy { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-top: 1px; line-height: 1.25; }
.how-scroll-guide { display: none; }

@media (min-width: 881px) {
  @supports not ((animation-timeline: view()) and (view-timeline-name: --how) and (animation-range: contain 0% contain 100%)) {
    .how-stage { padding-block: clamp(44px, 7vw, 88px); }
    .how-stage-grid {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 18px;
      max-width: 860px;
    }
    .how-steps,
    .how-canvas { display: contents; }
    .how-step,
    .how-frag {
      width: min(100%, 760px);
      margin-inline: auto;
    }
    .how-frag { min-height: 190px; }
    .how-step[data-step="1"] { order: 1; }
    .how-frag[data-frag="1"] { order: 2; }
    .how-step[data-step="2"] { order: 3; }
    .how-frag[data-frag="2"] { order: 4; }
    .how-step[data-step="3"] { order: 5; }
    .how-frag[data-frag="3"] { order: 6; }
    .how-step[data-step="4"] { order: 7; }
    .how-frag[data-frag="4"] { order: 8; }
    .how-step[data-step="2"],
    .how-step[data-step="3"],
    .how-step[data-step="4"] { margin-top: 22px; }
    .frag-card,
    .frag-notif { max-width: 420px; }
  }
}

/* Scroll-locked behavior: enabled only on wide viewports, with scroll-driven
   animation support, and when motion is allowed. */
@media (min-width: 881px) {
  @supports ((animation-timeline: view()) and (view-timeline-name: --how) and (animation-range: contain 0% contain 100%)) {
    @media (prefers-reduced-motion: no-preference) {
      .how-track {
        height: 440vh;
        view-timeline-name: --how;
        view-timeline-axis: block;
      }
      .how-stage {
        position: sticky;
        top: 0;
        min-height: 100vh;
        display: grid;
        align-items: center;
        padding-block: 0;
      }
      .how-scroll-guide {
        position: absolute;
        left: 50%;
        bottom: max(18px, env(safe-area-inset-bottom));
        transform: translateX(-50%);
        display: inline-flex;
        align-items: center;
        gap: 12px;
        min-width: min(360px, calc(100vw - 32px));
        padding: 12px 14px 12px 18px;
        border: 1px solid rgba(67, 100, 68, 0.32);
        border-radius: 9999px;
        background: rgba(250, 249, 246, 0.94);
        box-shadow:
          0 1px 0 rgba(255, 255, 255, 0.84) inset,
          0 18px 34px rgba(26, 28, 26, 0.12);
        color: var(--primary-dark);
        font-size: 13px;
        font-weight: 800;
        text-transform: uppercase;
        backdrop-filter: blur(10px) saturate(130%);
        animation: guideVisibility linear both;
        animation-timeline: --how;
        animation-range: contain 0% contain 100%;
        z-index: 2;
      }
      .guide-text { white-space: nowrap; }
      .guide-progress {
        position: relative;
        flex: 1 1 auto;
        height: 4px;
        min-width: 96px;
        overflow: hidden;
        border-radius: 9999px;
        background: rgba(194, 200, 190, 0.72);
      }
      .guide-progress-fill {
        position: absolute;
        inset-block: 0;
        left: 0;
        width: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, var(--primary), var(--secondary-container));
        transform: scaleX(0.05);
        transform-origin: left center;
        animation: guideProgress linear both;
        animation-timeline: --how;
        animation-range: contain 0% contain 92%;
      }
      .guide-chevron {
        flex: none;
        width: 20px;
        height: 20px;
        color: var(--primary);
        animation: guideBounce 1.2s ease-in-out infinite;
      }
      /* Step captions: smoothly highlight the active phase and dim the rest
         (ramped keyframes, no steps() snap). The first/last steps stay active
         at the very start/end so there is no dim flash at the extremes. Each
         phase holds long enough for its press → loading → handoff micro-beats. */
      .how-step { opacity: 0.4; animation: stepWin linear both; animation-timeline: --how; }
      .how-step[data-step="1"] { animation-name: stepWinFirst; animation-range: contain 0%  contain 30%; }
      .how-step[data-step="2"] { animation-range: contain 29% contain 57%; }
      .how-step[data-step="3"] { animation-range: contain 55% contain 81%; }
      .how-step[data-step="4"] { animation-name: stepWinLast; animation-range: contain 79% contain 100%; }

      /* Fragments stack and cross-fade across the four scroll phases. Each holds
         fully visible while its micro-interaction plays, then hands off quickly. */
      .how-canvas { display: block; min-height: 460px; }
      .how-frag {
        position: absolute; inset: 0;
        opacity: 0;
        animation: fragCross linear both;
        animation-timeline: --how;
      }
      .how-frag[data-frag="1"] { animation-name: fragFirst; animation-range: contain 0%  contain 32%; }
      .how-frag[data-frag="2"] { animation-range: contain 30% contain 58%; }
      .how-frag[data-frag="3"] { animation-range: contain 56% contain 82%; }
      .how-frag[data-frag="4"] { animation-name: fragLast; animation-range: contain 80% contain 100%; }

      /* Step 1: the calendar name types in; the caret blinks. */
      .type-text {
        max-width: 0;
        animation: typeIn steps(20) both;
        animation-timeline: --how;
        animation-range: contain 5% contain 17%;
      }
      .frag-caret { animation: caretBlink 1s steps(1) infinite; }

      /* Button "presses" = a darken, then a brief loading ring spins in (and the
         label fades out) before that step hands off to the next. */
      .frag-btn-filled.frag-press {
        animation: btnPress linear both;
        animation-timeline: --how;
        animation-range: contain 18% contain 23%;
      }
      .frag-btn-outline.frag-press {
        animation: btnPressOutline linear both;
        animation-timeline: --how;
        animation-range: contain 44% contain 49%;
      }
      .frag-fab.frag-press {
        animation: btnPress linear both;
        animation-timeline: --how;
        animation-range: contain 65% contain 70%;
      }
      /* Spinner rotates on the time timeline (auto) and fades in on scroll (--how). */
      .frag-spin {
        display: block; opacity: 0;
        animation: spin 0.7s linear infinite, spinShow linear both;
        animation-timeline: auto, --how;
      }
      .frag-btn-filled .frag-spin  { animation-range: normal, contain 23% contain 28%; }
      .frag-btn-outline .frag-spin { animation-range: normal, contain 49% contain 54%; }
      .frag-btn-filled .frag-btn-label  { animation: lblOut linear both; animation-timeline: --how; animation-range: contain 23% contain 27%; }
      .frag-btn-outline .frag-btn-label { animation: lblOut linear both; animation-timeline: --how; animation-range: contain 49% contain 53%; }

      /* Step 3: a third event is added — it expands in smoothly on the FAB press. */
      .evt-tile[data-new] {
        overflow: hidden; max-height: 0; opacity: 0; margin-top: 0;
        animation: evtAdd linear both;
        animation-timeline: --how;
        animation-range: contain 69% contain 78%;
      }

      /* Step 4: after a short delay, the reminder drops in (not an instant pop). */
      .frag-notif {
        opacity: 0; transform: translateY(-22px);
        animation: notifDrop linear both;
        animation-timeline: --how;
        animation-range: contain 86% contain 98%;
      }
    }
  }
}

@media (min-width: 881px) and (prefers-reduced-motion: no-preference) {
  html.js-how-fallback .how-track {
    height: 440vh;
  }
  html.js-how-fallback .how-stage {
    position: sticky;
    top: 0;
    min-height: 100vh;
    display: grid;
    align-items: center;
    padding-block: 0;
  }
  html.js-how-fallback .how-stage-grid {
    display: grid;
    grid-template-columns: 1fr 0.95fr;
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
    max-width: var(--maxw);
  }
  html.js-how-fallback .how-steps {
    display: grid;
    gap: 14px;
  }
  html.js-how-fallback .how-step {
    width: auto;
    margin-inline: 0;
    opacity: 0.4;
    transform: translateX(0);
    border-color: var(--hairline);
    background-color: rgba(250, 249, 246, 0.7);
    transition:
      opacity 0.3s ease,
      transform 0.3s ease,
      border-color 0.3s ease,
      background-color 0.3s ease;
  }
  html.js-how-fallback .how-step.is-active {
    opacity: 1;
    transform: translateX(4px);
    border-color: rgba(67, 100, 68, 0.34);
    background-color: rgba(255, 255, 255, 0.9);
  }
  html.js-how-fallback .how-canvas {
    display: block;
    min-height: 460px;
  }
  html.js-how-fallback .how-frag {
    position: absolute;
    inset: 0;
    width: auto;
    min-height: 0;
    margin-inline: 0;
    opacity: 0;
    transform: translateY(12px) scale(0.985);
    pointer-events: none;
    transition:
      opacity 0.38s ease,
      transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  }
  html.js-how-fallback .how-frag.is-active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
  html.js-how-fallback .how-scroll-guide {
    position: absolute;
    left: 50%;
    bottom: max(18px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: min(360px, calc(100vw - 32px));
    padding: 12px 14px 12px 18px;
    border: 1px solid rgba(67, 100, 68, 0.32);
    border-radius: 9999px;
    background: rgba(250, 249, 246, 0.94);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.84) inset,
      0 18px 34px rgba(26, 28, 26, 0.12);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    backdrop-filter: blur(10px) saturate(130%);
    transition: opacity 0.22s ease;
    z-index: 2;
  }
  html.js-how-fallback .guide-text { white-space: nowrap; }
  html.js-how-fallback .guide-progress {
    position: relative;
    flex: 1 1 auto;
    height: 4px;
    min-width: 96px;
    overflow: hidden;
    border-radius: 9999px;
    background: rgba(194, 200, 190, 0.72);
  }
  html.js-how-fallback .guide-progress-fill {
    position: absolute;
    inset-block: 0;
    left: 0;
    width: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--secondary-container));
    transform: scaleX(0.05);
    transform-origin: left center;
  }
  html.js-how-fallback .guide-chevron {
    flex: none;
    width: 20px;
    height: 20px;
    color: var(--primary);
    animation: guideBounce 1.2s ease-in-out infinite;
  }
  html.js-how-fallback .type-text { max-width: calc(var(--chars, 20) * 1ch); }
  html.js-how-fallback .frag-caret { animation: caretBlink 1s steps(1) infinite; }
}
@keyframes stepWin {
  0%   { opacity: .4; transform: translateX(0);   border-color: var(--hairline); background-color: rgba(250,249,246,.7); }
  16%  { opacity: 1;  transform: translateX(4px); border-color: rgba(67,100,68,.34); background-color: rgba(255,255,255,.9); }
  84%  { opacity: 1;  transform: translateX(4px); border-color: rgba(67,100,68,.34); background-color: rgba(255,255,255,.9); }
  100% { opacity: .4; transform: translateX(0);   border-color: var(--hairline); background-color: rgba(250,249,246,.7); }
}
@keyframes stepWinFirst {
  0%   { opacity: 1;  transform: translateX(4px); border-color: rgba(67,100,68,.34); background-color: rgba(255,255,255,.9); }
  84%  { opacity: 1;  transform: translateX(4px); border-color: rgba(67,100,68,.34); background-color: rgba(255,255,255,.9); }
  100% { opacity: .4; transform: translateX(0);   border-color: var(--hairline); background-color: rgba(250,249,246,.7); }
}
@keyframes stepWinLast {
  0%   { opacity: .4; transform: translateX(0);   border-color: var(--hairline); background-color: rgba(250,249,246,.7); }
  16%  { opacity: 1;  transform: translateX(4px); border-color: rgba(67,100,68,.34); background-color: rgba(255,255,255,.9); }
  100% { opacity: 1;  transform: translateX(4px); border-color: rgba(67,100,68,.34); background-color: rgba(255,255,255,.9); }
}
@keyframes fragCross { 0% { opacity: 0; } 9% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fragFirst { 0% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fragLast  { 0% { opacity: 0; } 14% { opacity: 1; } 100% { opacity: 1; } }
@keyframes typeIn { from { max-width: 0; } to { max-width: calc(var(--chars, 20) * 1ch); } }
@keyframes caretBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes btnPress { from { background-color: var(--primary); } to { background-color: var(--primary-dark); } }
@keyframes btnPressOutline {
  from { background-color: transparent; border-color: var(--outline); color: var(--primary); }
  to   { background-color: rgba(67, 100, 68, 0.16); border-color: var(--primary-dark); color: var(--primary-dark); }
}
/* Loading ring: continuous rotation (time timeline) + scroll-driven fade-in. */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinShow { from { opacity: 0; } to { opacity: 1; } }
@keyframes lblOut { 0%, 40% { opacity: 1; } 100% { opacity: 0; } }
/* New event expands into the agenda when "Add event" is pressed. */
@keyframes evtAdd {
  0%   { max-height: 0; opacity: 0; margin-top: 0; }
  35%  { opacity: 0.25; }
  100% { max-height: 80px; opacity: 1; margin-top: 10px; }
}
/* Reminder drops in with a gentle settle after a beat (not an instant pop). */
@keyframes notifDrop {
  0%   { opacity: 0; transform: translateY(-22px); }
  60%  { opacity: 1; transform: translateY(3px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes guideVisibility {
  0%, 82% { opacity: 0.96; }
  100% { opacity: 0; }
}
@keyframes guideProgress { to { transform: scaleX(1); } }
@keyframes guideBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ---------- Why / designed to stay quiet (feature grid) ---------- */
.quiet-section {
  background:
    linear-gradient(180deg, rgba(244, 243, 241, 0.78), rgba(250, 249, 246, 0.92)),
    var(--surface-low);
  border-block: 1px solid var(--hairline);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.feature-card {
  position: relative;
  padding: 26px 24px 26px 28px;
  border: 1px solid var(--hairline);
  border-radius: 20px;
  background: rgba(250, 249, 246, 0.92);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset;
  overflow: hidden;
  transform: translateZ(0);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.28s ease,
    background-color 0.28s ease;
}
.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 171, 105, 0.13), transparent 34%),
    linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.46) 42%, transparent 64%);
  opacity: 0;
  transform: translateX(-18%);
  transition:
    opacity 0.32s ease,
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
/* Event-style stripe flush on the card's left border (same 9px thickness). */
.feature-stripe {
  position: absolute; left: 0; top: 0; bottom: 0; width: 9px;
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), filter 0.28s ease;
}
.feature-card h3 {
  position: relative;
  font-size: 20px;
  font-weight: 800;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), color 0.28s ease;
}
.feature-card p {
  position: relative;
  color: var(--muted);
  font-size: 15.5px;
  margin-top: 9px;
  transition: color 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Preview / screenshots ---------- */
.preview-section {
  background:
    linear-gradient(90deg, rgba(115, 121, 112, 0.035) 1px, transparent 1px) center / 42px 100%,
    var(--background);
}
.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 4vw, 40px);
  justify-items: center;
  align-items: start;
  padding-top: 12px;
}
.shot {
  position: relative;
  text-align: center;
  max-width: 280px;
  margin: 0;
}
.shot img {
  position: relative;
  width: clamp(200px, 22vw, 240px);
  margin-inline: auto;
  filter: drop-shadow(0 18px 34px rgba(67,100,68,0.16));
  transition: transform 0.22s ease, filter 0.22s ease;
}
.shot figcaption { margin-top: 16px; }
.shot figcaption b { display: block; font-size: 16px; font-weight: 700; }
.shot figcaption span { color: var(--muted); font-size: 15px; }
.shots-note { margin-top: 28px; font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- Trust ---------- */
.trust { background: var(--surface-low); }
.trust-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 56px); align-items: center; }
.trust-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.trust-list li { display: flex; gap: 14px; align-items: flex-start; font-size: 17px; }
.trust-list .check {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: #e8efe6; display: grid; place-items: center;
}
.trust-list .check svg { width: 16px; height: 16px; }
.trust-list b { color: var(--text); }
.trust-list span { color: var(--muted); }
.trust-aside {
  background: var(--background);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-tight);
}
.trust-aside h3 { font-size: 20px; font-weight: 700; }
.trust-aside p { color: var(--muted); margin-top: 10px; }
.trust-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 9999px; border: 1.5px solid var(--outline-variant);
  background: var(--background); color: var(--primary); font-size: 14px;
  font-weight: 600; text-decoration: none;
  transition: background-color 0.18s ease, transform 0.18s ease;
}
.chip-link:hover { background: var(--surface-low); }

/* ---------- FAQ ---------- */
.faq-section { background: var(--surface-low); }
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 12px; }
.faq details {
  background: var(--surface-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.faq details[open] { background: var(--background); border-color: rgba(67, 100, 68, 0.34); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 56px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { flex: none; width: 22px; height: 22px; position: relative; }
.faq summary .plus::before, .faq summary .plus::after {
  content: ""; position: absolute; background: var(--primary); border-radius: 2px;
  transition: transform 0.2s ease;
}
.faq summary .plus::before { inset: 10px 2px; height: 2px; }
.faq summary .plus::after { inset: 2px 10px; width: 2px; }
.faq details[open] summary .plus::after { transform: scaleY(0); }
.faq details[open] summary .plus::before { transform: rotate(180deg); }
.faq .answer { padding: 0 22px 20px; color: var(--muted); font-size: 16px; }
.faq .answer a { font-weight: 600; }
.faq details[open] .answer { animation: faqReveal 0.28s ease; }
@keyframes faqReveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Final CTA ---------- */
.final-cta { text-align: center; }
.final-cta .card {
  position: relative;
  overflow: hidden;
  background: var(--background);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-xl);
  padding: clamp(32px, 6vw, 56px);
  max-width: 760px;
  margin-inline: auto;
  box-shadow: var(--shadow-soft);
}
.final-cta h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; }
.final-cta p { color: var(--muted); font-size: 18px; margin-top: 14px; }
.final-cta .cta-row { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--outline-variant); margin-top: 8px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-block: 48px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { color: var(--muted); font-size: 15px; max-width: 36ch; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0; color: var(--muted); margin: 0 0 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-col a {
  display: inline-flex; align-items: center; min-height: 40px;
  color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none;
}
.footer-col a:hover { color: var(--primary); text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid var(--outline-variant);
  padding-block: 20px;
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  justify-content: space-between;
  color: var(--muted); font-size: 14px;
}

/* ---------- Legal/support page layout ---------- */
.doc { padding-block: clamp(32px, 5vw, 56px); }
.doc-hero { max-width: 760px; margin-bottom: 8px; }
.doc-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--primary); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0; margin-bottom: 14px;
}
.doc-hero .eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--secondary-container); }
.doc-hero h1 { font-size: clamp(32px, 5vw, 46px); font-weight: 800; }
.doc-hero .lead { color: var(--muted); font-size: 19px; margin-top: 14px; max-width: 60ch; }
.doc-body { max-width: 760px; }
.doc-body h2 { font-size: clamp(22px, 3vw, 27px); font-weight: 700; margin-top: 38px; }
.doc-body p { margin-top: 14px; color: var(--text); }
.doc-body ul { margin: 14px 0 0; padding-left: 22px; }
.doc-body li { margin-top: 8px; }
.doc-body li::marker { color: var(--primary); }
.doc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 20px; }
.contact-card {
  background: var(--surface-low); border: 1px solid var(--outline-variant);
  border-radius: var(--radius-lg); padding: 20px; border-left: 6px solid var(--primary);
}
.contact-card:nth-child(2) { border-left-color: var(--tertiary); }
.contact-card:nth-child(3) { border-left-color: var(--secondary); }
.contact-card:nth-child(4) { border-left-color: var(--evt-purple); }
.contact-card h3 { font-size: 17px; font-weight: 700; }
.contact-card a { font-size: 15px; word-break: break-word; }
.callout {
  background: #FEF3C7; color: #92400E; border-radius: var(--radius-lg);
  padding: 18px 20px; margin-top: 28px; font-size: 16px;
}
.callout b { color: #7a3a08; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .site-header { background: rgba(250, 249, 246, 0.94); }
  .nav { min-height: 56px; padding-block: 8px; gap: 10px; }
  .nav-menu { position: relative; }
  .menu-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--outline-variant);
    border-radius: 9999px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    background: rgba(255, 255, 255, 0.48);
    transition:
      background-color 0.18s ease,
      border-color 0.18s ease,
      box-shadow 0.18s ease,
      color 0.18s ease;
  }
  .menu-button svg { width: 17px; height: 17px; transition: transform 0.18s ease; }
  .nav-menu.is-open .menu-button {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(67, 100, 68, 0.34);
    box-shadow: 0 8px 18px rgba(67, 100, 68, 0.08);
    color: var(--primary-dark);
  }
  .nav-menu.is-open .menu-button svg { transform: rotate(180deg); }
  .nav-menu:not(.is-open) > .nav-links { display: none; }
  .nav-menu.is-open > .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 80;
    display: grid;
    width: min(230px, calc(100vw - 32px));
    gap: 2px;
    padding: 8px;
    border: 1px solid var(--outline-variant);
    border-radius: 18px;
    background: rgba(250, 249, 246, 0.98);
    box-shadow: var(--shadow-tight);
    transform-origin: top right;
    animation: mobileMenuIn 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .nav-menu.is-open > .nav-links a {
    justify-content: flex-start;
    min-height: 42px;
    padding: 0 12px;
    font-size: 14px;
    animation: mobileMenuItemIn 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .nav-menu.is-open > .nav-links .language-switch {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 4px;
    min-height: 42px;
    width: 100%;
    margin: 4px 0 0;
    padding: 4px 5px 4px 12px;
    border: 1px solid rgba(194, 200, 190, 0.72);
    border-radius: 12px;
    background: rgba(244, 243, 241, 0.72);
  }
  .nav-menu.is-open > .nav-links .language-switch::before {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
  }
  html[lang="en"] .nav-menu.is-open > .nav-links .language-switch::before { content: "Language"; }
  html[lang="es"] .nav-menu.is-open > .nav-links .language-switch::before { content: "Idioma"; }
  .nav-menu.is-open > .nav-links .language-option {
    min-width: 38px;
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }
  .nav-menu.is-open > .nav-links a:nth-child(2) { animation-delay: 0.025s; }
  .nav-menu.is-open > .nav-links a:nth-child(3) { animation-delay: 0.05s; }
  .nav-menu.is-open > .nav-links a:nth-child(4) { animation-delay: 0.075s; }
  .nav-menu.is-open > .nav-links a:nth-child(5) { animation-delay: 0.1s; }
  .nav-menu.is-open > .nav-links .language-switch { animation: mobileMenuItemIn 0.18s 0.125s cubic-bezier(0.22, 1, 0.36, 1) both; }
  @keyframes mobileMenuIn {
    from {
      opacity: 0;
      transform: translateY(-6px) scale(0.98);
      clip-path: inset(0 0 18px 0 round 18px);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
      clip-path: inset(0 0 0 0 round 18px);
    }
  }
  @keyframes mobileMenuItemIn {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "copy"
      "visual"
      "actions";
  }
  .hero-copy { max-width: 680px; }
  .hero-visual { margin-top: 8px; opacity: 0.96; }
  .hero .lead { max-width: none; }
  /* Below 881px the scroll-lock is off. Interleave each fragment directly under
     its own step: display:contents dissolves the <ol> and .how-canvas wrappers so
     the steps and fragments become siblings in one flex column, then `order`
     pairs them step → fragment → next step. (Each fragment card centers itself
     and caps its own width, so the dropped .how-canvas max-width isn't needed.) */
  .how-stage-grid { display: flex; flex-direction: column; gap: 14px; }
  .how-steps, .how-canvas { display: contents; }
  .how-step[data-step="1"] { order: 1; }
  .how-frag[data-frag="1"] { order: 2; }
  .how-step[data-step="2"] { order: 3; }
  .how-frag[data-frag="2"] { order: 4; }
  .how-step[data-step="3"] { order: 5; }
  .how-frag[data-frag="3"] { order: 6; }
  .how-step[data-step="4"] { order: 7; }
  .how-frag[data-frag="4"] { order: 8; }
  /* Extra space before each new step groups it with the fragment beneath it. */
  .how-step[data-step="2"],
  .how-step[data-step="3"],
  .how-step[data-step="4"] { margin-top: 14px; }
  .trust-grid { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
  .shot { max-width: 320px; }
  .shot:nth-child(2),
  .shot:nth-child(3) { margin-top: 0; }
  .scroll-cue { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .brand { font-size: 17px; }
  .brand .pub { display: none; }
  .hero { padding-block: 30px; }
  .hero-full { min-height: 0; }
  .hero h1 { font-size: clamp(30px, 8vw, 42px); }
  .hero .lead { font-size: 18px; }
  .hero-visual { margin-top: 24px; }
  .hero-actions .cta-row { margin-top: 24px; }
  .phone-shadow svg { width: clamp(208px, 62vw, 248px); }
  .contact-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .cta-row .btn { width: 100%; }
}
@media (min-width: 1440px) {
  :root { --maxw: 1200px; }
}
@media (hover: hover) and (pointer: fine) {
  .btn:not(:disabled):hover { transform: translateY(-1px); }
  .btn-outline:hover { transform: translateY(-1px); }
  .feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(67, 100, 68, 0.44);
    background: rgba(255, 255, 255, 0.84);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.82) inset,
      0 18px 34px rgba(26, 28, 26, 0.08),
      0 8px 18px rgba(67, 100, 68, 0.08);
  }
  .feature-card:hover::before {
    opacity: 1;
    transform: translateX(0);
  }
  .feature-card:hover .feature-stripe {
    width: 12px;
    filter: saturate(1.12);
  }
  .feature-card:hover h3 {
    color: var(--primary-dark);
    transform: translateX(3px);
  }
  .feature-card:hover p {
    color: var(--text);
    transform: translateX(3px);
  }
  .chip-link:hover { transform: translateY(-1px); }
  .shot:hover img {
    transform: translateY(-4px) scale(1.015);
    filter: drop-shadow(0 24px 40px rgba(67,100,68,0.2));
  }
}

/* ---------- Reduced motion: disable all non-essential motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
  .phone-stage { transform: none !important; }
  .scroll-cue { display: none; }
  .hsvg [class^="hsvg-"] { opacity: 1 !important; transform: none !important; }
  /* How-it-works falls back to centered static step/screen pairs. */
  .how-track { height: auto !important; }
  .how-stage { position: static !important; min-height: 0 !important; }
  .how-stage-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 18px !important;
    max-width: 860px !important;
  }
  .how-steps,
  .how-canvas { display: contents !important; }
  .how-step,
  .how-frag {
    width: min(100%, 760px) !important;
    margin-inline: auto !important;
  }
  .how-frag { position: static !important; min-height: 190px !important; opacity: 1 !important; }
  .how-step { opacity: 1 !important; transform: none !important; }
  .how-step[data-step="1"] { order: 1 !important; }
  .how-frag[data-frag="1"] { order: 2 !important; }
  .how-step[data-step="2"] { order: 3 !important; }
  .how-frag[data-frag="2"] { order: 4 !important; }
  .how-step[data-step="3"] { order: 5 !important; }
  .how-frag[data-frag="3"] { order: 6 !important; }
  .how-step[data-step="4"] { order: 7 !important; }
  .how-frag[data-frag="4"] { order: 8 !important; }
  .how-step[data-step="2"],
  .how-step[data-step="3"],
  .how-step[data-step="4"] { margin-top: 22px !important; }
  .frag-card,
  .frag-notif { max-width: 420px !important; }
  .frag-notif { transform: none !important; opacity: 1 !important; }
  .type-text { max-width: none !important; }
  .frag-caret { animation: none !important; }
  .btn:hover, .shot:hover img, .feature-card:hover { transform: none !important; }
}
