/* Misma paleta que la app (src/input.css): oscuro por defecto y claro si el sistema lo prefiere. */
:root {
  color-scheme: dark light;
  --bg: #030712;
  --surface: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  --text: #f3f4f6;
  --text-2: #d1d5db;
  --muted: #9ca3af;
  --link: #93c5fd;
  --title-from: #60a5fa;
  --title-to: #a5b4fc;
  --orb-1: rgba(37, 99, 235, 0.1);
  --orb-2: rgba(79, 70, 229, 0.1);
  --chip-bg: rgba(99, 102, 241, 0.12);
  --chip-text: #a5b4fc;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f5f9;
    --surface: rgba(255, 255, 255, 0.72);
    --border: rgba(15, 23, 42, 0.08);
    --shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    --text: #101828;
    --text-2: #344054;
    --muted: #4b5565;
    --link: #1d4ed8;
    --title-from: #2563eb;
    --title-to: #4338ca;
    --chip-bg: rgba(79, 70, 229, 0.08);
    --chip-text: #4338ca;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(99, 102, 241, 0.3); }

/* Orbes difuminados del fondo (como en la app) */
.orbs { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.orbs::before, .orbs::after { content: ""; position: absolute; border-radius: 50%; filter: blur(120px); }
.orbs::before { top: -20%; left: -10%; width: 60%; height: 60%; background: var(--orb-1); }
.orbs::after { bottom: -20%; right: -10%; width: 50%; height: 50%; background: var(--orb-2); }

.wrap { position: relative; z-index: 1; max-width: 56rem; margin: 0 auto; padding: 4rem 1rem 2rem; }

a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .btn:focus-visible { outline: 2px solid #6366f1; outline-offset: 3px; border-radius: 6px; }

/* Cabecera */
.hero { text-align: center; margin-bottom: 3rem; }
.hero .logo { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 12px 32px rgba(79, 70, 229, 0.35); }
h1 {
  margin: 1.25rem 0 0.75rem;
  font-size: clamp(2.25rem, 6vw, 3rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--title-from), var(--title-to));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { max-width: 40rem; margin: 0 auto; font-size: 1.15rem; color: var(--text-2); }

.nav { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 1.75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.7rem 1.6rem; font-weight: 600; font-size: 0.95rem; text-decoration: none; color: #fff;
  background: linear-gradient(90deg, #2563eb, #4f46e5); border-radius: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: scale(1.02); box-shadow: 0 0 30px rgba(79, 70, 229, 0.35); text-decoration: none; }
.btn.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { box-shadow: none; }

/* Paneles de vidrio */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border-radius: 1.5rem;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}
h2 { margin: 0 0 0.75rem; font-size: 1.4rem; line-height: 1.3; letter-spacing: -0.01em; }
h3 { margin: 1.5rem 0 0.4rem; font-size: 1.05rem; color: var(--text); }
p { margin: 0 0 0.9rem; color: var(--text-2); }
ul { margin: 0 0 1rem; padding-left: 1.25rem; color: var(--text-2); }
li { margin-bottom: 0.4rem; }
strong { color: var(--text); }

.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-bottom: 1.5rem; }
.grid .panel { margin-bottom: 0; }
.step { display: inline-flex; width: 2rem; height: 2rem; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--chip-bg); color: var(--chip-text); font-weight: 700; margin-bottom: 0.5rem; }

.chip { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--chip-bg);
  color: var(--chip-text); font-size: 0.8rem; font-weight: 600; margin-right: 0.4rem; }

code { padding: 0.1rem 0.4rem; border-radius: 0.4rem; background: var(--chip-bg); color: var(--chip-text); font-size: 0.9em; }

table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1rem; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); color: var(--text-2); }
th { color: var(--text); font-weight: 600; }
.table-scroll { overflow-x: auto; }

.lang-note { font-size: 0.9rem; color: var(--muted); }
.updated { font-size: 0.9rem; color: var(--muted); }

footer { text-align: center; padding: 2rem 0 1rem; color: var(--muted); font-size: 0.9rem; }
footer a { margin: 0 0.5rem; }

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