/* Ferro · estilo «Laboratorio». Solo modo oscuro, un único acento. */

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/barlow-condensed-500.woff2) format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/barlow-condensed-600.woff2) format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/barlow-condensed-700.woff2) format("woff2");
}

:root {
  --bg: #000000;
  --surface: #101318;
  --surface-2: #171b22;
  --line: #262b33;
  --line-strong: #39404b;
  --accent: #2e8bff;
  --accent-light: #8dbfff;
  --accent-deep: #07213f;
  --night: #0b2a57;
  --text: #f2f4f7;
  --text-2: #959ba6;

  --r-block: 28px;
  --r-card: 20px;
  --r-small: 12px;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: 16px;
  --space-section: 72px;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.55 var(--body);
  overflow-x: hidden;
}

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

h1,
h2,
h3 {
  font-family: var(--display);
  font-feature-settings: "tnum";
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  max-width: 68ch;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--accent-light);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--accent);
  color: #000;
  border-radius: var(--r-small);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.125rem;
}
.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 1152px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Cabecera ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.625rem;
  line-height: 1;
}
.brand:hover {
  color: var(--text);
}
.brand img {
  border-radius: 8px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding-inline: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-small);
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.04em;
}
.lang-switch:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

/* ---------- Móvil ---------- */

.phone {
  --w: 300px;
  width: min(var(--w), 100%);
  padding: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 44px;
}
.phone-screen {
  overflow: hidden;
  border-radius: 35px;
  background: #000;
}
/* Asoma desde abajo: sin borde inferior y la pantalla desplazada a --y (píxeles de la captura de 820) */
.phone-peek {
  border-bottom: 0;
  border-radius: 44px 44px 0 0;
  padding-bottom: 0;
}
.phone-peek .phone-screen {
  /* --h: alto visible, en píxeles de la captura */
  aspect-ratio: 820 / var(--h, 860);
  border-radius: 35px 35px 0 0;
}
.phone-peek .phone-screen img {
  margin-top: calc(var(--y, 0) / 820 * -100%);
}

/* ---------- Bloque principal ---------- */

.hero {
  padding-top: 8px;
}

.hero-block {
  display: grid;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-block);
  overflow: hidden;
}

.hero-copy {
  padding: 32px 20px 28px;
}

.hero h1 {
  font-size: clamp(3.5rem, 15vw, 7rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.01em;
}

.hero-sub {
  margin-top: 20px;
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--text-2);
  max-width: 34ch;
}

.cta {
  margin-top: 28px;
}
.soon {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.1;
  color: var(--accent-light);
}
.notify {
  margin-top: 6px;
  color: var(--text-2);
  font-size: 0.9375rem;
}
.play-badge {
  display: inline-block;
  border-radius: var(--r-small);
}
.play-badge img {
  width: 200px;
}

.hero-reading {
  margin-top: 32px;
  padding: 20px 20px 22px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.reading-title {
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 14px;
}

.hero-visual {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 40px 20px 0;
  background: linear-gradient(160deg, var(--accent) 0%, var(--night) 72%);
}
.hero-visual .phone {
  --w: 300px;
  border-bottom: 0;
  border-radius: 44px 44px 0 0;
  padding-bottom: 0;
  background: #000;
  border-color: rgba(0, 0, 0, 0.6);
}
.hero-visual .phone-screen {
  height: 400px;
  border-radius: 35px 35px 0 0;
}

/* ---------- La escala graduada ---------- */

.gauge + .gauge {
  margin-top: 18px;
}
.gauge-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-family: var(--display);
  font-feature-settings: "tnum";
  line-height: 1.2;
}
.gauge-name {
  font-weight: 600;
  font-size: 1.25rem;
}
.gauge-read {
  font-weight: 500;
  font-size: 1.125rem;
  color: var(--text-2);
  text-align: right;
  white-space: nowrap;
}

.gauge-scale {
  position: relative;
  height: 24px;
  margin-top: 6px;
}
.gauge-track {
  position: absolute;
  inset: 8px 0 auto;
  height: 8px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}
.gauge-fill {
  display: block;
  height: 100%;
  width: calc(var(--v) * 100%);
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(46, 139, 255, 0.45), var(--accent));
}
.gauge-band {
  position: absolute;
  z-index: 1;
  top: 5px;
  height: 14px;
  left: calc(var(--lo) * 100%);
  width: calc((var(--hi) - var(--lo)) * 100%);
  background: rgba(46, 139, 255, 0.16);
}
.gauge-ticks {
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
}
.gauge-ticks.top {
  top: 0;
}
.gauge-ticks.bottom {
  top: 18px;
}
.gauge-ticks i {
  position: absolute;
  left: calc(var(--i) / 20 * (100% - 1px));
  width: 1px;
  height: 3px;
  background: var(--line-strong);
}
.gauge-ticks.top i {
  bottom: 0;
}
.gauge-ticks.bottom i {
  top: 0;
}
.gauge-ticks i.long {
  height: 6px;
}

/* Se rellena una vez al aparecer (gauge.js); sin JS o con movimiento reducido ya sale llena */
html.js .hero-reading:not(.is-filled) .gauge-fill {
  width: 0;
}
html.js .gauge-fill {
  transition: width 1.2s cubic-bezier(0.22, 0.8, 0.24, 1);
}
html.js .gauge:nth-of-type(2) .gauge-fill {
  transition-delay: 0.12s;
}
html.js .gauge:nth-of-type(3) .gauge-fill {
  transition-delay: 0.24s;
}
@media (prefers-reduced-motion: reduce) {
  html.js .gauge-fill {
    transition: none;
  }
  html.js .hero-reading:not(.is-filled) .gauge-fill {
    width: calc(var(--v) * 100%);
  }
}

