/*
 * DigiSparkMX site styles: the premium dark direction (docs/DESIGN.md,
 * spec 017, variant B).
 * Colors: the eleven palette tokens of constitution III are the only color
 * literals; every mix, transparency and gradient is a named token below.
 * Breakpoints (40em, 48em, 64em, 80em) are literal only in media queries.
 * Hover effects live in @media (hover: hover); everything that moves lives
 * in @media (prefers-reduced-motion: no-preference).
 * Order: tokens, fonts, base and type, layout, shell, buttons and links,
 * shared components, main page sections, other pages, hover, motion,
 * forced colors.
 */

/* ---------- Tokens ---------- */

:root {
  /* Palette (constitution III): the only color literals in this file. */
  --bg-base: #061523;
  --bg-elevated: #0A2030;
  --bg-soft: #0D293A;
  --text-primary: #F5F8FB;
  --text-secondary: #AEBDCA;
  --accent-cyan: #03C8E7;
  --accent-orange: #FF7900;
  --accent-orange-deep: #FF5A00;
  --accent-amber: #FFB04A;
  --accent-blue: #0A6FD6;
  --border-subtle: #244458;

  /* Opaque surfaces mixed from the palette. Text contrast on --color-card-2,
     the brightest surface: --text-primary 12.1, --text-secondary 6.7,
     --accent-cyan 6.4, --accent-orange 4.9, --accent-amber 7.1,
     --color-metal 4.9 (all at least 4.5:1). */
  --color-card-2: color-mix(in srgb, var(--accent-cyan) 8%, var(--bg-soft)); /* lightest surface: card bodies, glass at its brightest */
  --color-glass-light: color-mix(in srgb, var(--border-subtle) 25%, var(--color-card-2)); /* top of the glass gradient */
  --color-glass-deep: color-mix(in srgb, var(--bg-base) 50%, var(--bg-elevated)); /* bottom of the glass gradient, back-to-top */
  --color-surface-solid: color-mix(in srgb, var(--bg-soft) 55%, var(--bg-elevated)); /* the comparison table's sticky column */
  --color-frame-top: color-mix(in srgb, var(--accent-blue) 15%, var(--bg-soft)); /* top of the process step frames */
  --color-orange-dusk: color-mix(in srgb, var(--accent-orange) 20%, var(--bg-base)); /* the selected tier card's warm tint */
  --color-bezel: color-mix(in srgb, var(--text-secondary) 12%, var(--bg-base)); /* the laptop's screen frame */
  --color-metal: color-mix(in srgb, var(--text-secondary) 82%, var(--bg-soft)); /* muted icons ("No incluye") */
  --color-metal-light: color-mix(in srgb, var(--text-primary) 17%, var(--text-secondary)); /* laptop base, top */
  --color-metal-dark: color-mix(in srgb, var(--text-secondary) 62%, var(--bg-soft)); /* laptop base, bottom */
  --color-cyan-deep: color-mix(in srgb, color-mix(in srgb, var(--accent-cyan), var(--accent-blue)) 55%, var(--bg-base)); /* the darker process module */
  --color-orange-hover: color-mix(in srgb, var(--accent-amber) 40%, var(--accent-orange)); /* middle of the hover gradient */
  --color-amber-light: color-mix(in srgb, var(--text-primary) 25%, var(--accent-amber)); /* light end of the hover gradient */
  /* Gradient stops of the inline SVGs (hero glint, contact art): set here,
     never as literal colors in the markup (constitution III). */
  --color-glint-core: color-mix(in srgb, var(--text-primary) 85%, var(--accent-amber));
  --color-trail-mid: color-mix(in srgb, var(--accent-orange) 55%, var(--accent-amber));
  --color-trail-end: color-mix(in srgb, var(--accent-amber) 55%, var(--text-primary));
  --color-module-light: color-mix(in srgb, var(--accent-cyan) 65%, var(--text-primary));
  --color-module-deep: color-mix(in srgb, var(--accent-cyan) 60%, var(--accent-blue));
  --color-module-dark-top: color-mix(in srgb, var(--accent-cyan) 30%, var(--bg-soft));

  /* Cyan transparencies, from faint to strong. */
  --color-cyan-faint: color-mix(in srgb, var(--accent-cyan) 5%, transparent); /* secondary button fill, fact tiles */
  --color-cyan-wash: color-mix(in srgb, var(--accent-cyan) 10%, transparent); /* tinted fills, background lights */
  --color-cyan-tint: color-mix(in srgb, var(--accent-cyan) 14%, transparent); /* hovered secondary button, gallery counts */
  --color-line: color-mix(in srgb, var(--accent-cyan) 16%, transparent); /* dividers, decorative edges */
  --color-cyan-dim: color-mix(in srgb, var(--accent-cyan) 21%, transparent); /* hero guides, back-to-top track */
  --color-cyan-inner: color-mix(in srgb, var(--accent-cyan) 25%, transparent); /* inner light of frames, the hero wave's shadow */
  --glass-border: color-mix(in srgb, var(--accent-cyan) 28%, transparent); /* glass edges */
  --color-cyan-halo: color-mix(in srgb, var(--accent-cyan) 30%, transparent); /* wave glow, field focus ring */
  --color-cyan-glow: color-mix(in srgb, var(--accent-cyan) 35%, transparent); /* glows on cyan pieces */
  --color-cyan-radiance: color-mix(in srgb, var(--accent-cyan) 40%, transparent); /* the step numbers' text glow */
  --color-cyan-glow-strong: color-mix(in srgb, var(--accent-cyan) 45%, transparent); /* step frames' glow, contact art edge */
  --color-line-strong: color-mix(in srgb, var(--accent-cyan) 50%, transparent); /* lines that must be seen */

  /* Blue, only as background light. */
  --color-blue-wash: color-mix(in srgb, var(--accent-blue) 15%, transparent); /* page hero light, hero halo's outer ring */
  --color-blue-glow: color-mix(in srgb, var(--accent-blue) 20%, transparent); /* page, raised band, hero and process lights */

  /* Orange and amber transparencies. */
  --color-orange-light: color-mix(in srgb, var(--accent-orange) 15%, transparent); /* background lights */
  --color-orange-wash: color-mix(in srgb, var(--accent-orange) 22%, transparent); /* tinted fills */
  --color-orange-trail: color-mix(in srgb, var(--accent-orange) 30%, transparent); /* the process curve's glow */
  --color-orange-edge: color-mix(in srgb, var(--accent-orange) 35%, transparent); /* wave glow, closing card edge */
  --color-orange-border: color-mix(in srgb, var(--accent-orange) 50%, transparent); /* the targeted detail card's icon tile */
  --color-orange-glow: color-mix(in srgb, var(--accent-orange) 55%, transparent); /* glows on orange pieces */
  --color-orange-glow-strong: color-mix(in srgb, var(--accent-orange) 70%, transparent); /* hovered primary button */
  --color-amber-edge: color-mix(in srgb, var(--accent-amber) 35%, transparent); /* primary button's inner edge */
  --color-amber-edge-strong: color-mix(in srgb, var(--accent-amber) 50%, transparent); /* the same, on hover */

  /* Dark transparencies. Shadows use the page color: the palette has no black. */
  --color-scrim: color-mix(in srgb, var(--bg-base) 82%, transparent); /* behind small labels over images */
  --color-header: color-mix(in srgb, var(--bg-base) 72%, transparent); /* header at rest */
  --color-header-scrolled: color-mix(in srgb, var(--bg-base) 88%, transparent); /* header once scrolled */
  --color-backdrop: color-mix(in srgb, var(--bg-base) 60%, transparent); /* behind the open menu */
  --color-field: color-mix(in srgb, var(--bg-base) 55%, transparent); /* form fields */
  --color-shadow: color-mix(in srgb, var(--bg-base) 90%, transparent); /* deep, soft shadows */
  --color-back-to-top: color-mix(in srgb, var(--color-glass-deep) 82%, transparent); /* back-to-top button */
  --color-highlight: color-mix(in srgb, var(--text-primary) 6%, transparent); /* the inner top light on glass */
  --color-field-edge: color-mix(in srgb, var(--accent-cyan) 60%, transparent); /* form field edges at rest: 3.3:1 on the brightest glass, as constitution IV asks of a control edge */
  --color-focus: var(--accent-cyan);

  /* Glass and gradients. */
  --glass: linear-gradient(160deg, color-mix(in srgb, var(--color-glass-light) 72%, transparent), color-mix(in srgb, var(--color-glass-deep) 66%, transparent));
  --glass-shadow: inset 0 1px 0 var(--color-highlight), 0 24px 48px -24px var(--color-shadow);
  --gradient-orange: linear-gradient(180deg, var(--accent-amber) -40%, var(--accent-orange) 45%, var(--accent-orange-deep)); /* primary buttons */
  --gradient-orange-hover: linear-gradient(180deg, var(--color-amber-light) -40%, var(--color-orange-hover) 45%, var(--accent-orange)); /* primary buttons on hover */
  --gradient-orange-line: linear-gradient(90deg, var(--accent-orange-deep), var(--accent-orange) 60%, var(--accent-amber)); /* eyebrow bar, reading progress */
  --gradient-selected: linear-gradient(160deg, color-mix(in srgb, var(--color-orange-dusk) 55%, transparent), color-mix(in srgb, var(--bg-elevated) 75%, transparent)); /* the selected tier card */
  --gradient-card-body: linear-gradient(180deg, color-mix(in srgb, var(--bg-soft) 90%, transparent), color-mix(in srgb, var(--bg-base) 95%, transparent)); /* project card bodies */
  --gradient-frame: linear-gradient(160deg, var(--color-frame-top), var(--color-glass-deep)); /* process step frames */
  --gradient-metal: linear-gradient(180deg, var(--color-metal-light), var(--color-metal-dark)); /* the laptop's base */

  /* Type */
  --font-sans: "Inter", "Inter Fallback", system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --fs-display: clamp(2.375rem, 1.6rem + 2.6vw, 3.4rem);
  --fs-h2: clamp(1.875rem, 1.4rem + 1.8vw, 2.75rem);
  --fs-h3: clamp(1.0625rem, 1rem + 0.25vw, 1.25rem);
  --fs-lead: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-eyebrow: 0.75rem;

  /* Space and widths */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --band-space: clamp(3.5rem, 2.5rem + 3.5vw, 5.5rem);
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --content-max: 90rem;
  --header-height: 4.5rem;
  --wave-height: clamp(3.5rem, 2rem + 6vw, 8rem);

  /* Shape */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-draw: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 180ms;
  --t-mid: 320ms;
  --t-reveal: 420ms;

  color-scheme: dark;
}

