/* odd.css — ODD · Organic Driven Development (t420.dev)
   Mismo ADN cálido que t420.dev y ponytail.dev: fondo casi negro,
   tinta crema, hairlines. Único corte: el gradiente semáforo. */

:root {
  --bg: #070606;
  --ink: #efe9dd;
  --soft: #cfc8ba;
  --muted: #9a9284;
  --faint: #6a6358;
  --line: rgba(239, 233, 221, 0.1);
  --green: #3fae4a;
  --yellow: #f9a825;
  --red: #e2231a;
  --red-ink: #ff6a5f;
  --holo: linear-gradient(120deg, #3fae4a 0%, #f9a825 50%, #e2231a 100%);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, "Courier New", monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  /* atmósfera: tres halos apenas visibles, sin imágenes ni JS */
  background-image:
    radial-gradient(900px 520px at 16% -4%, rgba(63, 174, 74, 0.09), transparent 62%),
    radial-gradient(820px 520px at 94% 6%, rgba(249, 168, 37, 0.08), transparent 66%),
    radial-gradient(760px 540px at 58% 104%, rgba(226, 35, 26, 0.05), transparent 70%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--yellow);
  color: var(--bg);
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.75rem;
  text-decoration: none;
  border-radius: 4px;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 14px;
}

/* ── nav ─────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 6, 6, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  max-width: 1180px;
  min-height: 60px;
  margin: 0 auto;
  padding: 10px 28px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
}

.nav-links li {
  display: flex;
  align-items: center;
}

.nav-links li:not(:last-child)::after {
  content: "·";
  margin: 0 12px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.nav-link {
  padding: 5px 0;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.nav-link:hover {
  color: var(--ink);
  border-bottom-color: var(--yellow);
}

/* ── estructura ──────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: 110px 0;
  border-top: 1px solid var(--line);
}

.kicker {
  display: block;
  margin-bottom: 26px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.h2 {
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(1.95rem, 4vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.h2 em {
  display: block;
  margin-top: 0.12em;
  color: var(--muted);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.section-intro {
  max-width: 64ch;
  margin-top: 24px;
  color: var(--soft);
  font-size: 1rem;
}

/* ── hero ────────────────────────────────────────────── */
.hero {
  padding: clamp(74px, 12vh, 148px) 0 clamp(68px, 10vh, 124px);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.hero-kicker::before {
  content: "";
  width: 30px;
  height: 2px;
  background: var(--holo);
}

.hero-h1 {
  max-width: 18ch;
  margin-top: 26px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(2.7rem, 7.6vw, 5.7rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.hero-h1 em {
  display: block;
  margin-top: 0.14em;
  color: var(--muted);
  font-style: italic;
  font-weight: 400;
  font-size: 0.62em;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.holo-sin {
  background: var(--holo);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 8px rgba(249, 168, 37, 0.4));
}

@keyframes holoPulse {
  0%,
  100% {
    filter: drop-shadow(0 0 6px rgba(249, 168, 37, 0.28));
  }
  50% {
    filter: drop-shadow(0 0 14px rgba(249, 168, 37, 0.55));
  }
}

.hero-h1 .holo-sin {
  animation: holoPulse 7s ease-in-out infinite;
}

.hero-sub {
  max-width: 62ch;
  margin-top: 32px;
  color: var(--soft);
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-cta,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  border: 1px solid transparent;
  background:
    linear-gradient(#0c0a09, #0c0a09) padding-box,
    var(--holo) border-box;
  box-shadow: 0 0 24px -12px rgba(249, 168, 37, 0.65);
}

.btn-primary:hover {
  background:
    linear-gradient(#151110, #151110) padding-box,
    var(--holo) border-box;
  box-shadow: 0 0 34px -8px rgba(249, 168, 37, 0.6);
}

.btn-ghost {
  color: var(--soft);
  background: transparent;
}

.btn-ghost:hover {
  color: var(--ink);
  border-color: rgba(239, 233, 221, 0.3);
}

/* ── 01 · escalera ───────────────────────────────────── */
.ladder {
  margin-top: 54px;
  border-top: 1px solid var(--line);
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 8px 22px;
  align-items: center;
  padding: 24px 4px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease;
}

.step:hover {
  background: rgba(239, 233, 221, 0.018);
}

.step-num {
  color: var(--state, var(--faint));
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.step-body {
  display: flex;
  align-items: baseline;
  gap: 8px 18px;
  min-width: 0;
}

.step-name {
  flex-shrink: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.step-desc {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.chip {
  justify-self: end;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.step:hover .chip,
.risk-card:hover {
  border-color: var(--state, var(--line));
}

.state-green {
  --state: var(--green);
}

.state-yellow {
  --state: var(--yellow);
}

.state-red {
  --state: var(--red);
}

.state-neutral {
  --state: var(--muted);
}

.state-green .chip {
  color: var(--green);
}

.state-yellow .chip {
  color: var(--yellow);
}

.state-red .chip {
  color: var(--red-ink);
}

/* ── 02 · checklist ──────────────────────────────────── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 52px;
}

.check-card {
  padding: 30px 26px 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(239, 233, 221, 0.012);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.check-card:hover {
  border-color: var(--green);
  background: rgba(63, 174, 74, 0.035);
}

.check-mark {
  display: block;
  margin-bottom: 24px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 800;
}

.check-title {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.check-desc {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.verdict {
  margin-top: 38px;
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.9;
}

.fine {
  max-width: 78ch;
  margin-top: 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
}

/* ── 03 · tabla de roles ─────────────────────────────── */
.table-wrap {
  margin-top: 50px;
  overflow-x: auto;
}

.roles {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
}

.roles th {
  padding: 0 18px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-align: left;
  text-transform: uppercase;
}

.roles th:first-child,
.roles td:first-child {
  padding-left: 0;
}

.roles td {
  padding: 22px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--soft);
  vertical-align: top;
}

.roles td:first-child {
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 500;
  white-space: nowrap;
}

.roles code,
.tier code {
  padding: 3px 7px;
  border: 1px solid rgba(249, 168, 37, 0.28);
  border-radius: 4px;
  background: rgba(249, 168, 37, 0.06);
  color: var(--yellow);
  font-family: var(--mono);
  font-size: 0.8rem;
  white-space: nowrap;
}

/* ── 04 · riesgo ─────────────────────────────────────── */
.risk-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 52px;
  list-style: none;
}

.risk-card {
  padding: 24px 20px 26px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--state, var(--line));
  border-radius: 6px;
  background: rgba(239, 233, 221, 0.012);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.risk-card:hover {
  background: rgba(239, 233, 221, 0.03);
}

.risk-name {
  color: var(--state, var(--ink));
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.3;
  text-transform: uppercase;
}

.state-red .risk-name {
  color: var(--red-ink);
}

.risk-desc {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.contract {
  max-width: 100%;
  margin-top: 30px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b0a09;
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.75;
}

/* ── 05 · tiers ──────────────────────────────────────── */
.tiers {
  margin-top: 50px;
  border-top: 1px solid var(--line);
}

.tier {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.tier-name {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tier-desc {
  color: var(--soft);
  font-size: 0.98rem;
}

.t-passive .tier-name {
  color: var(--muted);
}

.t-medium .tier-name {
  color: var(--yellow);
}

.t-high .tier-name {
  color: var(--red-ink);
}

/* ── cierre ──────────────────────────────────────────── */
.cta-final {
  padding: 120px 0 132px;
}

.cta-final .h2 {
  max-width: 24ch;
}

/* ── footer ──────────────────────────────────────────── */
.odd-footer {
  padding: 30px 28px 44px;
  border-top: 1px solid var(--line);
}

.odd-footer p {
  max-width: 1180px;
  margin: 0 auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1.8;
}

/* ── reveal al scroll (mismo contrato que reveal.js) ───
   visible por defecto; .js-anim lo arma solo si hay IO
   y el usuario permite movimiento. */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-anim .reveal {
  opacity: 0;
  transform: translateY(18px);
}

.reveal > * {
  opacity: 1;
  transform: none;
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.js-anim .reveal > * {
  opacity: 0;
  transform: translateY(24px);
}

.js-anim .reveal > *:nth-child(2) {
  transition-delay: 90ms;
}

.js-anim .reveal > *:nth-child(3) {
  transition-delay: 180ms;
}

.js-anim .reveal > *:nth-child(4) {
  transition-delay: 270ms;
}

.reveal.in,
.reveal.in > * {
  opacity: 1;
  transform: none;
}

/* ── responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
  .section {
    padding: 84px 0;
  }

  .step {
    grid-template-columns: 44px 1fr;
    align-items: start;
  }

  .step-body {
    display: block;
  }

  .step-desc {
    margin-top: 5px;
  }

  .chip {
    grid-column: 2;
    justify-self: start;
    margin-top: 8px;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .risk-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tier {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 600px) {
  html {
    scroll-padding-top: 70px;
  }

  .wrap {
    padding: 0 20px;
  }

  .nav-inner {
    justify-content: center;
    min-height: 54px;
    padding: 10px 12px;
  }

  .nav-links li:not(:last-child)::after {
    margin: 0 7px;
  }

  .nav-link {
    font-size: 0.6rem;
    letter-spacing: 0.09em;
  }

  .hero {
    padding: 56px 0 68px;
  }

  .hero-h1 {
    font-size: clamp(2.35rem, 10.5vw, 3rem);
  }

  .hero-sub {
    margin-top: 26px;
    font-size: 0.98rem;
  }

  .hero-cta,
  .cta-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 32px;
  }

  .section {
    padding: 68px 0;
  }

  .kicker {
    margin-bottom: 18px;
  }

  .ladder {
    margin-top: 38px;
  }

  .step {
    padding: 20px 0;
  }

  .grid-3,
  .risk-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 38px;
  }

  .verdict {
    font-size: 0.84rem;
  }

  .table-wrap {
    margin-top: 38px;
    overflow: visible;
  }

  .roles,
  .roles tbody,
  .roles tr,
  .roles td {
    display: block;
    width: 100%;
  }

  .roles thead {
    display: none;
  }

  .roles tr {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }

  .roles td,
  .roles th {
    padding: 3px 0;
    border: 0;
  }

  .roles td::before {
    content: attr(data-label) " · ";
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .roles td:first-child {
    padding-left: 0;
  }

  .roles code {
    white-space: normal;
  }

  .tiers {
    margin-top: 38px;
  }

  .cta-final {
    padding: 82px 0 92px;
  }

  .odd-footer {
    padding: 26px 20px 38px;
  }
}

/* ── movimiento reducido: sin animación ni transición ── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal,
  .reveal > * {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-h1 .holo-sin {
    filter: drop-shadow(0 0 8px rgba(249, 168, 37, 0.4));
  }
}