/* ---------- Qué hace ---------- */

.features {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.feature {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 20px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
}
.feature h3 {
  font-weight: 700;
  font-size: 1.875rem;
}
.feature p {
  margin-top: 10px;
  color: var(--text-2);
  max-width: 40ch;
}
.feature .phone {
  --w: 272px;
  margin-inline: auto;
}

/* ---------- Estudios ---------- */

.studies,
.data {
  margin-top: var(--space-section);
}

.section-head p {
  margin-top: 12px;
  color: var(--text-2);
}
.studies h2,
.data h2 {
  font-weight: 700;
  font-size: clamp(2.25rem, 8vw, 3.25rem);
}

.study-list {
  margin: 32px 0 0;
}
.study {
  display: grid;
  gap: 4px;
  padding-block: 20px;
  border-top: 1px solid var(--line);
}
.study:last-child {
  border-bottom: 1px solid var(--line);
}
.study dt {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.2;
}
.study dd {
  margin: 0;
}
.study-refs {
  display: flex;
  flex-wrap: wrap;
  column-gap: 16px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.125rem;
  font-feature-settings: "tnum";
  color: var(--accent-light);
}
.study-refs cite {
  font-style: normal;
}
.study-note {
  color: var(--text-2);
  max-width: 52ch;
}

/* ---------- Tus datos ---------- */

.data-list {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 0 32px;
}
.data-list li {
  padding-block: 20px 24px;
  border-top: 1px solid var(--line);
}
.data-list .icon {
  color: var(--accent);
}
.data-list h3 {
  margin-top: 14px;
  font-weight: 600;
  font-size: 1.375rem;
}
.data-list p {
  margin-top: 6px;
  color: var(--text-2);
}

/* ---------- Pie ---------- */

.site-footer {
  margin-top: var(--space-section);
  border-top: 1px solid var(--line);
  padding-block: 28px 40px;
  color: var(--text-2);
  font-size: 0.9375rem;
}
.footer-inner {
  display: grid;
  gap: 20px;
}
.footer-links,
.lang-picker {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links {
  display: grid;
  gap: 4px;
}
.footer-links a {
  display: inline-block;
  padding-block: 6px;
}
.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.lang-picker {
  display: flex;
  gap: 4px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: 0.04em;
}
.lang-picker a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 40px;
  border-radius: var(--r-small);
  color: var(--text-2);
  text-decoration: none;
}
.lang-picker a:hover {
  color: var(--text);
}
.lang-picker a[aria-current="page"] {
  background: var(--accent-deep);
  color: var(--accent-light);
}

/* ---------- Páginas legales ---------- */

.legal {
  max-width: calc(72ch + 2 * var(--gutter));
  padding-top: 24px;
}
.legal h1 {
  font-weight: 700;
  font-size: clamp(2.5rem, 10vw, 3.75rem);
  line-height: 0.95;
}
.legal h2 {
  margin-top: 40px;
  font-weight: 600;
  font-size: 1.625rem;
}
.legal h1 + p,
.legal h1 + h2 {
  margin-top: 16px;
}
.legal p,
.legal ul,
.legal ol {
  margin-top: 12px;
}
.legal ul,
.legal ol {
  padding-left: 1.25em;
}
.legal li + li {
  margin-top: 6px;
}
.legal li::marker {
  color: var(--text-2);
}
.legal strong {
  font-weight: 600;
}
.legal .date,
.legal .note {
  color: var(--text-2);
}
.legal .date {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.125rem;
  font-feature-settings: "tnum";
}
.legal hr {
  border: 0;
  border-top: 1px solid var(--line);
}
.not-found section + section {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

/* ---------- Pantallas grandes ---------- */

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
    --space-section: 104px;
  }
  .hero-copy {
    padding: 48px 40px 40px;
  }
  .feature {
    padding: 36px 36px 0;
  }
  .data-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .study {
    grid-template-columns: 11rem 1fr;
    column-gap: 24px;
  }
  .study dt {
    grid-row: span 2;
  }
  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
  .footer-links {
    display: flex;
    flex-wrap: wrap;
    column-gap: 24px;
  }
}

@media (min-width: 960px) {
  .hero-block {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
  .hero-copy {
    padding: 64px 56px 56px;
  }
  .hero h1 {
    font-size: clamp(5rem, 7.4vw, 6.75rem);
  }
  .hero-visual {
    padding: 56px 32px 0;
  }
  .hero-visual .phone {
    --w: 340px;
  }
  .hero-visual .phone-screen {
    height: auto;
    max-height: 640px;
  }

  .features {
    grid-template-columns: repeat(3, 1fr);
  }
  .feature-lead {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    padding: 0 48px;
  }
  .feature-lead .feature-copy {
    padding-block: 48px;
  }
  .feature-lead h3 {
    font-size: 2.75rem;
  }
  .feature-lead p {
    font-size: 1.1875rem;
  }
  .feature-lead .phone {
    --w: 320px;
    align-self: end;
    margin-top: 48px;
  }
  .feature:not(.feature-lead) {
    padding: 32px 28px 0;
  }

  .study {
    grid-template-columns: 14rem 18rem 1fr;
    align-items: baseline;
  }
  .study dt {
    grid-row: auto;
  }
  .data-list {
    grid-template-columns: repeat(4, 1fr);
  }
}
