/* =============================================================
   POLYFORMA — Arquetipo 07 Brutalist Grid (versión plano técnico)
   Sin esquinas redondeadas, sin sombras, sin degradados.
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:    #ffffff;
  --fg:    #0b1b33;         /* tinta azul marino */
  --ink:   #0b1b33;
  --blue:  #00509c;         /* azul del logotipo, único color primario */
  --muted: #56657d;
  --line:  #0b1b33;         /* las líneas de la retícula */

  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --sans:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, Consolas, "Courier New", monospace;

  --nav-h: 64px;
  --pad: clamp(1.1rem, 2.4vw, 2rem);

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Secciones invertidas: reescriben los tokens, los componentes se adaptan solos */
.section-ink  { --bg: #0b1b33; --fg: #ffffff; --line: #2b4674; --muted: #9fb0cc; }
.section-blue { --bg: #00509c; --fg: #ffffff; --line: #4d8ac4; --muted: #cfe0f0; }

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; line-height: 1; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.section-blue :focus-visible { outline-color: #fff; }

/* =============================================================
   3. Utilities
   ============================================================= */
.mono { font-family: var(--mono); }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--blue); color: #fff; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* Retícula de 12 columnas: el gap de 1px deja ver el fondo = las líneas */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}
.cell {
  grid-column: 1 / -1;
  background: var(--bg);
  color: var(--fg);
  padding: var(--pad);
  min-width: 0;
}

/* =============================================================
   4. Tipografía
   ============================================================= */
.kicker {
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.1rem, 5.2vw, 4.6rem);
  line-height: .98;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
/* El límite de ancho va en el texto, no en la celda:
   si se pone en la celda, ésta se encoge y se ve el fondo de la retícula. */
.section-title > span { display: block; max-width: 20ch; }
.index {
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
}
.section-ink .index, .section-blue .index { color: var(--fg); }

/* =============================================================
   5. Componentes
   ============================================================= */

/* Botones: inversión instantánea al pasar el mouse (firma del arquetipo) */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px;
  padding: .8rem 1.4rem;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid var(--fg);
}
.btn-solid { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-solid:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn-line:hover  { background: var(--fg); color: var(--bg); }
.section-blue .btn-solid { background: #fff; border-color: #fff; color: var(--blue); }
.section-blue .btn-solid:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Duotono azul: unifica fotos de origen distinto; a color al pasar el mouse */
.duo {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: var(--blue);
  aspect-ratio: 4 / 3;
}
/* Cuando la foto debe llenar el alto de su celda, el aspect-ratio sobra:
   si se deja, el ancho se calcula a partir del alto y la imagen invade la celda vecina. */
.plant-figure .duo, .lab-figure .duo { aspect-ratio: auto; height: 100%; min-height: 260px; }
.duo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(.95) brightness(1.75);
  mix-blend-mode: multiply;
}
.duo:hover img { filter: none; mix-blend-mode: normal; }
/* Fotos de fondo claro (las tarimas): con el brillo general se lavaban */
.duo-claro img { filter: grayscale(1) contrast(1.1) brightness(1.12); }

/* Barra de progreso de lectura */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120;
  background: var(--blue);
  transform: scaleX(0); transform-origin: 0 50%;
}

/* ----- Navegación ----- */
.nav {
  position: sticky; top: 0; z-index: 100;
  /* Fila flexible: con retícula de 2 columnas el botón de menú caía bajo el logo */
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.brand {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: .7rem;
  padding-inline: var(--pad);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: .04em;
}
.brand-mark { height: 44px; width: auto; }
.nav-cta { display: none; }
.menu-toggle {
  flex: 0 0 auto;
  width: var(--nav-h);
  border-left: 1px solid var(--line);
  display: grid; place-items: center;
}
.menu-bars, .menu-bars::before, .menu-bars::after {
  display: block; width: 22px; height: 2px; background: var(--fg);
  transition: transform .3s var(--ease-out), background .2s;
}
.menu-bars { position: relative; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -7px; }
.menu-bars::after  { top: 7px; }
.menu-open .menu-bars { background: transparent; }
.menu-open .menu-bars::before { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-bars::after  { transform: translateY(-7px) rotate(-45deg); }

/* Menú móvil: pantalla completa, oculto hasta abrirse */
.nav-links {
  position: fixed; inset: var(--nav-h) 0 0 0;
  display: flex; flex-direction: column;
  background: var(--ink);
  visibility: hidden;
  transform: translateY(-8px);
  opacity: 0;
  transition: opacity .25s var(--ease-out), transform .35s var(--ease-out), visibility 0s .35s;
}
.menu-open .nav-links {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity .25s var(--ease-out), transform .35s var(--ease-out), visibility 0s;
}
.nav-links a {
  display: flex; align-items: baseline; gap: 1rem;
  padding: 1.1rem var(--pad);
  border-bottom: 1px solid #2b4674;
  color: #fff;
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 600;
  text-transform: uppercase;
}
.nav-links a .mono { font-size: .8rem; color: #8fbde8; }
.nav-links a:hover, .nav-links a.is-active { background: var(--blue); }
.nav-links a:hover .mono, .nav-links a.is-active .mono { color: #fff; }

/* ----- Formulario ----- */
.quote-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: .75rem .9rem;
  background: transparent;
  border: 1px solid var(--fg);
  border-radius: 0;
  color: var(--fg);
  font-family: var(--sans);
}
.field textarea { resize: vertical; min-height: 120px; }
.field select option { color: #0b1b33; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  background: #fff;
  color: var(--ink);
}
.field input[aria-invalid="true"] { border-width: 2px; border-color: #ffd23f; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; }
.submit .submit-spinner {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0;
}
.submit .submit-spinner::after {
  content: ""; width: 16px; height: 16px;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .8s linear infinite;
}
.is-sending .submit-label { opacity: 0; }
.is-sending .submit-spinner { opacity: 1; }
.form-note { font-size: .78rem; }

/* =============================================================
   6. Secciones
   ============================================================= */

/* ----- Splash (solo existe si hay JS) ----- */
.splash { display: none; }
.js .splash {
  position: fixed; inset: 0; z-index: 500;
  display: grid; place-items: center;
  background: var(--ink); color: #fff;
  transition: transform .8s var(--ease-in);
  /* Red de seguridad: se oculta sola a los 4.5 s aunque falle el JS */
  animation: splashSafety .01s 4.5s forwards;
}
.js .splash.is-out { transform: translateY(-100%); pointer-events: none; }
@keyframes splashSafety { to { opacity: 0; visibility: hidden; pointer-events: none; } }
.splash-inner { display: grid; gap: 1rem; width: min(80vw, 520px); }
.splash-draw { position: relative; display: block; width: fit-content; }
.splash-mark {
  display: block;
  height: clamp(96px, 19vw, 150px); width: auto;
  /* Se revela por franjas, como si una pluma lo fuera trazando */
  clip-path: inset(0 100% 0 0);
  animation: dibujar 2.6s cubic-bezier(.62, .04, .35, 1) infinite;
}
.splash-pen {
  position: absolute; top: -6%; bottom: -6%; left: 0;
  width: 2px; background: #fff;
  animation: pluma 2.6s cubic-bezier(.62, .04, .35, 1) infinite;
}
@keyframes dibujar {
  0%   { clip-path: inset(0 100% 0 0); opacity: 1; }
  58%  { clip-path: inset(0 0 0 0);    opacity: 1; }
  90%  { clip-path: inset(0 0 0 0);    opacity: 1; }
  100% { clip-path: inset(0 0 0 0);    opacity: 0; }
}
@keyframes pluma {
  0%   { left: 0;    opacity: 1; }
  58%  { left: 100%; opacity: 1; }
  66%  { left: 100%; opacity: 0; }
  100% { left: 100%; opacity: 0; }
}
.splash-brand {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(3rem, 12vw, 6.5rem); line-height: .9; letter-spacing: .02em;
}
.splash-bar { display: block; height: 2px; background: #2b4674; }
.splash-bar span {
  display: block; height: 100%; background: var(--blue);
  transform-origin: 0 50%;
  animation: splashBar 1.1s var(--ease-soft) forwards;
}
@keyframes splashBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.splash-num { font-size: .8rem; letter-spacing: .1em; color: #9fb0cc; justify-self: end; }

/* ----- Hero ----- */
.hero { border-bottom: 1px solid var(--line); }
.ruler {
  height: 14px;
  border-bottom: 1px solid var(--line);
  /* marcas de escala: menores cada 10 px y mayores cada 100 px */
  background-image:
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 10px),
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 100px);
  background-size: 100% 5px, 100% 13px;
  background-repeat: no-repeat;
  background-position: 0 100%, 0 100%;
}
.hero-copy { display: flex; flex-direction: column; gap: 1.6rem; padding-block: clamp(2rem, 6vw, 4.5rem); }
.hero-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3.3rem, 9.4vw, 9.2rem);
  line-height: .9;
  letter-spacing: -.01em;
  text-transform: uppercase;
  max-width: 12ch;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .02em; }
.hero-title .line > span { display: inline-block; }
.line-accent { color: var(--blue); }
.lead { max-width: 46ch; font-size: clamp(1rem, 1.3vw, 1.15rem); color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.hero-figure { display: flex; flex-direction: column; padding: 0; }
.hero-media { aspect-ratio: 4 / 3; flex: 1 1 auto; }
.hero-media img { height: 118%; }
.spec { border-top: 1px solid var(--line); }
.spec dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.spec dl > div { padding: .9rem var(--pad); border-left: 1px solid var(--line); }
.spec dl > div:first-child { border-left: 0; }
.spec dt { font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.spec dd { font-size: .85rem; font-weight: 500; }

.stats { border-top: 1px solid var(--line); border-bottom: 0; }
.stat { display: flex; flex-direction: column; gap: .3rem; }
.stat-num {
  font-size: clamp(2.4rem, 4.6vw, 3.8rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.stat-num small, .recycle-num small { font-size: .45em; margin-left: .15em; letter-spacing: 0; }
.stat-label { font-size: .9rem; color: var(--muted); }
.stat-title {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: clamp(1.5rem, 2.1vw, 1.9rem); line-height: 1; letter-spacing: -.01em;
  color: var(--blue);
}

/* ----- Marquee ----- */
.marquee {
  display: flex;
  overflow: hidden;
  background: var(--blue);
  color: #fff;
  border-bottom: 1px solid var(--line);
}
.marquee-track {
  display: inline-flex; flex: none; align-items: center; gap: 2.4rem;
  padding: 1rem 2.4rem 1rem 0;
  white-space: nowrap;
  will-change: transform;
  font-family: var(--display);
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  font-weight: 700;
  line-height: 1;
}
.marquee-track i { font-style: normal; font-size: .35em; opacity: .7; }

/* ----- Secciones genéricas ----- */
.section { background: var(--bg); color: var(--fg); }
.section-head .cell { padding-block: clamp(2rem, 5vw, 4rem); }
.section-head .index { padding-bottom: 0; }

/* ----- 01 Procesos ----- */
.process { display: flex; flex-direction: column; gap: .9rem; }
.process-media { margin: calc(var(--pad) * -1) calc(var(--pad) * -1) .4rem; }
.process-num { font-size: .75rem; color: var(--blue); }
.process h3 {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
}
.process > p:not(.process-num) { color: var(--muted); font-size: .95rem; }
.specs { margin-top: auto; border-top: 1px solid var(--line); font-size: .78rem; }
.specs li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .55rem 0; border-bottom: 1px solid var(--line);
}
.specs span { color: var(--muted); }
.specs b { font-weight: 500; text-align: right; }

/* ----- Visor 3D de la tarima de plástico ----- */
.pallet-copy { display: flex; flex-direction: column; gap: 1rem; justify-content: center; }
.pallet-copy h3 {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
}
.pallet-copy > p:not(.kicker):not(.pista) { color: var(--muted); }
.pista { font-size: .72rem; color: var(--muted); letter-spacing: .04em; }
.pallet-visor {
  position: relative;
  min-height: clamp(320px, 40vw, 520px);
  padding: 0;
  touch-action: pan-y;            /* el arrastre gira el modelo sin bloquear el scroll */
  cursor: grab;
}
.pallet-visor.arrastrando { cursor: grabbing; }
.pallet-visor canvas { display: block; width: 100%; height: 100%; }
.pallet-aviso {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: .75rem; color: var(--muted);
}
/* display:grid le gana al hidden del navegador, hay que apagarlo a mano */
.pallet-aviso[hidden] { display: none; }

/* ----- 02 Materiales ----- */
.materials-figure { display: flex; flex-direction: column; gap: 1rem; }
.materials-figure .duo { aspect-ratio: 1 / 1; }
.materials-figure figcaption { font-size: .78rem; color: var(--muted); }
.table-cell { padding: 0; }
.table-wrap { overflow-x: auto; }
.materials {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: .85rem;
}
.materials th, .materials td {
  text-align: left;
  padding: .95rem var(--pad);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.materials thead th {
  font-size: .68rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.materials tbody th { font-weight: 500; color: #8fbde8; width: 5.5rem; }
.materials td:last-child, .materials thead th:last-child { text-align: right; }
.materials tbody tr:hover { background: var(--blue); }
.materials tbody tr:hover th { color: #fff; }

/* ----- 03 Industrias: filas que se invierten ----- */
.industries { border-bottom: 1px solid var(--line); }
.industries li {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: .3rem 1rem;
  align-items: baseline;
  padding: 1.3rem var(--pad);
  border-top: 1px solid var(--line);
}
.industries li:first-child { border-top: 0; }
.industries span { font-size: .75rem; color: var(--blue); grid-row: span 2; }
.industries strong {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: clamp(1.9rem, 4.4vw, 3.6rem); line-height: 1;
}
.industries em { font-style: normal; color: var(--muted); font-size: .95rem; }
.industries li:hover { background: var(--ink); color: #fff; }
.industries li:hover span { color: #8fbde8; }
.industries li:hover em { color: #9fb0cc; }

/* ----- 04 Planta ----- */
.plant-figure { padding: 0; }
.plant-figure .duo { min-height: 320px; }
.plant-copy { display: flex; flex-direction: column; gap: 1.5rem; justify-content: space-between; }
.plant-copy > p { font-size: clamp(1.05rem, 1.4vw, 1.25rem); }
.checklist { border-top: 1px solid var(--line); font-size: .82rem; }
.checklist li { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.checklist li::before { content: "■"; color: var(--blue); margin-right: .7rem; font-size: .7em; }

.steps-head { border-top: 1px solid var(--line); }
.steps-head .cell { padding-block: 1rem; }
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}
.steps li { background: var(--bg); padding: var(--pad); display: grid; gap: .6rem; align-content: start; }
.steps span {
  font-size: clamp(2.2rem, 3.6vw, 3rem); line-height: 1; color: var(--blue); letter-spacing: -.03em;
}
.steps h3 { font-family: var(--display); font-weight: 600; text-transform: uppercase; font-size: 1.5rem; }
.steps p { color: var(--muted); font-size: .92rem; }

.lab-figure { padding: 0; }

.lab-copy { display: flex; flex-direction: column; gap: 1rem; }
.lab-copy h3 {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
}
.lab-copy > p:last-child { color: var(--muted); }
.recycle { background: var(--ink); color: #fff; display: flex; flex-direction: column; gap: .8rem; }
.recycle .kicker { color: #9fb0cc; }
.recycle-num {
  font-size: clamp(3.2rem, 6vw, 5rem); line-height: 1; letter-spacing: -.04em; color: #8fbde8;
  font-variant-numeric: tabular-nums;
}
.recycle > p:not(.kicker):not(.recycle-num) { color: #c9d3e6; }
.recycle-media { margin: .6rem calc(var(--pad) * -1) calc(var(--pad) * -1); aspect-ratio: 16 / 9; }

/* ----- Nota bajo la tabla de materiales y aviso previo a comprar ----- */
.table-note {
  padding: 1rem var(--pad) var(--pad);
  font-size: .78rem;
  color: var(--muted);
  max-width: 90ch;
}
.note-cell { display: grid; gap: .6rem; }
.note-cell > p:last-child { max-width: 80ch; color: var(--muted); }

/* ----- Correo como único canal de contacto ----- */
.mail-cell { display: flex; flex-direction: column; gap: 1.2rem; align-items: flex-start; justify-content: center; }
.mail-big {
  font-family: var(--display);
  font-weight: 600;
  text-transform: lowercase;
  font-size: clamp(1.6rem, 4.2vw, 3.4rem);
  line-height: 1;
  letter-spacing: -.01em;
  border-bottom: 2px solid currentColor;
  word-break: break-word;
}
.mail-big:hover { background: #fff; color: var(--blue); }
.mail-aside { display: flex; flex-direction: column; gap: 1rem; }
.mail-aside .checklist { border-top-color: currentColor; }

/* ----- 05 Contacto ----- */
.contact-info dl { display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact-info dl > div { padding: 1rem 0; border-bottom: 1px solid var(--line); display: grid; gap: .3rem; }
.contact-info dt { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.contact-info dd { font-size: .95rem; }
.contact-info a { border-bottom: 1px solid currentColor; }
.contact-info a:hover { background: #fff; color: var(--blue); }

/* ----- Footer ----- */
.footer { --bg: #0b1b33; --fg: #fff; --line: #2b4674; --muted: #9fb0cc; background: var(--bg); color: var(--fg); }
.footer .grid-12 { border-bottom: 0; }
.footer-mark { height: 104px; width: auto; margin-bottom: 1.2rem; }
.footer-logo { font-family: var(--display); font-weight: 700; font-size: 2.4rem; line-height: 1; margin-bottom: .6rem; }
.footer-brand .mono, .footer-credits p { font-size: .75rem; color: var(--muted); }
.footer-nav { display: flex; flex-direction: column; font-size: .8rem; }
.footer-nav a { padding: .35rem 0; }
.footer-nav a:hover { background: #fff; color: var(--ink); }
.footer-credits { display: flex; flex-direction: column; gap: 1rem; font-size: .75rem; }
.footer-credits summary { cursor: pointer; text-transform: uppercase; letter-spacing: .08em; }
.credits-list { margin-top: .8rem; display: grid; gap: .45rem; color: var(--muted); }
.credits-list a { border-bottom: 1px solid currentColor; }


/* =============================================================
   7. Efectos
   ============================================================= */

/* Titular del hero: cada línea sube desde abajo (CSS puro, funciona sin JS) */
:root { --hero-base: .1s; }
.js { --hero-base: 1.05s; }  /* espera a que salga el splash */
.hero-title .line > span { animation: lineUp 1s var(--ease-out) both; animation-delay: calc(var(--hero-base) + var(--d, 0s)); }
.hero-title .line:nth-child(2) > span { --d: .09s; }
.hero-title .line:nth-child(3) > span { --d: .18s; }
.hero-title .line:nth-child(4) > span { --d: .27s; }
@keyframes lineUp { from { transform: translateY(105%); } to { transform: none; } }

/* Aparición al hacer scroll.
   Se anima el CONTENIDO, nunca la celda: si la celda se hiciera transparente
   se vería el fondo de la retícula y parecería una mancha oscura. */
.js [data-reveal] > * {
  opacity: 0; transform: translateY(26px);
  transition: opacity .7s var(--ease-soft), transform .7s var(--ease-soft);
  transition-delay: calc(var(--i, 0) * 90ms + var(--j, 0s));
}
.js [data-reveal].is-revealed > * { opacity: 1; transform: none; }
.js [data-reveal] > *:nth-child(2) { --j: .05s; }
.js [data-reveal] > *:nth-child(3) { --j: .10s; }
.js [data-reveal] > *:nth-child(4) { --j: .15s; }
.js [data-reveal] > *:nth-child(5) { --j: .20s; }
/* Defensa obligatoria: un elemento con split nunca queda invisible */
.reveal[data-split] { opacity: 1; transform: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================================
   8. Responsive (mobile-first)
   ============================================================= */
@media (min-width: 540px) {
  .quote-form { grid-template-columns: 1fr 1fr; }
  .field-wide { grid-column: 1 / -1; }
}

@media (min-width: 720px) {
  .span-3, .span-4, .span-6 { grid-column: span 6; }
  .stats .span-3 { grid-column: span 6; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .industries li { grid-template-columns: 5rem 1fr minmax(0, 22rem); }
  .industries span { grid-row: auto; }
  .industries em { text-align: right; }
}

@media (min-width: 960px) {
  :root { --nav-h: 72px; }
  .span-3 { grid-column: span 3; }
  .span-4 { grid-column: span 4; }
  .span-5 { grid-column: span 5; }
  .span-6 { grid-column: span 6; }
  .span-7 { grid-column: span 7; }
  .span-8 { grid-column: span 8; }
  .span-9 { grid-column: span 9; }
  .stats .span-3 { grid-column: span 3; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .hero-media { aspect-ratio: auto; min-height: 420px; }

  /* Navegación de escritorio: enlaces en línea separados por reglas */
  .nav-menu { flex: 1 1 auto; }
  .brand { border-right: 1px solid var(--line); }
  .menu-toggle { display: none; }
  .nav-cta { display: inline-flex; height: 100%; min-width: 9rem; border-width: 0 0 0 1px; }
  .nav-menu { display: flex; justify-content: flex-end; }
  .nav-links {
    position: static; flex-direction: row;
    visibility: visible; opacity: 1; transform: none;
    background: transparent;
  }
  .nav-links li { display: flex; }
  .nav-links a {
    align-items: center; gap: .45rem;
    padding: 0 .85rem;
    border-bottom: 0; border-left: 1px solid var(--line);
    color: var(--fg);
    font-family: var(--sans); font-size: .86rem; font-weight: 500; text-transform: none; white-space: nowrap;
  }
  .nav-links a .mono { font-size: .7rem; color: var(--blue); }
  .nav-links a:hover, .nav-links a.is-active { background: var(--ink); color: #fff; }
  .nav-links a:hover .mono, .nav-links a.is-active .mono { color: #8fbde8; }
}

@media (min-width: 1280px) {
  :root { --pad: 2.2rem; }
}

/* =============================================================
   9. Movimiento reducido — solo lo intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Bucle corto: es de los pocos efectos que sí conviene apagar */
  .splash-mark { animation: none; clip-path: none; }
  .splash-pen { display: none; }
}