@media (min-width: 80em) {
  :root {
    --header-height: 5.25rem;
  }
}

/* ---------- Fonts ---------- */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Arial adjusted to Inter's proportions; values from fonts/README.md. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  size-adjust: 105.95%;
  ascent-override: 91.43%;
  descent-override: 22.77%;
  line-gap-override: 0%;
}

/* One variable file holds every heading weight (fonts/README.md). */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Base and type ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + var(--space-4));
}

body {
  margin: 0;
  background:
    radial-gradient(80rem 40rem at 100% 0%, var(--color-blue-glow), transparent 60%),
    var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
}

h1,
h2,
h3 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  text-wrap: balance;
  overflow-wrap: break-word;
}

h1 {
  font-size: var(--fs-display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.022em;
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.022em;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 var(--space-4);
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

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

button {
  font: inherit;
  color: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.text-small {
  font-size: var(--fs-small);
  line-height: 1.5;
}

.text-accent {
  color: var(--accent-orange);
}

.lead {
  max-width: 36rem;
  color: var(--text-secondary);
  font-size: var(--fs-lead);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The sprite holds the icons' symbols; it takes no space. */
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The WhatsApp glyph is a filled shape, not a stroke. */
.icon-fill {
  fill: currentColor;
  stroke: none;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

/* Skip-link and fragment targets take focus without showing a ring. */
main:focus,
section:focus {
  outline: none;
}

/* ---------- Layout ---------- */

.container {
  width: min(100% - 2 * var(--gutter), var(--content-max));
  margin-inline: auto;
}

.band {
  position: relative;
  padding-block: var(--band-space);
  border-top: 1px solid var(--color-line);
}

.band-raised {
  background:
    radial-gradient(40rem 22rem at 0% 0%, var(--color-blue-glow), transparent 70%),
    radial-gradient(36rem 20rem at 100% 100%, var(--color-cyan-wash), transparent 70%),
    var(--bg-elevated);
}

/* The band after the hero starts under the hero's wave, without an edge. */
.hero + .band {
  border-top: 0;
}

/* Intro and content: stacked, side by side from 80em. */
.band-layout {
  display: grid;
  gap: var(--space-6);
}

.band-intro h2 {
  max-width: 18ch;
  margin-bottom: var(--space-4);
}

.band-intro .lead {
  margin: 0;
}

.band-action {
  margin: var(--space-5) 0 0;
}

.section-header {
  margin-bottom: var(--space-6);
}

.section-header h2 {
  max-width: 22ch;
  margin-bottom: 0;
}

.section-header .lead {
  margin: var(--space-4) 0 0;
}

@media (min-width: 80em) {
  .band-layout {
    grid-template-columns: minmax(0, 3.6fr) minmax(0, 8.4fr);
    gap: var(--space-7);
    align-items: start;
  }

  .band-intro {
    position: sticky;
    top: calc(var(--header-height) + var(--space-5));
  }

  /* A wide layout puts the intro above the content: the heading on the
     left, the lead and the action on the right. */
  .band-layout-wide {
    grid-template-columns: minmax(0, 1fr);
  }

  .band-layout-wide .band-intro {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--space-8);
    align-items: end;
  }

  .band-layout-wide .band-intro h2 {
    grid-row: 2 / span 2;
    margin-bottom: 0;
  }

  .band-layout-wide .band-intro .lead {
    grid-column: 2;
    grid-row: 2;
  }

  .band-layout-wide .band-action {
    grid-column: 2;
    grid-row: 3;
  }
}

/* ---------- Shell: skip link ---------- */

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--text-primary);
  color: var(--bg-base);
  font-weight: 700;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- Shell: header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid transparent;
  background: var(--color-header);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-line);
  background: var(--color-header-scrolled);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--header-height);
}

.site-logo {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  min-height: 44px;
}

/* Mobile-navigation wordmark: kit size, artwork 178 px (minimum 160 px). */
.site-logo-image {
  width: 196px;
  max-width: none;
  height: auto;
  aspect-ratio: 392 / 94;
  margin-inline-start: -9px;
}

.header-divider {
  display: none;
}

.header-actions {
  display: none;
}

@media (min-width: 48em) {
  .header-actions {
    display: block;
  }
}

@media (min-width: 80em) {
  /* Horizontal logo: artwork at least 320 px (file at 358 px or more). */
  .site-logo-image {
    width: 358px;
    aspect-ratio: 840 / 216;
    margin-inline-start: calc(358px * -43 / 840);
  }

  .header-divider {
    display: block;
    width: 1px;
    height: 2.25rem;
    margin-inline: var(--space-2) 0;
    background: var(--color-line-strong);
  }
}

/* ---------- Shell: navigation and menu ---------- */

