/* Confidencial · web de lista de espera. Marca «Código reservado». */
:root {
  --ink: #151F25;
  --ink-2: #1E2B33;
  --ink-3: #2A3A44;
  --coral: #ED644E;
  --coral-deep: #C8452F;
  --paper: #F5EFDF;
  --paper-2: #E9E0C9;
  --steel: #91A7AB;
  --steel-light: #B9C8CA;
  --text-dark: #1B252B;
  --muted-dark: #4E5C62;
  --error: #B3261E;

  --display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --body: "Archivo", Arial, sans-serif;
  --typed: "Courier Prime", "Courier New", monospace;

  --gutter: clamp(16px, 5vw, 64px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-variation-settings: "wdth" 100;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a { color: inherit; }

:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 4px; }

/* ── Cabecera ─────────────────────────────────────────── */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
  max-width: 1240px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 900;
  font-variation-settings: "wdth" 112;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.top-cta {
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 10px 18px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--steel);
  border-radius: 999px;
  color: var(--paper);
  transition: background-color .2s, border-color .2s, color .2s;
}
.top-cta:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ── Portada ──────────────────────────────────────────── */
.hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(24px, 6vw, 72px) var(--gutter) clamp(32px, 6vw, 80px);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}

h1 {
  margin: 0 0 28px;
  font-family: var(--display);
  font-weight: 900;
  font-variation-settings: "wdth" 70;
  font-size: clamp(2.4rem, 5.1vw, 5rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

h1 .line { display: block; }

/* El titular llega tachado como un documento clasificado y se desclasifica una sola vez. */
.redacted .word {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  padding: 0 0.04em;
}
.redacted .word::after {
  content: "";
  position: absolute;
  left: -0.04em;
  right: -0.04em;
  top: -0.08em;
  bottom: 0;
  background: #05090B;
  transform-origin: right center;
  animation: declassify .55s cubic-bezier(.7, 0, .2, 1) forwards;
}
.redacted .line:nth-child(1) .word::after { animation-delay: .45s; }
.redacted .line:nth-child(2) .word::after { animation-delay: .8s; }
.redacted .line:nth-child(3) .word::after { animation-delay: 1.15s; background: var(--coral); }
.redacted .line:nth-child(3) .word { color: var(--coral); }

@keyframes declassify {
  to { transform: scaleX(0); }
}

.lede {
  margin: 0;
  max-width: 34em;
  color: var(--steel-light);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
}

/* Los cuatro sobres, abanicados como una mano de cartas */
.contents-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.packs {
  position: relative;
  aspect-ratio: 16 / 10;
  width: min(380px, 48%);
  flex: none;
  margin-bottom: -12px;
}
.pack {
  position: absolute;
  width: 40%;
  left: 30%;
  top: 6%;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .45));
  transform-origin: 50% 110%;
}
.p1 { transform: rotate(-21deg) translateX(-14%); }
.p2 { transform: rotate(-7deg) translateX(-4%); }
.p3 { transform: rotate(7deg) translateX(4%); }
.p4 { transform: rotate(21deg) translateX(14%); }

/* ── Ficha ────────────────────────────────────────────── */
.ficha-wrap {
  display: flex;
  justify-content: center;
  scroll-margin-top: 24px;
}

.ficha {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--paper);
  color: var(--text-dark);
  border-radius: 6px 6px 10px 10px;
  padding: clamp(24px, 5vw, 44px);
  box-shadow: 0 1px 0 #fff inset, 0 30px 60px -20px rgba(0, 0, 0, .6);
  overflow: hidden;
}
/* Pestaña de carpeta y franja de expediente */
.ficha::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: repeating-linear-gradient(135deg, var(--coral) 0 14px, var(--ink) 14px 28px);
}

