/* Tokens (DESIGN.md · SoftMYC), reset y tipografía */
:root {
  /* Superficies: 4 niveles de obsidiana, nunca negro puro */
  --bg-canvas: #0a0d14;
  --bg-surface-1: #10141d;
  --bg-surface-2: #161b26;
  --bg-surface-3: #1e2533;
  --bg-glass: rgba(16, 20, 29, 0.78);
  --bg-bezel: #080a0f;

  /* Marca (regla del 10 %: solo CTA, estados activos y micro-badges) */
  --brand-primary: #ff6b00;
  --brand-primary-hover: #ff8524;
  --brand-gradient: linear-gradient(135deg, #ff8c00 0%, #ff5500 100%);
  --brand-tint-bg: #231409;
  --brand-tint-border: #5c2d0c;
  --brand-tint-text: #ff7a1a;
  --text-on-brand: #0a0d14;

  /* Texto */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Bordes */
  --border-subtle: #1e2533;
  --border-strong: #262f40;
  --border-hover: #475569;
  --border-highlight: rgba(255, 255, 255, 0.08);
  --border-focus: #ff6b00;

  /* Estados */
  --status-success: #10b981;
  --status-success-bg: rgba(16, 185, 129, 0.12);
  --status-warning: #f59e0b;
  --status-warning-bg: rgba(245, 158, 11, 0.12);
  --status-danger: #ef4444;
  --status-danger-bg: rgba(239, 68, 68, 0.12);

  /* Espaciado (base 4px) */
  --s-4: 4px;
  --s-8: 8px;
  --s-12: 12px;
  --s-16: 16px;
  --s-20: 20px;
  --s-24: 24px;
  --s-32: 32px;
  --s-40: 40px;
  --s-48: 48px;
  --s-64: 64px;
  --s-80: 80px;
  --s-96: 96px;

  /* Radios */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-bezel: 18px;
  --radius-pill: 9999px;

  /* Layout */
  --container: 1240px;
  --gutter: var(--s-24);
  --header-h: 64px;

  /* Tipografía */
  --font-sans: "Inter", "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --t-micro: 0.75rem;
  --t-ui: 0.875rem;
  --t-body: 1rem;
  --t-lead: 1.125rem;
  --t-h3: 1.25rem;
  --t-h2: clamp(1.75rem, 3vw, 2.5rem);
  --t-hero: clamp(2.5rem, 5vw, 4rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 150ms;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s-16));
  scroll-padding-bottom: var(--s-80);
  -webkit-text-size-adjust: 100%;
  background: var(--bg-canvas);
}

body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

svg[fill="none"] {
  width: 20px;
  height: 20px;
  flex: none;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
pre {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  color: var(--text-primary);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  font-size: var(--t-hero);
  font-weight: 700;
  line-height: 1.08;
}

h2 {
  font-size: var(--t-h2);
  font-weight: 600;
  line-height: 1.15;
}

h3 {
  font-size: var(--t-h3);
  font-weight: 600;
  line-height: 1.3;
}

p {
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--brand-tint-border);
  color: var(--text-primary);
}

.container {
  width: min(100%, var(--container));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: var(--s-8);
  left: var(--s-8);
  z-index: 200;
  padding: var(--s-8) var(--s-16);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  background: var(--bg-surface-2);
  color: var(--text-primary);
  font-size: var(--t-ui);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Revelado al hacer scroll */
.js .reveal {
  opacity: 0;
  transform: translateY(var(--s-16));
  transition: opacity 0.6s var(--ease) var(--d, 0s), transform 0.6s var(--ease) var(--d, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

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

@media (min-width: 900px) {
  :root {
    --gutter: var(--s-48);
  }
}