.menu-button,
.menu-close {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-primary);
  font-size: var(--fs-small);
  font-weight: 700;
  cursor: pointer;
}

.menu-button {
  margin-inline-start: auto;
}

/* Under 360 px the logo and the labelled button do not fit side by side:
   the button shows its icon only and keeps "Menú" as its name. */
@media (max-width: 22.4375em) {
  .menu-button {
    padding-inline: var(--space-3);
  }

  .menu-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

.menu-close {
  display: flex;
  margin-inline-start: auto;
}

/* Below 80em the navigation is a popover under the header. */
.site-nav {
  inset: var(--header-height) 0 auto 0;
  width: 100%;
  max-height: calc(100dvh - var(--header-height));
  margin: 0;
  padding: var(--space-4) var(--gutter) var(--space-6);
  overflow-y: auto;
  border: 0;
  border-bottom: 1px solid var(--color-line);
  background: var(--bg-base);
  color: var(--text-primary);
}

.site-nav::backdrop {
  background: var(--color-backdrop);
}

.nav-list a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 3rem;
  padding: var(--space-2) 0;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.menu-actions {
  margin-top: var(--space-5);
}

@media (min-width: 48em) {
  .menu-actions {
    display: none;
  }
}

/* From 80em the links fit inline next to the horizontal logo. */
@media (min-width: 80em) {
  .menu-button,
  .menu-close {
    display: none;
  }

  .site-nav[popover] {
    display: block;
    position: static;
    width: auto;
    max-height: none;
    margin: 0 auto 0 var(--space-4);
    padding: 0;
    overflow: visible;
    border: 0;
    background: none;
  }

  .nav-list {
    display: flex;
    gap: var(--space-1);
  }

  .nav-list a {
    padding: var(--space-2) var(--space-3);
    font-size: 0.9375rem;
    font-weight: 400;
    white-space: nowrap;
  }

  /* The glowing orange bar under the current (or hovered) link. */
  .nav-list a::after {
    content: "";
    position: absolute;
    right: var(--space-3);
    bottom: 0.3rem;
    left: var(--space-3);
    height: 3px;
    border-radius: var(--radius-pill);
    background: var(--accent-orange);
    box-shadow: 0 0 10px var(--color-orange-glow);
    transform: scaleX(0);
    transform-origin: left center;
  }

  .nav-list a.is-current {
    font-weight: 700;
  }

  .nav-list a.is-current::after {
    transform: none;
  }
}

/* ---------- Shell: footer ---------- */

.site-footer {
  background: var(--bg-base);
}

.footer-inner {
  display: grid;
  gap: var(--space-6);
  padding-block: var(--space-6);
}

/* Footer wordmark: kit size, artwork 257 px. */
.footer-logo {
  width: 284px;
  max-width: none;
  height: auto;
  aspect-ratio: 568 / 138;
  margin: 0 0 var(--space-3) -13.5px;
}

.footer-brand .text-small,
.footer-copy {
  margin: 0;
  color: var(--text-secondary);
}

.footer-nav {
  display: grid;
  gap: var(--space-4);
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: var(--fs-small);
}

@media (min-width: 64em) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .footer-nav {
    justify-items: end;
  }

  .footer-copy {
    grid-column: 1 / -1;
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-line);
  }
}

/* ---------- Shell: reading progress and back to top ---------- */

/* Both read --scroll-progress (0 to 1), which js/site.js sets on these two
   elements only (on the root it would restyle the whole page each time)
   while the page scrolls. Both stay hidden without JavaScript. */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 101;
  height: 3px;
  pointer-events: none;
}

.scroll-progress[hidden] {
  display: none;
}

.scroll-progress-bar {
  display: block;
  height: 100%;
  background: var(--gradient-orange-line);
  box-shadow: 0 0 10px var(--color-orange-glow);
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left center;
}

.back-to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--color-back-to-top);
  box-shadow: inset 0 1px 0 var(--color-highlight), 0 12px 28px -10px var(--color-shadow);
  color: var(--text-primary);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
}

.back-to-top[hidden] {
  display: none;
}

/* Shown after the first part of the page; while hidden it takes no focus. */
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top > * {
  grid-area: 1 / 1;
}

.back-to-top .icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* The ring starts at the top and fills clockwise. */
.back-to-top-ring {
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.back-to-top-ring circle {
  fill: none;
  stroke-width: 3;
}

.back-to-top-track {
  stroke: var(--color-cyan-dim);
}

.back-to-top-fill {
  stroke: var(--accent-orange);
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--scroll-progress, 0));
  filter: drop-shadow(0 0 4px var(--color-orange-glow));
}

/* ---------- Buttons and links ---------- */

/* Primary: the orange gradient with a dark label (7:1), only for WhatsApp
   (constitution I). */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 3rem;
  padding: var(--space-3) var(--space-5);
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--gradient-orange);
  color: var(--bg-base);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--color-amber-edge) inset, 0 10px 30px -8px var(--color-orange-glow);
}

.button-compact {
  min-height: 2.75rem;
  padding-inline: var(--space-4);
}

/* Secondary and the header's outline pill: a cyan edge with a faint glow. */
.button-secondary,
.button-outline {
  border-color: var(--accent-cyan);
  background: var(--color-cyan-faint);
  color: var(--text-primary);
  box-shadow: 0 0 18px -6px var(--color-cyan-glow), inset 0 0 14px -8px var(--color-cyan-glow);
}

.text-link {
  font-weight: 700;
  text-decoration-color: var(--color-line-strong);
  text-decoration-thickness: 2px;
}

.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  color: var(--accent-orange);
  font-weight: 700;
  text-decoration: none;
}

.whatsapp-link .icon {
  width: 1.125rem;
  height: 1.125rem;
}

/* ---------- Shared components ---------- */

/* Eyebrow: the glowing orange bar, then spaced capitals. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
  color: var(--text-primary);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 0.375rem;
  border-radius: var(--radius-pill);
  background: var(--gradient-orange-line);
  box-shadow: 0 0 12px var(--color-orange-glow);
}

/* Checked list: circle-check in cyan before each item. */
.list-check {
  display: grid;
  gap: var(--space-2);
  font-size: var(--fs-small);
}

.list-check li {
  display: flex;
  gap: var(--space-2);
}

.list-check .icon {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.1rem;
  color: var(--accent-cyan);
}

/* Excluded list: circle-x, muted. */
.list-x {
  display: grid;
  gap: var(--space-2);
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.list-x li {
  display: flex;
  gap: var(--space-2);
}

.list-x .icon {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.1rem;
  color: var(--color-metal);
}

/* Plain points: a small glowing cyan square, like the logo's blocks. */
.list-dot {
  display: grid;
  gap: var(--space-2);
}

.list-dot li {
  position: relative;
  padding-left: var(--space-5);
}

.list-dot li::before {
  content: "";
  position: absolute;
  top: 0.6em;
  left: 0.25rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 1px;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--color-cyan-glow);
}

@media (min-width: 48em) {
  .list-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-6);
  }
}

/* Fact list: tiles with a faint cyan fill, the term above its value. */
.fact-list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
}

.fact-list > div {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-cyan-faint);
}

.fact-list dt {
  color: var(--text-secondary);
  font-size: var(--fs-small);
}

.fact-list dd {
  margin: var(--space-1) 0 0;
  color: var(--text-primary);
}

/* Tag: a small pill over images. */
.tag {
  display: inline-block;
  padding: 0.2rem var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--color-scrim);
  color: var(--accent-cyan);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* Price: the amount in the display face, "Desde" and "al mes" in Inter. */
