/* ══════════════════════════════════════════════════════════════════
   holachile.vip — sitio raíz
   Tokens de DESIGN_SYSTEM.md (Hola Chile · Dark, canónica)
   ══════════════════════════════════════════════════════════════════ */

:root {
  --primary: #ff3b30;
  --secondary: #17e6e6;
  --accent: #ff8a00;
  --bg: #050505;
  --surface: #0e0e10;
  --card: #131313;
  --fg: #ffffff;
  --fg-muted: #b8b8b8;
  --border: rgba(255, 255, 255, 0.08);
  --error: #c62828;

  --cta-gradient: linear-gradient(135deg, #ff3b30 0%, #ff6a3d 100%);

  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 12px;
  --sp-lg: 16px;
  --sp-xl: 20px;
  --sp-2xl: 24px;
  --sp-3xl: 32px;

  --r-card: 24px;
  --r-cta: 16px;
  --r-pill: 999px;

  --font-ui: "Inter Tight", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --font-wordmark: "Pacifico", cursive;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grain cinematográfico sutil sobre todo el sitio */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Tipografía ──────────────────────────────────────────────── */

.wordmark {
  font-family: var(--font-wordmark);
  font-weight: 400;
  color: var(--fg);
}

h1,
.display {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: clamp(34px, 6vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1.08;
}

h2 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: clamp(24px, 3.4vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h3 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
}

p {
  color: var(--fg-muted);
  max-width: 62ch;
}

strong {
  color: var(--fg);
  font-weight: 600;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Label "// SECTION" — JetBrainsMono 700 */
.section-label {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
  display: block;
  margin-bottom: var(--sp-lg);
}

.section-label::before {
  content: "// ";
  color: var(--primary);
}

.caption {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.mono {
  font-family: var(--font-mono);
}

/* ── Layout ──────────────────────────────────────────────────── */

.container {
  width: min(1120px, calc(100% - 2 * var(--sp-2xl)));
  margin-inline: auto;
}

section {
  padding-block: clamp(64px, 10vw, 120px);
  position: relative;
}

/* ── Header ──────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(5, 5, 5, 0.72);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-header .wordmark {
  font-size: 22px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-2xl);
}

.header-nav a {
  color: var(--fg-muted);
  font-size: 14px;
  font-weight: 600;
}

.header-nav a:hover {
  color: var(--fg);
  text-decoration: none;
}

/* En pantallas chicas el nav colapsa a wordmark + CTA; las secciones se
   descubren scrolleando y el footer trae todos los links. */
@media (max-width: 640px) {
  .header-nav {
    gap: var(--sp-md);
  }
  .header-nav a:not(.cta) {
    display: none;
  }
}

/* ── CTAs (gradiente + glow neón, radius 16) ─────────────────── */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: var(--cta-gradient);
  border: none;
  border-radius: var(--r-cta);
  padding: 14px 28px;
  cursor: pointer;
  box-shadow:
    0 0 18px rgba(255, 59, 48, 0.42),
    0 0 36px rgba(255, 59, 48, 0.18);
  transition:
    transform 220ms cubic-bezier(0.05, 0.7, 0.1, 1),
    box-shadow 220ms cubic-bezier(0.05, 0.7, 0.1, 1);
}

.cta:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow:
    0 0 22px rgba(255, 59, 48, 0.55),
    0 0 44px rgba(255, 59, 48, 0.24);
}

.cta:active {
  transform: scale(0.98);
}

.cta.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
  box-shadow: none;
}

.cta.ghost:hover {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: none;
}

/* ── Cards (radius 24, #131313, borde sutil) ─────────────────── */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: var(--sp-3xl);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 6px 14px;
}

/* ── Reveal on scroll ────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 600ms cubic-bezier(0.05, 0.7, 0.1, 1),
    transform 600ms cubic-bezier(0.05, 0.7, 0.1, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ── Footer ──────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--sp-3xl);
  background: var(--surface);
}

.site-footer .container {
  display: grid;
  gap: var(--sp-2xl);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-lg) var(--sp-2xl);
}

.footer-links a {
  color: var(--fg-muted);
  font-size: 13px;
}

.footer-links a:hover {
  color: var(--fg);
}

.footer-legal {
  color: var(--fg-muted);
  font-size: 12px;
}

/* ── Páginas legales ─────────────────────────────────────────── */

.legal-page {
  padding-block: clamp(48px, 8vw, 88px);
}

.legal-page h1 {
  font-size: clamp(28px, 4.5vw, 40px);
  margin-bottom: var(--sp-sm);
}

.legal-page h2 {
  font-size: 20px;
  margin-top: var(--sp-3xl);
  margin-bottom: var(--sp-md);
}

.legal-page p,
.legal-page li {
  color: var(--fg-muted);
  margin-bottom: var(--sp-md);
}

.legal-page ul,
.legal-page ol {
  padding-left: 22px;
  margin-bottom: var(--sp-lg);
}

.legal-page .updated {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  display: block;
  margin-bottom: var(--sp-3xl);
}

.notice {
  border: 1px solid rgba(255, 138, 0, 0.35);
  background: rgba(255, 138, 0, 0.07);
  border-radius: var(--r-cta);
  padding: var(--sp-lg) var(--sp-xl);
  color: var(--fg-muted);
  font-size: 13px;
  margin-bottom: var(--sp-3xl);
}
