/* kernox.cloud: sin recursos externos, fuentes del sistema, claro y oscuro. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f5f7fb;
  --fg: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --brand: #1d4ed8;
  --on-brand: #ffffff;
  --glow: #e8efff;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #101a2c;
    --fg: #e5e9f0;
    --muted: #9aa8bd;
    --border: #1f2b40;
    --brand: #7aa7ff;
    --on-brand: #0b1220;
    --glow: #13213d;
  }
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  /* Sin system-ui: en algunos locales resuelve a fuentes CJK sin negrita. */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: var(--brand); text-underline-offset: 0.2em; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

.skip {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 1;
  padding: 0.5rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

/* Cabecera */
.site-header { border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--fg);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand svg { flex: none; width: 2rem; height: 2rem; }
.nav-link { color: var(--muted); font-weight: 500; text-decoration: none; }
.nav-link:hover { color: var(--fg); }

/* Portada */
.hero {
  padding: clamp(4rem, 12vw, 8rem) 0 clamp(3.5rem, 9vw, 6.5rem);
  background: radial-gradient(56rem 28rem at 90% -20%, var(--glow), transparent 70%);
}
.eyebrow {
  margin: 0 0 1rem;
  color: var(--brand);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
h1 {
  max-width: 18ch;
  margin: 0 0 1.25rem;
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.lead { max-width: 38rem; margin: 0 0 2.25rem; color: var(--muted); font-size: clamp(1.125rem, 2.4vw, 1.3125rem); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.375rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { border-color: var(--border); color: var(--fg); }
.btn-secondary:hover { background: var(--surface); }

/* Secciones */
.section { padding: clamp(3.5rem, 9vw, 6rem) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
h2 { margin: 0 0 0.75rem; font-size: clamp(1.75rem, 4vw, 2.375rem); line-height: 1.15; letter-spacing: -0.025em; }
.intro { max-width: 38rem; margin: 0 0 2.5rem; color: var(--muted); }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step { padding: 1.75rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.step-label {
  margin: 0;
  color: var(--brand);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
h3 { margin: 0.5rem 0; font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.01em; }
.step p:last-child { margin: 0; color: var(--muted); }

.contact p { margin: 0 0 1rem; color: var(--muted); }
.contact .mail { margin: 0; font-size: clamp(1.375rem, 4vw, 2rem); font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }

/* Páginas de texto */
.legal { max-width: 46rem; padding: clamp(3rem, 8vw, 5rem) 0 clamp(3.5rem, 9vw, 6rem); }
.legal h1 { max-width: none; font-size: clamp(2rem, 5vw, 2.75rem); }
.legal h2 { margin-top: 2.25rem; font-size: 1.375rem; }
.updated { color: var(--muted); }

/* Pie */
.site-footer { padding: 2rem 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9375rem; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; }
.foot p { margin: 0; }
.foot a { color: inherit; }