.price {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.price-from {
  margin-right: var(--space-1);
  color: var(--text-secondary);
  font-size: var(--fs-small);
  letter-spacing: 0;
}

.price-note {
  margin-left: var(--space-1);
  color: var(--text-secondary);
  font-size: var(--fs-small);
  font-weight: 400;
  letter-spacing: 0;
}

/* A laptop drawn in CSS around a demo preview (decorative). */
.laptop {
  display: block;
  width: 88%;
  margin: var(--space-2) 0;
}

.laptop-screen {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 4px solid var(--color-bezel);
  border-bottom-width: 6px;
  border-radius: 0.5rem 0.5rem 0 0;
  background: var(--bg-base);
  box-shadow: 0 10px 24px -10px var(--color-shadow);
}

.laptop-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.laptop-base {
  display: block;
  height: 0.45rem;
  margin-inline: -9%;
  border-radius: 0 0 0.5rem 0.5rem;
  background: var(--gradient-metal);
}

/* Project card: glass, the preview, the tag, a dark body; one stretched
   link. Used on the main page and in the gallery. */
.project-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  scroll-snap-align: start;
}

.project-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top left;
}

/* Not positioned, so the stretched link covers the whole card. */
.project-body {
  min-height: 4.75rem;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-line);
  background: var(--gradient-card-body);
}

.project-card .tag-sample {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 1;
}

.project-card h3 {
  margin: 0;
  padding-right: var(--space-7);
  font-size: 1rem;
}

.project-card h3 a {
  text-decoration: none;
}

.project-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* The focus ring goes around the card, not the stretched link. */
.project-card h3 a:focus-visible {
  outline: none;
}

.project-card:has(h3 a:focus-visible) {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.project-meta p {
  margin: 0;
}

.project-line {
  color: var(--text-primary);
  font-size: 0.875rem;
}

.project-tier {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.project-arrow {
  position: absolute;
  right: var(--space-4);
  bottom: var(--space-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--accent-cyan);
  border-radius: 50%;
  color: var(--accent-cyan);
  box-shadow: 0 0 12px -2px var(--color-cyan-glow);
}

.project-arrow .icon {
  width: 1rem;
  height: 1rem;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: clip;
  padding-top: var(--space-6);
  background:
    radial-gradient(42rem 30rem at 92% 30%, var(--color-cyan-wash), transparent 70%),
    radial-gradient(30rem 18rem at 92% 92%, var(--color-orange-light), transparent 70%),
    radial-gradient(50rem 30rem at -10% 110%, var(--color-blue-glow), transparent 70%),
    transparent;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: var(--space-5);
}

.hero .lead {
  max-width: 32rem;
  margin-top: var(--space-5);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.microbenefits {
  position: relative;
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-7);
}

.microbenefits li {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.microbenefits .icon {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--accent-cyan);
  filter: drop-shadow(0 0 8px var(--color-cyan-glow));
}

.microbenefits p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-small);
}

.microbenefits .microbenefit-title {
  margin-bottom: var(--space-1);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: var(--fs-body);
  font-weight: 700;
}

@media (min-width: 48em) {
  .microbenefits {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .microbenefits li + li {
    padding-left: var(--space-5);
    border-left: 1px solid var(--color-line);
  }
}

@media (min-width: 64em) {
  .hero-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
  }
}

/* Waves: a cyan (or orange) line over a wider transparent copy of itself.
   Decorative SVG strokes at the foot of the hero and around the contact band. */
.wave {
  display: block;
  width: 100%;
  height: var(--wave-height);
  pointer-events: none;
}

.wave path {
  vector-effect: non-scaling-stroke;
}

.wave-fill {
  fill: var(--bg-elevated);
}

.wave-fill-base {
  fill: var(--bg-base);
}

.wave-line,
.wave-glow,
.wave-orange,
.wave-orange-glow {
  fill: none;
  stroke-linecap: round;
}

.wave-line {
  stroke: var(--accent-cyan);
  stroke-width: 2.5;
}

.wave-glow {
  stroke: var(--color-cyan-halo);
  stroke-width: 16;
}

.wave-orange {
  stroke: var(--accent-orange);
  stroke-width: 3;
}

.wave-orange-glow {
  stroke: var(--color-orange-edge);
  stroke-width: 16;
}

.wave-hero {
  margin-top: var(--space-5);
  margin-bottom: -1px;
  filter: drop-shadow(0 -6px 18px var(--color-cyan-inner));
}

/* ---------- Hero symbol ---------- */

/* The brand kit's symbol, assembled once (contracts/hero.md). The markup
   comes from scripts/hero.py; these styles are maintained here. */
/* On a phone the symbol stays smaller than the h1, so the title is the
   largest paint and does not wait for the symbol's images (spec 017, R4). */
.hero-symbol {
  position: relative;
  width: 100%;
  max-width: 15rem;
  aspect-ratio: 502 / 327;
  justify-self: center;
  margin-block: var(--space-5);
}

.hero-mark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hero-guides path {
  fill: none;
  stroke: var(--color-cyan-dim);
  stroke-dasharray: 4 7;
}

.hero-guides .guide-box {
  fill: none;
  stroke: var(--accent-cyan);
  stroke-dasharray: 4 3;
  opacity: 0.7;
}

/* A ring of light just outside the arc, centered on the D's own center
   (48.7% and 50.9% of the symbol). Inside the D it stays dark: the logo's
   dark shading is made for a dark background. */
.hero-halo {
  position: absolute;
  top: -6.6%;
  left: 11.2%;
  width: 75%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, transparent 80%, var(--color-cyan-glow) 88%, var(--color-blue-wash) 95%, transparent);
  filter: blur(10px);
}

/* The end state is the whole symbol in one piece; the build layers show
   only while it is being built. */
.mark-build,
.mark-glint {
  opacity: 0;
}

/* The glint adds light (screen) rather than covering the blue. */
.mark-glint {
  mix-blend-mode: screen;
}

@media (min-width: 48em) {
  .hero-symbol {
    max-width: 32rem;
  }
}

@media (min-width: 64em) {
  .hero-symbol {
    max-width: 36rem;
    justify-self: end;
    margin-block: 0;
  }
}

/* ---------- Presencia Digital (#soluciones) ---------- */

/* Four cards that choose a tier (tabs with JavaScript), then the panels. */
.tier-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.tier-cards[hidden] {
  display: none;
}

.tier-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
  box-shadow: var(--glass-shadow);
  text-align: center;
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.tier-card .icon {
  color: var(--accent-cyan);
  filter: drop-shadow(0 0 6px var(--color-cyan-glow));
}

.tier-card .laptop {
  width: 90%;
}

.tier-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
}

.tier-card-hint {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.4;
}

/* «Personalizado» needs the room in a tier card on a 320 px screen. */
@media (max-width: 22.4375em) {
  .tier-card {
    padding-inline: var(--space-2);
  }
}

/* The chosen tier: orange edge, orange glow, a warm tint. */
.tier-card[aria-selected="true"] {
  border-color: var(--accent-orange);
  background: var(--gradient-selected);
  box-shadow: 0 0 0 1px var(--accent-orange), 0 0 36px -2px var(--color-orange-glow), inset 0 0 30px -12px var(--color-orange-glow);
}

.tier-card[aria-selected="true"] .icon {
  color: var(--accent-orange);
  filter: drop-shadow(0 0 6px var(--color-orange-glow));
}

.tier-panels {
  display: grid;
  gap: var(--space-4);
}

.tier-cards:not([hidden]) + .tier-panels {
  margin-top: var(--space-4);
}

.tier-panel {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.tier-panel[hidden] {
  display: none;
}

.tier-panel-main h3 {
  margin-bottom: var(--space-2);
}

.tier-panel-main p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-small);
}

.tier-panel-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
}

.tier-panel-side .price {
  flex-basis: 100%;
}

