/* ── Landing page (#204) ─────────────────────────────────────────────────────
   Landing-section selectors scoped under body.landing-page (marketing layout);
   the finder section below is deliberately unscoped (application layout) with
   the finder- prefix as its collision guard.
   Ported from the signed-off prototype .prototypes/feature-landing-page/ —
   markup in app/views/pages/* uses these class names verbatim.
   GOTCHA: .landing-page .nav must never gain backdrop-filter — it becomes the
   containing block for the language menu's fixed click-away overlay
   (summary::before) and silently breaks click-outside-close. */

/* ── Workspace finder (/find-workspace) ──────────────────────────────────────
   Renders in the chromeless `application` layout (auth family), NOT the
   marketing layout — so these rules are NOT under .landing-page; the finder-
   prefix is the collision guard. Ported from finder.html; the prototype's
   body.show-error toggle becomes the server-rendered .finder-has-error. */

.finder-viewport {
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 4.5rem 1rem 2rem;
  /* same ledger dot grid as the landing hero */
  background-image: radial-gradient(color-mix(in srgb, var(--color-primary) 9%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
}
.finder-column { width: 100%; max-width: 26rem; }
.finder-wordmark {
  font-size: 1rem; font-weight: 900; letter-spacing: 0.06em; text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  margin-bottom: 4.75rem; color: var(--color-on-surface);
}
/* flex:none + max-width:none — Tailwind preflight's `img { max-width: 100% }`
   zeroes the logo's min-content contribution, collapsing the wordmark flex item
   and crashing its text into the neighbor at ≤343px. */
.finder-wordmark .mark-logo { width: 2rem; height: 2rem; object-fit: contain; flex: none; max-width: none; }
.finder-card {
  background: var(--color-surface-container-lowest);
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.10), 0 8px 10px -6px rgb(0 0 0 / 0.10);
  border: 1px solid color-mix(in srgb, var(--color-outline-variant) 15%, transparent);
  padding: 1.5rem;
  position: relative;
}
.finder-avatar-row { display: flex; justify-content: center; margin: -4rem 0 1rem; }
.finder-avatar {
  width: 5rem; height: 5rem; border-radius: 1.5rem;
  background: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  box-sizing: content-box; border: 4px solid #fff;
}
.finder-avatar .material-symbols-outlined { font-size: 44px; color: #fff; }
.finder-heading {
  text-align: center; font-size: 1.25rem; font-weight: 800;
  letter-spacing: -0.025em; margin-bottom: 0.25rem;
}
.finder-sub { text-align: center; font-size: 13px; color: var(--color-secondary); margin-bottom: 1.5rem; }

.finder-label {
  display: block; font-size: 11px; font-weight: 700; color: var(--color-secondary);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.375rem;
}

/* Signature: the address plate as the INPUT itself */
.finder-plate {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, transparent);
  background: color-mix(in srgb, var(--color-primary) 4%, #ffffff);
  border-radius: 0.5rem;
  padding: 0.25rem 0.75rem 0.25rem 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.finder-plate:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 12%, transparent);
}
.finder-plate .material-symbols-outlined { font-size: 18px; color: var(--color-primary); flex: none; }
.finder-plate input {
  /* basis 8rem: below that the .domain suffix wraps to its own right-aligned
     line instead of crushing the input (320px + long dev suffixes). */
  flex: 1 1 8rem; min-width: 0;
  border: 0; background: transparent; outline: none;
  padding: 0.625rem 0;
  font-family: var(--font-mono); font-weight: 600; font-size: 14px;
  color: var(--color-primary);
  text-transform: lowercase;
}
.finder-plate input::placeholder { color: color-mix(in srgb, var(--color-primary) 70%, transparent); text-transform: none; }
.finder-plate .domain {
  font-family: var(--font-mono); font-weight: 500; font-size: 13px;
  color: var(--color-secondary); flex: none; user-select: none;
  margin-left: auto;
}
.finder-error { margin-top: 0.5rem; font-size: 12px; color: var(--color-error); font-weight: 600; }
.finder-error .material-symbols-outlined { font-size: 14px; vertical-align: -2px; }
.finder-has-error .finder-plate { border-color: var(--color-error); background: color-mix(in srgb, var(--color-error) 3%, #fff); }
.finder-has-error .finder-plate .material-symbols-outlined { color: var(--color-error); }
.finder-hint { margin-top: 0.5rem; font-size: 11px; color: color-mix(in srgb, var(--color-on-surface-variant) 70%, transparent); }

.finder-cta {
  width: 100%; display: flex; justify-content: center; align-items: center;
  padding: 0.75rem 1rem; min-height: 44px; margin-top: 1.25rem;
  border: 0; border-radius: 0.5rem; cursor: pointer;
  background: var(--color-primary); color: #fff;
  font-size: 0.875rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  transition: all 0.2s;
}
.finder-cta:hover { background: var(--color-primary-container); transform: translateY(-2px); }

.finder-register-note { margin-top: 1rem; font-size: 12.5px; text-align: center; color: var(--color-secondary); }
.finder-register-note a { color: var(--color-primary); font-weight: 700; text-decoration: none; }
.finder-register-note a:hover { text-decoration: underline; }

.finder-footer-line {
  text-align: center; font-size: 10px; font-weight: 700;
  /* 80% mix ≈ 5:1 on the page surface — 40% measured ~2:1, illegible at 10px */
  color: color-mix(in srgb, var(--color-on-surface-variant) 80%, transparent);
  text-transform: uppercase; letter-spacing: 0.1em; margin-top: 1.25rem;
}

/* Branded focus ring (prototype :focus-visible) + reduced-motion coverage for
   the finder, which renders OUTSIDE body.landing-page (application layout). */
.finder-viewport :focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: 4px; }
/* the plate input's focus treatment is the PLATE's :focus-within border — the
   generic ring above would double-ring it (and outranks the input's outline:none) */
.finder-viewport .finder-plate input:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) {
  .finder-viewport * { transition: none !important; }
}

@media (min-width: 640px) {
  .finder-viewport { padding: 5rem 1.5rem 2rem; }
  .finder-column { max-width: 28rem; }
  .finder-card { padding: 2rem; }
  .finder-avatar-row { margin-top: -4.5rem; }
  .finder-avatar { width: 6rem; height: 6rem; }
  .finder-heading { font-size: 1.5rem; }
}

/* ── Landing components (marketing layout, body.landing-page) ───────────────
   Ported from index.html v3. Keyframes are renamed with a d- prefix: keyframe
   names are GLOBAL and unlayered ones beat Tailwind's @layer — the prototype's
   `pulse` would have replaced the `animate-pulse` keyframes app-wide. */

html:has(.landing-page) { scroll-behavior: smooth; }
.landing-page section { scroll-margin-top: 5rem; }

.landing-page .shell { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

/* ── Type roles ── */
.landing-page .eyebrow {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-primary);
}
.landing-page .section-title {
  font-size: 1.625rem; font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.15; margin: 0.5rem 0 0.75rem;
  text-wrap: balance; /* no single-word widow lines on narrow viewports */
}
.landing-page .section-sub { font-size: 0.9375rem; color: var(--color-secondary); max-width: 38rem; }

/* ── CTA buttons (mirrors auth pages) ── */
.landing-page .cta {
  display: inline-flex; justify-content: center; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; min-height: 44px;
  border: 0; border-radius: 0.5rem; cursor: pointer; text-decoration: none;
  background: var(--color-primary); color: #fff;
  font-size: 0.875rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  transition: all 0.2s;
}
.landing-page .cta:hover { background: var(--color-primary-container); transform: translateY(-2px); box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }

/* ── Nav ── */
.landing-page .nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--color-surface) 97%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--color-outline-variant) 25%, transparent);
}
.landing-page .nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4rem; }
.landing-page .wordmark {
  font-size: 1rem; font-weight: 900; letter-spacing: 0.06em; text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.landing-page .wordmark .mark-logo { width: 2rem; height: 2rem; object-fit: contain; flex: none; max-width: none; }
.landing-page .nav-links { display: none; gap: 0.25rem; }
.landing-page .nav-link {
  text-decoration: none; font-size: 13px; font-weight: 600; color: var(--color-secondary);
  padding: 0.5rem 0.75rem; border-radius: 0.5rem; transition: all 0.15s;
  white-space: nowrap;
}
.landing-page .nav-link:hover { color: var(--color-on-surface); background: var(--color-surface-container); }
.landing-page .nav-actions { display: flex; align-items: center; gap: 1rem; }
.landing-page .nav-signin {
  text-decoration: none; font-size: 13px; font-weight: 700; color: var(--color-secondary);
  white-space: nowrap; transition: color 0.15s;
  padding: 0.625rem 0.25rem; /* ≥24px tap target — the only sign-in entry below 960px */
}
.landing-page .nav-signin:hover { color: var(--color-primary); }
@media (min-width: 960px) {
  .landing-page .nav-links { display: flex; }
}
/* ≤383px: the es nav ("Iniciar sesión") runs out of row — tighten gaps and
   the wordmark so all three nav items keep breathing room down to 320. */
@media (max-width: 383px) {
  .landing-page .nav-inner { gap: 0.5rem; }
  .landing-page .nav-actions { gap: 0.25rem; }
  .landing-page .wordmark { font-size: 0.875rem; letter-spacing: 0.04em; }
  .landing-page .wordmark .mark-logo { width: 1.75rem; height: 1.75rem; }
}

/* ── Language switcher: details/summary popover, zero JS ── */
.landing-page .lang { position: relative; }
.landing-page .lang summary {
  display: flex; align-items: center; gap: 0.375rem;
  list-style: none; cursor: pointer; user-select: none;
  font-size: 13px; font-weight: 700; color: var(--color-secondary);
  padding: 0.375rem 0.5rem; border-radius: 0.5rem;
  transition: all 0.15s; white-space: nowrap;
}
.landing-page .lang summary::-webkit-details-marker { display: none; }
.landing-page .lang summary:hover { color: var(--color-on-surface); background: var(--color-surface-container); }
.landing-page .lang summary .material-symbols-outlined { font-size: 18px; }
.landing-page .lang summary .caret { font-size: 16px; transition: transform 0.15s; }
.landing-page .lang[open] summary .caret { transform: rotate(180deg); }
.landing-page .lang .lang-label { display: none; }
@media (min-width: 640px) { .landing-page .lang .lang-label { display: inline; } }
/* click anywhere outside closes the menu (fixed overlay belongs to the open summary) */
.landing-page .lang[open] > summary::before { content: ''; position: fixed; inset: 0; cursor: default; }
.landing-page .lang-menu {
  position: absolute; right: 0; top: calc(100% + 0.375rem); z-index: 60;
  min-width: 12.5rem;
  background: var(--color-surface-container-lowest);
  border: 1px solid color-mix(in srgb, var(--color-outline-variant) 30%, transparent);
  border-radius: 0.75rem; padding: 0.375rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
.landing-page .lang-option {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.625rem; border-radius: 0.5rem; text-decoration: none;
  font-size: 13px; font-weight: 600; color: var(--color-on-surface-variant);
  transition: background 0.15s;
}
.landing-page .lang-option:hover { background: var(--color-surface-container-low); }
.landing-page .lang-option .code {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: color-mix(in srgb, var(--color-on-surface-variant) 55%, transparent);
  margin-left: auto;
}
.landing-page .lang-option .material-symbols-outlined { font-size: 16px; color: var(--color-primary); visibility: hidden; }
.landing-page .lang-option.active { color: var(--color-on-surface); font-weight: 700; }
.landing-page .lang-option.active .material-symbols-outlined { visibility: visible; }
.landing-page .lang-option.active .code { color: var(--color-primary); }

/* ── Hero ── */
.landing-page .hero {
  position: relative; overflow: hidden;
  /* ledger-paper dot grid, barely there */
  background-image: radial-gradient(color-mix(in srgb, var(--color-primary) 9%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
}
.landing-page .hero-inner {
  display: grid; grid-template-columns: 1fr; gap: 3rem;
  padding-block: 3.5rem 4rem; align-items: center;
}
.landing-page .hero h1 {
  font-size: clamp(2rem, 6vw, 3.25rem); font-weight: 900;
  letter-spacing: -0.04em; line-height: 1.05; margin: 0.875rem 0 1rem;
}
.landing-page .hero h1 .flip { color: var(--color-primary); }
.landing-page .hero-sub { font-size: 1rem; color: var(--color-secondary); max-width: 34rem; margin-bottom: 1.75rem; }
.landing-page .hero-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.25rem; }
.landing-page .trust-line {
  display: flex; flex-wrap: wrap; gap: 0.375rem 1rem;
  font-size: 12px; font-weight: 600; color: color-mix(in srgb, var(--color-on-surface-variant) 75%, transparent);
}
.landing-page .trust-line span { display: inline-flex; align-items: center; gap: 0.3rem; }
.landing-page .trust-line .material-symbols-outlined { font-size: 15px; color: var(--color-success); }

/* ── Signature: the POS-ticket vignette ── */
.landing-page .vignette { position: relative; max-width: 26rem; margin: 0 auto; width: 100%; padding: 0 0 4.5rem; }
.landing-page .ticket {
  background: var(--color-surface-container-lowest);
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.10), 0 8px 10px -6px rgb(0 0 0 / 0.10);
  border: 1px solid color-mix(in srgb, var(--color-outline-variant) 15%, transparent);
  padding: 1.25rem 1.25rem 1rem;
}
.landing-page .ticket-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 0.75rem; margin-bottom: 0.25rem;
  border-bottom: 1px dashed color-mix(in srgb, var(--color-outline-variant) 55%, transparent);
}
.landing-page .ticket-head .label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--color-secondary); display: inline-flex; align-items: center; gap: 0.375rem;
}
.landing-page .ticket-head .label .material-symbols-outlined { font-size: 16px; color: var(--color-primary); }
.landing-page .ticket-head .code { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--color-on-surface-variant); }
.landing-page .t-row {
  display: flex; align-items: baseline; gap: 0.625rem;
  padding: 0.5rem 0; font-size: 13px;
}
.landing-page .t-row .qty { font-family: var(--font-mono); font-weight: 600; font-size: 12px; color: var(--color-primary); flex: none; }
.landing-page .t-row .name { font-weight: 600; min-width: 0; }
.landing-page .t-row .dots { flex: 1; border-bottom: 1px dotted color-mix(in srgb, var(--color-outline-variant) 60%, transparent); transform: translateY(-3px); }
.landing-page .t-row .price { font-family: var(--font-mono); font-weight: 600; font-size: 12.5px; }
.landing-page .ticket-total {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 0.375rem; padding-top: 0.75rem;
  border-top: 2px solid var(--color-on-surface);
}
.landing-page .ticket-total .word { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; }
.landing-page .ticket-total .amount { font-family: var(--font-mono); font-size: 1.125rem; font-weight: 700; }
.landing-page .pay-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  margin-top: 0.75rem; padding: 0.25rem 0.625rem; border-radius: 9999px;
  background: color-mix(in srgb, var(--color-primary) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--color-primary) 20%, transparent);
  font-size: 11px; font-weight: 700; color: var(--color-primary);
}
.landing-page .pay-chip .material-symbols-outlined { font-size: 14px; }

