/* ============================================================
   Quantic Vacaciones · Base (reset, tipografía, layout, fondo)
   ============================================================ */

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

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

body {
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 680px at 88% -8%, rgba(34, 192, 255, 0.16), transparent 60%),
    radial-gradient(900px 620px at -6% 8%, rgba(11, 132, 255, 0.14), transparent 55%),
    radial-gradient(800px 800px at 50% 120%, rgba(11, 132, 255, 0.08), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.01em;
}

/* Grano sutil fijo (no bloquea interacción, no repinta al hacer scroll) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }

a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
:focus-visible { outline: none; box-shadow: var(--ring-focus); border-radius: var(--r-sm); }

::selection { background: rgba(11, 132, 255, 0.18); }

/* — Tipografía — */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.05; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.4rem, 1rem + 1.4vw, 2rem); letter-spacing: -0.025em; }
h3 { font-size: 1.15rem; letter-spacing: -0.02em; }
h4 { font-size: 1rem; letter-spacing: -0.015em; }
p { color: var(--ink-2); }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }
.tnum { font-variant-numeric: tabular-nums; }

/* — Layout — */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 40px);
}

.app-shell { min-height: 100dvh; padding-bottom: var(--s-12); }

.page {
  padding-top: var(--s-7);
  animation: page-in var(--dur-3) var(--ease) both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Cabecera de página */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-6);
  flex-wrap: wrap;
  margin-bottom: var(--s-7);
}
.page-head__title { display: grid; gap: 6px; }
.page-head__title h1 { margin: 0; }
.page-head__sub { color: var(--muted); font-size: 0.95rem; max-width: 60ch; }
.page-head__actions { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; }

/* — Grids utilitarios — */
.grid { display: grid; gap: var(--s-5); }
.flex { display: flex; gap: var(--s-3); }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.items-center { align-items: center; }
.wrap { flex-wrap: wrap; }
.gap-2 { gap: var(--s-2); } .gap-3 { gap: var(--s-3); } .gap-4 { gap: var(--s-4); }
.mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); }
.full { width: 100%; }
.hidden { display: none !important; }
.text-right { text-align: right; }
.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;
}

/* — Scroll reveal (IntersectionObserver añade .is-in) — */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(6px);
  transition: opacity var(--dur-4) var(--ease), transform var(--dur-4) var(--ease),
    filter var(--dur-4) var(--ease);
  will-change: transform, opacity;
}
[data-reveal].is-in { opacity: 1; transform: none; filter: none; }
[data-reveal-delay="1"] { transition-delay: 0.06s; }
[data-reveal-delay="2"] { transition-delay: 0.12s; }
[data-reveal-delay="3"] { transition-delay: 0.18s; }
[data-reveal-delay="4"] { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; filter: none; }
}
