/* Naltion — hoja de estilos única. Los colores viven en :root. */

:root {
  --bg:        #05070c;
  --bg-alt:    #080b12;
  --surface:   rgba(255,255,255,0.03);
  --surface-2: rgba(255,255,255,0.055);
  --line:      rgba(255,255,255,0.085);
  --line-2:    rgba(255,255,255,0.17);
  --text:      #eef0f4;
  --muted:     #98a0b0;
  --accent:    #e8b04b;
  --accent-2:  #ffc76a;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.62;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
.mono { font-family: var(--mono); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: 800px; }
.center { text-align: center; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
           overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

.glow { position: absolute; border-radius: 50%; filter: blur(120px); pointer-events: none; z-index: 0; }
.glow-b { top: 6%; right: -240px; width: 640px; height: 640px;
          background: radial-gradient(closest-side, rgba(232,176,75,0.1), transparent); }
.glow-c { bottom: -220px; left: 50%; transform: translateX(-50%); width: 860px; height: 500px;
          background: radial-gradient(closest-side, rgba(232,176,75,0.14), transparent); }

/* Revelado al hacer scroll */
.reveal { opacity: 0; transform: translateY(26px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal[data-delay="1"].in { transition-delay: 0.08s; }
.reveal[data-delay="2"].in { transition-delay: 0.16s; }
.reveal[data-delay="3"].in { transition-delay: 0.24s; }
.reveal[data-delay="4"].in { transition-delay: 0.32s; }

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(5,7,12,0.7);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 26px; height: 72px; }

.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; margin-right: auto; }
.logo-mark { width: 20px; height: 20px; border-radius: 6px; border: 2px dashed var(--accent);
             display: grid; place-items: center; }
.logo-mark i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); display: block; }
.logo-text { font-family: var(--mono); font-weight: 500; letter-spacing: 0.26em; font-size: 15px; }

.nav { display: flex; gap: 30px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 14.5px; transition: color 0.2s; }
.nav a:hover { color: var(--text); }

.header-right { display: flex; align-items: center; gap: 12px; }

/* Desplegable de idioma propio: el <select> nativo lo pinta el sistema
   operativo (fondo blanco, resaltado azul) y no respeta la paleta. */
.lang { position: relative; }

.lang-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 12px; font-family: var(--font); font-size: 13.5px;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.lang-btn:hover { border-color: var(--line-2); background: var(--surface-2); }
.lang-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-caret { width: 10px; height: 7px; color: var(--muted); transition: transform 0.2s var(--ease); }
.lang-btn[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 70;
  margin: 0; padding: 6px; list-style: none; min-width: 156px;
  background: #0d1017; border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 20px 48px -16px rgba(0,0,0,0.85);
}
.lang-menu[hidden] { display: none; }

.lang-menu li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; color: var(--muted); transition: background 0.15s, color 0.15s;
}
.lang-menu li:hover, .lang-menu li.focused { background: var(--surface-2); color: var(--text); }
.lang-menu li[aria-selected="true"] { color: var(--accent); }
.lang-menu li[aria-selected="true"]::after { content: "✓"; font-size: 12px; }

/* ---------- Botones ---------- */

.btn { display: inline-block; text-decoration: none; font-weight: 600; font-size: 15px;
       padding: 13px 26px; border-radius: 11px; border: 1px solid transparent;
       transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.25s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #141005; box-shadow: 0 10px 34px -12px rgba(232,176,75,0.7); }
.btn-primary:hover { background: var(--accent-2); box-shadow: 0 16px 44px -12px rgba(232,176,75,0.85); }
.btn-ghost { border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 9px 18px; font-size: 14px; border-radius: 9px; }
.btn-lg { padding: 16px 34px; font-size: 16px; }

/* ---------- Hero a pantalla completa ---------- */

.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; text-align: center;
  overflow: hidden; border-bottom: 1px solid var(--line);
  padding: 96px 0 120px;
}

.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }

.hero-veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 55% at 50% 50%, rgba(5,7,12,0.5), rgba(5,7,12,0.88) 70%),
    linear-gradient(180deg, rgba(5,7,12,0.85) 0%, transparent 30%, transparent 62%, var(--bg) 100%);
}

.hero-inner { position: relative; z-index: 2; max-width: 940px; }

.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em;
           text-transform: uppercase; color: var(--accent); margin-bottom: 24px; }

.hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.6rem); font-weight: 800;
           letter-spacing: -0.042em; margin-bottom: 28px; }

.lead { font-size: clamp(1.05rem, 1.4vw, 1.24rem); color: var(--muted);
        max-width: 62ch; margin: 0 auto 40px; }

.actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

.scroll-hint { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); z-index: 2; }
.scroll-hint span {
  display: block; width: 22px; height: 36px; border: 1px solid var(--line-2); border-radius: 12px; position: relative;
}
.scroll-hint span::after {
  content: ""; position: absolute; left: 50%; top: 8px; width: 3px; height: 6px; border-radius: 2px;
  background: var(--accent); transform: translateX(-50%); animation: wheel 1.9s var(--ease) infinite;
}
@keyframes wheel { 0% { opacity: 0; top: 7px; } 35% { opacity: 1; } 100% { opacity: 0; top: 20px; } }

/* ---------- Secciones ---------- */