/* stock chip — decrements when the sale lands.
   bottom must clear the alert-toast below it: under 1024px the toast wraps to
   two lines (~3.5rem tall from bottom -0.25rem), and 1.75rem left the chip's
   value buried behind it on every tablet/phone width. ≥1024 restores the
   prototype offsets (toast is 1 line there and both floats move outward). */
.landing-page .stock-chip {
  position: absolute; right: 0.5rem; bottom: 4.25rem;
  background: var(--color-surface-container-lowest);
  border-radius: 0.75rem; padding: 0.625rem 0.875rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.12), 0 4px 6px -4px rgb(0 0 0 / 0.12);
  border: 1px solid color-mix(in srgb, var(--color-outline-variant) 20%, transparent);
  min-width: 12.5rem;
}
.landing-page .stock-chip .chip-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--color-secondary); display: flex; align-items: center; gap: 0.3rem; margin-bottom: 0.25rem;
  white-space: nowrap;
}
.landing-page .stock-chip .chip-label .material-symbols-outlined { font-size: 14px; }
.landing-page .qty-swap { position: relative; height: 1.375rem; font-family: var(--font-mono); font-weight: 700; font-size: 15px; }
.landing-page .qty-swap > span { position: absolute; inset: 0; white-space: nowrap; }
.landing-page .qty-swap .before { color: var(--color-success); }
.landing-page .qty-swap .after  { color: #5c2d0c; }

/* low-stock alert toast — fires after the decrement */
.landing-page .alert-toast {
  position: absolute; left: 0.5rem; bottom: -0.25rem;
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--color-marine); color: #fff;
  border-radius: 0.75rem; padding: 0.625rem 0.875rem;
  font-size: 12px; font-weight: 600;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.25);
  max-width: 16rem;
}
.landing-page .alert-toast .material-symbols-outlined { font-size: 18px; color: #fbbf24; flex: none; }

@media (min-width: 1024px) {
  .landing-page .hero-inner { grid-template-columns: 11fr 9fr; gap: 4rem; padding-block: 5rem 5.5rem; }
  .landing-page .vignette { margin: 0; padding-bottom: 3rem; }
  .landing-page .stock-chip { right: -1.25rem; bottom: 1.75rem; }
  .landing-page .alert-toast { left: -1.25rem; bottom: -0.5rem; }
}

/* ═══ Animated demo system ═══
   Motion contract (WCAG 2.2.2 by construction):
   - every animation plays ONCE and settles; total wall-clock ≤ 4.2s → no pause control needed
   - base styles ARE the settle state: reduced-motion and no-animation renders a complete card
   - transform + opacity only (cheap-Android compositor path)
   - replay is user-initiated only (:hover / :focus-within swaps to the -r keyframe twins) */

/* base = settle state */
.landing-page .d-rise { opacity: 1; }
.landing-page .d-out  { opacity: 0; }
.landing-page .d-mid  { opacity: 0; }
.landing-page .d-bar  { transform-origin: bottom; }
.landing-page .d-gfill { transform-origin: left; transform: scaleX(0.18); }

@media (prefers-reduced-motion: no-preference) {
  /* Demos play when scrolled into view: the inline IntersectionObserver adds
     .play per card. The above-the-fold vignette plays on load. No JS → no
     .play → the settled base state (a complete static card). */
  .landing-page :is(.vignette, .demo-card.play) .d-rise  { animation: d-rise 0.45s both;    animation-delay: calc(var(--d, 0s) + var(--at, 0s)); }
  .landing-page :is(.vignette, .demo-card.play) .d-out   { animation: d-fall 0.35s both;    animation-delay: calc(var(--d, 0s) + var(--at, 0s)); }
  .landing-page :is(.vignette, .demo-card.play) .d-mid   { animation: d-hold-mid 1.3s both; animation-delay: calc(var(--d, 0s) + var(--at, 0s)); }
  .landing-page :is(.vignette, .demo-card.play) .d-pulse { animation: d-pulse 0.5s both;    animation-delay: calc(var(--d, 0s) + var(--at, 0s)); }
  .landing-page :is(.vignette, .demo-card.play) .d-bar   { animation: d-grow 0.5s both;     animation-delay: calc(var(--d, 0s) + var(--at, 0s)); }
  .landing-page :is(.vignette, .demo-card.play) .d-gfill { animation: d-shrink 1s both;     animation-delay: calc(var(--d, 0s) + var(--at, 0s)); }

  .landing-page :is(.demo-card, .vignette):hover .d-rise,  .landing-page .demo-card:focus-within .d-rise  { animation-name: d-rise-r; }
  .landing-page :is(.demo-card, .vignette):hover .d-out,   .landing-page .demo-card:focus-within .d-out   { animation-name: d-fall-r; }
  .landing-page :is(.demo-card, .vignette):hover .d-mid,   .landing-page .demo-card:focus-within .d-mid   { animation-name: d-hold-mid-r; }
  .landing-page :is(.demo-card, .vignette):hover .d-pulse, .landing-page .demo-card:focus-within .d-pulse { animation-name: d-pulse-r; }
  .landing-page :is(.demo-card, .vignette):hover .d-bar,   .landing-page .demo-card:focus-within .d-bar   { animation-name: d-grow-r; }
  .landing-page :is(.demo-card, .vignette):hover .d-gfill, .landing-page .demo-card:focus-within .d-gfill { animation-name: d-shrink-r; }
}

@keyframes d-rise   { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes d-rise-r { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes d-fall   { from { opacity: 1; } to { opacity: 0; } }
@keyframes d-fall-r { from { opacity: 1; } to { opacity: 0; } }
@keyframes d-hold-mid   { 0% { opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes d-hold-mid-r { 0% { opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes d-pulse   { 0% { transform: scale(1); } 40% { transform: scale(0.94); } 100% { transform: scale(1); } }
@keyframes d-pulse-r { 0% { transform: scale(1); } 40% { transform: scale(0.94); } 100% { transform: scale(1); } }
@keyframes d-grow   { from { transform: scaleY(0.12); } to { transform: scaleY(1); } }
@keyframes d-grow-r { from { transform: scaleY(0.12); } to { transform: scaleY(1); } }
@keyframes d-shrink   { from { transform: scaleX(1); } to { transform: scaleX(0.18); } }
@keyframes d-shrink-r { from { transform: scaleX(1); } to { transform: scaleX(0.18); } }

/* ── Features: bento of 7 mini-demos ── */
.landing-page .features { padding: 4rem 0; }
.landing-page .demo-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 2rem; }
.landing-page .demo-card {
  display: flex; flex-direction: column;
  background: var(--color-surface-container-lowest);
  border: 1px solid color-mix(in srgb, var(--color-outline-variant) 18%, transparent);
  border-radius: 1rem; padding: 1.375rem;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  transition: box-shadow 0.2s, transform 0.2s;
}
.landing-page .demo-card:hover { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08); transform: translateY(-2px); }
.landing-page .demo-tag {
  display: flex; align-items: center; gap: 0.375rem;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-secondary);
  margin-bottom: 0.625rem;
}
.landing-page .demo-tag .material-symbols-outlined { font-size: 16px; color: var(--color-primary); }
.landing-page .demo-card h3 { font-size: 0.9375rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 0.25rem; }
.landing-page .demo-card > p { font-size: 13px; color: var(--color-secondary); margin-bottom: 1rem; }
.landing-page .demo-stage {
  flex: 1;
  background: var(--color-surface-container-low);
  border: 1px solid color-mix(in srgb, var(--color-outline-variant) 15%, transparent);
  border-radius: 0.75rem; padding: 0.75rem;
  display: grid; gap: 0.375rem; align-content: start;
}
@media (min-width: 640px)  { .landing-page .demo-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) {
  .landing-page .demo-grid { grid-template-columns: repeat(12, 1fr); gap: 1.25rem; }
  .landing-page .demo-card.tier-hero { grid-column: span 4; }
  .landing-page .demo-card.tier-mini { grid-column: span 3; }
  /* reserve two title lines so the four mini stages share one top edge
     (one 2-line title was sinking its panel 27px below the row band) */
  .landing-page .demo-card.tier-mini h3 { min-height: 3em; }
}

/* stage atoms */
.landing-page .s-row {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 12px; font-weight: 600;
  background: var(--color-surface-container-lowest);
  border: 1px solid color-mix(in srgb, var(--color-outline-variant) 15%, transparent);
  border-radius: 0.5rem; padding: 0.4rem 0.625rem;
  min-width: 0;
}
.landing-page .s-row .material-symbols-outlined { font-size: 15px; color: var(--color-primary); flex: none; }
.landing-page .s-row .name { min-width: 0; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.landing-page .s-row .tail { margin-left: auto; font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--color-secondary); flex: none; }
.landing-page .s-row .tail.ok,   .landing-page .s-row .tail .ok   { color: var(--color-success); }
.landing-page .s-row .tail.warn, .landing-page .s-row .tail .warn { color: #b45309; }
.landing-page .s-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--color-secondary);
  padding: 0 0.125rem 0.25rem;
}
.landing-page .s-note {
  display: flex; align-items: center; gap: 0.375rem;
  font-size: 11px; font-weight: 600; color: var(--color-secondary); padding: 0.125rem 0.125rem 0;
}
.landing-page .s-note .material-symbols-outlined { font-size: 14px; color: var(--color-primary); }
.landing-page .s-total {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.375rem 0.125rem 0; border-top: 2px solid var(--color-on-surface); margin-top: 0.125rem;
}
.landing-page .s-total .amount { font-family: var(--font-mono); font-size: 0.9375rem; font-weight: 700; letter-spacing: 0; }
.landing-page .state-chip {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.55rem; border-radius: 9999px;
  font-size: 10.5px; font-weight: 700;
}
.landing-page .state-chip .material-symbols-outlined { font-size: 13px; }
.landing-page .chip-success { color: var(--color-success); background: color-mix(in srgb, var(--color-success) 10%, #fff); border: 1px solid color-mix(in srgb, var(--color-success) 25%, transparent); }
.landing-page .chip-marine  { color: #fff; background: var(--color-marine); border: 1px solid var(--color-marine); }
.landing-page .chip-amber   { color: #b45309; background: color-mix(in srgb, #b45309 10%, #fff); border: 1px solid color-mix(in srgb, #b45309 25%, transparent); }
.landing-page .swap { display: inline-grid; }
.landing-page .swap > span { grid-area: 1 / 1; white-space: nowrap; }
.landing-page .chip-stack { display: inline-grid; justify-self: start; }
.landing-page .chip-stack > .state-chip { grid-area: 1 / 1; justify-self: start; }
.landing-page .pos-tiles { display: flex; gap: 0.375rem; margin-bottom: 0.125rem; }
.landing-page .pos-tile {
  flex: 1; text-align: center;
  font-size: 11px; font-weight: 700;
  background: var(--color-surface-container-lowest);
  border: 1px solid color-mix(in srgb, var(--color-outline-variant) 25%, transparent);
  border-radius: 0.5rem; padding: 0.45rem 0.25rem;
  white-space: nowrap; overflow: hidden;
}
.landing-page .s-chart { display: flex; align-items: flex-end; gap: 0.375rem; height: 4.25rem; padding: 0.25rem 0.125rem 0; }
.landing-page .s-chart .d-bar { flex: 1; border-radius: 0.25rem 0.25rem 0 0; background: color-mix(in srgb, var(--color-primary) 55%, #fff); }
.landing-page .s-chart .d-bar:last-child { background: var(--color-primary); }
.landing-page .s-gauge { height: 0.5rem; border-radius: 9999px; background: var(--color-surface-container); overflow: hidden; margin: 0.25rem 0.125rem 0; }
/* display:block is load-bearing: on the inline span, width/height AND the
   scaleX settle transform are all inert — the gauge painted as an empty track
   (broken in the prototype too, caught by the 2026-07-30 audit). */
.landing-page .s-gauge .d-gfill { display: block; height: 100%; width: 100%; background: var(--color-error); border-radius: 9999px; }
.landing-page .s-toast {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--color-marine); color: #fff;
  border-radius: 0.625rem; padding: 0.5rem 0.625rem;
  font-size: 11px; font-weight: 600;
}
.landing-page .s-toast .material-symbols-outlined { font-size: 15px; color: #fbbf24; flex: none; }

/* ── Business types ── */
.landing-page .biz { padding: 1rem 0 4rem; }
.landing-page .biz-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 2rem; }
.landing-page .biz-card {
  display: flex; gap: 0.875rem; align-items: flex-start;
  background: var(--color-surface-container-low);
  border: 1px solid color-mix(in srgb, var(--color-outline-variant) 15%, transparent);
  border-radius: 1rem; padding: 1.125rem 1.25rem;
  color: inherit; text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.landing-page .biz-card:hover {
  border-color: color-mix(in srgb, var(--color-primary) 35%, transparent);
  box-shadow: 0 10px 20px -12px rgb(0 0 0 / 0.25);
  transform: translateY(-2px);
}
.landing-page .biz-card .material-symbols-outlined { font-size: 24px; color: var(--color-primary); flex: none; margin-top: 2px; }
.landing-page .biz-card h3 { font-size: 0.875rem; font-weight: 800; margin-bottom: 0.125rem; }
.landing-page .biz-card p { font-size: 12.5px; color: var(--color-secondary); }
@media (min-width: 640px)  { .landing-page .biz-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .landing-page .biz-grid { grid-template-columns: repeat(4, 1fr); } }

/* ── Solution pages ── */
.landing-page .solution-hero {
  background-image: radial-gradient(color-mix(in srgb, var(--color-primary) 9%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
  padding: 1.25rem 0 4rem;
}
.landing-page .solution-breadcrumb {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 2.5rem; color: var(--color-secondary); font-size: 12px; font-weight: 600;
}
.landing-page .solution-breadcrumb a { color: var(--color-primary); text-decoration: none; }
.landing-page .solution-breadcrumb a:hover { text-decoration: underline; }
.landing-page .solution-hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.landing-page .solution-hero h1 {
  max-width: 46rem; margin: 0.875rem 0 1rem;
  font-size: clamp(2.25rem, 7vw, 4rem); font-weight: 900; letter-spacing: -0.045em; line-height: 1.02;
  text-wrap: balance;
}
.landing-page .solution-lead { max-width: 39rem; color: var(--color-secondary); font-size: 1.05rem; line-height: 1.65; }
.landing-page .solution-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.landing-page .solution-secondary {
  display: inline-flex; min-height: 44px; align-items: center; justify-content: center;
  border: 1px solid color-mix(in srgb, var(--color-primary) 28%, transparent); border-radius: 0.5rem;
  padding: 0.75rem 1.25rem; color: var(--color-primary); font-size: 0.875rem; font-weight: 800;
  text-decoration: none;
}
.landing-page .solution-secondary:hover { background: color-mix(in srgb, var(--color-primary) 6%, #fff); }
.landing-page .solution-trust {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-top: 1.25rem; padding: 0;
  color: var(--color-on-surface-variant); font-size: 12px; font-weight: 600; list-style: none;
}
.landing-page .solution-trust li { display: inline-flex; align-items: center; gap: 0.3rem; }
.landing-page .solution-trust .material-symbols-outlined { color: var(--color-success); font-size: 15px; }
.landing-page .solution-flow-card {
  padding: 1.25rem; border: 1px solid color-mix(in srgb, var(--color-outline-variant) 25%, transparent);
  border-radius: 1rem; background: var(--color-surface-container-lowest);
  box-shadow: 0 20px 35px -22px rgb(0 0 0 / 0.35);
}
.landing-page .solution-flow-label {
  display: block; margin-bottom: 0.875rem; color: var(--color-secondary);
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.landing-page .solution-flow-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 0.75rem; align-items: center;
  padding: 0.875rem 0; border-bottom: 1px dashed color-mix(in srgb, var(--color-outline-variant) 45%, transparent);
  font-size: 13px;
}
.landing-page .solution-flow-row .material-symbols-outlined { color: var(--color-primary); font-size: 18px; }
.landing-page .solution-flow-number,
.landing-page .solution-step > span {
  display: inline-flex; width: 1.75rem; height: 1.75rem; align-items: center; justify-content: center;
  border-radius: 9999px; background: color-mix(in srgb, var(--color-primary) 10%, #fff);
  color: var(--color-primary); font-family: var(--font-mono); font-size: 11px; font-weight: 800;
}
.landing-page .solution-flow-result {
  display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; padding: 0.75rem;
  border-radius: 0.625rem; background: color-mix(in srgb, var(--color-success) 9%, #fff);
  color: var(--color-on-surface-variant); font-size: 12px; font-weight: 700;
}
.landing-page .solution-flow-result .material-symbols-outlined { color: var(--color-success); font-size: 18px; }
.landing-page .solution-section { padding: 4rem 0; }
.landing-page .solution-outcomes { background: var(--color-surface-container-lowest); }
.landing-page .solution-benefit-grid { display: grid; gap: 1rem; margin-top: 2rem; }
.landing-page .solution-benefit {
  padding: 1.5rem; border: 1px solid color-mix(in srgb, var(--color-outline-variant) 20%, transparent);
  border-radius: 1rem; background: var(--color-surface-container-low);
}
.landing-page .solution-benefit-number { color: var(--color-primary); font-family: var(--font-mono); font-size: 11px; font-weight: 800; }
.landing-page .solution-benefit h3,
.landing-page .solution-feature h3,
.landing-page .solution-step h3 { margin: 0.625rem 0 0.375rem; font-size: 0.9375rem; font-weight: 800; }
.landing-page .solution-benefit p,
.landing-page .solution-feature p,
.landing-page .solution-step p { color: var(--color-secondary); font-size: 13px; line-height: 1.6; }
.landing-page .solution-workflow { background: var(--color-surface-container-low); }
.landing-page .solution-workflow-grid { display: grid; gap: 2.5rem; }
.landing-page .solution-step-list { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.landing-page .solution-step {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1.25rem;
  border-radius: 1rem; background: var(--color-surface-container-lowest);
}
.landing-page .solution-step h3 { margin-top: 0.125rem; }
.landing-page .solution-feature-grid { display: grid; gap: 1rem; margin-top: 2rem; }
.landing-page .solution-feature {
  padding: 1.25rem; border: 1px solid color-mix(in srgb, var(--color-outline-variant) 20%, transparent);
  border-radius: 0.875rem; background: var(--color-surface-container-lowest);
}
.landing-page .solution-feature > .material-symbols-outlined { color: var(--color-primary); font-size: 24px; }
.landing-page .solution-faq { background: var(--color-surface-container-low); }
.landing-page .solution-faq .faq-list { margin-left: 0; }
.landing-page .solution-related { background: var(--color-surface-container-lowest); }
.landing-page .solution-related-grid { display: grid; gap: 1rem; margin-top: 2rem; }
.landing-page .solution-related-grid a {
  display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1rem; padding: 1.25rem;
  border: 1px solid color-mix(in srgb, var(--color-outline-variant) 22%, transparent);
  border-radius: 0.875rem; color: var(--color-on-surface); text-decoration: none;
}
.landing-page .solution-related-grid a:hover { border-color: var(--color-primary); }
.landing-page .solution-related-grid strong { font-size: 0.9375rem; }
.landing-page .solution-related-grid a > span:not(.material-symbols-outlined) { color: var(--color-secondary); font-size: 12.5px; }
.landing-page .solution-related-grid .material-symbols-outlined { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--color-primary); font-size: 20px; }
.landing-page .solution-final p { max-width: 38rem; color: #cbd5e1; font-size: 0.9375rem; }
@media (min-width: 640px) {
  .landing-page .solution-benefit-grid { grid-template-columns: repeat(3, 1fr); }
  .landing-page .solution-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .landing-page .solution-related-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .landing-page .solution-hero { padding-bottom: 5.5rem; }
  .landing-page .solution-hero-grid { grid-template-columns: minmax(0, 3fr) minmax(19rem, 2fr); gap: 4rem; }
  .landing-page .solution-workflow-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); gap: 5rem; }
  .landing-page .solution-feature-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── CTA strip (marine) ── */
.landing-page .cta-strip { background: var(--color-marine); color: #fff; padding: 4rem 0; }
.landing-page .cta-strip-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.25rem; }
.landing-page .cta-strip .eyebrow { color: #5eead4; }
.landing-page .cta-strip h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; }
.landing-page .cta-strip .note { font-size: 13px; color: #94A3B8; }
.landing-page .strip-plate {
  display: inline-flex; align-items: center; gap: 0.625rem;
  border: 1px solid rgb(94 234 212 / 0.25);
  background: rgb(94 234 212 / 0.06);
  border-radius: 0.5rem; padding: 0.625rem 1rem;
  font-family: var(--font-mono); font-weight: 600; font-size: 13px; color: #5eead4;
  overflow-wrap: anywhere;
}
.landing-page .strip-plate .material-symbols-outlined { font-size: 18px; flex: none; }
/* slug nowrap + inline-block domain: on a too-narrow plate the DOMAIN drops to
   the next line whole — never a "tu-" / "negocio…" split at the slug's hyphen */
.landing-page .strip-plate .slug { white-space: nowrap; }
.landing-page .strip-plate .domain { color: #94A3B8; font-weight: 500; display: inline-block; }
.landing-page .cta-strip .cta { background: #fff; color: var(--color-marine); }
.landing-page .cta-strip .cta:hover { background: #e2e8f0; }

/* ── FAQ ── */
.landing-page .faq { padding: 4rem 0; }
.landing-page .faq-head { text-align: center; }
.landing-page .faq-list { max-width: 42rem; margin: 2rem auto 0; }
.landing-page .faq-item {
  border-bottom: 1px solid color-mix(in srgb, var(--color-outline-variant) 30%, transparent);
}
.landing-page .faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 0.25rem; cursor: pointer; list-style: none;
  font-size: 0.9375rem; font-weight: 700;
}
.landing-page .faq-item summary::-webkit-details-marker { display: none; }
.landing-page .faq-item summary .material-symbols-outlined { font-size: 20px; color: var(--color-secondary); transition: transform 0.2s; flex: none; }
.landing-page .faq-item[open] summary .material-symbols-outlined { transform: rotate(45deg); color: var(--color-primary); }
.landing-page .faq-item .answer { padding: 0 0.25rem 1.125rem; font-size: 13.5px; color: var(--color-secondary); max-width: 38rem; }

/* ── Footer ── */
.landing-page .footer {
  background: var(--color-surface-container-low);
  border-top: 1px solid color-mix(in srgb, var(--color-outline-variant) 25%, transparent);
  padding: 3rem 0 2rem;
}
.landing-page .footer-grid { display: flex; flex-wrap: wrap; gap: 2rem 3rem; justify-content: space-between; align-items: flex-start; }
.landing-page .footer-brand p { font-size: 12.5px; color: var(--color-secondary); margin-top: 0.5rem; max-width: 18rem; }
.landing-page .footer-col h2 {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--color-secondary); margin-bottom: 0.75rem;
}
.landing-page .footer-col a,
.landing-page .footer-col button {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 13px; font-weight: 600; text-decoration: none; color: var(--color-on-surface-variant);
  padding: 0.25rem 0; transition: color 0.15s;
}
.landing-page .footer-col button { border: 0; background: transparent; cursor: pointer; font-family: inherit; text-align: left; }
.landing-page .footer-col a:hover,
.landing-page .footer-col button:hover { color: var(--color-primary); }
.landing-page .footer-col .material-symbols-outlined { font-size: 16px; color: var(--color-primary); }
.landing-page .footer-legal {
  margin-top: 2.5rem; text-align: center; font-size: 10px; font-weight: 700;
  /* 80% mix ≈ 5:1 on the footer surface — 40% measured ~2:1, illegible at 10px */
  color: color-mix(in srgb, var(--color-on-surface-variant) 80%, transparent);
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* Branded focus ring — ports the prototype's :focus-visible rule, scoped */
.landing-page :focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  .landing-page * { transition: none !important; }
  html:has(.landing-page) { scroll-behavior: auto; }
}
