/*
 * The Final Ark.
 *
 * Una oficina de registro para un futuro que no ha llegado: noche, ámbar de
 * baliza y papel para los documentos. Cada sección de la portada tiene su propio
 * color de fondo, para que se lea como una sucesión de lugares y no como una
 * página larga del mismo negro.
 *
 * Tipografías: Instrument Serif para los titulares (con su cursiva para las
 * palabras que importan), Inter Tight para leer y IBM Plex Mono para etiquetas,
 * cifras e identificadores.
 */

/* --- Tipografías ------------------------------------------------------------- */

@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/InstrumentSerif-Regular.woff") format("woff");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
  font-display: swap;
}
/* Las letras latinas extendidas (Ł, Ż, ő…), solo si un nombre las necesita. */
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/InstrumentSerif-Regular.ttf") format("truetype");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  src: url("/fonts/InstrumentSerif-Italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  src: url("/fonts/InstrumentSerif-Italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  font-weight: 400 600;
  src: url("/fonts/InterTight-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  font-weight: 400 600;
  src: url("/fonts/InterTight-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-SemiBold.woff") format("woff");
  font-weight: 600;
  font-display: swap;
}

/* --- Sistema ------------------------------------------------------------------ */

:root {
  /* Papel crema, tinta azul marino, madera y el rojo del tejado del Arca. */
  --night: #fbf6ec;
  --hull: #ffffff;
  --hull-2: #f4ead8;
  --line: rgb(27 43 72 / 0.12);
  --line-strong: rgb(27 43 72 / 0.22);
  --bone: #1b2b48;
  --bone-2: rgb(27 43 72 / 0.78);
  --dim: rgb(27 43 72 / 0.6);
  --amber: #e0573a;
  --amber-deep: #b8432a;
  --on-accent: #ffffff;
  --ink: #1b2b48;
  --paper: #f3eee2;
  --paper-2: #e8e0cd;
  --rust: #c23b2a;
  --wood: #b8693a;
  --sky: #5aa6ea;
  --sea: #2f74d0;

  --display: "Instrument Serif", Georgia, serif;
  --text: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 76rem;
  --header: 4.5rem;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);

  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header);
}

body {
  margin: 0;
  overflow-x: clip;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--night);
  color: var(--bone);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

::selection {
  background: var(--amber);
  color: #fff;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--amber);
  color: #fff;
  font-weight: 600;
}
.skip:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- Piezas ------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber-deep);
}
.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: currentColor;
}

/* Número de sección: "01" en cursiva, como en un expediente. */
.section-number {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--amber);
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.display {
  font-family: var(--display);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.01em;
  /* Palabras largas ("PERSONENERFASSUNG") se parten en vez de desbordar. */
  overflow-wrap: break-word;
  hyphens: auto;
}
.display em {
  font-style: italic;
  color: var(--amber-deep);
}

.h1 {
  font-size: clamp(3.2rem, 11vw, 9.5rem);
}
.h2 {
  font-size: clamp(2.5rem, 6.2vw, 5.4rem);
}
.h3 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1.1;
}

.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.32rem);
  line-height: 1.55;
  color: var(--bone-2);
  max-width: 38rem;
}

