/* =========================================================================
   AMG Core-Tech
   Mundo visual: estudio cobalto + papel. La impresión 3D como película:
   el scroll añade capas. Tipografía editorial ligera (AMG Serif) con texto
   de interfaz en AMG Sans y lecturas de máquina en AMG Mono.
   ========================================================================= */

@font-face { font-family: "AMG Serif"; src: url("../fuentes/amg-serif-200.woff2") format("woff2"); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: "AMG Serif"; src: url("../fuentes/amg-serif-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "AMG Sans";  src: url("../fuentes/amg-sans-400.woff2") format("woff2");  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "AMG Sans";  src: url("../fuentes/amg-sans-500.woff2") format("woff2");  font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "AMG Mono";  src: url("../fuentes/amg-mono-400.woff2") format("woff2");  font-weight: 400; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  /* papel (secciones de lectura) */
  --paper: #F1F1EC;
  --paper-2: #E6E6E0;
  --ink: #101114;
  --ink-2: #2B2D33;
  --muted: #565961;
  --line: rgba(16, 17, 20, .12);
  --line-2: rgba(16, 17, 20, .24);
  --accent: #1F45D6;           /* cobalto: acciones y estados */
  --accent-ink: #F1F1EC;
  --accent-press: #1838B4;
  /* cobalto (escenario) */
  --cobalt: #1F45D6;
  --cobalt-deep: #0E2A93;
  --cobalt-night: #071B66;
  --cobalt-hi: #4A73FF;
  --on-cobalt: #F1F1EC;
  --on-cobalt-2: #C9D3F6;
  --cobalt-line: rgba(241, 241, 236, .18);
  --hot: #FF8A3D;              /* filamento caliente (solo en la película) */

  --f-serif: "AMG Serif", "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --f-sans: "AMG Sans", "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "AMG Mono", "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1360px;
  --gutter: clamp(20px, 4.4vw, 64px);
  --edge: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
  --nav-h: 72px;

  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .26 -.08'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0D0E11;
    --paper-2: #17181C;
    --ink: #ECECE7;
    --ink-2: #CFCFCA;
    --muted: #A2A5AD;
    --line: rgba(236, 236, 231, .12);
    --line-2: rgba(236, 236, 231, .24);
    --accent: #8EA6FF;
    --accent-ink: #0D0E11;
    --accent-press: #A9BCFF;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0D0E11;
  --paper-2: #17181C;
  --ink: #ECECE7;
  --ink-2: #CFCFCA;
  --muted: #A2A5AD;
  --line: rgba(236, 236, 231, .12);
  --line-2: rgba(236, 236, 231, .24);
  --accent: #8EA6FF;
  --accent-ink: #0D0E11;
  --accent-press: #A9BCFF;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 8px);
  scrollbar-color: var(--line-2) transparent;
  background: var(--paper);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}
::selection { background: var(--cobalt); color: var(--on-cobalt); }
:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 200; text-wrap: balance; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.ic { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 200;
  padding: .7rem 1rem; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 500;
  transform: translateY(-160%); transition: transform 200ms var(--ease-out);
}
.skip:focus-visible { transform: none; }

/* ------------------------------------------------------------ tipografía */
h2 { font: 200 clamp(2.6rem, 5.6vw, 5.25rem)/1.02 var(--f-serif); letter-spacing: -0.026em; }
h3 { font: 300 clamp(1.65rem, 2.5vw, 2.3rem)/1.12 var(--f-serif); letter-spacing: -0.014em; }
h4 { font: 500 1.0625rem/1.3 var(--f-sans); letter-spacing: 0; }
.lead { font-size: clamp(1.0625rem, 1.25vw, 1.25rem); line-height: 1.55; color: var(--muted); max-width: 40rem; }

/* tonos de sección: el cobalto compensa texto claro con un poco más de aire */
[data-tone="cobalt"] { --focus: var(--on-cobalt); }
.sec--cobalt {
  background: var(--grain), radial-gradient(90% 70% at 70% 0%, #2550E6 0%, transparent 60%), linear-gradient(180deg, var(--cobalt) 0%, var(--cobalt-deep) 100%);
  color: var(--on-cobalt);
}
.sec--cobalt .lead { color: var(--on-cobalt-2); letter-spacing: .004em; line-height: 1.6; }
.sec--paper { background: var(--grain), var(--paper); }

/* ------------------------------------------------------------- botones */
.btn {
  --bg: transparent; --fg: currentColor; --bd: transparent;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 50px; padding: 0 1.4rem;
  background: var(--bg); color: var(--fg); box-shadow: inset 0 0 0 1px var(--bd);
  font: 500 1rem/1 var(--f-sans); letter-spacing: .005em; text-decoration: none; white-space: nowrap;
  border: 0; border-radius: 0; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}
.btn:active { transform: scale(.97); }
.btn .ic { transition: transform 240ms var(--ease-out); }
.btn--sm { min-height: 42px; padding: 0 1rem; font-size: .9375rem; }
.btn--light { --bg: var(--on-cobalt); --fg: #0E1530; }
.btn--line { --bd: rgba(241, 241, 236, .38); }
.sec--paper .btn--line, .foot .btn--line { --bd: var(--line-2); }
.btn--accent { --bg: var(--accent); --fg: var(--accent-ink); }
.btn--nav { min-height: 40px; padding: 0 1.05rem; font-size: .9375rem; }
@media (hover: hover) and (pointer: fine) {
  .btn--light:hover { --bg: #FFFFFF; }
  .btn--line:hover { --bd: currentColor; }
  .btn--accent:hover { --bg: var(--accent-press); }
  .btn:hover > .ic:last-child { transform: translateX(3px); }
}
.link {
  display: inline-flex; align-items: center; gap: .45rem;
  color: var(--accent); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .32em;
  transition: text-decoration-color 200ms ease;
}
.sec--cobalt .link { color: var(--on-cobalt); }
.link .ic { transition: transform 240ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .link:hover { text-decoration-color: transparent; }
  .link:hover .ic { transform: translateX(3px); }
}

/* ------------------------------------------------------------------ nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--nav-h); padding-top: env(safe-area-inset-top, 0px);
  color: var(--on-cobalt);
  transition: color 300ms ease, background-color 300ms ease, transform 420ms var(--ease-out);
}
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line);
  transition: opacity 300ms ease;
}
.nav[data-tone="paper"] { color: var(--ink); }
.nav[data-tone="paper"]::before { opacity: 1; }
.nav[data-tone="cobalt"][data-solid]::before { opacity: 1; background: color-mix(in srgb, var(--cobalt-deep) 82%, transparent); box-shadow: 0 1px 0 var(--cobalt-line); }
.nav-in { height: 100%; display: flex; align-items: center; gap: 2.25rem; padding-inline: var(--edge); }
.brand { display: block; flex: none; color: inherit; padding-block: 8px; }
.logo { width: 76px; height: auto; aspect-ratio: 734 / 323; fill: currentColor; }
.nav-links { display: flex; gap: 1.9rem; margin-left: auto; }
.nav-links a {
  position: relative; padding-block: .45rem; text-decoration: none; font-size: .96875rem; font-weight: 500;
  opacity: .78; transition: opacity 200ms ease;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: 0 50%; transition: transform 320ms var(--ease-out);
}
.nav-links a[aria-current="true"] { opacity: 1; }
.nav-links a[aria-current="true"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .nav-links a:hover { opacity: 1; } }
.nav .btn--nav { --bg: var(--on-cobalt); --fg: #0E1530; }
.nav[data-tone="paper"] .btn--nav { --bg: var(--accent); --fg: var(--accent-ink); }
.menu-btn {
  display: none; width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; background: none; cursor: pointer;
  align-items: center; justify-content: center; color: inherit;
}
.menu-btn .ic { width: 26px; height: 26px; }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .btn--nav { margin-left: auto; }
  .menu-btn { display: inline-flex; }
  .nav-in { gap: 1rem; }
  .logo { width: 68px; }
}

/* menú móvil: cortina cobalto */
.menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--grain), linear-gradient(180deg, var(--cobalt) 0%, var(--cobalt-deep) 100%);
  color: var(--on-cobalt); --focus: var(--on-cobalt);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 520ms var(--ease-drawer);
}
.menu[hidden] { display: block; visibility: hidden; }
.menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; }
.menu-in { height: 100%; display: grid; grid-template-rows: auto 1fr auto; padding: env(safe-area-inset-top, 0px) var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px)); }
.menu-top { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; }
.menu-close { width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; color: inherit; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.menu-close .ic { width: 26px; height: 26px; }
.menu nav { display: grid; align-content: center; }
.menu-links { display: grid; gap: .25rem; }
.menu-links a {
  display: block; padding-block: .35rem; text-decoration: none;
  font: 200 clamp(2.6rem, 11vw, 4rem)/1.05 var(--f-serif); letter-spacing: -0.02em;
  opacity: 0; transform: translateY(18px);
  transition: opacity 300ms ease, transform 500ms var(--ease-out);
}
.menu.is-open .menu-links a { opacity: 1; transform: none; }
.menu.is-open .menu-links li:nth-child(1) a { transition-delay: 120ms; }
.menu.is-open .menu-links li:nth-child(2) a { transition-delay: 170ms; }
.menu.is-open .menu-links li:nth-child(3) a { transition-delay: 220ms; }
.menu.is-open .menu-links li:nth-child(4) a { transition-delay: 270ms; }
.menu-foot { display: grid; gap: 1.1rem; justify-items: start; }
.menu-mail { color: var(--on-cobalt-2); text-decoration: none; font-size: .9375rem; }

/* ===================================================================
   PELÍCULA (hero + "De la idea a la pieza")
   Estado base (sin JS / movimiento reducido): hero fijo y pasos en lista.
   =================================================================== */
.film { position: relative; color: var(--on-cobalt); background: var(--cobalt-deep); --focus: var(--on-cobalt); --hero-fs: clamp(2.5rem, 4.6vw, 4.5rem); }
.film-stage { position: relative; isolation: isolate; overflow: clip; }
.stage-bg {
  position: absolute; inset: 0; z-index: -3;
  background:
    var(--grain),
    radial-gradient(42% 46% at var(--lx, 66%) 50%, rgba(92, 132, 255, .5) 0%, rgba(92, 132, 255, 0) 70%),
    radial-gradient(70% 30% at 50% 102%, rgba(54, 92, 236, .55) 0%, rgba(54, 92, 236, 0) 70%),
    linear-gradient(180deg, #0A2079 0%, #1335B0 46%, #1C43CF 70%, #173BBE 100%);
}
.stage-bg::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 95% at 55% 48%, transparent 52%, rgba(4, 12, 52, .62) 100%);
}
.stage-light {
  position: absolute; left: 0; top: 0; z-index: -2; width: 90vmax; height: 90vmax; margin: -45vmax 0 0 -45vmax;
  background: radial-gradient(closest-side, rgba(96, 136, 255, .42), rgba(96, 136, 255, .16) 45%, rgba(96, 136, 255, 0) 100%);
  transform: translate3d(66vw, 50svh, 0); pointer-events: none;
}
@media (max-width: 900px), (max-aspect-ratio: 1/1) { .stage-light { transform: translate3d(50vw, 70svh, 0); } }
.subj-grid, .subj-scan { display: none; }