.tier-panel-side .text-small {
  flex-basis: 100%;
  margin: 0 0 var(--space-2);
  color: var(--text-secondary);
}

.tiers-note {
  margin: var(--space-4) 0 0;
  color: var(--text-secondary);
}

@media (min-width: 48em) {
  .tier-panel {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .tier-panel-side {
    grid-column: 1 / -1;
  }
}

@media (min-width: 64em) {
  .tier-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tier-card {
    padding: var(--space-5) var(--space-4);
  }

  .tier-card-name {
    font-size: 1.125rem;
  }

  .tier-card-hint {
    font-size: 0.9375rem;
  }

  .tier-panel {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: start;
  }

  .tier-panel-side {
    grid-column: auto;
    flex-direction: column;
    align-items: flex-start;
  }

  .tier-panel-side .button {
    white-space: nowrap;
  }
}

/* ---------- Complementary services (#servicios) ---------- */

/* No cards: cells divided by fine lines. */
.service-grid {
  display: grid;
}

.service-cell {
  display: flex;
  flex-direction: column;
  padding: var(--space-5) 0;
  border-top: 1px solid var(--color-line);
}

.service-icon {
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: var(--space-3);
  color: var(--accent-cyan);
  filter: drop-shadow(0 0 8px var(--color-cyan-glow));
}

.service-cell:nth-child(odd) .service-icon {
  color: var(--accent-orange);
  filter: drop-shadow(0 0 8px var(--color-orange-glow));
}

.service-cell h3 {
  margin-bottom: var(--space-2);
}

.service-cell > p:not([class]) {
  color: var(--text-secondary);
  font-size: var(--fs-small);
}

.service-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-5);
  margin: auto 0 0;
}

@media (min-width: 48em) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-cell:nth-child(even) {
    padding-left: var(--space-5);
    border-left: 1px solid var(--color-line);
  }
}

@media (min-width: 80em) {
  .service-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .service-cell {
    padding: 0 var(--space-5);
    border-top: 0;
    border-left: 1px solid var(--color-line);
  }
}

/* ---------- Benefits (#beneficios) ---------- */

.benefit-list {
  display: grid;
  gap: var(--space-5);
}

.benefit-list li {
  display: flex;
  gap: var(--space-4);
}

.benefit-list .icon {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--accent-cyan);
  filter: drop-shadow(0 0 8px var(--color-cyan-glow));
}

.benefit-list li:nth-child(2) .icon {
  color: var(--accent-orange);
  filter: drop-shadow(0 0 8px var(--color-orange-glow));
}

.benefit-list h3 {
  margin-bottom: var(--space-1);
}

.benefit-list p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-small);
}

@media (min-width: 48em) {
  .benefit-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .benefit-list li + li {
    padding-left: var(--space-5);
    border-left: 1px solid var(--color-line);
  }
}

@media (min-width: 80em) {
  .benefit-list {
    padding-top: var(--space-5);
  }
}

/* ---------- Projects (#proyectos) ---------- */

/* Below 64em the cards scroll sideways, one and a bit in view. */
.project-track {
  display: grid;
  grid-auto-columns: 80%;
  grid-auto-flow: column;
  gap: var(--space-4);
  padding-bottom: var(--space-2);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.project-track::-webkit-scrollbar {
  display: none;
}

.project-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-1);
  margin-top: var(--space-3);
}

.project-dots[hidden] {
  display: none;
}

.project-dots button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.project-dots button::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-line-strong);
}

.project-dots button[aria-current="true"]::before {
  width: 1.25rem;
  border-radius: var(--radius-pill);
  background: var(--accent-cyan);
}

@media (min-width: 40em) {
  .project-track {
    grid-auto-columns: 46%;
  }
}

@media (min-width: 64em) {
  .project-track {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }

  .project-dots,
  .project-dots[hidden] {
    display: none;
  }
}

/* ---------- Process (#proceso) ---------- */

.process-section {
  overflow: clip;
  background:
    radial-gradient(36rem 18rem at 95% 15%, var(--color-orange-light), transparent 70%),
    radial-gradient(40rem 20rem at 5% 95%, var(--color-blue-glow), transparent 70%),
    transparent;
}

.process {
  position: relative;
  padding-block: var(--space-4);
}

/* The curve: an orange line over a wider transparent orange stroke. */
.process-path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.process-line,
.process-glow {
  fill: none;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.process-line {
  stroke: var(--accent-orange);
  stroke-width: 3.5;
}

.process-glow {
  stroke: var(--color-orange-trail);
  stroke-width: 18;
}

/* The diamond at the curve's end, placed by js/site.js. */
.process-end {
  position: absolute;
  top: 0;
  left: 0;
  width: 0.875rem;
  aspect-ratio: 1;
  background: var(--accent-amber);
  box-shadow: 0 0 0 0.35rem var(--color-orange-edge), 0 0 24px var(--accent-orange);
  transform: translate(var(--end-x, -100vw), var(--end-y, 0)) translate(-50%, -50%) rotate(45deg);
}

.process-steps {
  position: relative;
  display: grid;
  gap: var(--space-7);
}

.process-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
}

.process-frame {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border: 1.5px solid var(--accent-cyan);
  border-radius: var(--radius-lg);
  background: var(--gradient-frame);
  box-shadow: 0 0 0 4px var(--color-cyan-wash), 0 0 34px var(--color-cyan-glow-strong), inset 0 0 18px var(--color-cyan-inner);
}

.process-number {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: 0 0 18px var(--color-cyan-radiance);
}

/* Small glowing blocks above each frame, from the logo's blocks. */
.process-modules span {
  position: absolute;
  border-radius: 0.2rem;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--color-cyan-glow);
}

.process-modules span:nth-child(1) {
  top: -1.6rem;
  right: -0.9rem;
  width: 1.1rem;
  height: 1.1rem;
}

.process-modules span:nth-child(2) {
  top: -0.7rem;
  right: 0.6rem;
  width: 0.75rem;
  height: 0.75rem;
  background: var(--color-cyan-deep);
}

.process-modules span:nth-child(3) {
  top: -1.1rem;
  right: 1.7rem;
  width: 0.45rem;
  height: 0.45rem;
  background: var(--color-line-strong);
}

.process-text {
  padding-top: var(--space-2);
}

.process-text h3 {
  margin-bottom: var(--space-2);
}

.process-text p {
  max-width: 65ch;
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-small);
}

@media (min-width: 64em) {
  .process {
    padding-block: var(--space-6);
  }

  .process-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-6);
  }

  .process-step {
    flex-direction: column;
  }

  /* Each step a little higher than the one before, as the curve rises. */
  .process-step:nth-child(1) {
    margin-top: 7rem;
  }

  .process-step:nth-child(2) {
    margin-top: 3.5rem;
  }

  .process-frame {
    width: 6.5rem;
    height: 6.5rem;
  }

  .process-number {
    font-size: 3.25rem;
  }

  .process-text {
    max-width: 17rem;
    padding: 0;
  }

  .process-text h3 {
    font-size: 1.25rem;
  }
}

@media (min-width: 80em) {
  .process-step {
    flex-direction: row;
  }

  .process-text {
    padding-top: var(--space-3);
    padding-left: var(--space-4);
    border-left: 1px solid var(--color-line-strong);
  }
}

/* ---------- FAQ placeholder (#preguntas-frecuentes) ----------
   A plain .band with a .section-header until its content exists; it needs
   no rules of its own. */

/* ---------- Contact (#contacto) and the form ---------- */

/* The raised color starts under the top wave's fill. */
.contact-section {
  position: relative;
  overflow: clip;
  background: linear-gradient(to bottom, transparent calc(var(--wave-height) - 1px), var(--bg-elevated) calc(var(--wave-height) - 1px));
}