.muted {
  color: var(--dim);
}
.small {
  font-size: 0.9rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3.4rem;
  padding: 0.9rem 1.7rem;
  border: 0;
  border-radius: 999px;
  background: var(--amber);
  color: var(--on-accent);
  font-family: var(--text);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 40px -12px rgb(224 87 58 / 0.6);
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background 0.2s;
}
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 50px -12px rgb(224 87 58 / 0.75);
}
.button:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}
.button .price {
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: rgb(27 43 72 / 0.14);
  font-family: var(--mono);
  font-size: 0.85rem;
}
.button--ghost {
  background: transparent;
  color: var(--bone);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.button--ghost:hover {
  border-color: var(--bone);
  box-shadow: none;
}
.button--ink {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 40px -14px rgb(27 43 72 / 0.5);
}
.button--block {
  width: 100%;
}
.button .arrow {
  transition: transform 0.25s var(--ease);
}
.button:hover .arrow {
  transform: translateX(4px);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.link-button:hover {
  color: var(--bone);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgb(255 255 255 / 0.55);
  backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--bone-2);
}
.pill .live {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #2fa866;
  box-shadow: 0 0 0 0 rgb(47 168 102 / 0.6);
  animation: live 2.4s infinite;
}
@keyframes live {
  70% {
    box-shadow: 0 0 0 0.6rem rgb(47 168 102 / 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgb(47 168 102 / 0);
  }
}

.notice {
  padding: 0.95rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgb(224 87 58 / 0.35);
  background: rgb(224 87 58 / 0.08);
  font-size: 0.98rem;
}
.notice--error {
  border-color: rgb(194 59 42 / 0.5);
  background: rgb(194 59 42 / 0.12);
}

/* --- Cabecera ------------------------------------------------------------------ */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header);
  transition:
    background 0.3s,
    border-color 0.3s;
  border-bottom: 1px solid transparent;
}
/* Al bajar, la cabecera se apoya en un fondo para que nada se lea a través de ella. */
.site-header.is-solid,
.page-plain .site-header {
  background: rgb(251 246 236 / 0.88);
  backdrop-filter: blur(14px);
  border-color: var(--line);
}
.site-header__inner {
  /* A lo ancho de toda la pantalla: la marca pegada a la izquierda y las
     acciones a la derecha, como en cualquier web, no centradas en una columna. */
  height: 100%;
  padding-inline: clamp(1rem, 3vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  margin-right: auto;
}
.brand__mark {
  width: 2.1rem;
  height: 2.1rem;
  color: var(--amber);
  flex-shrink: 0;
}
.brand__name {
  font-family: var(--display);
  font-size: 1.55rem;
  line-height: 1;
  white-space: nowrap;
}
.header-cta {
  display: none;
  min-height: 2.6rem;
  padding: 0.5rem 1.15rem;
  font-size: 0.88rem;
}
.header-retrieve {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.6rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgb(255 255 255 / 0.7);
  backdrop-filter: blur(8px);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--bone);
  text-decoration: none;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.header-retrieve:hover {
  border-color: var(--bone);
  background: #fff;
}
.header-retrieve__icon {
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  color: var(--amber-deep);
}

.locale-menu {
  position: relative;
}
.locale-menu summary {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  list-style: none;
}
.locale-menu summary::-webkit-details-marker {
  display: none;
}
.locale-menu summary::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.locale-menu ul {
  position: absolute;
  right: 0;
  top: calc(100% + 0.6rem);
  min-width: 11rem;
  padding: 0.4rem;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--hull);
  box-shadow: 0 20px 50px -20px rgb(27 43 72 / 0.45);
}
.flag {
  width: 1.5rem;
  height: 1rem;
  flex-shrink: 0;
}
.locale-menu a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.8rem;
  border-radius: 9px;
  text-decoration: none;
}
.locale-menu a:hover {
  background: var(--hull-2);
}
.locale-menu a[aria-current] {
  color: var(--amber);
}

@media (min-width: 720px) {
  .header-cta {
    display: inline-flex;
  }
}
/* En el móvil, todo un poco más compacto para que la marca quepa entera. */
@media (max-width: 480px) {
  .brand {
    gap: 0.5rem;
  }
  .brand__mark {
    width: 1.75rem;
    height: 1.75rem;
  }
  .brand__name {
    font-size: 1.3rem;
  }
  .header-retrieve {
    padding: 0.45rem 0.8rem;
    font-size: 0.82rem;
  }
  .locale-menu summary {
    padding: 0.45rem 0.55rem;
  }
}

/* --- Animaciones de entrada ------------------------------------------------------- */

/*
 * Cada pieza entra a su manera (sube, llega de un lado, crece) cuando aparece en
 * pantalla. Sin JavaScript, o con movimiento reducido, todo está quieto y visible.
 */
