/* ============================================================
   GRUPO MOAI — Landing page styles (light theme)
   ------------------------------------------------------------
   Two accent zones:
   - .zone-orange  → nav, hero y sección de animación (naranja)
   - default       → resto de la página (azul)
   ============================================================ */

:root {
  /* Base light theme */
  --bg: #ffffff;
  --bg-soft: #f4f7fb;
  --text: #122a3f;
  --muted: #54677c;
  --card: #ffffff;
  --border: rgba(18, 42, 63, 0.12);
  --radius: 18px;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;

  /* Blue accent (default, after the animation section) */
  --accent: #1565d8;
  --accent-2: #00a8e8;
  --accent-deep: #0e4ba8;
  --accent-soft: rgba(21, 101, 216, 0.1);
  --accent-glow: rgba(21, 101, 216, 0.25);
  --accent-border: rgba(21, 101, 216, 0.45);
}

/* Orange accent zone: top of the page through the animation */
.zone-orange {
  --accent: #e87a1c;
  --accent-2: #f6a432;
  --accent-deep: #c95f08;
  --accent-soft: rgba(232, 122, 28, 0.1);
  --accent-glow: rgba(232, 122, 28, 0.28);
  --accent-border: rgba(232, 122, 28, 0.5);
}

/* When the animation reaches "Después", the orange zone turns blue */
.zone-orange.is-blue {
  --accent: #1565d8;
  --accent-2: #00a8e8;
  --accent-deep: #0e4ba8;
  --accent-soft: rgba(21, 101, 216, 0.1);
  --accent-glow: rgba(21, 101, 216, 0.25);
  --accent-border: rgba(21, 101, 216, 0.45);
}

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

html { scroll-behavior: smooth; }

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

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; }

img, canvas { max-width: 100%; display: block; }