.wave-contact-bottom {
  margin-top: calc(var(--space-4) * -1);
}

.contact-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  margin-block: var(--space-4) var(--space-5);
  padding: var(--space-6) var(--space-5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background: var(--glass);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.contact-copy h2 {
  margin-bottom: var(--space-4);
  font-size: clamp(2.125rem, 1.6rem + 1.8vw, 3rem);
  overflow-wrap: normal;
}

.contact-copy .lead {
  margin: 0;
}

/* A few blocks and an orange trail under the copy (decorative). */
.contact-art {
  display: block;
  width: 12rem;
  height: auto;
  margin-top: var(--space-5);
  overflow: visible;
}

.contact-art .m-light {
  fill: url(#g-module);
}

.contact-art .m-dark {
  fill: url(#g-module-dark);
  stroke: var(--color-cyan-glow-strong);
  stroke-width: 1;
}

.contact-art .art-trail,
.contact-art .art-trail-glow {
  fill: none;
  stroke-linecap: round;
}

.contact-art .art-trail {
  stroke: url(#g-contact-trail);
  stroke-width: 8;
}

.contact-art .art-trail-glow {
  stroke: var(--accent-orange);
  stroke-width: 22;
  opacity: 0.55;
}

.contact-card {
  position: relative;
  padding: var(--space-5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* Under 360 px the panel and its cards give their padding to the fields, so the
   placeholders and the send button keep to one line. */
@media (max-width: 22.4375em) {
  .contact-panel {
    padding-inline: var(--space-3);
  }

  .contact-card {
    padding-inline: var(--space-4);
  }
}

.contact-whatsapp {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: var(--space-3);
}

.contact-wa-icon {
  width: 3.25rem;
  height: 3.25rem;
  fill: var(--accent-cyan);
  filter: drop-shadow(0 0 14px var(--color-cyan-glow));
}

.contact-whatsapp h3 {
  margin: 0;
  font-size: 1.375rem;
}

.contact-whatsapp p {
  margin: 0 0 var(--space-2);
  color: var(--text-secondary);
}

/* Grid tracks never grow past the panel (the select's longest option would
   otherwise widen the column). */
.contact-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
}

.contact-form-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.contact-form-title .icon {
  width: 2rem;
  height: 2rem;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  background: var(--accent-cyan);
  color: var(--bg-base);
}

.contact-form-title h3 {
  margin: 0;
  font-size: 1.25rem;
}

/* A field: a leading icon and the control in one box; the label is
   visually hidden and the placeholder repeats it. */
.field-control {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 3rem;
  padding-inline: var(--space-4);
  border: 1px solid var(--color-field-edge);
  border-radius: var(--radius-md);
  background: var(--color-field);
}

.field-control .icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-secondary);
}

/* The box shows focus (below), so the control itself needs no outline. */
.field-control input,
.field-control select,
.field-control textarea {
  flex: 1;
  min-width: 0;
  min-height: 2.75rem;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  outline: none;
}

.field-control ::placeholder {
  color: var(--text-secondary);
  opacity: 1;
}

.field-control:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--color-cyan-halo), 0 0 18px -4px var(--color-cyan-glow);
}

.field-control select {
  width: 100%;
}

.field-select select {
  padding-right: var(--space-6);
  appearance: none;
  text-overflow: ellipsis;
  cursor: pointer;
}

.field-select option {
  background: var(--bg-soft);
  color: var(--text-primary);
}

.field-chevron {
  position: absolute;
  right: var(--space-4);
  pointer-events: none;
}

.field-textarea {
  align-items: flex-start;
  padding-block: var(--space-3);
}

.field-textarea textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.field.is-invalid .field-control {
  border-color: var(--accent-amber);
}

.field-error {
  display: block;
  min-height: 0;
  color: var(--accent-amber);
  font-size: 0.8125rem;
}

.field-error:empty {
  display: none;
}

.contact-submit {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  text-align: center;
}

.contact-submit .button {
  min-width: min(100%, 18rem);
}

.contact-submit .text-small,
.form-status {
  margin: 0;
  color: var(--text-secondary);
}

.form-status:empty {
  display: none;
}

@media (min-width: 40em) {
  .contact-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-form-title,
  .field-wide {
    grid-column: 1 / -1;
  }
}

/* The copy across the top, the WhatsApp card and the form below it. */
@media (min-width: 64em) {
  .contact-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: var(--space-7) var(--space-6);
  }

  .contact-copy {
    grid-column: 1 / -1;
  }

  .contact-art {
    display: none;
  }
}

/* Wide: the copy above the WhatsApp card on the left, the form on the right. */
@media (min-width: 80em) {
  .contact-panel {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    align-items: start;
    gap: var(--space-5) var(--space-7);
  }

  .contact-copy,
  .contact-whatsapp {
    grid-column: 1;
  }

  .contact-art {
    display: block;
  }

  .contact-form {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

/* ---------- Other pages: page hero, breadcrumb, quick links ---------- */

.page-hero {
  padding-block: clamp(2rem, 1.25rem + 3vw, 4rem) var(--band-space);
  background:
    radial-gradient(48rem 26rem at 88% 0%, var(--color-cyan-wash), transparent 70%),
    radial-gradient(40rem 24rem at 0% 100%, var(--color-blue-wash), transparent 70%);
}

.page-hero h1 {
  max-width: 16ch;
}

.page-hero .lead {
  max-width: 46rem;
  margin: 0;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-6);
  color: var(--text-secondary);
  font-size: var(--fs-small);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: var(--space-2);
  color: var(--color-line-strong);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb [aria-current] {
  color: var(--text-primary);
}

/* Quick links: glass pills to the parts of the page. */
.tier-jump ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.tier-jump a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  padding: 0 var(--space-4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  background: var(--glass);
  color: var(--text-primary);
  font-size: var(--fs-small);
  font-weight: 700;
  text-decoration: none;
}

.tier-jump .icon {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--accent-cyan);
}

/* The gallery's quick links carry each line's count. */
.gallery-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 var(--space-1);
  border-radius: var(--radius-pill);
  background: var(--color-cyan-tint);
  color: var(--accent-cyan);
  font-size: 0.75rem;
}

/* ---------- Other pages: shared panel and detail cards ---------- */

/* What every tier shares. */
.shared-panel {
  display: grid;
  gap: var(--space-6);
  padding: clamp(1.25rem, 0.75rem + 2vw, 2.5rem);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
  box-shadow: var(--glass-shadow);
}

.shared-panel h2 {
  margin: 0;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}

.shared-panel .list-check {
  font-size: 0.9375rem;
}

@media (min-width: 48em) {
  .shared-panel .fact-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* One tier or service: its summary (icon, name, preview, price, action)
   beside its lists from 64em. */
.tier-detail-list {
  display: grid;
  gap: var(--space-6);
}

.tier-detail {
  display: grid;
  gap: var(--space-6);
  padding: clamp(1.25rem, 0.75rem + 2vw, 2.5rem);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
  box-shadow: var(--glass-shadow);
}

/* The card in the address glows orange, like the chosen tier card. */
.tier-detail:target {
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 1px var(--accent-orange), 0 0 40px -6px var(--color-orange-glow), var(--glass-shadow);
}

.tier-detail-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.tier-detail-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--color-cyan-wash);
  color: var(--accent-cyan);
  box-shadow: 0 0 18px -6px var(--color-cyan-glow);
}

.tier-detail:target .tier-detail-icon {
  border-color: var(--color-orange-border);
  color: var(--accent-orange);
  box-shadow: 0 0 18px -6px var(--color-orange-glow);
}

.tier-detail h2 {
  margin: 0;
  font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.25rem);
}

.tier-detail-description {
  margin: 0;
  color: var(--text-secondary);
}