.js [data-reveal] {
  opacity: 0;
  transition:
    opacity 0.9s var(--ease),
    transform 1.1s var(--ease),
    clip-path 1.2s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js [data-reveal="up"] {
  transform: translateY(2.4rem);
}
.js [data-reveal="left"] {
  transform: translateX(-3rem);
}
.js [data-reveal="right"] {
  transform: translateX(3rem);
}
.js [data-reveal="scale"] {
  transform: scale(0.92);
}
.js [data-reveal="tilt"] {
  transform: perspective(1400px) rotateX(18deg) translateY(4rem) scale(0.94);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Titulares cuyas líneas suben desde detrás de una máscara. */
.lines .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.lines .line > span {
  display: block;
}
.js .lines .line > span {
  transform: translateY(105%);
  transition: transform 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 110ms + var(--d, 0) * 90ms);
}
.js .lines.is-in .line > span {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js [data-reveal],
  .js .lines .line > span {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* --- Portada: el cartel ------------------------------------------------------------ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Cielo de día: lo que se ve mientras carga la escena, o si no hay WebGL. */
  background: linear-gradient(180deg, #3f8fe0 0%, #8cc4f2 45%, #bfe3fb 62%, #2f74d0 62.2%, #1d4fa3 100%);
}
.hero__scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero__scene.is-ready {
  opacity: 1;
}
.hero__fallback {
  display: none;
}
/*
 * Dos velos claros: uno arriba, para que el titular se lea sobre el cielo, y
 * otro abajo que funde el mar con el papel de la sección siguiente.
 */
.hero__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 45% at 50% 30%, rgb(255 255 255 / 0.55), transparent 75%),
    linear-gradient(180deg, transparent 72%, rgb(251 246 236 / 0.9) 96%, var(--night) 100%);
}
/*
 * El cartel: el título arriba, el Arca ocupando el centro (a la derecha en
 * escritorio) y los botones abajo a la izquierda. Poco texto: la escena explica.
 */
.hero__content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  gap: 2rem;
  padding: calc(var(--header) + clamp(1rem, 4vh, 2.5rem)) var(--gutter) clamp(3.5rem, 9vh, 5.5rem);
}
.hero__top {
  display: grid;
  gap: 0.6rem;
  justify-items: center;
}
.hero__title {
  font-size: clamp(3.2rem, 15vw, 10rem);
  letter-spacing: 0.03em;
  color: #14284b;
}
.hero__subtitle {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.35rem, 3vw, 2.3rem);
  color: var(--amber-deep);
  line-height: 1.1;
  text-shadow: 0 2px 24px rgb(255 255 255 / 0.9);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.8rem 1rem;
}
.hero .pill {
  background: rgb(255 255 255 / 0.85);
  color: #1b2b48;
}
.hero > .scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  z-index: 2;
  transform: translateX(-50%);
}
@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  .hero__content {
    align-items: flex-start;
    text-align: left;
    padding-left: max(var(--gutter), 5vw);
    padding-right: max(var(--gutter), 5vw);
  }
  .hero__top {
    justify-items: start;
  }
  .hero__title {
    font-size: clamp(4rem, 8.5vw, 9.5rem);
  }
  .hero__actions {
    justify-content: flex-start;
  }
  .hero__shade {
    background:
      radial-gradient(45% 40% at 15% 15%, rgb(255 255 255 / 0.55), transparent 75%),
      linear-gradient(180deg, transparent 84%, rgb(251 246 236 / 0.85) 98%, var(--night) 100%);
  }
}
.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
}
.scroll-hint i {
  width: 1px;
  height: 2.6rem;
  background: linear-gradient(var(--amber), transparent);
  animation: hint 2.2s var(--ease) infinite;
  transform-origin: top;
}
@keyframes hint {
  0% {
    transform: scaleY(0);
  }
  50% {
    transform: scaleY(1);
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}
/* --- Formularios --------------------------------------------------------------------- */

.form {
  display: grid;
  gap: 1.2rem;
}
.field {
  display: grid;
  gap: 0.5rem;
}
.field > .label,
.field__label {
  color: var(--bone-2);
}
.field input {
  width: 100%;
  min-height: 3.3rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgb(255 255 255 / 0.6);
  font-size: 1.05rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.field input::placeholder {
  color: rgb(27 43 72 / 0.35);
}
.field input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgb(224 87 58 / 0.15);
}
.field input.mono {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.person__row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.person__remove {
  flex-shrink: 0;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--dim);
}
.person__remove:hover {
  color: var(--bone);
  border-color: var(--bone);
}
.add-person {
  justify-self: start;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  border: 1px dashed var(--line-strong);
  background: none;
  font-size: 0.92rem;
  cursor: pointer;
  color: var(--bone-2);
}
.add-person:hover {
  border-color: var(--amber);
  color: var(--amber);
}
.check {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 0.35);
  font-size: 0.95rem;
  line-height: 1.5;
  cursor: pointer;
}
.check input {
  flex-shrink: 0;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.15rem;
  accent-color: var(--amber);
}
.summary {
  display: grid;
  gap: 0.4rem;
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgb(224 87 58 / 0.06);
}
.summary__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.summary__total strong {
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1;
}
.legal-note {
  font-size: 0.86rem;
  color: var(--dim);
}
.legal-note a {
  color: var(--bone-2);
}