/* sujeto: la figura recortada sobre el escenario */
.subject {
  --sh: 78svh;
  position: absolute; z-index: 1;
  height: var(--sh); aspect-ratio: 689 / 979;
  /* a la derecha del titular: el brazo de la figura nunca toca "Programamos tu web." */
  left: max(calc(66% - var(--sh) * .35196), calc(var(--edge) + var(--hero-fs) * 9.95 + 36px - var(--sh) * .0753));
  top: calc(94svh - var(--sh));
  transform-origin: 0 0;
}
.subject > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.subj-photo, .subj-model { object-fit: contain; }
.subj-model, .subj-heat, .subj-slices, .subj-lines, .subj-dims, .subj-front, .subj-rings { display: none; }
.subj-shadow {
  inset: auto; left: -6%; right: -6%; top: 78%; width: auto; height: 26%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(3, 10, 46, .62) 0%, rgba(3, 10, 46, .34) 42%, rgba(3, 10, 46, 0) 72%);
  filter: blur(6px);
}

.film-copy { position: relative; z-index: 2; }
.hero-copy {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center; gap: 1.6rem;
  width: min(46vw, 660px);
  margin-left: var(--edge);
  padding: calc(var(--nav-h) + 1rem) 0 3rem;
}
.hero-title { font: 200 var(--hero-fs)/1.0 var(--f-serif); letter-spacing: -0.028em; }
.hero-title .ln { display: block; white-space: nowrap; }
.hero-sub { font-size: clamp(1.0625rem, 1.35vw, 1.3rem); line-height: 1.5; color: var(--on-cobalt-2); max-width: 30rem; letter-spacing: .004em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .4rem; }

