/* ============ Fuente (autoalojada) ============ */
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  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;
}

/* ============ Tokens ============ */
:root {
  --blue: #0165EE;
  --blue-deep: #003ABD;
  --cyan: #0DB5FD;
  --ink: #040308;
  --paper: #F4F4F6;
  --white: #fff;

  --text: #040308;
  --muted: #4a4e60;          /* 7.6:1 sobre --paper */
  --line: #d6d8e2;
  --field-line: #7d8297;     /* 3.6:1 sobre blanco */
  --error: #b4231a;

  /* Escala de radios: controles pill · campos 12 · superficies 20 · hoja 28 */
  --r-field: 12px;
  --r-surface: 20px;
  --r-sheet: 28px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --header-h: 64px;
  --gutter: clamp(20px, 5vw, 48px);

  --sky-top: #0a54d6;
  --sky-mid: #0DB5FD;
  --sky-low: #cfeaff;

  --shadow-tint: 4, 20, 70;
}
body[data-time="atardecer"] { --sky-top: #2e2d78; --sky-mid: #e0689a; --sky-low: #ffc58a; }
body[data-time="noche"]     { --sky-top: #040308; --sky-mid: #0a1b52; --sky-low: #1b3a82; }

/* ============ Reset ============ */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
  scrollbar-color: var(--blue) var(--paper);
  scroll-behavior: auto;
}
html.lock { overflow: hidden; }
body {
  margin: 0;
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--blue);
  -webkit-tap-highlight-color: transparent;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-appearance: none; appearance: none; background: none; border: 0; padding: 0; touch-action: manipulation; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
[hidden] { display: none !important; }
::selection { background: var(--blue); color: #fff; }

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

.ico { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }

.skip {
  position: fixed; left: 12px; top: -80px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px;
  transition: top .2s var(--ease-out);
}
.skip:focus { top: 12px; }

.wrap { width: min(1180px, 100%); margin-inline: auto; padding-inline: var(--gutter); }

/* ============ Botones (pill) ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 1.5rem; border-radius: 999px;
  font-weight: 560; font-size: 1rem; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap; border: 1.5px solid transparent;
  transition: transform .18s var(--ease-out), background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn:active { transform: scale(0.97); }
.btn--sm { min-height: 40px; padding: 0 1.1rem; font-size: .9375rem; }
.btn--block { width: 100%; }
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 6px 20px -8px rgba(var(--shadow-tint), .5); }
.btn--primary:hover { background: var(--blue-deep); }
.btn--light { background: #fff; color: var(--blue-deep); }
.btn--light:hover { background: var(--paper); }
.btn--ghost { color: #fff; border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.08); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgba(255,255,255,.2); }

/* ============ Cabecera ============ */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-inline: var(--gutter);
  color: #fff;
  transition: background-color .35s ease, color .35s ease, box-shadow .35s ease;
}
.top.is-solid {
  background: rgba(244, 244, 246, .88);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(var(--shadow-tint), .08);
}
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-weight: 650; letter-spacing: -0.01em; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.brand__name { font-size: 1.0625rem; }
.top__nav { display: flex; align-items: center; gap: .5rem; }
.link-btn {
  display: inline-flex; align-items: center; gap: .45em; min-height: 40px; padding: 0 .85rem;
  border-radius: 999px; font-size: .9375rem; font-weight: 500;
  transition: background-color .2s;
}
.link-btn:hover { background: rgba(255,255,255,.18); }
.is-solid .link-btn:hover { background: rgba(1,101,238,.1); }
.link-btn[aria-pressed="true"] { background: rgba(1,101,238,.14); }
.lang { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.16); }
.is-solid .lang { background: rgba(var(--shadow-tint), .07); }
.lang button {
  min-width: 40px; min-height: 34px; padding: 0 .6rem; border-radius: 999px; font-size: .8125rem; font-weight: 600; letter-spacing: .04em;
  transition: background-color .2s, color .2s;
}
.lang button[aria-pressed="true"] { background: #fff; color: var(--blue-deep); }
.is-solid .lang button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.top .btn--primary { box-shadow: none; }
/* pantalla inicial limpia: marca y llamada a la acción aparecen al descender */
.brand, .top__cta { transition: opacity .4s ease, visibility 0s; }
body:not(.is-text) .top:not(.is-solid) :is(.brand, .top__cta) { opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility 0s linear .4s; }
body.is-text .top { background: rgba(244,244,246,.92); color: var(--text); }
@media (max-width: 760px) {
  :root { --header-h: 56px; }
  .brand__name { display: none; }
  .top__cta { display: none; }
  .link-btn span { display: none; }
  .link-btn { padding: 0; min-width: 40px; justify-content: center; }
}
@media (min-width: 761px) and (max-width: 980px) {
  .brand__name { display: none; }
}

/* ============ Reducción de movimiento ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