/* The screen takes the previews' own shape (600 x 315), so the whole width
   of each demo shows. */
.tier-detail .laptop {
  width: 90%;
  margin: var(--space-3) 0 var(--space-2) 5%;
}

.tier-detail .laptop-screen {
  aspect-ratio: 600 / 315;
}

.tier-detail-price .price {
  font-size: 2rem;
}

.tier-detail-price .text-small {
  margin: var(--space-1) 0 var(--space-2);
  color: var(--text-secondary);
}

.tier-detail-body {
  display: grid;
  gap: var(--space-6);
}

.tier-detail-block h3 {
  margin: 0 0 var(--space-3);
  color: var(--accent-cyan);
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tier-detail .list-check {
  max-width: 65ch;
  font-size: 0.9375rem;
}

@media (min-width: 64em) {
  .tier-detail {
    grid-template-columns: minmax(0, 6fr) minmax(0, 7fr);
    gap: var(--space-7);
    align-items: start;
  }

  .tier-detail-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: var(--space-7);
    border-left: 1px solid var(--color-line);
  }

  .tier-detail-facts {
    grid-column: 1 / -1;
  }

  .tier-detail-facts .fact-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Other pages: comparison table ---------- */

/* Scrolls sideways inside its own box on small screens; the row names
   stay put on a solid surface. */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
  box-shadow: var(--glass-shadow);
}

/* The comparison table sits at the end of precios.html, far below the first screen:
   the browser lays it out only near the viewport, which keeps the first layout short
   on a phone (spec 017, T027). Only its height is estimated (its usual height until
   rendered once); nothing that a fragment targets comes after it. */
.table-scroll {
  content-visibility: auto;
  contain-intrinsic-block-size: auto 1050px;
}

@media (min-width: 64em) {
  .table-scroll {
    contain-intrinsic-block-size: auto 800px;
  }
}

.comparison-table {
  width: 100%;
  min-width: 52rem;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fs-small);
}

.comparison-table th,
.comparison-table td {
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-line);
  text-align: left;
  vertical-align: top;
}

.comparison-table tbody tr:last-child > * {
  border-bottom: 0;
}

.comparison-table thead th {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1rem;
  vertical-align: bottom;
}

.comparison-table thead .icon {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  margin-bottom: var(--space-2);
  color: var(--accent-cyan);
  filter: drop-shadow(0 0 6px var(--color-cyan-glow));
}

.comparison-table tbody th,
.comparison-table thead td {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 12rem;
  background: var(--color-surface-solid);
}

.comparison-table tbody th {
  color: var(--text-secondary);
  font-weight: 700;
}

.comparison-price {
  display: block;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
}

.comparison-table td .text-small {
  display: block;
  margin-top: var(--space-1);
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.comparison-no {
  color: var(--text-secondary);
}

.comparison-yes {
  color: var(--accent-orange);
  font-weight: 700;
}

.comparison-yes .icon {
  width: 1.125rem;
  height: 1.125rem;
  margin-right: var(--space-1);
  vertical-align: -0.2em;
}

/* ---------- Other pages: closing card ---------- */

.closing-card {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  padding: clamp(2rem, 1.5rem + 3vw, 3.5rem) clamp(1.25rem, 1rem + 2vw, 3rem);
  border: 1px solid var(--color-orange-edge);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(30rem 16rem at 50% 0%, var(--color-orange-light), transparent 70%),
    var(--glass);
  box-shadow: var(--glass-shadow);
  text-align: center;
}

.closing-card h2,
.closing-card .lead {
  margin: 0;
}

.closing-card .lead {
  max-width: 36rem;
}

/* ---------- Other pages: gallery ---------- */

.gallery-list {
  display: grid;
  gap: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

/* Added to the page's scroll padding: the group's heading has no card
   padding above it. */
.gallery-group {
  scroll-margin-top: var(--space-6);
}

.gallery-group-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-line);
}

.gallery-group-header h2 {
  margin: 0;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}

.gallery-group-count {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-small);
}

/* The group in the address gets the orange rule, like the chosen tier. */
.gallery-group:target .gallery-group-header {
  border-bottom-color: var(--accent-orange);
  box-shadow: 0 12px 24px -22px var(--color-orange-glow);
}

.gallery-grid {
  display: grid;
  gap: var(--space-5);
}

/* The whole preview, at the width the site was made for. */
.gallery-card img {
  aspect-ratio: 600 / 315;
}

.gallery-card .project-body {
  min-height: 5.75rem;
}

@media (min-width: 40em) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64em) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-6);
  }
}

/* ---------- Other pages: legal ---------- */

.legal-updated {
  margin: 0 0 var(--space-4);
  color: var(--text-secondary);
  font-size: var(--fs-small);
}

.legal-layout {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}

/* The index of the page's sections. */
.legal-toc {
  padding: var(--space-5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
}

.legal-toc-title {
  margin: 0 0 var(--space-3);
  color: var(--accent-cyan);
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.legal-toc ol {
  display: grid;
  gap: var(--space-1);
  font-size: var(--fs-small);
}

.legal-toc a {
  display: block;
  padding: var(--space-1) 0;
  color: var(--text-secondary);
  text-decoration: none;
}

/* The text itself: one glass panel at a comfortable reading width; 46rem
   keeps its lines within 65ch at the widest padding. */
.legal-document {
  max-width: 46rem;
  padding: clamp(1.25rem, 0.75rem + 2.5vw, 3rem);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
  box-shadow: var(--glass-shadow);
}

.legal-document > :first-child {
  margin-top: 0;
}

.legal-document h2 {
  margin: var(--space-8) 0 var(--space-3);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-line);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
}

.legal-document h2:first-child {
  padding-top: 0;
  border-top: 0;
}

.legal-document p,
.legal-document ul,
.legal-document dl {
  margin: 0 0 var(--space-4);
}

.legal-document a:not(.button) {
  color: var(--accent-cyan);
}

.legal-facts dd {
  font-weight: 400;
}

.legal-action {
  margin-block: var(--space-5);
}

@media (min-width: 48em) {
  .legal-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Wide screens: the index stays beside the text while you read. */
@media (min-width: 64em) {
  .legal-layout {
    grid-template-columns: 16rem minmax(0, 46rem);
    gap: var(--space-7);
  }

  .legal-toc {
    position: sticky;
    top: calc(var(--header-height) + var(--space-5));
  }
}

/* ---------- Hover (pointer devices only) ---------- */

@media (hover: hover) {
  .button:hover {
    background: var(--gradient-orange-hover);
    box-shadow: 0 0 0 1px var(--color-amber-edge-strong) inset, 0 14px 36px -8px var(--color-orange-glow-strong);
    transform: translateY(-2px);
  }

  .button-secondary:hover,
  .button-outline:hover {
    border-color: var(--accent-cyan);
    background: var(--color-cyan-tint);
    box-shadow: 0 0 26px -4px var(--color-cyan-glow);
  }

  .button:active {
    transform: none;
  }

  .whatsapp-link:hover,
  .text-link:hover,
  .footer-nav a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
  }

  .menu-button:hover {
    background: var(--color-cyan-wash);
  }

  .back-to-top:hover {
    color: var(--accent-amber);
  }

  .tier-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 1px var(--accent-cyan), 0 0 28px -6px var(--color-cyan-glow);
    transform: translateY(-3px);
  }

  .tier-card[aria-selected="true"]:hover {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 1px var(--accent-orange), 0 0 40px 0 var(--color-orange-glow);
  }

  .project-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 1px var(--accent-cyan), 0 18px 40px -16px var(--color-cyan-glow);
    transform: translateY(-4px);
  }

  .project-card:hover img {
    transform: scale(1.05);
  }

  .project-card:hover .project-arrow {
    border-color: var(--accent-cyan);
    background: var(--accent-cyan);
    color: var(--bg-base);
  }

  .breadcrumb a:hover,
  .legal-toc a:hover {
    color: var(--text-primary);
  }

  .legal-toc a:hover {
    text-decoration: underline;
  }

  .tier-jump a:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 18px -6px var(--color-cyan-glow);
  }
}

