/* ============================================================
   Leandro Gimenez — Landing minimalista (estética Essentia)
   Sistema unificado: un eyebrow, un section-head, una lista,
   una escala tipográfica. Fondo único + hairlines. CTA oscuro.
   ============================================================ */

:root {
  /* Light */
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --ink: #1d1d1f;
  --ink-2: #35374b;
  --muted: #6e6e73;
  --faint: #a1a1a6;
  --hairline: rgba(0, 0, 0, 0.09);
  --hairline-strong: rgba(0, 0, 0, 0.14);

  --accent: #344955;
  --accent-hover: #2a3a44;
  --accent-soft: #50727b;
  --on-accent: #ffffff;

  --nav-bg: rgba(255, 255, 255, 0.72);
  --dark-bg: #0c0d10;

  /* Tipografía */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --fs-hero: clamp(2.5rem, 6vw, 5rem);
  --fs-h2: clamp(1.75rem, 3.2vw, 2.75rem);
  --fs-h3: 1.3125rem;
  --fs-statement: clamp(1.375rem, 2.6vw, 2rem);
  --fs-lede: clamp(1.0625rem, 1.5vw, 1.1875rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-micro: 0.75rem;

  /* Espacio */
  --gutter: clamp(24px, 5vw, 80px);
  --section: clamp(72px, 11vw, 132px);
  --head-gap: clamp(40px, 6vw, 64px);
  --maxw: 1080px;

  --num-col: 56px;
  --radius: 12px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg: #0c0d10;
  --bg-soft: #131419;
  --ink: #f5f5f7;
  --ink-2: #d6d6db;
  --muted: #a1a1a6;
  --faint: #6e6e73;
  --hairline: rgba(255, 255, 255, 0.11);
  --hairline-strong: rgba(255, 255, 255, 0.18);

  --accent: #8fb8c4;
  --accent-hover: #a4c8d2;
  --accent-soft: #7a9ea6;
  --on-accent: #0c0d10;

  --nav-bg: rgba(12, 13, 16, 0.78);
  --dark-bg: #060708;
}

/* ---------------- Base ---------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01", "kern";
  overflow-x: hidden;
  transition: background 0.45s var(--ease-expo), color 0.45s var(--ease-expo);
}
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--on-accent); }

.container { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------------- Eyebrow (ÚNICO estilo) ---------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}
.eyebrow__line { width: 24px; height: 1px; background: var(--accent); transform-origin: left center; }

/* ---------------- Section head (ÚNICO patrón) ---------------- */
.section { padding-block: var(--section); border-top: 1px solid var(--hairline); }
.section-head { margin-bottom: var(--head-gap); }
.section-head .eyebrow { margin-bottom: 20px; }
.section-title { font-size: var(--fs-h2); max-width: 18ch; }
.section-sub { margin-top: 14px; color: var(--muted); font-size: var(--fs-small); max-width: 48ch; }
.section-head--center { text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head--center .section-title { max-width: none; margin-inline: auto; }

/* ---------------- Número (ÚNICO estilo) ---------------- */
.num {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

/* ---------------- Botones ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: var(--fs-small); font-weight: 500;
  padding: 13px 24px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.18s var(--ease);
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { color: var(--ink); border-color: var(--hairline-strong); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--sm { padding: 9px 18px; }
.btn--full { width: 100%; padding-block: 15px; }

/* ---------------- NAV ---------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: var(--gutter);
  padding: 16px var(--gutter);
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.45s var(--ease-expo);
}
.nav.is-stuck { border-bottom-color: var(--hairline); }
.brand { font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.02em; color: var(--ink); }
.brand__dot { color: var(--accent); }
.nav__links { display: flex; align-items: center; gap: 26px; }
.nav__links > a:not(.btn) { position: relative; font-size: var(--fs-small); color: var(--muted); transition: color 0.2s; }
.nav__links > a:not(.btn):hover { color: var(--ink); }
.nav__links > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  width: 100%; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.32s var(--ease-expo);
}
.nav__links > a:not(.btn):hover::after { transform: scaleX(1); }

/* Theme toggle */
.theme-toggle { background: none; border: none; cursor: pointer; padding: 4px; display: inline-flex; }
.theme-toggle__track {
  width: 40px; height: 22px; border-radius: 999px;
  background: var(--hairline-strong);
  display: inline-flex; align-items: center; padding: 2px;
  transition: background 0.32s var(--ease);
}
.theme-toggle__thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.32s var(--ease-expo), background 0.32s var(--ease);
}
[data-theme="dark"] .theme-toggle__thumb { transform: translateX(18px); background: var(--accent); }

/* ---------------- HERO ---------------- */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(72px, 11vw, 140px) var(--gutter) var(--section);
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
}
/* Atmósfera sutil (1 gradiente, no blobs pesados) */
.hero::before {
  content: "";
  position: absolute; inset: -10% -20% 30%;
  z-index: -1;
  background: radial-gradient(ellipse 60% 55% at 50% 35%, color-mix(in oklch, var(--accent-soft) 16%, transparent), transparent 70%);
  pointer-events: none;
}
.hero .eyebrow { margin-bottom: 32px; }
.hero__title { font-size: var(--fs-hero); letter-spacing: -0.045em; margin-bottom: 30px; }
.hero__title .line { display: block; }
.hero__lede { font-size: var(--fs-lede); color: var(--muted); max-width: 52ch; margin: 0 auto 38px; line-height: 1.55; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 32px; }
.hero__sig { font-size: var(--fs-small); color: var(--faint); }

/* ---------------- Lista numerada (ÚNICO patrón) ---------------- */
.list { list-style: none; }
.list-item {
  display: grid;
  grid-template-columns: var(--num-col) 1fr;
  gap: 24px;
  padding-block: 28px;
  border-top: 1px solid var(--hairline);
}
.list-item:last-child { border-bottom: 1px solid var(--hairline); }
.list-item .num { padding-top: 4px; }
.list-item h3 { font-size: var(--fs-h3); margin-bottom: 8px; }
.list-item p { color: var(--muted); max-width: 56ch; }

.list--compact .list-item { grid-template-columns: 40px 1fr; gap: 16px; padding-block: 20px; }
.list--compact .list-item h3 { font-size: 1.0625rem; margin-bottom: 4px; }
.list--compact .list-item p { font-size: var(--fs-small); }

/* ---------------- Proceso (stepper) ---------------- */
.stepper {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.stepper__list { list-style: none; }
.step-tab {
  display: flex;
  align-items: baseline;
  gap: 18px;
  width: 100%;
  text-align: left;
  font-family: inherit;
  background: none;
  border: none;
  border-top: 1px solid var(--hairline);
  padding: 18px 0;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.3s var(--ease), padding-left 0.35s var(--ease-expo);
}
.stepper__list li:last-child .step-tab { border-bottom: 1px solid var(--hairline); }
.step-tab__n { font-size: var(--fs-small); color: var(--faint); font-variant-numeric: tabular-nums; transition: color 0.3s; }
.step-tab__t { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; }
.step-tab:hover { color: var(--ink); }
.step-tab.is-active { color: var(--ink); padding-left: 14px; }
.step-tab.is-active .step-tab__n { color: var(--accent); }

.stepper__panel { transition: opacity 0.22s var(--ease), transform 0.4s var(--ease-expo); }
.stepper__panel.is-changing { opacity: 0; transform: translateY(8px); }
.stepper__num {
  display: block;
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--faint);
  opacity: 0.4;
  margin-bottom: 16px;
}
.stepper__title { font-size: var(--fs-h2); margin-bottom: 16px; }
.stepper__desc { color: var(--muted); font-size: var(--fs-lede); max-width: 38ch; }

/* ---------------- Ejemplos / Capacidades ---------------- */
.examples { list-style: none; display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; }
.example { padding-block: 28px; border-top: 1px solid var(--hairline); }
.example h3 { font-size: var(--fs-h3); margin-bottom: 8px; }
.example p { color: var(--muted); font-size: var(--fs-small); max-width: 46ch; }
.example__tag { display: block; font-size: var(--fs-micro); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }

/* ---------------- Filosofía ---------------- */
.philo { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(40px, 7vw, 96px); align-items: start; }
.statement { font-size: var(--fs-statement); font-weight: 500; letter-spacing: -0.025em; line-height: 1.25; margin-bottom: 32px; }
.philo__vision { color: var(--muted); font-size: var(--fs-lede); line-height: 1.55; max-width: 46ch; }
.philo__vlabel { color: var(--ink); font-weight: 600; }

/* ---------------- Credibilidad ---------------- */
.stats { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.stat { display: flex; flex-direction: column; gap: 12px; }
.stat__num { font-size: clamp(2.2rem, 4.5vw, 3.25rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.stat__unit { font-size: 0.36em; color: var(--faint); font-weight: 500; }
.stat__label { color: var(--muted); font-size: var(--fs-small); max-width: 26ch; }

/* ---------------- CTA FINAL (oscuro) ---------------- */
.cta { background: var(--dark-bg); color: #f5f5f7; padding-block: var(--section); text-align: center; }
.cta .eyebrow { color: rgba(245, 245, 247, 0.55); }
.cta .eyebrow__line { background: var(--accent-soft); }
.cta__title { color: #f5f5f7; }
.cta__sub { color: rgba(245, 245, 247, 0.66); font-size: var(--fs-lede); max-width: 44ch; margin: -16px auto 36px; }
.cta__chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 44px; }
.chip {
  font-size: var(--fs-small); color: #f5f5f7;
  border: 1px solid rgba(245, 245, 247, 0.22); border-radius: 999px;
  padding: 11px 22px; transition: border-color 0.25s, transform 0.2s;
}
.chip:hover { border-color: rgba(245, 245, 247, 0.55); transform: translateY(-2px); }
.chip--solid { background: var(--accent-soft); color: #0c0d10; border-color: var(--accent-soft); }

.form { display: grid; gap: 16px; text-align: left; max-width: 520px; margin: 0 auto; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: var(--fs-small); color: rgba(245, 245, 247, 0.66); }
.field input, .field textarea {
  font-family: inherit; font-size: var(--fs-small); color: #f5f5f7;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(245, 245, 247, 0.16);
  border-radius: 10px; padding: 12px 14px; resize: vertical;
  transition: border-color 0.2s, background 0.2s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent-soft); background: rgba(255, 255, 255, 0.08);
}
.form__status { font-size: var(--fs-small); text-align: center; min-height: 1.2em; transition: color 0.3s; }
.form__status.is-ok { color: var(--accent-3); }
.form__status.is-error { color: #e0857a; }

/* ---------------- FOOTER ---------------- */
.footer { padding-block: clamp(48px, 7vw, 80px) 36px; border-top: 1px solid var(--hairline); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 44px; margin-bottom: 48px; }
.footer__brand p { color: var(--muted); font-size: var(--fs-small); margin-top: 14px; line-height: 1.5; }
.footer__col { display: flex; flex-direction: column; gap: 11px; }
.footer__head { font-size: var(--fs-micro); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 3px; }
.footer__col a { font-size: var(--fs-small); color: var(--muted); transition: color 0.2s; }
.footer__col a:hover { color: var(--ink); }
.footer__legal { display: flex; justify-content: space-between; padding-top: 26px; border-top: 1px solid var(--hairline); font-size: var(--fs-small); color: var(--faint); }

/* ---------------- Micro-interacciones (hover) ---------------- */
.list-item, .example, .process-item { transition: background 0.32s var(--ease), padding 0.32s var(--ease); border-radius: 10px; }
.list-item h3, .example h3, .process-item h3 { transition: color 0.3s var(--ease); }
.list-item .num, .example__tag, .process-item .num { transition: color 0.3s var(--ease); }
.list-item:hover, .example:hover, .process-item:hover { background: var(--bg-soft); }
.list-item:hover h3, .example:hover h3, .process-item:hover h3 { color: var(--accent); }
.list-item:hover .num, .process-item:hover .num { color: var(--accent-hover); }

/* Deriva lenta del gradiente del hero */
@keyframes heroDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -16px, 0) scale(1.04); }
}
.hero::before { animation: heroDrift 14s ease-in-out infinite; }

/* ---------------- Motion ---------------- */
.anim .hero .reveal { opacity: 0; }
.anim .hero__title { opacity: 0; }
.split-line { overflow: hidden; display: block; padding-bottom: 0.08em; }

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .stepper { grid-template-columns: 1fr; gap: 28px; }
  .philo { grid-template-columns: 1fr; gap: 48px; }
  .stats { grid-template-columns: 1fr; gap: 32px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 560px) {
  .nav__links > a:not(.btn) { display: none; }
  .form__row { grid-template-columns: 1fr; }
  .footer__legal { flex-direction: column; gap: 8px; }
  .hero__actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