.section { position: relative; padding: 130px 0; overflow: hidden; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section > .wrap { position: relative; z-index: 2; }

.section-head { max-width: 760px; margin-bottom: 66px; }
.section-head.center { margin-inline: auto; }
.section-title { font-size: clamp(2rem, 3.5vw, 3.1rem); letter-spacing: -0.035em; margin-bottom: 22px; }
.title-accent { color: var(--accent); }
.section-lead { color: var(--muted); font-size: 1.06rem; max-width: 66ch; }
.section-head.center .section-lead { margin-inline: auto; }
.wrap.center .section-lead, .wrap.center .section-title { margin-inline: auto; }

/* ---------- Tarjetas ---------- */

.cards { display: grid; gap: 18px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }

.card { position: relative; padding: 36px 32px 38px; background: var(--surface);
        border: 1px solid var(--line); border-radius: 18px;
        transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease); }
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: 18px; pointer-events: none;
  background: radial-gradient(440px circle at 50% 0%, rgba(232,176,75,0.1), transparent 70%);
  opacity: 0; transition: opacity 0.35s;
}
.card:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-4px); }
.card:hover::before { opacity: 1; }

.icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 22px;
        border-radius: 13px; border: 1px solid rgba(232,176,75,0.28);
        background: rgba(232,176,75,0.09); color: var(--accent); }
.icon svg { width: 23px; height: 23px; }

.card-idx { display: block; font-size: 11.5px; color: var(--accent); letter-spacing: 0.14em; margin-bottom: 18px; }
.card h3 { font-size: 1.3rem; margin-bottom: 12px; letter-spacing: -0.02em; }
.card p { color: var(--muted); font-size: 15.5px; }

/* ---------- Método ---------- */

.method-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 72px; align-items: start; }

.steps { list-style: none; margin: 46px 0 0; padding: 0; }
.step { display: grid; grid-template-columns: 62px 1fr; gap: 22px; padding: 26px 0; }
.step + .step { border-top: 1px solid var(--line); }
.step-n { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px;
          border: 1px solid var(--line-2); background: var(--surface);
          color: var(--accent); font-size: 12.5px; letter-spacing: 0.08em; }
.step h3 { font-size: 1.28rem; margin-bottom: 9px; }
.step p { color: var(--muted); font-size: 15.5px; }

.method-visual { position: sticky; top: 108px; display: grid; gap: 16px; }
.viz-frame { position: relative; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 20px;
             background: radial-gradient(circle at 50% 45%, rgba(232,176,75,0.07), transparent 62%), var(--surface);
             overflow: hidden; }
.viz-frame canvas { width: 100%; height: 100%; display: block; }
.viz-caption { position: absolute; left: 16px; bottom: 14px; display: flex; align-items: center; gap: 8px;
               font-size: 11.5px; color: var(--muted); letter-spacing: 0.06em; }
.viz-caption .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
                    box-shadow: 0 0 0 0 rgba(232,176,75,0.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(232,176,75,0); } 100% { box-shadow: 0 0 0 0 rgba(232,176,75,0); } }

.viz-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; min-height: 96px; font-size: 11.5px; }
.viz-log li { color: var(--muted); opacity: 0; transform: translateY(6px);
              animation: logIn 0.45s var(--ease) forwards; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viz-log li .ok { color: #59d38a; }
.viz-log li .warn { color: var(--accent); }
@keyframes logIn { to { opacity: 1; transform: none; } }

/* ---------- Bloque de diagnóstico ---------- */

.assess-wrap { padding: 0 0 130px; }
.assess { position: relative; border: 1px solid var(--line); border-radius: 28px;
          overflow: hidden; background: var(--bg-alt); }
.assess-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; opacity: 0.85; }
.assess-inner { position: relative; z-index: 2; text-align: center; padding: 92px 32px 96px;
                max-width: 720px; margin: 0 auto; }
.assess-inner .section-lead { margin: 0 auto 36px; }
.assess-inner .section-title { margin-inline: auto; }

/* ---------- Bitácora, contacto, pie ---------- */

.pill { display: inline-block; margin-top: 26px; font-size: 12.5px; color: var(--accent);
        background: rgba(232,176,75,0.1); border: 1px solid rgba(232,176,75,0.3);
        border-radius: 999px; padding: 8px 18px; letter-spacing: 0.04em; }

.contact { padding-block: 150px; }
.contact .section-lead { margin-bottom: 40px; }
.mail { margin-top: 24px; font-size: 13.5px; }
.mail a { color: var(--muted); text-decoration: none; }
.mail a:hover { color: var(--accent); }

.site-footer { border-top: 1px solid var(--line); padding: 46px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.footer-tag { color: var(--muted); font-size: 14px; margin-top: 10px; }
.footer-rights { color: #626b7d; font-size: 12.5px; }

/* ---------- Responsive ---------- */

@media (max-width: 1040px) {
  .method-grid { grid-template-columns: 1fr; gap: 48px; }
  .method-visual { position: static; max-width: 460px; }
  .cards-3, .cards-2 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .hero { min-height: auto; padding: 86px 0 96px; }
  .section { padding: 90px 0; }
  .assess-wrap { padding-bottom: 90px; }
  .contact { padding-block: 106px; }
  .section-head { margin-bottom: 46px; }
  .scroll-hint { display: none; }

  .header-inner { flex-wrap: wrap; height: auto; padding-block: 13px; row-gap: 6px; }
  .nav { order: 3; width: 100%; gap: 22px; overflow-x: auto; scrollbar-width: none; padding-bottom: 3px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; font-size: 14px; }
  html { scroll-padding-top: 116px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .actions .btn { width: 100%; text-align: center; }
  .step { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 28px 24px 30px; }
  .assess-inner { padding: 62px 22px 66px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .btn:hover, .card:hover { transform: none; }
  .viz-caption .dot, .scroll-hint span::after { animation: none; }
}