@media (min-width: 80em) and (hover: hover) {
  .nav-list a:hover::after {
    transform: none;
  }
}

/* ---------- Motion (opt-in) ---------- */

/* With reduced motion nothing here applies: the page is complete and still,
   and the hero shows the final symbol. */
@media (prefers-reduced-motion: no-preference) {
  html,
  .project-track {
    scroll-behavior: smooth;
  }

  .button,
  .tier-card,
  .project-card,
  .project-arrow,
  .menu-button,
  .site-header,
  .nav-list a::after {
    transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
      color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  }

  .project-card img {
    transition: transform var(--t-mid) var(--ease);
  }

  .field-control {
    transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  }

  /* Hero copy. The h1 is never transparent: it is the largest paint. */
  .hero h1 {
    animation: rise var(--t-reveal) var(--ease) both;
  }

  .hero .eyebrow,
  .hero-copy .lead,
  .hero-actions {
    animation: fade-rise var(--t-reveal) var(--ease) 120ms both;
  }

  .microbenefits li {
    animation: fade-rise var(--t-reveal) var(--ease) both;
  }

  .microbenefits li:nth-child(1) {
    animation-delay: 300ms;
  }

  .microbenefits li:nth-child(2) {
    animation-delay: 380ms;
  }

  .microbenefits li:nth-child(3) {
    animation-delay: 460ms;
  }

  .wave-hero .wave-line,
  .wave-hero .wave-glow,
  .wave-hero .wave-orange,
  .wave-hero .wave-orange-glow {
    animation: fade 1200ms var(--ease) 500ms both;
  }

  /* Hero symbol: ends by 2.55 s (contracts/hero.md). */
  .hero-guides {
    animation: fade 800ms var(--ease) both;
  }

  .hero-halo {
    animation: halo-in 1400ms var(--ease) 150ms both;
  }

  /* Blocks: one by one, nearest the arc first, sliding in from the left. */
  .mark-block {
    animation: block-in 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(60ms + var(--i) * 75ms);
  }

  /* The "D" is drawn along its curve, then the S along its centerline once
     the D's lower bar is in place. The masks' soft edges come from the blur
     filters on their strokes. The embers follow 140 ms behind the S, and
     the glint rides its front with the same timing. */
  .mask-arc {
    stroke-dasharray: 1;
    animation: mask-draw 1050ms var(--ease-draw) 220ms both;
  }

  .mask-spark {
    stroke-dasharray: 1;
    animation: mask-draw 900ms cubic-bezier(0.4, 0, 0.25, 1) 1150ms both;
  }

  .mask-embers {
    stroke-dasharray: 1;
    animation: mask-draw 900ms cubic-bezier(0.4, 0, 0.25, 1) 1290ms both;
  }

  .mark-glint {
    animation:
      glint-run 900ms cubic-bezier(0.4, 0, 0.25, 1) 1150ms both,
      glint-glow 900ms linear 1150ms both;
  }

  /* Crossfade to the whole symbol once the embers have landed. */
  .mark-build {
    animation: build-out 2550ms linear both;
  }

  .mark-final {
    animation: final-in 2550ms linear both;
  }

  /* Tier change: the new panel fades and rises. */
  .tier-panel.is-entering {
    animation: fade-rise var(--t-mid) var(--ease) both;
  }

  /* Reveal on scroll: js/site.js marks only what is below the first screen. */
  [data-reveal] {
    transition: opacity var(--t-reveal) var(--ease), transform var(--t-reveal) var(--ease);
  }

  [data-reveal].is-pending {
    opacity: 0;
    transform: translateY(14px);
  }

  /* The process curve draws once when the section comes into view. */
  .process-line,
  .process-glow {
    stroke-dasharray: 1;
    transition: stroke-dashoffset 1400ms var(--ease-draw);
  }

  .process.is-pending .process-line,
  .process.is-pending .process-glow {
    stroke-dashoffset: 1;
  }

  .process-end {
    transition: opacity 300ms var(--ease) 1200ms;
  }

  .process.is-pending .process-end {
    opacity: 0;
    transition: none;
  }

  .process-frame {
    transition: box-shadow 500ms var(--ease), border-color 500ms var(--ease);
  }

  .process.is-pending .process-frame {
    border-color: var(--color-line);
    box-shadow: 0 0 0 0 transparent;
  }

  /* Back to top: rises into place when it appears. */
  .back-to-top {
    transform: translateY(0.75rem) scale(0.9);
    transition: opacity 240ms var(--ease), transform 240ms var(--ease), visibility 0s linear 240ms, color 160ms var(--ease);
  }

  .back-to-top.is-visible {
    transform: none;
    transition: opacity 240ms var(--ease), transform 240ms var(--ease), visibility 0s, color 160ms var(--ease);
  }

  .back-to-top.is-visible:hover {
    transform: translateY(-2px);
  }

  @keyframes rise {
    from { transform: translateY(12px); }
  }

  @keyframes fade {
    from { opacity: 0; }
  }

  @keyframes fade-rise {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
  }

  @keyframes halo-in {
    from {
      opacity: 0;
      transform: scale(0.7);
    }
  }

  @keyframes block-in {
    from {
      opacity: 0;
      transform: translateX(-28px);
    }
  }

  @keyframes mask-draw {
    from { stroke-dashoffset: 1; }
    to { stroke-dashoffset: 0; }
  }

  @keyframes glint-run {
    from { offset-distance: 0%; }
    to { offset-distance: 100%; }
  }

  /* Lights up as the S starts, flares and fades at its tip. */
  @keyframes glint-glow {
    0% { opacity: 0; scale: 0.6; }
    12% { opacity: 1; scale: 1; }
    82% { opacity: 1; scale: 1; }
    100% { opacity: 0; scale: 1.8; }
  }

  @keyframes build-out {
    0%, 86% { opacity: 1; }
    100% { opacity: 0; }
  }

  @keyframes final-in {
    0%, 86% { opacity: 0; }
    100% { opacity: 1; }
  }
}

/* ---------- Forced colors ---------- */

/* Glows and gradients disappear; the selected tier keeps a heavier edge. */
@media (forced-colors: active) {
  .tier-card[aria-selected="true"] {
    border-width: 3px;
  }
}

/* ---------- Inline SVG gradient stops (hero glint, contact art) ---------- */

.stop-glint-core { stop-color: var(--color-glint-core); }
.stop-glint-mid { stop-color: var(--color-amber-light); stop-opacity: 0.85; }
.stop-orange-clear { stop-color: var(--accent-orange); stop-opacity: 0; }
.stop-trail-mid { stop-color: var(--color-trail-mid); stop-opacity: 0.5; }
.stop-trail-end { stop-color: var(--color-trail-end); stop-opacity: 0.9; }
.stop-module-light { stop-color: var(--color-module-light); }
.stop-module-deep { stop-color: var(--color-module-deep); }
.stop-module-dark-top { stop-color: var(--color-module-dark-top); }
.stop-module-dark-end { stop-color: var(--bg-soft); }
.stop-trail-start { stop-color: var(--accent-orange-deep); stop-opacity: 0.15; }
.stop-trail-orange { stop-color: var(--accent-orange); }
.stop-trail-warm { stop-color: var(--color-orange-hover); }
.stop-trail-amber { stop-color: var(--color-amber-light); }