.film-steps { padding: 0 var(--edge) clamp(4rem, 8vw, 7rem); }
.film-steps-title { font: 200 clamp(2.2rem, 4vw, 3.6rem)/1.05 var(--f-serif); letter-spacing: -0.02em; margin-bottom: 2rem; }
.film-steps ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem); border-top: 1px solid var(--cobalt-line); padding-top: 1.6rem; }
.film-step { display: grid; gap: .6rem; align-content: start; }
.film-step-k { font: 400 .75rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--on-cobalt-2); }
.film-step p { font: 300 clamp(1.35rem, 2vw, 1.85rem)/1.2 var(--f-serif); letter-spacing: -0.01em; text-wrap: balance; }
.film-step--end { display: none; }
.film-hud { display: none; }

@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  .subject { --sh: min(46svh, 118vw); left: calc(50% - var(--sh) * .35196); top: calc(96svh - var(--sh)); }
  .hero-copy { width: auto; margin-inline: var(--gutter); justify-content: flex-start; gap: 1.15rem; padding-top: calc(var(--nav-h) + 1.25rem); padding-bottom: 0; min-height: 100svh; }
  .hero-title { font-size: clamp(2.3rem, 9.4vw, 3.6rem); line-height: 1.02; }
  .hero-title .ln { white-space: normal; }
  .hero-sub { font-size: 1.0625rem; max-width: 26rem; }
  .hero-actions { gap: .6rem; }
  .hero-actions .btn { min-height: 48px; padding-inline: 1rem; font-size: .9375rem; }
  .film-steps ol { grid-template-columns: minmax(0, 1fr); }
  .stage-bg { --lx: 50%; }
}