/* --- Páginas interiores ------------------------------------------------------------------- */

.page {
  padding: calc(var(--header) + clamp(2.5rem, 7vh, 5rem)) 0 clamp(4rem, 10vh, 7rem);
}
.page__head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2rem, 5vh, 3rem);
}
.narrow {
  max-width: 40rem;
  margin-inline: auto;
}

/* El registro: formulario a un lado y el certificado que se va rellenando al otro. */
.register {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}
.register__form {
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 0.7);
}
.register__aside {
  display: grid;
  gap: 1rem;
}
@media (min-width: 1000px) {
  .register {
    grid-template-columns: 1.05fr 1fr;
  }
  .register__aside {
    position: sticky;
    top: calc(var(--header) + 2rem);
  }
}

/* Un certificado en miniatura, en HTML, que repite lo que se escribe. */
.mini-cert {
  position: relative;
  aspect-ratio: 1200 / 1340;
  padding: 4.5%;
  background: #fbf6ec;
  color: #14284b;
  border-radius: 6px;
  border: 1px solid #ddd2bb;
  box-shadow: 0 40px 90px -40px rgb(27 43 72 / 0.55);
  transform: rotate(1.5deg);
  container-type: inline-size;
}
.mini-cert__frame {
  height: 100%;
  border: 3px solid #14284b;
  padding: 1.4%;
}
.mini-cert__inner {
  height: 100%;
  border: 1px solid #c4472d;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8% 7% 6%;
}
.mini-cert__mark {
  width: 22cqw;
  height: auto;
}
.mini-cert__org {
  margin-top: 3cqw;
  font-family: var(--display);
  font-size: 5.6cqw;
  letter-spacing: 0.24em;
  line-height: 1;
}
.mini-cert__doc {
  margin-top: 1.6cqw;
  font-family: var(--mono);
  font-size: 1.5cqw;
  letter-spacing: 0.3em;
  color: #5a6781;
}
.mini-cert__certifies {
  margin-top: 6cqw;
  font-family: var(--display);
  font-style: italic;
  font-size: 2.8cqw;
  color: #b8432a;
}
.mini-cert__name {
  margin-top: 1.6cqw;
  min-height: 1.1em;
  font-family: var(--display);
  font-size: 7cqw;
  line-height: 1.05;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.mini-cert__name.is-placeholder {
  color: #a9b2c3;
}
.mini-cert__line {
  margin-top: 2cqw;
  font-family: var(--display);
  font-size: 2.4cqw;
  color: #2c3a55;
}
.mini-cert__data {
  display: flex;
  width: 100%;
  justify-content: space-between;
  margin-top: auto;
  font-family: var(--mono);
  font-size: 1.6cqw;
  color: #5a6781;
}
.mini-cert__more {
  position: absolute;
  top: -0.8rem;
  right: -0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--amber);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
}

.blocked {
  display: grid;
  gap: 0.8rem;
  padding: 1.6rem;
  border-radius: 18px;
  border: 1px solid rgb(194 59 42 / 0.5);
  background: rgb(194 59 42 / 0.08);
}

/* Éxito */
.credentials {
  display: grid;
  gap: 1.2rem;
}
.credential {
  display: grid;
  gap: 1.2rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: rgb(255 255 255 / 0.75);
}
.credential__name {
  font-family: var(--display);
  font-size: 1.9rem;
  line-height: 1.1;
}
.credential__grid {
  display: grid;
  gap: 1rem;
}
.credential__grid dd {
  margin-top: 0.3rem;
}
.credential__id {
  font-size: 1.5rem;
  color: var(--amber);
}
.credential__key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.2rem;
  font-size: 1.5rem;
}
.credential__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
}
@media (min-width: 720px) {
  .credential__grid {
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    gap: 2.5rem;
  }
}

