/* ============================================================
   lice.cl · main.css
   ────────────────────────────────────────────────────────────
   Design tokens, base, layout y utilidades compartidas.
   El resto de estilos vive en archivos separados por sección
   (./nav.css, ./hero.css, ./trust.css, etc.) cargados desde
   el HTML en el orden correcto.
   ============================================================ */

:root {
  /* Type families */
  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', 'Menlo', ui-monospace, monospace;

  /* Easings */
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Layout */
  --container: 1240px;
}

/* ============== LIGHT (default) ============== */
:root,
[data-theme="light"] {
  --bg:        #FFFFFF;
  --bg-2:      #F8FAFC;
  --bg-3:      #F1F5F9;

  --ink:       #0F172A;
  --ink-2:     #334155;
  --ink-3:     #64748B;
  --ink-4:     #94A3B8;

  --rule:        #E2E8F0;
  --rule-soft:   #F8FAFC;
  --rule-strong: #CBD5E1;

  --brand:      #4F46E5;
  --brand-hi:   #3730A3;
  --brand-lo:   #818CF8;

  --accent:     #6366F1;

  --success:    #10B981;
  --warning:    #F59E0B;

  --shadow-sm:  0 1px 2px 0 rgb(15 23 42 / 0.04);
  --shadow-md:  0 4px 12px -2px rgb(15 23 42 / 0.08);
  --shadow-lg:  0 16px 40px -8px rgb(15 23 42 / 0.12);
  --shadow-xl:  0 24px 60px -12px rgb(15 23 42 / 0.16);

  --ring:       0 0 0 3px rgb(79 70 229 / 0.18);

  color-scheme: light;
  --theme-color: #FFFFFF;
}

/* ============== DARK ============== */
[data-theme="dark"] {
  --bg:        #020617;
  --bg-2:      #0F172A;
  --bg-3:      #1E293B;

  --ink:       #F8FAFC;
  --ink-2:     #CBD5E1;
  --ink-3:     #94A3B8;
  --ink-4:     #64748B;

  --rule:        #1E293B;
  --rule-soft:   #0F172A;
  --rule-strong: #334155;

  --brand:      #818CF8;
  --brand-hi:   #A5B4FC;
  --brand-lo:   #4F46E5;

  --accent:     #6366F1;

  --success:    #34D399;
  --warning:    #FBBF24;

  --shadow-sm:  0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md:  0 4px 12px -2px rgb(0 0 0 / 0.4);
  --shadow-lg:  0 16px 40px -8px rgb(0 0 0 / 0.5);
  --shadow-xl:  0 24px 60px -12px rgb(0 0 0 / 0.6);

  --ring:       0 0 0 3px rgb(129 140 248 / 0.25);

  color-scheme: dark;
  --theme-color: #020617;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  transition:
    background-color 0.3s var(--ease-in-out),
    color 0.3s var(--ease-in-out);
}

/* Scroll lock cuando el menú móvil está abierto */
body.nav-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; transition: color .15s var(--ease-out); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }

::selection { background: var(--brand); color: #fff; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  font-optical-sizing: auto;
}
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.serif-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.mono {
  font-family: var(--font-mono);
  font-weight: 400;
  font-feature-settings: "ss01" on, "ss02" on, "zero" on;
  letter-spacing: 0;
}

.kbd {
  font-family: var(--font-mono);
  font-size: 0.82em;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-3);
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  white-space: nowrap;
  font-weight: 500;
}
.kbd--inline { font-size: 0.78em; padding: 1px 6px; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--bg);
  padding: 8px 14px; border-radius: 4px; z-index: 999;
}
.skip:focus { left: 8px; }

/* ============================================================
   Layout
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 640px)  { .container { padding-inline: 32px; } }
@media (min-width: 1024px) { .container { padding-inline: 48px; } }

.section {
  padding: 64px 0;
  position: relative;
}
@media (min-width: 768px)  { .section { padding: 88px 0; } }
@media (min-width: 1024px) { .section { padding: 112px 0; } }

.section--soft {
  background: var(--bg-3);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.section--closing {
  padding: 80px 0 100px;
  background: var(--bg);
}
@media (min-width: 768px) { .section--closing { padding: 120px 0 140px; } }

.section__head {
  max-width: 760px;
  margin: 0 auto 48px;
  text-align: center;
}
@media (min-width: 768px) { .section__head { margin-bottom: 64px; } }

.section__kicker {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.section__num {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--brand);
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.02em;
  background: var(--bg-2);
  font-family: var(--font-mono);
}

.section__title {
  font-size: clamp(1.85rem, 1.2vw + 1.4rem, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0;
}
.section__title em { color: var(--brand); font-style: italic; font-weight: 500; }

.section__lead {
  font-size: 1.02rem;
  color: var(--ink-2);
  margin-top: 18px;
  max-width: 56ch;
  margin-inline: auto;
  line-height: 1.6;
}
@media (min-width: 768px) { .section__lead { font-size: 1.06rem; margin-top: 22px; } }

/* ============================================================
   Buttons (compartidos)
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0;
  white-space: nowrap;
  border: 1px solid transparent;
  transition:
    background-color .15s var(--ease-out),
    border-color .15s var(--ease-out),
    color .15s var(--ease-out),
    transform .15s var(--ease-out),
    box-shadow .15s var(--ease-out);
  min-height: 44px;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn--lg { padding: 14px 24px; font-size: 14.5px; }
.btn--block { width: 100%; }

.btn--solid {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow:
    0 1px 0 0 rgb(57 88 134 / 0.2),
    0 4px 12px -2px rgb(98 142 203 / 0.25);
}
.btn--solid:hover {
  background: var(--brand-hi);
  border-color: var(--brand-hi);
  color: #fff;
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 0 rgb(57 88 134 / 0.2),
    0 8px 20px -4px rgb(98 142 203 / 0.35);
}
.btn--solid:active { transform: translateY(0); }

.btn--ghost {
  background: var(--bg-2);
  color: var(--ink);
  border-color: var(--rule-strong);
}
.btn--ghost:hover {
  border-color: var(--brand);
  background: var(--bg);
  color: var(--brand-hi);
}

.btn--text {
  background: transparent;
  color: var(--brand);
  border: 0;
  padding: 8px 4px;
  min-height: 0;
  font-weight: 500;
}
.btn--text:hover { color: var(--brand-hi); }

/* ============================================================
   Focus & motion
   ============================================================ */
:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .nav, .hero__actions, .footer, .modal, .nav__mobile, .theme-toggle { display: none !important; }
  body { background: white; color: black; }
}