.ficha-head h2 {
  margin: 8px 0 4px;
  font-family: var(--display);
  font-weight: 900;
  font-variation-settings: "wdth" 80;
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  line-height: 1.05;
  text-transform: uppercase;
}
.ficha-head p { margin: 0 0 24px; color: var(--muted-dark); }

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  min-height: 48px;
  font-family: var(--typed);
  font-size: 1.15rem;
  color: var(--text-dark);
  background: rgba(255, 255, 255, .55);
  border: 0;
  border-bottom: 2px solid var(--muted-dark);
  border-radius: 4px 4px 0 0;
  padding: 10px 12px;
  transition: border-color .2s, background-color .2s;
}
.field input:hover { background: rgba(255, 255, 255, .8); }
.field input:focus { outline: none; border-bottom-color: var(--coral-deep); background: #fff; box-shadow: 0 0 0 3px rgba(237, 100, 78, .25); }
.field input[aria-invalid="true"] { border-bottom-color: var(--error); }

.field-error {
  margin: 6px 0 0;
  color: var(--error);
  font-size: 0.9rem;
  font-weight: 600;
}

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 6px 0 4px;
  font-size: 0.95rem;
  color: var(--muted-dark);
  cursor: pointer;
}
.consent input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--coral-deep);
  cursor: pointer;
}

.stamp-btn {
  margin-top: 22px;
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  font-weight: 800;
  font-variation-settings: "wdth" 100;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color .2s, transform .1s;
}
.stamp-btn:hover { background: var(--coral-deep); }
.stamp-btn:active { transform: translateY(1px); }
.stamp-btn[disabled] { cursor: progress; opacity: .7; }

.form-status { min-height: 1.6em; margin: 12px 0 0; font-weight: 600; }
.form-status.is-error { color: var(--error); }
.form-status.is-ok { color: var(--text-dark); }

/* Sello de goma al apuntarse */
.sello {
  position: absolute;
  right: clamp(12px, 5vw, 36px);
  top: clamp(40px, 9vw, 64px);
  padding: 6px 16px;
  border: 4px solid var(--coral-deep);
  border-radius: 8px;
  color: var(--coral-deep);
  font-family: var(--display);
  font-weight: 900;
  font-variation-settings: "wdth" 75;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0;
  transform: rotate(-12deg) scale(1.8);
  pointer-events: none;
  mix-blend-mode: multiply;
}
.ficha.is-done .sello { animation: stamp .35s cubic-bezier(.3, 1.4, .5, 1) forwards; }
@keyframes stamp {
  to { opacity: .9; transform: rotate(-12deg) scale(1); }
}
.ficha.is-done .field,
.ficha.is-done .consent,
.ficha.is-done .stamp-btn { display: none; }

/* ── Qué hay dentro ───────────────────────────────────── */
.contents {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(56px, 9vw, 110px);
}
.contents h2 {
  margin: 0 0 20px;
  font-family: var(--display);
  font-weight: 900;
  font-variation-settings: "wdth" 80;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  text-transform: uppercase;
}
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--ink-3);
  padding-top: 28px;
}
.facts article p { margin: 0; color: var(--steel-light); max-width: 30em; }
.fact-figure {
  font-family: var(--display);
  font-weight: 900;
  font-variation-settings: "wdth" 62;
  font-size: clamp(3.2rem, 7vw, 4.6rem);
  line-height: 1;
  color: var(--paper) !important;
}
.facts h3 { margin: 4px 0 10px; font-size: 1.15rem; font-weight: 700; color: var(--coral); }

/* ── Pie ──────────────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--ink-3);
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  color: var(--steel);
  font-size: 0.92rem;
}
.foot p { margin: 0 0 8px; max-width: 70ch; }

/* ── Móvil ────────────────────────────────────────────── */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  h1 { font-size: min(11vw, 4.4rem); }
  .contents-head { flex-direction: column; align-items: flex-start; }
  .packs { width: min(340px, 100%); align-self: center; margin: 0 0 8px; }
  .facts { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .redacted .word::after { display: none; }
  .ficha.is-done .sello { animation: none; opacity: .9; transform: rotate(-12deg); }
  * { transition: none !important; }
}

/* Al apuntarse, el sello ocupa el sitio del formulario en vez de tapar el texto. */
.ficha.is-done .ficha-head p { display: none; }
.ficha.is-done .sello { position: static; display: inline-block; margin: 20px 0 4px 6px; }
