/* Never Twice: landing del experimento de demanda. Colores del logo (Omnis, 03_Logo_e_Identidad_Visual). */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fuentes/bricolage_grotesque_latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fuentes/ibm_plex_mono_500_latin.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --fondo: #F7F8F9;
  --tinta: #121417;
  --suave: #4F5662;
  --linea: #C6CCD4;
  --rojo: #D3261D;
  --sobre-rojo: #FFFFFF;
  --fuente: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --fuente-datos: "IBM Plex Mono", ui-monospace, monospace;
  --margen: clamp(1.25rem, 5vw, 4rem);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #121417;
    --tinta: #F1F2F4;
    --suave: #A4ABB6;
    --linea: #2C3139;
    --rojo: #FF4B3E;
    --sobre-rojo: #121417;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: var(--fuente);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  caret-color: var(--rojo);
}

::selection { background: var(--rojo); color: var(--sobre-rojo); }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--rojo); }

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

/* Cabecera */
.cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem var(--margen);
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  text-decoration: none;
}

.marca-logo { width: 2rem; height: 2rem; }
.marca-logo .trazo-dos { stroke-width: 13; }
.marca-logo .trazo-tachado { stroke-width: 12; }

.marca-nombre {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cabecera-derecha {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.idiomas { display: inline-flex; }

.idioma {
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.5rem;
  border: 0;
  background: transparent;
  color: var(--suave);
  font: 500 0.875rem var(--fuente-datos);
  letter-spacing: 0.06em;
  cursor: pointer;
}
.idioma[aria-pressed="true"] {
  color: var(--tinta);
  text-decoration: underline;
  text-decoration-color: var(--rojo);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}
.idioma:hover { color: var(--tinta); }
.idioma:focus-visible { outline: 2px solid var(--rojo); outline-offset: 2px; }

@media (max-width: 30rem) {
  .cabecera { flex-wrap: wrap; row-gap: 0.25rem; }
  .cabecera-derecha { width: 100%; flex-wrap: wrap; justify-content: space-between; gap: 0 0.25rem; }
  .idioma { min-width: 40px; padding: 0 0.25rem; }
}

.cabecera-enlace {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--suave);
  font-size: 0.9375rem;
}

/* Trazos del logo: el color sale de la paleta para que funcione en claro y en oscuro */
.trazo-dos, .trazo-tachado {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.trazo-dos { stroke: var(--tinta); stroke-width: 9; }
.trazo-tachado { stroke: var(--rojo); stroke-width: 8; }

/* Portada */
.portada {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  padding: clamp(2rem, 8vh, 6rem) var(--margen) clamp(3rem, 10vh, 7rem);
  max-width: 78rem;
  margin: 0 auto;
}

.portada-logo {
  order: -1;
  width: clamp(7rem, 32vw, 11rem);
  height: auto;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 11vw, 6.75rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 96;
}

.apoyo {
  margin: 1.5rem 0 0;
  font-size: clamp(1.375rem, 3.2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.2;
}

.entrada {
  max-width: 34rem;
  margin: 1rem 0 0;
  color: var(--suave);
}

/* Avísame */
.aviso { margin-top: 2rem; }

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.75rem;
  border: 2px solid var(--tinta);
  border-radius: 4px;
  background: var(--tinta);
  color: var(--fondo);
  font: inherit;
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out;
}
.boton:hover { background: var(--rojo); border-color: var(--rojo); color: var(--sobre-rojo); }

.boton[aria-expanded="true"] {
  background: transparent;
  color: var(--tinta);
}
.boton[aria-expanded="true"]:hover { color: var(--sobre-rojo); }

.boton-secundario {
  background: transparent;
  color: var(--tinta);
}

.aviso-panel {
  max-width: 34rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--linea);
}
.aviso-panel:focus { outline: none; }
.aviso-panel:focus-visible { outline: 3px solid var(--rojo); outline-offset: 6px; }
.aviso-panel p { margin: 0 0 1rem; }
.aviso-titulo { font-weight: 700; }

/* Cómo funciona */
.como {
  max-width: 78rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 8vh, 5rem) var(--margen);
  border-top: 1px solid var(--linea);
}

h2 {
  margin: 0 0 2rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.como-pasos {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.paso h3 { margin: 0 0 0.4rem; font-size: 1.25rem; font-weight: 700; line-height: 1.25; }
.paso p { margin: 0; max-width: 30rem; color: var(--suave); }

/* Sello numerado */
.sello {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  margin: 3.5rem 0 0;
}

.sello-dibujo { width: min(13rem, 60vw); height: auto; }
.sello-borde { fill: none; stroke: var(--tinta); stroke-width: 2.5; }
.sello-texto { fill: var(--tinta); font-family: var(--fuente); font-weight: 700; font-size: 17px; letter-spacing: 3px; }
.sello-numero { fill: var(--tinta); font-family: var(--fuente-datos); font-weight: 500; font-size: 13px; letter-spacing: 1px; }

.sello figcaption { max-width: 30rem; color: var(--suave); }
.sello figcaption strong { display: block; color: var(--tinta); font-size: 1.25rem; margin-bottom: 0.3rem; }

/* Pie */
.pie {
  max-width: 78rem;
  margin: 0 auto;
  padding: 2rem var(--margen) 3rem;
  border-top: 1px solid var(--linea);
  color: var(--suave);
  font-size: 0.9375rem;
}
.pie p { margin: 0 0 0.75rem; max-width: 40rem; }
.pie a { display: inline-flex; align-items: center; min-height: 44px; color: var(--tinta); }

@media (min-width: 48rem) {
  .portada {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: center;
  }
  .portada-logo { order: 0; width: 100%; max-width: 22rem; justify-self: end; }
  .como-pasos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
  .sello { grid-template-columns: auto minmax(0, 1fr); gap: 2.5rem; }
}

/* El único momento animado: el 2 se escribe, una pausa y la misma línea vuelve a tacharlo.
   Mismos tiempos que diseno/logo/animacion/never_twice_logo_animado.svg */
@media (prefers-reduced-motion: no-preference) {
  .portada-logo path { stroke-dasharray: 1; }
  .portada-logo .trazo-dos { animation: trazar 1100ms cubic-bezier(0.45, 0, 0.25, 1) 200ms both; }
  .portada-logo .trazo-tachado { animation: trazar 400ms cubic-bezier(0.6, 0, 0.3, 1) 1450ms both; }
}

/* La opacidad evita que el remate redondo se vea como un punto antes de empezar a trazar */
@keyframes trazar {
  0% { stroke-dashoffset: 1; opacity: 0; }
  1% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}
