/* Jai Five — base: reset, tipografía, utilidades y cielo. Ver ../../docs/ARQUITECTURA-web.md */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: rgb(var(--bg-a));
  color: var(--fg);
  font-family: var(--f-lat);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, canvas, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--c-oro); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
[lang="he"] { font-family: var(--f-heb); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Cielo: fondo fijo que se entibia con el scroll (variables de js/light.js) ---- */
.sky {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgb(var(--bg-a)) 0%, rgb(var(--bg-b)) 55%, rgb(var(--bg-c)) 100%);
}
.sky::after {
  content: ""; position: absolute; left: 50%; bottom: -30vh; width: 140vmax; height: 90vh; translate: -50% 0;
  background: radial-gradient(ellipse at 50% 100%, rgb(var(--rgb-oro) / .55) 0%, rgb(var(--rgb-oro) / .12) 35%, transparent 70%);
  opacity: var(--glow-a);
}
.grano {
  position: fixed; inset: 0; z-index: var(--z-grain); pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---- Tipografía ---- */
.display, h1, h2, h3 { font-family: var(--f-serif); font-optical-sizing: auto; font-weight: 500; line-height: 1.04; letter-spacing: -.015em; text-wrap: balance; }
h1 .oro, h2 .oro, .display .oro { font-style: italic; font-weight: 500; }
h1, .display { font-size: var(--fs-display); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
.lede { font-size: var(--fs-lede); max-width: 52ch; color: var(--fg-2); text-wrap: pretty; }
.mono { font-family: var(--f-mono); font-size: var(--fs-label); letter-spacing: .08em; text-transform: uppercase; }
.oro { background: var(--g-oro); -webkit-background-clip: text; background-clip: text; color: transparent; }
.heb-grande { font-family: var(--f-heb); font-weight: 900; line-height: 1; }

/* ---- Layout ---- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.noche { position: relative; padding-block: clamp(80px, 12vw, var(--s-9)); background: var(--bg); color: var(--fg); }
.noche:not(.banda-clara) { background: transparent; }
.cabecera { display: grid; gap: var(--s-3); max-width: 900px; margin-bottom: clamp(40px, 6vw, var(--s-7)); }
.cabecera > * { min-width: 0; }

/* ---- Etiqueta (eyebrow) ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; justify-self: start;
  padding: 7px 13px; border-radius: var(--r-badge);
  font-family: var(--f-mono); font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); background: var(--surface-2); box-shadow: var(--sh-hair);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.banda-clara .eyebrow { color: var(--c-azul-israel); }

/* ---- Botones: píldora con ícono en círculo propio ---- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 7px 7px 7px 22px; border-radius: var(--r-btn);
  font-weight: 700; font-size: 16px; line-height: 1; white-space: nowrap;
  transition: transform var(--d-base) var(--ease-out), box-shadow var(--d-base) var(--ease-out), background-color var(--d-base) var(--ease-out);
}
.btn .ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; transition: transform var(--d-base) var(--ease-out); }
.btn .ic svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover .ic { transform: translate(2px, -2px) scale(1.06); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-oro { background: var(--g-oro); color: var(--c-noche); box-shadow: var(--sh-oro), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn-oro .ic { background: rgba(10, 22, 51, .12); }
.btn-oro:hover { box-shadow: 0 24px 50px -16px rgba(232, 184, 74, .75), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn-vidrio { background: var(--surface-2); color: var(--fg); box-shadow: var(--sh-hair); }
.btn-vidrio .ic { background: var(--surface-2); box-shadow: var(--sh-hair); }
.btn-vidrio:hover { background: rgba(255, 255, 255, .08); }
.banda-clara .btn-vidrio:hover { background: rgba(11, 16, 34, .06); }
.btn-simple { padding: 12px 22px; }

/* ---- Chips ---- */
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: var(--r-badge);
  font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--fg); background: var(--surface-2); box-shadow: var(--sh-hair);
}
.chip[aria-pressed="true"] { background: var(--g-oro); color: var(--c-noche); box-shadow: none; }
.badge {
  display: inline-flex; align-items: center; padding: 6px 11px; border-radius: var(--r-badge);
  font-family: var(--f-mono); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  background: var(--c-granada); color: var(--c-blanco);
}
.badge-oro { background: var(--g-oro); color: var(--c-noche); }
.badge-azul { background: var(--c-azul); }

/* ---- Doble bisel (bandeja + núcleo) ---- */
.bandeja { padding: 6px; border-radius: var(--r-panel); background: var(--surface-2); box-shadow: var(--sh-hair); display: grid; min-width: 0; }
.nucleo { border-radius: calc(var(--r-panel) - 6px); background: var(--surface); box-shadow: var(--sh-top); padding: clamp(22px, 3vw, 36px); display: grid; gap: 14px; align-content: start; min-width: 0; position: relative; overflow: hidden; }
.nucleo p { color: var(--fg-2); font-size: 16px; }

/* ---- Toast ---- */
.toast {
  position: fixed; left: 50%; top: calc(var(--nav-h) + 18px + env(safe-area-inset-top, 0px)); z-index: var(--z-toast);
  transform: translate(-50%, -160%); opacity: 0;
  padding: 12px 20px; border-radius: var(--r-badge);
  background: rgba(10, 22, 51, .72); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid rgb(var(--rgb-oro) / .5); color: var(--c-blanco); font-weight: 700; text-align: center; max-width: calc(100% - 32px);
  transition: transform var(--d-slow) var(--ease-out), opacity var(--d-base) var(--ease-out);
}
.toast.visible { transform: translate(-50%, 0); opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn .ic { transition: none; }
}

/* ---- Serif editorial en las frases grandes fuera de los h1/h2 ---- */
.pie-frase, .carrito-vacio-titulo { font-family: var(--f-serif); font-optical-sizing: auto; font-weight: 500; letter-spacing: -.015em; }
