/* ============================================================
   Tiancode — Website Tokens (OpenAI Editorial Style)
   Paleta de alto contraste cromático neutral (#000000 / #ffffff / #09090b),
   tipografía precisa Inter, bordes hairline de precisión (0.08 alpha),
   sombras arquitectónicas y componentes tipo pill.
   ============================================================ */

:root {
  /* Tipografía: Inter con métricas editoriales */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;

  /* Layout */
  --maxw: 1180px;
  --maxw-narrow: 820px;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --radius-pill: 9999px;
  --header-h: 64px;

  /* Acento cromático de precisión (Sutil azul cobalto / violeta / cian) */
  --accent: #2563eb;
  --accent-2: #06b6d4;
  --accent-3: #6366f1;
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #4f46e5 50%, #06b6d4 100%);
  --accent-glow: rgba(37, 99, 235, 0.18);

  /* -------- Tema claro (Editorial Paper / White Lab) -------- */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f9f9fb;
  --surface-3: #f1f2f6;
  --card-bg: rgba(255, 255, 255, 0.85);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);
  --grid: rgba(0, 0, 0, 0.04);
  --text: #09090b;
  --text-2: #52525b;
  --text-3: #71717a;
  --text-muted: #a1a1aa;
  --accent-soft: rgba(37, 99, 235, 0.07);
  --header-bg: rgba(255, 255, 255, 0.82);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 12px 32px -12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.12);
  --hero-glow-1: rgba(37, 99, 235, 0.06);
  --hero-glow-2: rgba(6, 182, 212, 0.05);
  --hero-glow-3: rgba(99, 102, 241, 0.04);
  --term-bg: #09090b;
  --term-text: #f4f4f5;
  --scroll-thumb: rgba(0, 0, 0, 0.18);
  --skel-shine: rgba(0, 0, 0, 0.05);
  --glare-opacity: 0.12;
  --showcase-border: rgba(0, 0, 0, 0.1);
  --showcase-glow: rgba(0, 0, 0, 0.04);

  /* Botones estilo OpenAI Inverted Pill */
  --btn-primary-bg: #09090b;
  --btn-primary-text: #ffffff;
  --btn-primary-hover: #27272a;
  --btn-secondary-bg: transparent;
  --btn-secondary-text: #09090b;
  --btn-secondary-border: rgba(0, 0, 0, 0.15);
  --btn-secondary-hover: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
  /* -------- Tema oscuro (Deep Obsidian / Frontier Studio) -------- */
  --bg: #08080a;
  --surface: #0e0e12;
  --surface-2: #131318;
  --surface-3: #1a1a22;
  --card-bg: rgba(14, 14, 18, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --grid: rgba(255, 255, 255, 0.035);
  --text: #f4f4f6;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --text-muted: #52525b;
  --accent-soft: rgba(37, 99, 235, 0.14);
  --header-bg: rgba(8, 8, 10, 0.82);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 16px 40px -16px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 32px 80px -24px rgba(0, 0, 0, 0.85);
  --hero-glow-1: rgba(37, 99, 235, 0.12);
  --hero-glow-2: rgba(6, 182, 212, 0.08);
  --hero-glow-3: rgba(99, 102, 241, 0.08);
  --term-bg: #050507;
  --term-text: #f4f4f6;
  --scroll-thumb: rgba(255, 255, 255, 0.18);
  --skel-shine: rgba(255, 255, 255, 0.06);
  --glare-opacity: 0.2;
  --showcase-border: rgba(255, 255, 255, 0.1);
  --showcase-glow: rgba(37, 99, 235, 0.15);

  /* Botones estilo OpenAI Inverted Pill */
  --btn-primary-bg: #ffffff;
  --btn-primary-text: #09090b;
  --btn-primary-hover: #e4e4e7;
  --btn-secondary-bg: transparent;
  --btn-secondary-text: #f4f4f6;
  --btn-secondary-border: rgba(255, 255, 255, 0.18);
  --btn-secondary-hover: rgba(255, 255, 255, 0.08);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-feature-settings: "cv11" 1, "liga" 1, "calt" 1, "ss01" 1;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: rgba(37, 99, 235, 0.25); color: inherit; }

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

/* Scrollbar custom */
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--text-3); }

.container { width: min(var(--maxw), 100% - 48px); margin-inline: auto; }
.container-narrow { width: min(var(--maxw-narrow), 100% - 48px); margin-inline: auto; }

.section { padding: 96px 0; }

.section-alt {
  position: relative;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head { max-width: 740px; margin: 0 auto 52px; text-align: center; }
.section-head-left { text-align: left; margin: 0 0 44px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.section-title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--text);
}
.section-sub { margin: 0; font-size: 16.5px; line-height: 1.6; color: var(--text-2); }