.grad {
  background: linear-gradient(92deg, var(--accent-deep), var(--accent) 55%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.container { width: min(1160px, 92%); margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(95deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 26px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px var(--accent-glow); }
.btn-ghost {
  color: var(--text);
  background: var(--card);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-2px); }
.btn-sm { padding: 0.5rem 1.2rem; font-size: 0.88rem; }
.btn-lg { padding: 1.05rem 2.6rem; font-size: 1.1rem; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  width: min(1240px, 94%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 400;
}
.wordmark strong { font-weight: 700; color: var(--accent); transition: color 0.45s ease; }
.wordmark-glyph {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  position: relative;
  flex: none;
}
.wordmark-glyph::after {
  content: "";
  position: absolute; inset: 7px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
}
.logo-img { width: 27px; height: 38px; object-fit: contain; flex: none; }
.logo-stack { position: relative; width: 27px; height: 38px; flex: none; }
.logo-stack .logo-img { position: absolute; inset: 0; transition: opacity 0.45s ease; }
.logo-stack .logo-blue { opacity: 0; }
.is-blue .logo-stack .logo-orange { opacity: 0; }
.is-blue .logo-stack .logo-blue { opacity: 1; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s ease;
}
.nav-links a:not(.btn):hover { color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: 0.3s; }

/* ---------- Hero integrado en la sección de animación ---------- */
.scrolly-title {
  grid-area: title;
  text-align: center;
  font-size: clamp(1.7rem, 4.4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 900px;
  margin: 0 auto;
}
.scrolly-ctas {
  grid-area: ctas;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Scroll-driven animation ---------- */
.scrolly {
  position: relative;
  height: 400vh;             /* scroll runway for the frame animation */
  background: var(--bg-soft);
}
.scrolly-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh; /* mobile browsers: account for dynamic toolbars */
  width: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 72px; /* clear the fixed nav */
  background:
    radial-gradient(ellipse 50% 60% at 22% 50%, rgba(232, 122, 28, 0.08), transparent 70%),
    radial-gradient(ellipse 40% 50% at 85% 30%, rgba(21, 101, 216, 0.07), transparent 70%);
}
/* Background grid: orange by default, crossfades to blue in "Después" */
.scrolly-sticky::before,
.scrolly-sticky::after {
  content: "";
  position: absolute; inset: 0;
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 75%);
  pointer-events: none;
  transition: opacity 0.7s ease;
  z-index: 0; /* keep both grids behind the content */
}
.scrolly-sticky::before {
  background-image:
    linear-gradient(rgba(232, 122, 28, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 122, 28, 0.13) 1px, transparent 1px);
  opacity: 1;
}
.scrolly-sticky::after {
  background-image:
    linear-gradient(rgba(21, 101, 216, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 101, 216, 0.13) 1px, transparent 1px);
  opacity: 0;
}
.zone-orange.is-blue .scrolly-sticky::before { opacity: 0; }
.zone-orange.is-blue .scrolly-sticky::after { opacity: 1; }

/* Invitation to scroll, fades out once the user starts scrolling */
.scroll-hint {
  grid-area: hint;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin: -0.3rem 0 -0.2rem;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.scroll-hint.is-hidden { opacity: 0; }
.scroll-hint svg { width: 18px; height: 18px; color: var(--accent); animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
.scrolly-layout {
  position: relative;
  z-index: 1; /* above the background grids */
  width: min(1160px, 92%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-areas:
    "title title"
    "hint hint"
    "canvas captions"
    "ctas ctas";
  column-gap: clamp(1.5rem, 4vw, 4rem);
  row-gap: clamp(1rem, 2.6vh, 2rem);
  align-items: center;
}
.canvas-card {
  grid-area: canvas;
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f3efe7; /* matches the animation frames' paper background */
  box-shadow:
    0 24px 60px rgba(18, 42, 63, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  aspect-ratio: 1 / 1;
  max-height: min(56vh, 540px);
  margin: 0 auto;
  width: 100%;
  max-width: min(56vh, 540px);
}
#moaiCanvas { width: 100%; height: 100%; }

.canvas-loader {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: linear-gradient(160deg, #ffffff, var(--bg-soft));
  transition: opacity 0.6s ease;
  text-align: center;
  padding: 1rem;
}
.canvas-loader.is-hidden { opacity: 0; pointer-events: none; }
.loader-ring {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(18, 42, 63, 0.12);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
  margin-bottom: 0.4rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-title { font-family: var(--font-display); font-size: 1.05rem; }
.loader-sub { color: var(--muted); font-size: 0.85rem; }
.loader-bar {
  width: min(240px, 70%);
  height: 4px;
  border-radius: 4px;
  background: rgba(18, 42, 63, 0.1);
  overflow: hidden;
  margin-top: 0.4rem;
}
.loader-bar-fill {
  height: 100%; width: 0%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.2s ease;
}

.scrolly-captions { grid-area: captions; position: relative; min-height: 270px; }
.caption {
  position: absolute;
  inset: 0 0 auto 0;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}
.caption.is-active { opacity: 1; transform: translateY(0); }
/* The final caption ("Después") switches to blue: the automated state */
.caption-blue {
  --accent: #1565d8;
  --accent-2: #00a8e8;
  --accent-deep: #0e4ba8;
  --accent-soft: rgba(21, 101, 216, 0.1);
  --accent-border: rgba(21, 101, 216, 0.45);
}
.caption-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1rem;
}
.caption h3 { font-size: clamp(1.7rem, 3.1vw, 2.5rem); margin-bottom: 0.9rem; }
.caption p { color: var(--muted); max-width: 470px; font-size: 1.15rem; }
.caption-progress {
  position: absolute;
  bottom: -3.2rem;
  display: flex;
  gap: 0.5rem;
}
.caption-progress .dot {
  width: 26px; height: 4px;
  border-radius: 4px;
  background: rgba(18, 42, 63, 0.14);
  transition: background 0.3s;
}
.caption-progress .dot.is-active { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* ---------- Sections ---------- */
.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; position: relative; background: var(--bg); }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  text-align: center;
  margin-bottom: 1.2rem;
}
.section-sub {
  color: var(--muted);
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.2rem;
  font-size: 1.05rem;
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 1.3rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); margin-top: 3rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); margin-top: 3rem; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
  box-shadow: 0 2px 10px rgba(18, 42, 63, 0.04);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.card:hover, .card-hover:hover {
  transform: translateY(-5px);
  border-color: var(--accent-border);
  box-shadow: 0 18px 40px rgba(18, 42, 63, 0.12);
}
.card h3 { font-size: 1.12rem; margin-bottom: 0.6rem; }
.card p { color: var(--muted); font-size: 0.93rem; }
.card-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.card-icon svg { width: 24px; height: 24px; }

/* ---------- Process steps ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.3rem;
  margin-top: 3rem;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: 0 2px 10px rgba(18, 42, 63, 0.04);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.3s ease;
}
.step.is-on { opacity: 1; transform: translateY(0); }
.steps .step:hover { transform: translateY(-4px); border-color: var(--accent-border); }
.step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.step-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  opacity: 0;
  transform: scale(0.5) rotate(-8deg);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s, opacity 0.4s ease 0.15s;
}
.step-icon svg { width: 24px; height: 24px; }
.step.is-on .step-icon { opacity: 1; transform: scale(1) rotate(0); }
.step-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
  transition: color 0.4s ease 0.3s;
}
.step.is-on .step-num { color: var(--accent); }

/* Animated dashed connectors between steps */
.step::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -1.3rem;
  width: 1.3rem;
  height: 3px;
  background-image: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 12px);
  opacity: 0;
  transition: opacity 0.4s ease 0.35s;
}
.step:nth-child(3n)::after { display: none; }
.step.is-on::after { opacity: 0.8; animation: dashflow 1.1s linear infinite; }
@keyframes dashflow { to { background-position: 12px 12px; } }
.step h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.step p { color: var(--muted); font-size: 0.9rem; }

/* ---------- Use case chips ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  margin-top: 3rem;
}
.chip {
  font-family: var(--font-display);
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(18, 42, 63, 0.04);
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.chip:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
  transform: translateY(-3px);
}

/* ---------- Benefits ---------- */
.benefits .benefit {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  box-shadow: 0 2px 10px rgba(18, 42, 63, 0.04);
}
.benefit-check {
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.benefit h3 { font-size: 1.02rem; margin-bottom: 0.3rem; }
.benefit p { color: var(--muted); font-size: 0.88rem; }
.benefits-statement {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.8vw, 1.9rem);
  font-weight: 600;
  text-align: center;
  margin-top: 3.5rem;
}

/* ---------- Metrics ---------- */
.metrics-section {
  background:
    radial-gradient(ellipse 55% 70% at 50% 50%, rgba(21, 101, 216, 0.08), transparent 75%),
    var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.3rem;
  text-align: center;
}
.metric {
  padding: 2rem 1rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(18, 42, 63, 0.04);
}
.metric-value {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 700;
  background: linear-gradient(92deg, var(--accent-deep), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
  margin-bottom: 0.4rem;
}
.metric p { color: var(--muted); font-size: 0.9rem; }
.metrics-note { text-align: center; color: var(--muted); font-size: 0.8rem; margin-top: 1.8rem; opacity: 0.85; }

/* ---------- CTA ---------- */
.cta-box {
  text-align: center;
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(21, 101, 216, 0.1), transparent 70%),
    var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: 0 10px 40px rgba(18, 42, 63, 0.08);
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4rem);
}
.cta-box h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); margin-bottom: 1rem; letter-spacing: -0.015em; }
.cta-box > p { color: var(--muted); max-width: 620px; margin: 0 auto 2.2rem; }
.cta-secondary { color: var(--muted); font-size: 0.88rem; margin-top: 1.6rem; }

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.contact-copy > p { color: var(--muted); margin: 0.8rem 0 1.6rem; }
.contact-points { list-style: none; display: grid; gap: 0.7rem; }
.contact-points li {
  color: var(--muted);
  padding-left: 1.6rem;
  position: relative;
}
.contact-points li::before {
  content: "✓";
  position: absolute; left: 0;
  color: var(--accent);
  font-weight: 700;
}
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.8rem;
  color: #fff;
  background: linear-gradient(95deg, #25d366, #1ebe5d);
  box-shadow: 0 8px 26px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(37, 211, 102, 0.42);
}
.btn-whatsapp svg { width: 21px; height: 21px; flex: none; }
.whatsapp-note { color: var(--muted); font-size: 0.82rem; margin-top: 0.7rem; }
.contact-form {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: grid;
  gap: 1.1rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.contact-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}
.contact-form input,
.contact-form textarea {
  font: inherit;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.contact-form .btn { justify-self: start; }
.form-status { font-size: 0.88rem; color: var(--accent-deep); min-height: 1.2em; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 3rem 0 1.6rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-brand p { color: var(--muted); font-size: 0.9rem; margin-top: 0.7rem; max-width: 320px; }
.footer-links { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(3n)::after { display: block; }
  .step:nth-child(2n)::after { display: none; }
}

@media (max-width: 880px) {
  .nav-links {
    position: fixed;
    top: 58px; right: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.2rem;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 0 0 0 18px;
    padding: 1.6rem 2rem;
    transform: translateX(110%);
    transition: transform 0.35s ease;
    box-shadow: 0 18px 40px rgba(18, 42, 63, 0.14);
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-toggle { display: block; }

  .scrolly { height: 320vh; }
  .scrolly-sticky { padding-top: 58px; padding-bottom: 0.6rem; }
  .scrolly-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "hint"
      "canvas"
      "captions"
      "ctas";
    row-gap: clamp(0.4rem, 1.4vh, 0.9rem);
    align-content: center;
  }
  .scrolly-title { font-size: clamp(1.35rem, 5.4vw, 1.9rem); }
  .canvas-card { max-width: min(34vh, 86vw); max-height: min(34vh, 86vw); }
  .scrolly-captions { min-height: 146px; text-align: center; }
  .caption-tag { font-size: 0.68rem; padding: 0.22rem 0.7rem; margin-bottom: 0.5rem; }
  .caption h3 { font-size: 1.15rem; margin-bottom: 0.45rem; }
  .caption p { margin: 0 auto; font-size: 0.9rem; max-width: 92%; }
  .caption-progress { left: 50%; transform: translateX(-50%); bottom: -0.9rem; }
  .scrolly-ctas { gap: 0.7rem; padding-top: 0.5rem; }
  .scrolly-ctas .btn { padding: 0.62rem 1.3rem; font-size: 0.88rem; }
  .scroll-hint { font-size: 0.7rem; margin: -0.2rem 0; }
  .scroll-hint svg { width: 15px; height: 15px; }

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

@media (max-width: 560px) {
  .grid-4, .grid-3, .steps, .metrics { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .step:nth-child(n)::after {
    display: block;
    right: auto;
    left: calc(50% - 1.5px);
    top: auto;
    bottom: -1.35rem;
    width: 3px;
    height: 1.35rem;
    background-image: repeating-linear-gradient(180deg, var(--accent) 0 6px, transparent 6px 12px);
  }
  .step:last-child::after { display: none; }
}

/* ============================================================
   Reduced motion: show a static final frame, no scroll animation
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .scrolly { height: auto; padding: 5rem 0; }
  .scrolly-sticky { position: static; height: auto; }
  .scrolly-captions .caption { position: static; opacity: 1; transform: none; margin-bottom: 1.6rem; }
  .caption-progress { display: none; }
  .reveal { opacity: 1; transform: none; }
  .step { opacity: 1; transform: none; }
  .step-icon { opacity: 1; transform: none; }
  .step-num { color: var(--accent); }
  .step::after { opacity: 0.8; }
  .scroll-hint { display: none; }
}