/* -------------------------- película activa (JS + movimiento permitido) */
html.film-on .film { height: 440svh; }
html.film-on .film-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
html.film-on .subject > .subj-grid {
  display: block; inset: -45% -150%; width: auto; height: auto; z-index: -1; opacity: 0; pointer-events: none; will-change: opacity;
  background:
    linear-gradient(rgba(241, 241, 236, .17) 1px, transparent 1px) 0 0 / 120px 120px,
    linear-gradient(90deg, rgba(241, 241, 236, .17) 1px, transparent 1px) 0 0 / 120px 120px,
    linear-gradient(rgba(241, 241, 236, .075) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(241, 241, 236, .075) 1px, transparent 1px) 0 0 / 24px 24px;
  -webkit-mask-image: radial-gradient(26% 40% at 50% 47%, #000 30%, transparent 100%);
  mask-image: radial-gradient(26% 40% at 50% 47%, #000 30%, transparent 100%);
}
html.film-on .subj-model, html.film-on .subj-lines, html.film-on .subj-dims, html.film-on .subj-slices,
html.film-on .subj-heat, html.film-on .subj-front, html.film-on .subj-rings, html.film-on .subj-scan { display: block; }
html.film-on .subj-photo { clip-path: inset(100% 0 0 0); }
html.film-on .subj-model { opacity: 0; }
html.film-on .subj-slices { opacity: 0; overflow: visible; clip-path: inset(0 0 100% 0); }
html.film-on .subj-lines, html.film-on .subj-dims { overflow: visible; }
.subj-lines path { fill: none; stroke: var(--on-cobalt); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.subj-lines .ln-face path, .subj-lines .ln-corn path { stroke-width: 1.7; }
.subj-lines .ln-base path { stroke-width: 1.8; }
.subj-dims path { fill: none; stroke: var(--on-cobalt-2); stroke-width: 1.6; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.subj-dims circle { fill: var(--on-cobalt-2); opacity: 0; }
.subj-dims text { font: 400 20px var(--f-mono); letter-spacing: .12em; fill: var(--on-cobalt); opacity: 0; }
.subj-heat {
  overflow: hidden; opacity: 0;
  -webkit-mask: url("../imagenes/figura-recorte.webp") 0 0 / 100% 100% no-repeat;
  mask: url("../imagenes/figura-recorte.webp") 0 0 / 100% 100% no-repeat;
}
.subj-heat i {
  position: absolute; left: 0; right: 0; top: 0; height: 2.6%;
  background: linear-gradient(to bottom, rgba(255, 236, 214, .9) 0%, rgba(255, 168, 96, .55) 30%, rgba(255, 128, 60, .16) 70%, rgba(255, 128, 60, 0) 100%);
  mix-blend-mode: screen;
}
.subj-front, .subj-scan { inset: auto; left: 0; right: 0; top: 0; height: 0; opacity: 0; }
.subj-scan i {
  position: absolute; left: -7%; right: -7%; top: -1px; height: 1.5px;
  background: linear-gradient(90deg, rgba(241, 241, 236, 0), rgba(241, 241, 236, .9) 15%, #fff 50%, rgba(241, 241, 236, .9) 85%, rgba(241, 241, 236, 0));
  box-shadow: 0 0 18px 2px rgba(150, 180, 255, .55);
}
.front-line {
  position: absolute; left: -9%; right: -9%; top: -1px; height: 2px;
  background: linear-gradient(90deg, rgba(255, 196, 150, 0), rgba(255, 214, 180, .95) 18%, #FFF4EA 50%, rgba(255, 214, 180, .95) 82%, rgba(255, 196, 150, 0));
  box-shadow: 0 0 14px 2px rgba(255, 138, 61, .55), 0 0 42px 6px rgba(74, 115, 255, .35);
}
.nozzle { position: absolute; top: 0; left: 0; width: 6.4%; min-width: 26px; height: auto; transform: translate(-50%, -96%); filter: drop-shadow(0 6px 10px rgba(2, 8, 40, .45)); }
.subj-rings { inset: auto; left: 49.9%; top: 75.3%; width: 0; height: 0; }
.subj-rings i {
  position: absolute; left: 0; top: 0; width: 46%; aspect-ratio: 1; border-radius: 50%;
  width: calc(var(--sh) * .34); height: calc(var(--sh) * .34 * .52);
  margin: calc(var(--sh) * -.0884) 0 0 calc(var(--sh) * -.17);
  box-shadow: inset 0 0 0 1.5px rgba(241, 241, 236, .9);
  opacity: 0; transform: scale(.4);
}

html.film-on .film-copy { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
html.film-on .film-copy a, html.film-on .film-copy button { pointer-events: auto; }
html.film-on .hero-copy {
  position: absolute; left: 0; top: 0; bottom: 0; margin: 0; margin-left: var(--edge);
  will-change: transform, opacity;
}
html.film-on .film-steps { position: absolute; inset: 0; padding: 0; pointer-events: none; }
html.film-on .film-steps-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
html.film-on .film-steps ol { display: block; border: 0; padding: 0; }
html.film-on .film-step {
  position: absolute; left: var(--edge); top: 50%; width: min(29vw, 430px);
  opacity: 0; transform: translateY(-50%);
}
html.film-on .film-step-k { display: none; }
html.film-on .film-step p { font: 300 clamp(1.7rem, 2.65vw, 2.75rem)/1.1 var(--f-serif); letter-spacing: -0.016em; }
html.film-on .film-step--end { display: block; }
html.film-on .film-step--end p { font-weight: 200; font-size: clamp(2.2rem, 3.6vw, 3.8rem); line-height: 1.02; letter-spacing: -0.024em; }
html.film-on .film-hud {
  display: block; position: absolute; left: 0; right: 0; bottom: max(18px, 3.6svh); z-index: 3; opacity: 0;
}
.hud-in { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; padding-inline: var(--edge); }
.hud-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: min(420px, 62%); }
.hud-steps li { display: grid; gap: .65rem; font: 400 .6875rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--on-cobalt-2); transition: color 250ms ease; }
.hud-steps li.is-on { color: var(--on-cobalt); }
.hud-steps i { display: block; height: 1px; background: rgba(241, 241, 236, .24); position: relative; overflow: hidden; }
.hud-steps i::after { content: ""; position: absolute; inset: 0; background: var(--on-cobalt); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.hud-layer { font: 400 .75rem/1 var(--f-mono); letter-spacing: .12em; color: var(--on-cobalt-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hud-layer b { color: var(--on-cobalt); font-weight: 400; }

@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  html.film-on .film { height: 400svh; }
  html.film-on .hero-copy { right: 0; margin-right: var(--gutter); margin-left: var(--gutter); bottom: auto; }
  html.film-on .film-step { left: var(--gutter); right: var(--gutter); width: auto; top: calc(var(--nav-h) + 1.25rem); transform: none; }
  html.film-on .film-step p { font-size: clamp(1.6rem, 7vw, 2.4rem); line-height: 1.12; }
  html.film-on .film-step--end p { font-size: clamp(2.2rem, 10vw, 3.2rem); }
  .hud-steps { width: 100%; }
  .hud-layer { display: none; }
  .nozzle { min-width: 18px; }
}

/* --- Timelapse opcional (secuencia de cuadros con scroll) */
.seq[hidden] { display: none; }
.seq { position: relative; background: var(--cobalt-night); color: var(--on-cobalt); --focus: var(--on-cobalt); }
.seq-stage { position: relative; height: 100svh; overflow: hidden; isolation: isolate; }
.seq-poster, .seq-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.seq-canvas { display: none; }
.seq-stage::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(5, 12, 50, .72) 0%, rgba(5, 12, 50, 0) 46%), linear-gradient(to right, rgba(5, 12, 50, .45) 0%, rgba(5, 12, 50, 0) 55%); }
.seq-copy { position: absolute; z-index: 2; left: var(--edge); right: var(--gutter); bottom: max(10svh, 72px); display: grid; }
.seq-copy p { grid-area: 1 / 1; align-self: end; max-width: 15ch; font: 300 clamp(1.9rem, 3.6vw, 3.6rem)/1.06 var(--f-serif); letter-spacing: -0.02em; }
.seq-copy p + p { opacity: 0; }
.seq.seq-on { height: 340svh; }
.seq.seq-on .seq-stage { position: sticky; top: 0; }
.seq.seq-on .seq-canvas { display: block; }
.seq.seq-on .seq-copy p { opacity: 0; will-change: transform, opacity; }

/* ===================================================================
   SECCIONES
   =================================================================== */
.sec { position: relative; padding-block: clamp(6rem, 12vw, 11rem); overflow-x: clip; }
.sec--tight { padding-block: clamp(5rem, 9vw, 8rem); }
.sec-head { display: grid; gap: 1.4rem; max-width: 52rem; margin-bottom: clamp(3.5rem, 7vw, 6rem); }

/* --- Impresiones 3D: caso Granolandia + galería */
.case-head { display: grid; gap: .9rem; max-width: 40rem; margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.case-head p { color: var(--muted); }

.gallery { position: relative; }
.gallery-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(250px, 31vw, 460px);
  gap: clamp(14px, 2vw, 28px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge);
  padding: 0 var(--edge) 4px;
  scrollbar-width: none; cursor: grab;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.gallery-track.is-dragging img { pointer-events: none; }
.gallery-track:focus-visible { outline-offset: -2px; }
.shot { scroll-snap-align: start; }
.shot-img { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--paper-2); }
.shot-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); user-select: none; -webkit-user-drag: none; }
@media (hover: hover) and (pointer: fine) { .shot:hover .shot-img img { transform: scale(1.035); } }
.shot figcaption { display: grid; gap: .3rem; padding-top: 1.1rem; max-width: 26rem; }
.shot-k { order: 3; font-size: .8125rem; font-weight: 500; color: var(--muted); }
.shot figcaption b { order: 1; }
.shot figcaption span:last-child { order: 2; }
.shot figcaption b { font: 300 1.5rem/1.15 var(--f-serif); letter-spacing: -0.01em; }
.shot figcaption span:last-child { color: var(--muted); font-size: .96875rem; line-height: 1.5; }
.gallery-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; margin-top: clamp(1.75rem, 3vw, 2.5rem); }
.gallery-ctrl { display: flex; align-items: center; gap: .5rem; }
.g-btn {
  width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: none; box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; color: var(--ink);
  transition: transform 160ms var(--ease-out), box-shadow 200ms ease, opacity 200ms ease;
}
.g-btn .ic { width: 20px; height: 20px; }
.g-btn:active { transform: scale(.94); }
.g-btn:disabled { opacity: .35; cursor: default; }
@media (hover: hover) and (pointer: fine) { .g-btn:not(:disabled):hover { box-shadow: inset 0 0 0 1px var(--ink); } }
.g-bar { position: relative; width: clamp(80px, 12vw, 160px); height: 1px; background: var(--line-2); margin-left: 1rem; overflow: hidden; }
.g-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 25%; background: var(--ink); transition: transform 200ms var(--ease-out); }
.case-links { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.75rem; font-size: .96875rem; }

/* --- listados de servicios */
.offer { margin-top: clamp(5rem, 10vw, 8.5rem); }
.offer-title { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.offer-rows { display: grid; }
.row {
  position: relative; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 1.25rem 3rem;
  padding-block: clamp(1.75rem, 3vw, 2.5rem);
}
.row::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line-2); transform-origin: 0 50%; }
.row h4, .col h4 { font: 300 clamp(1.4rem, 2vw, 1.75rem)/1.15 var(--f-serif); letter-spacing: -0.01em; }
.row h4 span, .col h4 span { display: block; margin-top: .45rem; font: 500 .8125rem/1 var(--f-sans); color: var(--muted); letter-spacing: .01em; }
.items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 2.5rem; }
.items li { display: grid; gap: .3rem; align-content: start; }
.items b { font-weight: 500; font-size: 1.0625rem; }
.items span { color: var(--muted); font-size: .96875rem; line-height: 1.55; }
.offer-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line-2); color: var(--muted); }
@media (max-width: 860px) {
  .row { grid-template-columns: minmax(0, 1fr); }
  .items { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
}

/* --- NFC / QR */
.nfc-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2.5rem, 5vw, 5rem); align-items: center; }
.nfc-copy { display: grid; gap: 1.6rem; align-content: start; min-width: 0; }
.nfc-copy .lead { max-width: 34rem; }
.seg {
  position: relative; display: inline-flex; justify-self: start; max-width: 100%;
  padding: 4px; gap: 0; box-shadow: inset 0 0 0 1px var(--cobalt-line);
  overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .5rem;
  min-height: 44px; padding: 0 1.1rem; border: 0; background: none; cursor: pointer; white-space: nowrap;
  font: 500 .9375rem/1 var(--f-sans); color: var(--on-cobalt-2); transition: color 220ms ease;
}
.seg button[aria-pressed="true"] { color: #0E1530; }
@media (hover: hover) and (pointer: fine) { .seg button[aria-pressed="false"]:hover { color: var(--on-cobalt); } }
.seg-ind { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; background: var(--on-cobalt); transition: transform 340ms var(--ease-in-out), width 340ms var(--ease-in-out); }
.seg-ind.no-anim { transition: none; }
.nfc-state { font: 300 1.3rem/1.35 var(--f-serif); letter-spacing: -0.005em; min-height: 3.6em; max-width: 30rem; }
.facts { display: grid; gap: .95rem; }
.facts li { display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: start; color: var(--on-cobalt-2); }
.facts b { color: var(--on-cobalt); font-weight: 500; }
.facts .ic { color: var(--on-cobalt); margin-top: .22em; }
.facts.is-swapping li { opacity: 0; transform: translateY(-4px); filter: blur(2px); }
.facts li { transition: opacity 220ms ease, transform 320ms var(--ease-out), filter 220ms ease; }

.nfc-stage { position: relative; height: clamp(420px, 44vw, 620px); }
.nfc-floor {
  position: absolute; inset: 8% 0 0;
  background: radial-gradient(48% 40% at 44% 62%, rgba(110, 146, 255, .38) 0%, rgba(110, 146, 255, 0) 70%);
}
.nfc-piece { position: absolute; left: 10%; top: 16%; width: 52%; aspect-ratio: 431 / 487; transform: rotate(-7deg); }
.nfc-piece::after {
  content: ""; position: absolute; left: 6%; right: 6%; bottom: -10%; height: 16%; z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, rgba(3, 10, 46, .55), rgba(3, 10, 46, 0) 72%);
  filter: blur(4px);
}
.nfc-medal { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(3, 10, 46, .35)); }
.nfc-rings { position: absolute; left: 50%; top: 58%; width: 0; height: 0; }
.nfc-rings i {
  position: absolute; left: 0; top: 0; width: 120%; aspect-ratio: 1; border-radius: 50%;
  width: clamp(220px, 26vw, 380px); height: clamp(220px, 26vw, 380px);
  margin: calc(clamp(220px, 26vw, 380px) / -2) 0 0 calc(clamp(220px, 26vw, 380px) / -2);
  box-shadow: inset 0 0 0 1.5px rgba(241, 241, 236, .85); opacity: 0;
}
.nfc-stage.is-live[data-mode="nfc"] .nfc-rings i { animation: ring 2.4s var(--ease-out) infinite; }
.nfc-stage.is-live[data-mode="nfc"] .nfc-rings i:nth-child(2) { animation-delay: .8s; }
.nfc-stage.is-live[data-mode="nfc"] .nfc-rings i:nth-child(3) { animation-delay: 1.6s; }
@keyframes ring { 0% { transform: scale(.55); opacity: .75; } 100% { transform: scale(1.5); opacity: 0; } }
.nfc-qr {
  position: absolute; left: -10%; bottom: -10%; width: 38%; aspect-ratio: 1; padding: 6%;
  background: #F6F6F2; border-radius: 8px; box-shadow: 0 16px 30px -12px rgba(3, 10, 46, .6);
  transform: rotate(-8deg) scale(.9); opacity: 0; transition: opacity 300ms ease, transform 500ms var(--ease-out);
}
.nfc-qr svg { width: 100%; height: 100%; fill: #0D0E11; }
.nfc-stage[data-mode="qr"] .nfc-qr { opacity: 1; transform: rotate(-6deg) scale(1); }
.nfc-stage[data-mode="none"] .nfc-floor { opacity: .4; }

.phone {
  --pw: clamp(150px, 15vw, 210px);
  position: absolute; right: 6%; top: 6%; width: var(--pw); aspect-ratio: 9 / 19;
  border-radius: calc(var(--pw) * .17); padding: calc(var(--pw) * .045);
  background: linear-gradient(145deg, #23262E, #0B0C10 60%);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .14), 0 40px 60px -28px rgba(2, 8, 40, .75);
  transform: translate(28%, -6%) rotate(14deg); opacity: 0;
  transition: transform 900ms var(--ease-drawer), opacity 500ms ease;
}
.nfc-stage.is-in .phone { transform: translate(0, 0) rotate(-6deg); opacity: 1; }
.nfc-stage.is-in[data-mode="nfc"] .phone { transform: translate(-6%, 16%) rotate(-9deg); }
.nfc-stage.is-in[data-mode="qr"] .phone { transform: translate(6%, 12%) rotate(4deg); }
.nfc-stage.is-in[data-mode="none"] .phone { transform: translate(24%, -4%) rotate(8deg); opacity: .35; }
.phone-screen {
  position: relative; height: 100%; overflow: hidden; border-radius: calc(var(--pw) * .13);
  background: #F4F5F8; color: #0D0E11;
  display: grid; align-content: center; justify-items: center;
}
.phone-island { position: absolute; top: 5%; left: 50%; width: 32%; height: 4.5%; border-radius: 99px; background: #0B0C10; transform: translateX(-50%); }
.phone-card { display: grid; justify-items: center; gap: .35rem; padding: 0 10%; text-align: center; transition: opacity 240ms ease, filter 240ms ease, transform 320ms var(--ease-out); }
.phone-card.is-swapping { opacity: 0; filter: blur(3px); transform: translateY(4px); }
.phone-app { width: 44px; height: 44px; border-radius: 12px; background: var(--cobalt); color: var(--on-cobalt); display: grid; place-items: center; margin-bottom: .35rem; }
.phone-app .ic { width: 24px; height: 24px; }
.phone-k { font: 400 .625rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: #3B5BDB; }
.phone-t { font: 500 .9375rem/1.2 var(--f-sans); }
.phone-s { font-size: .75rem; line-height: 1.3; color: #5B5F69; }
.phone-cam { position: absolute; left: 14%; right: 14%; top: 50%; aspect-ratio: 1; transform: translateY(-50%); opacity: 0; transition: opacity 300ms ease; }
.phone-qr { position: absolute; inset: 16%; width: 68%; height: 68%; fill: #0D0E11; opacity: .9; }
.phone-cam i { position: absolute; width: 18%; aspect-ratio: 1; border: 2px solid #0D0E11; }
.phone-cam i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.phone-cam i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.phone-cam i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.phone-cam i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.phone-cam b { position: absolute; left: 6%; right: 6%; top: 10%; height: 2px; background: var(--cobalt); box-shadow: 0 0 10px rgba(31, 69, 214, .6); }
.nfc-stage.is-scanning .phone-cam { opacity: 1; }
.nfc-stage.is-scanning .phone-cam b { animation: scan 1.1s var(--ease-in-out) infinite alternate; }
.nfc-stage.is-scanning .phone-card { opacity: 0; }
@keyframes scan { to { top: calc(90% - 2px); } }
.phone-screen::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1.5px var(--cobalt-hi), 0 0 30px rgba(74, 115, 255, .5); opacity: 0; transition: opacity 500ms ease; pointer-events: none; }
.nfc-stage.is-hit .phone-screen::after { opacity: 1; }

@media (max-width: 900px) {
  .nfc-grid { grid-template-columns: minmax(0, 1fr); }
  .seg button { padding: 0 .8rem; font-size: .875rem; }
  .nfc-stage { height: clamp(340px, 92vw, 500px); }
  .nfc-piece { left: 4%; top: 14%; width: 60%; }
  .phone { --pw: clamp(130px, 34vw, 180px); right: 4%; }
}

/* --- Páginas web: vista previa del sitio de Granolandia */
.project { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.project-view { min-width: 0; }
.pv-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1rem; }
.pv-url { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; color: var(--muted); font: 400 .8125rem/1.2 var(--f-mono); letter-spacing: .02em; }
.pv-url span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg--sm { box-shadow: inset 0 0 0 1px var(--line-2); }
.seg--sm button { min-height: 40px; padding: 0 .9rem; font-size: .875rem; color: var(--muted); }
.seg--sm button .ic { width: 1.05em; height: 1.05em; }
.seg--sm button[aria-pressed="true"] { color: var(--accent-ink); }
.seg--sm .seg-ind { background: var(--accent); }
@media (hover: hover) and (pointer: fine) { .seg--sm button[aria-pressed="false"]:hover { color: var(--ink); } }
.preview { position: relative; }
.pv-stage { display: grid; place-items: center; background: var(--paper-2); overflow: hidden; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.pv-stage[data-mode="mobile"] { padding-block: 22px; }
.pv-screen { position: relative; overflow: hidden; background: #0D0E12; transition: opacity 200ms ease, filter 200ms ease; }
.pv-stage[data-mode="desktop"] .pv-screen { border-radius: 10px; }
.pv-stage[data-mode="mobile"] .pv-screen { border-radius: 26px; box-shadow: 0 0 0 7px #16181D, 0 30px 50px -24px rgba(10, 14, 30, .5); }
.pv-screen.is-swapping { opacity: 0; filter: blur(4px); }
.pv-screen iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: #fff; }
.poster { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); background: #111214; color: #F4F5F8; text-decoration: none; }
.poster-img img { transition: transform 900ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .poster:hover .poster-img img { transform: scale(1.03); } }
.poster.is-off { visibility: hidden; }
.poster-copy { display: grid; align-content: center; justify-items: start; gap: .9rem; padding: clamp(1rem, 5%, 2.75rem); }
.poster-t { display: block; }
.poster-k { font: 500 .75rem/1 var(--f-sans); letter-spacing: .12em; text-transform: uppercase; color: #F5C518; }
.poster-t { font: 500 clamp(2rem, 5vw, 3.6rem)/.92 var(--f-sans); letter-spacing: -0.03em; }
.poster-p { color: rgba(244, 245, 248, .76); font-size: .9375rem; line-height: 1.5; max-width: 22rem; }
.poster-img { position: relative; background: radial-gradient(70% 60% at 50% 60%, #2a2a2e, #111214 75%); }
.poster-img img { position: absolute; inset: 8% 6% 4%; width: 88%; height: 88%; object-fit: contain; }
.pv-stage[data-mode="mobile"] .poster { grid-template-columns: minmax(0, 1fr); grid-template-rows: 54% 1fr; }
.pv-stage[data-mode="mobile"] .poster-img { order: -1; }
.pv-stage[data-mode="mobile"] .poster-copy { align-content: start; gap: .6rem; padding: 1.1rem; }
.pv-stage[data-mode="mobile"] .poster-t { font-size: 1.9rem; }
.pv-stage[data-mode="mobile"] .poster-p { font-size: .8125rem; }
.shot-fallback { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; background: #fff; opacity: 0; transition: opacity 400ms ease; }
.shot-fallback.is-on { opacity: 1; }
.pv-badge { position: absolute; left: 10px; bottom: 10px; padding: .4rem .6rem; background: rgba(10, 12, 18, .72); color: #fff; font: 500 .6875rem/1 var(--f-sans); letter-spacing: .06em; text-transform: uppercase; pointer-events: none; }
.project-copy { display: grid; gap: 1.3rem; align-content: start; padding-top: 3.4rem; }
.checks { display: grid; gap: .8rem; }
.checks li { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; }
.checks .ic, .included .ic { color: var(--accent); margin-top: .2em; }
.project-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.5rem; margin-top: .4rem; }
@media (max-width: 980px) { .project { grid-template-columns: minmax(0, 1fr); } .project-copy { padding-top: 0; } }
@media (max-width: 560px) { .poster { grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto; } .poster-img { order: -1; } .poster-p { display: none; } }

.offer--web .cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem clamp(2rem, 4vw, 4rem); border-top: 1px solid var(--line-2); padding-top: clamp(1.75rem, 3vw, 2.5rem); }
.col { display: grid; gap: 1.5rem; align-content: start; }
.col .items { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.included { display: flex; flex-wrap: wrap; gap: .9rem 2.5rem; margin-top: clamp(2.5rem, 4vw, 3.5rem); padding-top: 1.75rem; border-top: 1px solid var(--line); }
.included li { display: flex; align-items: center; gap: .6rem; }
.included .ic { margin-top: 0; }
.offer--web .offer-foot { border-top: 0; padding-top: 1.5rem; }
@media (max-width: 860px) { .offer--web .cols { grid-template-columns: minmax(0, 1fr); } }

/* --- Así trabajamos */
#proceso h2 { margin-bottom: clamp(3rem, 6vw, 5rem); }
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem clamp(1.5rem, 3vw, 3rem); padding-top: 2.75rem; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--ink); transform-origin: 0 50%; transform: scaleX(var(--draw, 1)); }
.steps::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line-2); z-index: -1; }
.steps li { position: relative; display: grid; gap: .75rem; align-content: start; }
.steps li::before { content: ""; position: absolute; left: 0; top: calc(-2.75rem - 4px); width: 9px; height: 9px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink); transition: background-color 300ms ease; }
.steps li.is-on::before { background: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.step-n { font: 400 .8125rem/1 var(--f-mono); letter-spacing: .08em; color: var(--muted); }
.steps h3 { font-size: clamp(1.45rem, 2vw, 1.85rem); }
.steps p { color: var(--muted); font-size: 1rem; line-height: 1.55; }
@media (max-width: 860px) {
  .steps { grid-template-columns: minmax(0, 1fr); padding-top: 0; padding-left: 2.25rem; gap: 2.25rem; }
  .steps::before, .steps::after { left: 4px; right: auto; top: 6px; bottom: 6px; width: 1px; height: auto; transform-origin: 50% 0; transform: scaleY(var(--draw, 1)); }
  .steps li::before { top: 5px; left: -2.25rem; }
}

/* --- Contacto */
.contact-title { font-size: clamp(3rem, 9vw, 8.5rem); line-height: .96; letter-spacing: -0.035em; margin-bottom: 1.6rem; }
.contact .lead { margin-bottom: clamp(3rem, 6vw, 5rem); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2.5rem, 5vw, 5rem); border-top: 1px solid var(--cobalt-line); padding-top: clamp(2rem, 4vw, 3rem); }
.ch-k { display: inline-flex; align-items: center; gap: .55rem; font-weight: 500; font-size: .9375rem; color: var(--on-cobalt-2); }
.ch-k .ic { width: 1.3em; height: 1.3em; color: var(--on-cobalt); }
.wa { display: grid; gap: 1.25rem; align-content: start; }
.wa-num {
  display: block; width: fit-content; text-decoration: none; color: var(--on-cobalt);
  font: 200 clamp(3rem, 7.4vw, 6.6rem)/1 var(--f-serif); letter-spacing: -0.03em; font-variant-numeric: lining-nums;
  user-select: all; -webkit-user-select: all;
}
.wa p { color: var(--on-cobalt-2); max-width: 30rem; }
.wa-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .4rem; }
.contact-side { display: grid; gap: 2.25rem; align-content: start; }
.mail { display: grid; gap: .9rem; }
.mail-val { font: 300 clamp(1.35rem, 2vw, 1.7rem)/1.2 var(--f-serif); color: var(--on-cobalt); text-decoration: none; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.mail-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.scan { display: grid; grid-template-columns: 112px 1fr; gap: 1.1rem; align-items: center; padding-top: 2rem; border-top: 1px solid var(--cobalt-line); }
.scan-qr { display: block; padding: 9px; background: #F6F6F2; width: 112px; transition: transform 200ms var(--ease-out); }
.scan-qr svg { width: 100%; height: auto; fill: #0D0E11; }
.scan-qr:active { transform: scale(.97); }
.scan p { color: var(--on-cobalt-2); font-size: .96875rem; line-height: 1.5; max-width: 22rem; }
.soon { color: var(--on-cobalt-2); font-size: .9375rem; }
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .scan { display: none; }
}

/* odómetro del número */
.odo { display: inline-block; height: 1em; overflow: hidden; vertical-align: top; }
.odo-col { display: block; will-change: transform; }
.odo-col > span { display: block; height: 1em; line-height: 1; }

/* --- Pie */
.foot { overflow-x: clip; background: var(--grain), var(--paper); color: var(--ink); padding: clamp(4rem, 8vw, 6.5rem) 0 calc(2.25rem + env(safe-area-inset-bottom, 0px)); }
.foot-mark { position: relative; width: min(100%, 820px); margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.foot-mark .logo { width: 100%; fill: var(--ink); }
.foot-line { display: none; }
.foot-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.5rem 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line-2); }
.foot-brand { display: grid; gap: .25rem; font-size: .9375rem; color: var(--muted); }
.foot-brand b { font: 300 1.35rem/1.1 var(--f-serif); color: var(--ink); }
.foot-nav { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; }
.foot-nav a { text-decoration: none; color: var(--muted); padding-block: .5rem; font-size: .9375rem; transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .foot-nav a:hover { color: var(--ink); } }
.foot-copy { color: var(--muted); font-size: .875rem; }

/* --- Aviso (copiar) */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 120;
  display: flex; align-items: center; gap: .6rem; padding: .85rem 1.15rem; max-width: calc(100vw - 32px);
  background: var(--ink); color: var(--paper); font-weight: 500; font-size: .9375rem;
  opacity: 0; transform: translate(-50%, 120%); pointer-events: none;
  transition: opacity 240ms ease, transform 420ms var(--ease-out);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ===================================================================
   MOVIMIENTO DE APOYO (solo con JS y sin "reducir movimiento")
   =================================================================== */
@media (prefers-reduced-motion: no-preference) {
  html.rv-on [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 700ms ease, transform 1000ms var(--ease-out); transition-delay: var(--d, 0ms); }
  html.rv-on [data-reveal].is-in { opacity: 1; transform: none; }
  /* títulos: suben dentro de su propia máscara, como los subtítulos de la película */
  html.rv-on [data-title] { overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
  html.rv-on [data-title] > .rv { display: block; transform: translateY(105%); transition: transform 1100ms var(--ease-out); }
  html.rv-on [data-title].is-in > .rv { transform: none; }
  /* filas de servicios: la línea se traza como una pasada de la boquilla y luego entra el contenido */
  html.rv-on [data-row]::before { transform: scaleX(0); transition: transform 1100ms var(--ease-in-out); }
  html.rv-on [data-row] > * { opacity: 0; transform: translateY(10px); transition: opacity 600ms ease 260ms, transform 900ms var(--ease-out) 260ms; }
  html.rv-on [data-row].is-in::before { transform: none; }
  html.rv-on [data-row].is-in > * { opacity: 1; transform: none; }
  /* galería: cada foto se "imprime" de abajo hacia arriba */
  html.rv-on .gallery .shot-img { clip-path: inset(100% 0 0 0); transition: clip-path 1200ms var(--ease-in-out); transition-delay: var(--d, 0ms); }
  html.rv-on .gallery .shot-img img { transform: scale(1.12); transition: transform 1600ms var(--ease-out); transition-delay: var(--d, 0ms); }
  html.rv-on .gallery.is-in .shot-img { clip-path: inset(0 0 0 0); }
  html.rv-on .gallery.is-in .shot-img img { transform: none; }
  html.rv-on .gallery figcaption { opacity: 0; transition: opacity 700ms ease; transition-delay: calc(var(--d, 0ms) + 350ms); }
  html.rv-on .gallery.is-in figcaption { opacity: 1; }
  html.rv-on .steps::before { transform: scaleX(var(--draw, 0)); transition: transform 1400ms var(--ease-in-out); }
  html.rv-on .steps li .step-n, html.rv-on .steps li h3, html.rv-on .steps li p { opacity: 0; transform: translateY(12px); transition: opacity 600ms ease, transform 800ms var(--ease-out); }
  html.rv-on .steps li.is-on .step-n, html.rv-on .steps li.is-on h3, html.rv-on .steps li.is-on p { opacity: 1; transform: none; }
  html.rv-on .steps li.is-on h3 { transition-delay: 60ms; }
  html.rv-on .steps li.is-on p { transition-delay: 120ms; }
  /* el logo del pie se imprime capa por capa */
  html.rv-on .foot-mark .logo { clip-path: inset(100% 0 0 0); }
  html.rv-on .foot-mark.is-print .logo { animation: printUp 1700ms steps(28, end) forwards; }
  html.rv-on .foot-line { display: block; position: absolute; left: -2%; right: -2%; bottom: 0; height: 2px; opacity: 0;
    background: linear-gradient(90deg, transparent, var(--accent) 12%, var(--accent) 88%, transparent); }
  html.rv-on .foot-mark.is-print .foot-line { animation: nozzleUp 1700ms steps(28, end) forwards; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 860px) {
  html.rv-on .steps::before { transform: scaleY(var(--draw, 0)); }
}
@keyframes printUp { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes nozzleUp { 0% { opacity: 1; transform: translateY(0); } 96% { opacity: 1; transform: translateY(calc(-1 * var(--mark-h, 400px))); } 100% { opacity: 0; transform: translateY(calc(-1 * var(--mark-h, 400px))); } }

@media (prefers-reduced-motion: reduce) {
  .menu { transition: opacity 200ms ease; clip-path: none; opacity: 0; }
  .menu.is-open { opacity: 1; }
  .menu-links a { opacity: 1; transform: none; transition: none; }
  .phone { transition: opacity 200ms ease; }
  .nfc-stage .phone { transform: translate(-20%, 18%) rotate(-8deg); }
  .nfc-rings i { display: none; }
  .nfc-stage.is-scanning .phone-cam b { animation: none; }
  .shot-img img, .btn, .btn .ic, .link .ic { transition: none; }
  .toast { transition: opacity 200ms ease; transform: translate(-50%, 0); }
}
