/* Secciones y páginas */
.page { display: none; }
.page.is-active { display: block; }
.page:not([data-page="inicio"]) { min-height: 100svh; padding-bottom: 8vh; }
html:not(.has-js) .page[data-page="inicio"] { display: block; }

/* ---------- Cabecera de página interior ---------- */
.pagehead { padding-top: calc(var(--header-h) + 10vh); padding-bottom: 6vh; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3vh; }
.pagehead .h-xl { font-size: clamp(2.4rem, 10.2vw, 13rem); }
.pagehead .h-xl .line-mask > span { white-space: nowrap; }
.pagehead__lead { max-width: 34ch; }
.pagehead__tools { display: grid; gap: 20px; margin-top: 3vh; max-width: 760px; }
.search input { width: 100%; background: transparent; border: 0; border-bottom: 1px solid currentColor; padding: 14px 0; font: 500 clamp(1.05rem, 2vw, 1.5rem) var(--font-sans); color: inherit; outline: none; }
.search input::placeholder { color: inherit; opacity: .45; }
.search input:focus { border-color: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.chip { font: 500 .79rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; opacity: .45; padding: 6px 0; position: relative; transition: opacity .3s; }
.chip:hover, .chip.is-on { opacity: 1; }
.chip.is-on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; }

/* ---------- HERO: volcado hexadecimal generativo + tipografía por anchura ---------- */
.hero { position: relative; min-height: 100svh; overflow: hidden; }
/* Los bytes se atenúan hacia la izquierda y abajo, donde están la frase y el botón: el texto siempre se lee */
.hero__field { position: absolute; inset: 0; z-index: 1; -webkit-mask-image: linear-gradient(to right, rgb(0 0 0 / .22) 18%, #000 62%); mask-image: linear-gradient(to right, rgb(0 0 0 / .22) 18%, #000 62%); }
/* Móvil: los bytes se concentran entre el título y la frase; arriba y abajo, donde hay texto, casi desaparecen */
@media (max-width: 720px) { .hero__field { -webkit-mask-image: linear-gradient(to bottom, rgb(0 0 0 / .12) 26%, #000 44%, #000 60%, rgb(0 0 0 / .12) 76%); mask-image: linear-gradient(to bottom, rgb(0 0 0 / .12) 26%, #000 44%, #000 60%, rgb(0 0 0 / .12) 76%); } }
.hero__field canvas { width: 100%; height: 100%; }
.hero__micro { position: absolute; z-index: 6; top: calc(var(--header-h) + 14px); }
.hero__micro--tl { left: var(--edge); }
.hero__micro--tr { right: var(--edge); text-align: right; }
/* GAMSTER ancha y negra; APK con la misma fuente condensada y fina: el énfasis está en la anchura, no en el color */
.hero__back, .hero__front { position: absolute; font-size: clamp(3.4rem, calc(15.4 * var(--vw)), 24rem); line-height: .8; white-space: nowrap; }
.hero__back { z-index: 2; left: calc(var(--edge) - .04em); top: calc(var(--header-h) + 11vh); font-variation-settings: "wdth" var(--hero-wdth, 118); }
.hero__front { z-index: 3; right: var(--edge); top: calc(var(--header-h) + 11vh + 15.4 * var(--vw) * .9); }
/* Mascota 3D: delante de la tipografía gigante y detrás del texto y los botones */
.hero__mascot { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.hero__mascot canvas { width: 100%; height: 100%; }
.hero.is-3d .hero__field { display: none; }
.hero__copy { position: absolute; z-index: 6; left: var(--edge); bottom: 56px; display: grid; gap: 22px; max-width: 30ch; }
.hero__lead { font-size: clamp(1.15rem, 1rem + .9vw, 1.9rem); line-height: 1.2; font-weight: 500; letter-spacing: -.01em; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.hero__ctas .btn-line:not(.btn-line--solid) { background: var(--bg); } /* opaco: la mascota no se ve a través del texto */
.hero__scroll { position: absolute; z-index: 6; right: var(--edge); bottom: 60px; display: flex; align-items: center; gap: 14px; }
.hero__scrollline { width: 54px; height: 1px; background: currentColor; transform-origin: left; animation: scrollline 2.4s var(--ease-expo) infinite; }
@keyframes scrollline { 0% { transform: scaleX(0); } 50% { transform: scaleX(1); transform-origin: left; } 51% { transform-origin: right; } 100% { transform: scaleX(0); transform-origin: right; } }
@media (max-width: 720px) {
  .hero__back, .hero__front { font-size: 15.4vw; }
  .hero__back { top: calc(var(--header-h) + 64px); }
  .hero__front { top: calc(var(--header-h) + 64px + 15.4vw * .9); }
  .hero__copy { bottom: 36px; right: var(--edge); max-width: none; gap: 16px; }
  .hero__scroll { display: none; }
  .hero__micro--tr { display: none; }
}
/* Móvil en horizontal (pantalla baja): el título se mide por el alto para que nunca pise el texto */
@media (orientation: landscape) and (max-height: 520px) {
  .hero { --hero-fs: min(calc(15.4 * var(--vw)), 23vh); }
  .hero__back, .hero__front { font-size: var(--hero-fs); }
  .hero__back { top: calc(var(--header-h) + 5vh); }
  .hero__front { top: calc(var(--header-h) + 5vh + var(--hero-fs) * .9); }
  .hero__micro, .hero__scroll { display: none; }
  .hero__copy { bottom: 18px; gap: 12px; max-width: 34ch; }
  .hero__lead { font-size: 1rem; }
}
html.has-motion .hero__micro, html.has-motion .hero__copy, html.has-motion .hero__scroll, html.has-motion .hero__field, html.has-motion .hero__mascot { opacity: 0; }

/* ---------- TIPOGRAFÍA LÍQUIDA: "ÁBRELO" negra y, bajo la tinta, en 3D ---------- */
.liquid { position: relative; }
/* Dos filas: la palabra centrada en el espacio libre y el texto debajo (nunca se pisan) */
.liquid__pin { position: relative; height: 100vh; min-height: 560px; overflow: hidden; display: grid; grid-template-rows: minmax(0, 1fr) auto; align-items: center; padding: calc(var(--header-h) + 56px) 0 clamp(28px, 6vh, 64px); }
.liquid__k { position: absolute; z-index: 4; top: calc(var(--header-h) + 24px); left: var(--edge); color: #fff; mix-blend-mode: difference; } /* negro sobre papel, blanco sobre la tinta */
.liquid__stage { width: 100%; text-align: center; padding-inline: var(--edge); }
.liquid__word { display: inline-block; font-size: clamp(2.8rem, calc(17 * var(--vw)), 21rem); /* "ÁBRELO" ≈ 5,1 em: cabe hasta en 320px */ line-height: .92; letter-spacing: -.045em; white-space: nowrap; padding-top: .14em; }
.liquid__canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.liquid__copy { position: relative; z-index: 3; margin-left: var(--edge); display: grid; gap: 12px; max-width: 46ch; padding-right: var(--edge); }
.liquid__copy .lead { font-size: clamp(1.1rem, .9rem + 1vw, 1.9rem); }
.liquid__copy .lead { font-weight: 600; }
.liquid.is-live .liquid__copy { color: var(--paper); }
html.has-motion .liquid.is-live .liquid__copy { opacity: 0; }

/* ---------- RECORRIDO 3D DE PRODUCTO: GamsterGPS ---------- */
.product { position: relative; background: var(--ink); color: var(--paper); }
.product__pin { position: relative; height: 100vh; min-height: 600px; overflow: hidden; }
/* luz de estudio cálida que aparece con el scroll (rojo de marca → naranja luminoso en el centro) */
.product__glow { position: absolute; inset: 0; z-index: 0; opacity: 0; background: radial-gradient(110% 85% at 64% 52%, #ff7b3d 0%, #f1471f 40%, #b51d15 100%); }
.product__phrase { position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.92); font-size: calc(16.5 * var(--vw)); line-height: .8; white-space: nowrap; opacity: 0; color: rgb(246 245 242 / .96); pointer-events: none; }
.product__canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.product__ui { position: absolute; inset: 0; z-index: 3; display: grid; grid-template-rows: auto 1fr auto; padding: calc(var(--header-h) + 3vh) var(--edge) 6vh; pointer-events: none; }
.product__ui a, .product__ui button { pointer-events: auto; }
.product__texts { position: relative; align-self: end; width: min(100%, 440px); min-height: 17rem; }
.product__text { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 12px; opacity: 0; transform: translateY(-12px); transition: opacity .2s linear, transform .3s var(--ease-smooth); pointer-events: none; }
.product__text.is-on { opacity: 1; transform: none; pointer-events: auto; transition: opacity .45s var(--ease-smooth) .16s, transform .6s var(--ease-smooth) .16s; }
.product__title { font-size: clamp(3rem, 8vw, 9rem); }
.product__big { font-size: clamp(2.5rem, 7vw, 7.5rem); line-height: .88; }
.product__big span { opacity: .55; }
.product__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 6px; }
.product__count { border-top: 1px solid rgb(246 245 242 / .3); padding-top: 14px; width: min(100%, 440px); }
@media (max-width: 720px) {
  .product__texts { width: 100%; min-height: 15rem; }
  .product__phrase { top: 38%; }
}
/* Sin animación (movimiento reducido o sin 3D): una composición fija y todos los textos visibles */
.product:not(.is-pinned) .product__pin { height: auto; min-height: 0; }
.product:not(.is-pinned) .product__glow { opacity: 1; }
.product:not(.is-pinned) .product__canvas { position: relative; height: 70vh; }
.product:not(.is-pinned) .product__ui { position: relative; inset: auto; }
.product:not(.is-pinned) .product__texts { min-height: 0; display: grid; gap: 7vh; width: 100%; }
.product:not(.is-pinned) .product__text { position: static; opacity: 1; transform: none; }
.product:not(.is-pinned) .product__count { display: none; }

/* ---------- INTRO ---------- */
.intro { padding: calc(var(--sec-y) * 1.2) 0 var(--sec-y); }
.intro .grid-12 { row-gap: 8vh; }
.intro__k { grid-column: 1 / -1; }
.intro__text { grid-column: 1 / -1; font-size: clamp(1.7rem, 4vw, 4.4rem); line-height: 1.1; letter-spacing: -.025em; font-weight: 600; font-variation-settings: "wdth" 96; }
.intro__foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
@media (min-width: 960px) { .intro__k { grid-column: 1 / 3; } .intro__text { grid-column: 3 / 13; } .intro__foot { grid-column: 3 / 13; } }
.w-fade { display: inline-block; opacity: .14; will-change: opacity; }

/* ---------- ESCENA FIJADA: GamsterGPS ---------- */
.stage { padding: var(--sec-y) var(--edge); }
.stage__pin { display: grid; gap: 6vh; }
.stage__left { display: grid; gap: 4vh; align-content: start; container-type: inline-size; }
/* "GAMSTER" mide ~5,7 em: con 15,5cqw ocupa casi toda su columna sin invadir la de la imagen */
.stage__title { font-size: clamp(2.6rem, min(15.5cqw, 15vh), 12rem); }
.stage__texts { display: grid; gap: 5vh; }
.stage__text { display: grid; gap: 10px; max-width: 460px; }
.stage__big { font-size: clamp(2.8rem, min(7vw, 11vh), 7.5rem); line-height: .88; }
.stage__big b { font-weight: 800; }
.stage__big span { opacity: .5; }
.stage__count { display: flex; gap: 24px; align-items: center; }
.stage__plates { display: grid; gap: 4vh; }
.stage__plate { aspect-ratio: 4/3; }
@media (min-width: 960px) {
  /* Sin animaciones (movimiento reducido) la escena no se fija: dos columnas con el margen lateral normal */
  .stage { padding: var(--sec-y) var(--edge); }
  .stage__pin { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gutter); }
  .stage:not(.is-pinned) .stage__pin { align-items: start; } /* fijada, la columna de imágenes necesita toda la altura */
  .stage.is-pinned { padding: 0; }
  .stage.is-pinned .stage__pin { height: 100vh; grid-template-columns: 1fr 1fr; padding: calc(var(--header-h) + 3vh) var(--edge) 7vh; gap: var(--gutter); }
  .stage.is-pinned .stage__left { grid-template-rows: auto auto 1fr auto; align-content: stretch; }
  .stage.is-pinned .stage__texts { position: relative; align-self: end; min-height: 40vh; display: block; }
  .stage.is-pinned .stage__text { position: absolute; left: 0; bottom: 0; right: 0; opacity: 0; }
  .stage.is-pinned .stage__text.is-first { opacity: 1; }
  .stage.is-pinned .stage__plates { position: relative; display: block; }
  .stage.is-pinned .stage__plate { position: absolute; inset: 0; aspect-ratio: auto; clip-path: inset(100% 0 0 0); }
  .stage.is-pinned .stage__plate.is-first { clip-path: inset(0); }
}

/* ---------- ÍNDICE con vista previa al pasar el cursor ---------- */
.index { padding: var(--sec-y) 0 0; }
.index__head { display: flex; justify-content: space-between; padding-bottom: 3vh; }
.index__row { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr) auto 4.5rem; align-items: baseline; gap: clamp(8px, 2vw, 32px); padding-block: clamp(14px, 2.2vw, 30px); border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent); transition: opacity .5s var(--ease-smooth); position: relative; }
.index__list li:last-child .index__row { border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.index__row .t { font-size: clamp(1.6rem, 8.2vw, 11rem); transition: transform .7s var(--ease-smooth), color .4s; display: block; line-height: .9; }
.index__row .m, .index__row .y { opacity: .6; text-align: right; }
.index__list:hover .index__row { opacity: .22; }
.index__list .index__row:hover, .index__list .index__row:focus-visible { opacity: 1; }
.index__row:hover .t { transform: translateX(clamp(8px, 1.6vw, 28px)); color: var(--red); }
.index__row .t { min-width: 0; }
/* Por debajo de escritorio la descripción no cabe junto al título: se oculta y quedan número, título y año */
@media (max-width: 1099px) { .index__row { grid-template-columns: 3.2rem minmax(0, 1fr) auto; } .index__row .m { display: none; } }
@media (max-width: 720px) { .index__row { grid-template-columns: 2.4rem minmax(0, 1fr) auto; } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; white-space: nowrap; padding-block: clamp(32px, 8vh, 90px); }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__track > span { font-size: clamp(3.6rem, 11vw, 13rem); line-height: .95; padding-right: .3em; flex: none; }
/* Texto solo con contorno: el relleno es transparente pero el color se conserva para el trazo
   (con color: transparent, currentColor también lo era y el texto desaparecía) */
.marquee--solid .marquee__track > span:not(.thin) { -webkit-text-fill-color: transparent; -webkit-text-stroke: 1px currentColor; }
.marquee--dark { padding-block: clamp(24px, 6vh, 70px); }

/* ---------- MÉTODO: scroll horizontal ---------- */
.process { padding: var(--sec-y) 0; }
.process__pin { display: grid; gap: 6vh; }
.process__head { display: flex; justify-content: space-between; width: 100%; }
.process__track { display: grid; gap: 14vh; padding-inline: var(--edge); }
.panel { position: relative; display: grid; gap: 2.4vh; align-content: center; max-width: 880px; container-type: inline-size; }
.panel h3 { font-size: clamp(2.2rem, 13cqw, 8.4rem); } /* "DISECCIONA" (~6,6 em) cabe siempre en su panel */
.panel__n { position: absolute; right: 0; top: -.12em; font-size: clamp(9rem, 38vw, 34rem); line-height: .8; opacity: .07; pointer-events: none; }
.panel .body-s { font-size: 1.02rem; max-width: 40ch; }
/* Sin scroll horizontal (móvil o sin animaciones): números contenidos en su panel y sin la pista "Sigue bajando" */
.process:not(.is-hscroll) .panel { padding-top: clamp(28px, 6vh, 64px); }
.process:not(.is-hscroll) .panel__n { top: 0; font-size: clamp(5.5rem, 24vw, 13rem); }
.process:not(.is-hscroll) .process__hint { display: none; }
@media (min-width: 960px) {
  .process:not(.is-hscroll) .process__track { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12vh var(--gutter); }
}
@media (min-width: 960px) {
  .process.is-hscroll { padding: 0; }
  .process.is-hscroll .process__pin { height: 100vh; padding-top: calc(var(--header-h) + 3vh); grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr); overflow: hidden; gap: 0; } /* la columna no crece con la pista horizontal */
  .process.is-hscroll .process__track { display: flex; width: max-content; gap: 8vw; align-items: center; height: 100%; padding-inline: var(--edge-vw) 24vw; }
  .process.is-hscroll .panel { width: min(70vw, 860px); flex: none; }
}

/* ---------- ANATOMÍA DE UN APK: vista explosionada por capas (sección insignia) ---------- */
.anatomy { padding: var(--sec-y) 0; }
.anatomy__pin { display: grid; gap: 6vh var(--gutter); }
.anatomy__head { display: grid; gap: 3vh; }
.anatomy__head h2 { font-size: clamp(2.4rem, 6.2vw, 7.4rem); }
.anatomy__scene { position: relative; height: clamp(300px, 60vw, 520px); perspective: 2000px; display: grid; place-items: center; }
/* Pila isométrica: cada capa se separa en Z según --spread (lo anima el scroll) */
.anatomy__stack { position: relative; width: min(74%, 500px); aspect-ratio: 1.3; transform-style: preserve-3d; transform: rotateX(58deg) rotateZ(var(--rz, -34deg)); --spread: 46px; }
/* La separación (Z) la mueve el scroll sin retardo; el desplazamiento de la capa activa (translate) sí se anima */
/* Al separarse, las capas suben en pantalla: la pila baja lo mismo para quedar centrada y no pisar el título */
.anatomy__stack { translate: 0 calc(var(--spread) * 2.3); }
@media (max-width: 959px) { .anatomy__stack { --spread: 30px; width: min(70%, 420px); } }
.layer { position: absolute; inset: 0; transform-style: preserve-3d; transform: translateZ(calc(var(--spread) * (5 - var(--i)))); translate: var(--shift, 0px) 0 0; transition: translate .7s var(--ease-smooth); }
.layer__face {
  position: absolute; inset: 0; display: flex; flex-direction: column-reverse; justify-content: space-between; padding: 5% 7%; /* el nombre va abajo: es el borde que queda visible bajo la capa superior */
  background-color: var(--surface); color: var(--on-surface); border: 1px solid var(--on-surface);
  background-image: repeating-linear-gradient(0deg, transparent 0 13px, color-mix(in srgb, var(--on-surface) 7%, transparent) 13px 14px);
  box-shadow: 0 40px 60px -40px rgb(11 11 12 / .45);
  transition: background-color .5s var(--ease-smooth), color .5s, border-color .5s, opacity .5s;
}
.layer__path { font: 600 clamp(.82rem, 1.5vw, 1.3rem)/1.1 var(--font-mono); letter-spacing: -.01em; }
.layer__files { font: 500 clamp(.57rem, .88vw, .73rem)/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; opacity: .62; }
.layer.is-on { --shift: 34px; }
.layer.is-on .layer__face { background-color: var(--red); color: var(--paper); border-color: var(--red); background-image: none; }
/* Las capas inactivas se apagan con el color del texto y del borde, nunca con transparencia (el rojo teñiría toda la pila) */
.anatomy.is-reading .layer:not(.is-on) .layer__face { color: color-mix(in srgb, var(--on-surface) 38%, var(--surface)); border-color: color-mix(in srgb, var(--on-surface) 30%, var(--surface)); }
.anatomy__file { position: absolute; left: 0; bottom: 0; opacity: .55; }
.anatomy__list { display: grid; gap: 0; }
.anatomy__item { display: grid; gap: 10px; padding-block: 22px; border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.anatomy__item h3 { font-size: clamp(1.6rem, 2.8vw, 3rem); }
.anatomy__item .body-s { max-width: 44ch; }
.anatomy__count { display: none; }
@media (min-width: 960px) {
  .anatomy__pin { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .anatomy__head { grid-column: 1 / 6; }
  .anatomy__scene { grid-column: 6 / 13; grid-row: 1 / span 2; }
  .anatomy__list { grid-column: 1 / 6; }
  /* Fijada: una sola capa explicada a la vez, con contador */
  .anatomy.is-pinned { padding: 0; }
  .anatomy.is-pinned .anatomy__pin { height: 100vh; padding-top: calc(var(--header-h) + 5vh); padding-bottom: 7vh; grid-template-rows: auto 1fr auto; align-content: stretch; }
  .anatomy.is-pinned .anatomy__scene { grid-row: 1 / span 3; height: auto; }
  .anatomy.is-pinned .anatomy__list { position: relative; align-self: end; min-height: 13rem; }
  /* La explicación saliente desaparece rápido y la entrante llega después: nunca se leen dos a la vez */
  .anatomy.is-pinned .anatomy__item { position: absolute; left: 0; right: 0; bottom: 0; border: 0; opacity: 0; transform: translateY(-14px); transition: opacity .2s linear, transform .3s var(--ease-smooth); pointer-events: none; }
  .anatomy.is-pinned .anatomy__item.is-on { opacity: 1; transform: none; pointer-events: auto; transition: opacity .45s var(--ease-smooth) .18s, transform .6s var(--ease-smooth) .18s; }
  .anatomy.is-pinned .anatomy__count { display: block; grid-column: 1 / 6; border-top: 1px solid currentColor; padding-top: 14px; }
  .anatomy.is-pinned .anatomy__stack { width: min(70%, 580px); } /* con la capa activa desplazada, sigue dentro del margen */
}

/* ---------- CIFRAS VERIFICABLES (leídas de la API, con contador) ---------- */
.proof { padding: var(--sec-y) 0; }
.proof__head { display: grid; gap: 3vh; margin-bottom: 9vh; }
.proof__head h2 { font-size: clamp(2.4rem, 6.2vw, 7.4rem); }
.proof__grid { display: grid; gap: 7vh var(--gutter); }
.proof__item { display: grid; gap: 12px; align-content: start; padding-top: 20px; border-top: 1px solid currentColor; }
.proof__n { font-size: clamp(4.2rem, 9.5vw, 10.5rem); line-height: .82; font-variant-numeric: tabular-nums; }
.proof__item .body-s { max-width: 30ch; }
.proof__src { opacity: .5; }
@media (min-width: 600px) { .proof__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .proof__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- CONTACTO (cierre) ---------- */
.contact { min-height: 100svh; display: grid; align-items: end; padding: var(--sec-y) 0 calc(var(--sec-y) * .5); }
.contact--page { padding-top: calc(var(--header-h) + 12vh); }
.contact__in { display: grid; gap: 7vh; width: 100%; }
/* Cada línea del cierre cabe entera: "y seguridad." es la más larga (antes la "Y" quedaba sola) */
.contact__title { font-size: clamp(2.1rem, 8.4vw, 12rem); } /* tope: "y seguridad." (~8 em) cabe en el ancho máximo */
.contact__title .line-mask > span { white-space: nowrap; }
.contact__grid { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.contact__mail { font-size: clamp(1.2rem, 5.2vw, 5.4rem); overflow-wrap: anywhere; letter-spacing: -.03em; text-transform: none; }
.contact__meta { display: grid; gap: 0; }
.contact__meta li { display: flex; flex-direction: column; gap: 8px; padding-block: 16px; border-top: 1px solid rgb(239 236 230 / .25); }
.contact__meta li > span:first-child { opacity: .55; }
@media (min-width: 960px) { .contact__meta { grid-template-columns: repeat(3, 1fr); column-gap: var(--gutter); } .contact__meta li { flex-direction: column; } }

/* ---------- CATÁLOGO ---------- */
.catalog { display: grid; gap: 14vh; padding-top: 4vh; }
.empty { opacity: .6; }
.proj { display: grid; gap: 4vh; position: relative; }
.proj__plate { aspect-ratio: 4/3; position: relative; }
.proj__plate .reveal { display: block; }
.proj__plate .reveal, .proj__plate .reveal__in, .proj__plate .plate { height: 100%; }
.proj__body { display: grid; gap: 22px; align-content: start; container-type: inline-size; }
.proj__n { display: flex; justify-content: space-between; }
.proj__name { font-size: clamp(1.9rem, 10.6cqw, 8rem); overflow-wrap: anywhere; }
.proj__meta { display: grid; }
.proj__meta .sep { padding-block: 10px; }
.proj__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.secb { display: inline-flex; align-items: center; gap: 14px; text-align: left; border-bottom: 1px solid currentColor; padding: 6px 0; font: 500 .79rem var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.secb b { color: var(--red); }
.proj[data-flash] .proj__plate { outline: 2px solid var(--red); outline-offset: 6px; }
@media (min-width: 960px) {
  .proj { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(12px, 1.6vw, 28px); align-items: end; }
  .proj--a .proj__plate { grid-column: 1 / 8; grid-row: 1; aspect-ratio: 5/4; }
  .proj--a .proj__body { grid-column: 8 / 13; grid-row: 1; padding-left: clamp(12px, 2vw, 36px); }
  .proj--b .proj__plate { grid-column: 5 / 10; grid-row: 1; aspect-ratio: 4/5; }
  .proj--b .proj__body { grid-column: 1 / 5; grid-row: 1; }
  .proj--c .proj__plate { grid-column: 1 / 13; grid-row: 1; aspect-ratio: 21/9; }
  .proj--c .proj__body { grid-column: 1 / 8; grid-row: 1; align-self: end; position: relative; z-index: 2; color: var(--paper); padding: 2vw; mix-blend-mode: normal; }
}
.catalog__more { padding-top: 12vh; opacity: .6; }

/* ---------- DETALLE DE PROYECTO ---------- */
.dt__head { padding-top: calc(var(--header-h) + 10vh); display: grid; grid-template-columns: minmax(0, 1fr); gap: 3vh; }
.dt__name { font-size: clamp(3rem, 11vw, 18rem); white-space: nowrap; }
.dt__facts { display: grid; gap: 0; }
.dt__facts .sep span:first-child { opacity: .55; }
.dt__plate { aspect-ratio: 16/9; margin-block: 6vh; position: relative; }
.dt__plate .reveal, .dt__plate .reveal__in, .dt__plate .plate { height: 100%; }
.dt__grid { display: grid; gap: 8vh var(--gutter); padding-block: 4vh 10vh; }
.dt__block { display: grid; gap: 18px; align-content: start; }
.dt__steps { counter-reset: s; display: grid; }
.dt__steps li { counter-increment: s; display: grid; grid-template-columns: 4rem 1fr; padding-block: 18px; border-top: 1px solid currentColor; align-items: baseline; }
.dt__steps li::before { content: "0" counter(s); font: 500 .79rem var(--font-mono); opacity: .6; }
.dt__sec { display: grid; gap: 14px; }
.dt__seal { display: flex; align-items: baseline; gap: 14px; }
.dt__seal b { font-size: clamp(3.4rem, 8vw, 8rem); line-height: .85; }
.dt__hash { font: 400 .74rem var(--font-mono); word-break: break-all; opacity: .7; border: 1px solid currentColor; padding: 12px; }
.dt__table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.dt__table td { padding: 9px 0; border-top: 1px solid currentColor; vertical-align: top; }
.dt__table td:first-child { opacity: .7; width: 44%; padding-right: 14px; }
.dt__next { display: block; padding-block: 10vh; border-top: 1px solid currentColor; position: relative; }
.dt__next .t { font-size: clamp(2.4rem, 11vw, 13rem); display: block; transition: transform .7s var(--ease-smooth); }
.dt__next:hover .t { transform: translateX(2vw); }
@media (min-width: 960px) {
  .dt__facts { grid-template-columns: repeat(4, 1fr); column-gap: var(--gutter); }
  .dt__facts .sep { flex-direction: column; border-top: 1px solid currentColor; }
  .dt__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .dt__about { grid-column: 1 / 7; } .dt__sec { grid-column: 8 / 13; } .dt__install { grid-column: 1 / 8; }
}

/* ---------- GUÍAS ---------- */
.guides { display: grid; gap: 0; padding-bottom: 10vh; }
.guide { display: grid; gap: 4vh; padding-top: 4vh; }
.guide__row { display: grid; grid-template-columns: minmax(70px, 18vw) 1fr; gap: clamp(12px, 3vw, 48px); align-items: start; padding-bottom: 6vh; }
.guide__n { font-size: clamp(4rem, 12.5vw, 14rem); /* "01" mide ~1,2 em: cabe en su columna de 18vw sin tocar el título */ line-height: .78; -webkit-text-fill-color: transparent; -webkit-text-stroke: 1px currentColor; opacity: .55; }
.guide h3 { margin-bottom: 16px; }
@media (min-width: 960px) { .guide--r { padding-left: 14vw; } }
/* En móvil el número va encima: a su lado no quedaba sitio para títulos largos como «Prácticas recomendadas» */
@media (max-width: 600px) { .guide__row { grid-template-columns: minmax(0, 1fr); gap: 18px; } .guide__n { font-size: 4.6rem; } }

/* ---------- COMUNIDAD ---------- */
.community__cta { display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; margin-top: 4vh; }
.community__cta .lead { max-width: 32ch; }
.community { display: grid; gap: 10vh; padding-top: 8vh; padding-bottom: 12vh; }
.community__grid { display: grid; gap: 6vh var(--gutter); }
.community__item { display: grid; gap: 16px; align-content: start; }
.community__item .rule { margin-bottom: 8px; }
.community__item h3 { font-size: clamp(1.7rem, 2.7vw, 3.2rem); line-height: .95; }
.community__item .micro { opacity: .6; }
.community__rules { display: grid; gap: 18px; padding-top: 4vh; border-top: 1px solid rgb(239 236 230 / .25); }
.community__rules ul { display: grid; gap: 10px; max-width: none; }
.community__rules li { position: relative; padding-left: 1.6em; }
.community__rules li::before { content: "—"; position: absolute; left: 0; color: var(--red); }
@media (min-width: 960px) {
  .community__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .community__rules { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
  .community__rules > .micro { grid-column: 1 / 4; }
  .community__rules ul { grid-column: 5 / 13; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); }
}
.posts { padding-top: 10vh; }
.posts__k { padding-bottom: 20px; }
.post { display: grid; gap: 10px; padding-block: 30px; border-top: 1px solid currentColor; }
.post time { opacity: .6; }
@media (min-width: 960px) { .post { grid-template-columns: 12rem 1fr 1fr; align-items: baseline; } }

/* ---------- FAQ ---------- */
.faq { display: grid; padding-bottom: 8vh; }
.faq__item { border-top: 1px solid currentColor; }
.faq__item:last-child { border-bottom: 1px solid currentColor; }
.faq__q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px; text-align: left; padding-block: clamp(18px, 2.6vw, 34px); transition: transform .6s var(--ease-smooth); }
.faq__q:hover { transform: translateX(1vw); }
.faq__ic { position: relative; width: 26px; height: 26px; flex: none; }
.faq__ic::before, .faq__ic::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: currentColor; transition: transform .6s var(--ease-expo); }
.faq__ic::after { transform: rotate(90deg); }
.faq__q[aria-expanded="true"] .faq__ic::after { transform: rotate(0); }
.faq__a { overflow: hidden; }
.faq__a p { padding-bottom: 30px; max-width: 60ch; }

/* ---------- Pie ---------- */
.foot { padding: 26px 0 64px; } /* el aire inferior deja sitio al indicador de progreso fijo */
.foot__in { border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent); padding-top: 22px; }
/* Sin animaciones la portada termina en el contacto oscuro: el pie lo continúa en vez de cortar a papel */
html:not(.has-motion):has(.page.is-active[data-page="inicio"]) .foot { background: var(--ink); color: var(--paper); }
.foot__in { display: flex; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; opacity: .75; }
.foot__legal { display: flex; gap: 10px 22px; flex-wrap: wrap; }
@media (max-width: 720px) { .foot__in { flex-direction: column; gap: 14px; } }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .hero__scrollline { animation: none; transform: none; }
}