/* Certificado */
.certificate-view {
  display: grid;
  gap: 2rem;
  max-width: 56rem;
  margin-inline: auto;
}
.certificate-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.certificate-tabs a {
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 0.8rem;
  text-decoration: none;
}
.certificate-tabs a[aria-current] {
  border-color: var(--amber);
  background: var(--amber);
  color: #fff;
}
.certificate-image {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 50px 100px -40px rgb(27 43 72 / 0.55);
}
.certificate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.share {
  display: grid;
  gap: 1rem;
  padding: clamp(1.6rem, 4vw, 2.6rem);
  border-radius: 22px;
  background: var(--amber);
  color: #fff;
}
.share .link-button {
  color: #fff;
}
.share__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 0.5rem;
}

/* Verificación pública */
.verified {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.6rem, 4vw, 2.6rem);
  border-radius: 24px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(70% 80% at 100% 0%, rgb(224 87 58 / 0.12), transparent 60%),
    var(--hull);
}
.verified__id {
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  line-height: 1;
}
.checks {
  display: grid;
  gap: 0.5rem;
}
.checks li {
  display: flex;
  gap: 0.7rem;
}
.checks li::before {
  content: "✓";
  color: #2fa866;
}
.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem 1.5rem;
  align-items: baseline;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.classified {
  justify-self: start;
  padding: 0.1rem 0.6rem;
  background: var(--bone);
  color: #fff;
  font-family: var(--mono);
  letter-spacing: 0.2em;
}

/* Textos legales */
.legal {
  max-width: 46rem;
}
.legal__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.legal__nav a {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.9rem;
  text-decoration: none;
}
.legal__nav a[aria-current] {
  background: var(--bone);
  color: #fff;
  border-color: var(--bone);
}
.legal__intro {
  font-size: 1.2rem;
  color: var(--bone-2);
}
.legal section {
  display: grid;
  gap: 0.8rem;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}
.legal h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.8rem;
  line-height: 1.15;
}
.legal p {
  color: var(--bone-2);
}

/* --- Pie -------------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--night);
}
.site-footer__inner {
  display: grid;
  gap: 2rem;
  padding-block: 3.5rem 2.5rem;
}
.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.site-footer__brand svg {
  width: 2.2rem;
  height: 2.2rem;
  color: var(--amber);
}
.site-footer__disclaimer {
  max-width: 40rem;
  color: var(--dim);
  font-size: 0.92rem;
}
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
}
.site-footer__links a {
  font-size: 0.92rem;
  color: var(--bone-2);
  text-decoration: none;
}
.site-footer__links a:hover {
  color: var(--bone);
  text-decoration: underline;
}
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
@media (min-width: 900px) {
  .site-footer__inner {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
  .site-footer__bottom {
    grid-column: 1 / -1;
  }
  .site-footer__links {
    justify-content: flex-end;
  }
}

/* --- Impresión: solo el certificado ------------------------------------------------------ */

@media print {
  body {
    background: #fff;
  }
  .no-print,
  .site-header,
  .site-footer {
    display: none !important;
  }
  .page {
    padding: 0;
  }
  .certificate-image {
    box-shadow: none;
  }
}

.site-footer__about {
  display: grid;
  gap: 1.2rem;
}

/* --- Portada: el texto de debajo del cartel ------------------------------------------- */

.about {
  padding-block: clamp(5rem, 14vh, 9rem);
  background:
    radial-gradient(60% 40% at 50% 0%, rgb(224 87 58 / 0.08), transparent 70%),
    var(--night);
}
.about .wrap {
  max-width: 58rem;
  display: grid;
  gap: clamp(2rem, 5vh, 3rem);
}
.manifesto__text {
  display: grid;
  gap: 1.5rem;
  font-family: var(--display);
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1.24;
}
.js .manifesto__text .word {
  color: rgb(27 43 72 / 0.2);
  transition: color 0.4s;
}
.js .manifesto__text .word.is-lit {
  color: var(--bone);
}
.slogans {
  display: grid;
  gap: 1rem;
  padding-left: 1.4rem;
  border-left: 1px solid rgb(224 87 58 / 0.5);
}
.slogans li {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
}
.about__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.8rem;
}
@media (max-width: 720px) {
  .hero > .scroll-hint {
    display: none;
  }
}

/* Textos que cambian según el ancho: la versión corta en el móvil. */
.only-desktop {
  display: none;
}
@media (min-width: 720px) {
  .only-mobile {
    display: none;
  }
  .only-desktop {
    display: inline;
  }
}
