:root {
  --bg: #05080a;
  --bg-2: #070c0f;
  --panel: #0a1114;
  --panel-2: #0d171b;
  --line: #17241f;
  --line-2: #1f332b;
  --fg: #cfdad4;
  --fg-strong: #eaf5ee;
  --muted: #71847c;
  --green: #00ff9c;
  --green-dim: #0d8f5f;
  --amber: #ffb454;
  --red: #ff6b5f;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 4px;
  --max: 1120px;
}

* { box-sizing: border-box; }

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

body.site {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(900px 500px at 80% -10%, rgba(0, 255, 156, .07), transparent 60%),
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
  opacity: .5;
}
body.no-crt .scanlines { display: none; }

::selection { background: var(--green); color: #04110b; }

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 { color: var(--fg-strong); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
code { font-size: .92em; background: rgba(0, 255, 156, .08); color: var(--green); padding: .1em .35em; border-radius: 3px; }
.dim { color: var(--muted); }
.ok { color: var(--green); }
.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;
}

.app {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
  max-width: 1500px;
  margin: 0 auto;
}

/* ------------------------------- rail ------------------------------- */
.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 20px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-2), transparent);
}

.brand { display: flex; gap: 12px; align-items: center; color: var(--fg-strong); }
.brand:hover { text-decoration: none; }
.brand-mark {
  font-size: 18px; color: var(--green);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 4px 8px; background: rgba(0, 255, 156, .05);
  text-shadow: 0 0 12px rgba(0, 255, 156, .5);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-size: 14px; letter-spacing: .02em; }
.brand-text small { color: var(--muted); font-size: 11px; }

.rail-label { display: block; color: var(--muted); font-size: 11px; letter-spacing: .08em; margin: 30px 0 10px; }
.rail-nav { display: flex; flex-direction: column; gap: 2px; }
.rail-nav a {
  display: flex; gap: 8px; align-items: baseline;
  color: var(--fg); font-size: 13px;
  padding: 7px 10px; border-radius: var(--radius);
  border-left: 2px solid transparent;
}
.rail-nav a:hover { background: rgba(0, 255, 156, .06); text-decoration: none; color: var(--fg-strong); }
.rail-nav a.active { border-left-color: var(--green); background: rgba(0, 255, 156, .07); color: var(--fg-strong); }
.rail-nav .cmd { color: var(--green-dim); font-size: 11px; min-width: 38px; }
.rail-nav a:hover .cmd, .rail-nav a.active .cmd { color: var(--green); }

.rail-bottom { display: flex; flex-direction: column; gap: 10px; }
.status { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 0 rgba(0, 255, 156, .6); animation: pulse 2.4s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 7px rgba(0, 255, 156, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 255, 156, 0); }
}
.rail-cta {
  display: block; text-align: center;
  border: 1px solid var(--green-dim); border-radius: var(--radius);
  padding: 9px 12px; color: var(--green); font-size: 13px;
  background: rgba(0, 255, 156, .06);
}
.rail-cta:hover { background: var(--green); color: #04110b; text-decoration: none; }

.rail-toggles { display: flex; gap: 6px; }
.ghost-btn {
  flex: 1; cursor: pointer;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 6px 8px; font: inherit; font-size: 11px;
}
.ghost-btn:hover { color: var(--fg-strong); border-color: var(--green-dim); }
.ghost-btn[aria-pressed="true"] { color: var(--green); border-color: var(--green-dim); background: rgba(0, 255, 156, .07); }
.rail-note { color: var(--muted); font-size: 10px; margin: 4px 0 0; }

/* ------------------------------- main -------------------------------- */
.main { min-width: 0; padding: 0 clamp(18px, 4vw, 56px) 40px; }

.titlebar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0 12px;
  background: linear-gradient(180deg, var(--bg) 65%, rgba(5, 8, 10, 0));
  border-bottom: 1px solid var(--line);
  font-size: 11px; color: var(--muted);
}
.dots { display: flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: #21322b; display: block; }
.dots i:first-child { background: #ff5f56; }
.dots i:nth-child(2) { background: #ffbd2e; }
.dots i:nth-child(3) { background: #27c93f; }
.titlebar-title { color: var(--fg); letter-spacing: .02em; }
.titlebar-clock { margin-left: auto; font-variant-numeric: tabular-nums; }

/* ------------------------------- hero -------------------------------- */
.hero { padding: clamp(28px, 6vw, 64px) 0 32px; max-width: 880px; }
.banner {
  color: var(--green-dim); font-size: clamp(9px, 1.9vw, 13px);
  line-height: 1.25; margin: 0 0 26px; white-space: pre;
  text-shadow: 0 0 18px rgba(0, 255, 156, .25);
  overflow-x: auto;
}
.hero-title {
  font-size: clamp(28px, 5.4vw, 46px);
  line-height: 1.1; letter-spacing: -.03em; margin-bottom: 14px;
}
.hero-text { color: var(--fg); font-size: clamp(14px, 1.7vw, 16px); max-width: 62ch; }
.hero-tags { color: var(--green-dim); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 26px; }

.console {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: rgba(8, 14, 17, .82);
  box-shadow: 0 20px 60px -40px rgba(0, 255, 156, .5), inset 0 0 0 1px rgba(255, 255, 255, .02);
  overflow: hidden;
  margin-bottom: 22px;
}
.console-out { padding: 16px 16px 6px; font-size: 13px; min-height: 72px; }
.console-out .line { white-space: pre-wrap; word-break: break-word; animation: fadein .25s ease-out; }
.console-out .line + .line { margin-top: 2px; }
@keyframes fadein { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }
.console-out .err-line { color: var(--red); }
.console-out .hint { color: var(--amber); }

.prompt {
  display: flex; align-items: center; gap: 8px;
  border-top: 1px solid var(--line);
  padding: 10px 14px;
  background: rgba(0, 255, 156, .03);
}
.prompt-user { color: var(--green); font-size: 12px; white-space: nowrap; }
.prompt input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: none;
  color: var(--fg-strong); font: inherit; font-size: 13px;
  caret-color: var(--green);
}
.prompt input::placeholder { color: #3f544c; }
.prompt button {
  background: transparent; border: 0; color: var(--green-dim);
  font: inherit; cursor: pointer; font-size: 14px;
}
.prompt button:hover { color: var(--green); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 14px; }
.chips button {
  cursor: pointer; font: inherit; font-size: 11px;
  color: var(--muted); background: transparent;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 10px;
}
.chips button:hover { color: var(--green); border-color: var(--green-dim); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius);
  font-size: 13px; border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--green); color: #04110b; font-weight: 700; box-shadow: 0 0 24px -6px rgba(0, 255, 156, .5); }
.btn-primary:hover { background: #4dffba; }
.btn-ghost { border-color: var(--line-2); color: var(--fg); }
.btn-ghost:hover { border-color: var(--green-dim); color: var(--green); }

/* ------------------------------ secciones ---------------------------- */
.section { padding: 56px 0 8px; border-top: 1px solid var(--line); }
.section-head { margin-bottom: 26px; max-width: 70ch; }
.section-head h2 { font-size: clamp(18px, 2.4vw, 24px); margin-bottom: 8px; }
.section-head p { color: var(--muted); font-size: 13px; margin: 0; }
.prompt-sign { color: var(--green); margin-right: 6px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(288px, 1fr)); gap: 14px; }
.card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  padding: 18px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.card:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 18px 40px -34px rgba(0, 255, 156, .8); }
.card-top { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.card-icon { color: var(--green); font-size: 16px; line-height: 1.4; }
.card h3 { font-size: 15px; margin: 0; }
.card h3 a { color: var(--fg-strong); }
.card h3 a:hover { color: var(--green); text-decoration: none; }
.card-summary { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 14px; }
.tags li {
  font-size: 10px; color: var(--green-dim);
  border: 1px solid var(--line-2); border-radius: 3px;
  padding: 1px 6px; background: rgba(0, 255, 156, .04);
}
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-size: 12px; color: var(--amber); }
.price-alt { color: var(--muted); font-size: 11px; }
.card-link { font-size: 12px; color: var(--green-dim); }
.card-link:hover { color: var(--green); }

.projects { display: grid; gap: 14px; }
.project {
  border: 1px solid var(--line); border-left: 2px solid var(--line-2);
  border-radius: var(--radius); background: var(--panel);
  padding: 18px 20px;
}
.project:hover { border-left-color: var(--green-dim); }
.project-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; justify-content: space-between; }
.project h3 { font-size: 15px; margin: 0 0 6px; }
.project h3 a { color: var(--fg-strong); }
.project h3 a:hover { color: var(--green); text-decoration: none; }
.project p { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.meta { color: var(--muted); font-size: 11px; }
.metrics { display: flex; flex-wrap: wrap; gap: 26px; margin: 0 0 14px; }
.metrics div { display: flex; flex-direction: column-reverse; }
.metrics dt { color: var(--muted); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.metrics dd { margin: 0; color: var(--green); font-size: 18px; font-weight: 700; }
.metrics-wide { gap: 40px; margin: 22px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metrics-wide dd { font-size: 26px; }

.stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.stack-group h3 { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.chips-list { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; padding: 0; margin: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); border-radius: 3px;
  background: var(--panel); color: var(--fg);
  font-size: 12px; padding: 4px 9px;
}
.lvl { font-style: normal; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-left: 1px solid var(--line); padding-left: 7px; }
.lvl-experto { color: var(--green); }
.lvl-avanzado { color: var(--amber); }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.plan {
  position: relative;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); padding: 22px 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.plan-hl { border-color: var(--green-dim); box-shadow: 0 0 50px -30px rgba(0, 255, 156, .9); background: linear-gradient(180deg, rgba(0, 255, 156, .05), var(--panel)); }
.plan-flag {
  position: absolute; top: -1px; right: 14px;
  background: var(--green); color: #04110b;
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  padding: 2px 8px; border-radius: 0 0 3px 3px;
}
.plan h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0; }
.plan-price { margin: 0; }
.plan-price strong { font-size: 30px; color: var(--fg-strong); letter-spacing: -.02em; }
.plan-price span { color: var(--muted); font-size: 12px; }
.plan-alt { color: var(--muted); font-size: 11px; margin: 2px 0 0; }
.plan-desc { color: var(--muted); font-size: 12px; margin: 0; }
.plan-features { list-style: none; padding: 0; margin: 4px 0 12px; font-size: 12px; }
.plan-features li { padding: 4px 0 4px 18px; position: relative; color: var(--fg); border-bottom: 1px dashed var(--line); }
.plan-features li::before { content: "›"; position: absolute; left: 2px; color: var(--green); }
.plan .btn { margin-top: auto; width: 100%; }

.about { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr); gap: 34px; align-items: start; }
.about-text p { color: var(--fg); font-size: 14px; }
.checks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 6px; }
.checks li { position: relative; padding-left: 22px; font-size: 13px; color: var(--fg); }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.stats div { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--panel); }
.stats dd { margin: 0; font-size: 24px; font-weight: 700; color: var(--green); letter-spacing: -.02em; }
.stats dt { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 34px; }
blockquote {
  margin: 0; border-left: 2px solid var(--green-dim);
  background: var(--panel); border-radius: var(--radius);
  padding: 16px 18px; font-size: 13px;
}
blockquote p { margin: 0 0 10px; }
blockquote footer { color: var(--muted); font-size: 11px; }

.notice { padding: 10px 14px; border-radius: var(--radius); font-size: 13px; border: 1px solid var(--line-2); }
.notice.ok { border-color: var(--green-dim); color: var(--green); background: rgba(0, 255, 156, .06); }
.notice.err { border-color: var(--red); color: var(--red); background: rgba(255, 107, 95, .06); }

.contact { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 34px; align-items: start; }
.form { display: flex; flex-direction: column; gap: 12px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.field input, .field textarea {
  font: inherit; font-size: 13px; color: var(--fg-strong);
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 10px 12px; outline: none;
  transition: border-color .15s ease;
}
.field input:focus, .field textarea:focus { border-color: var(--green-dim); box-shadow: 0 0 0 3px rgba(0, 255, 156, .08); }
.field textarea { resize: vertical; min-height: 130px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { align-self: flex-start; margin-top: 4px; }

.contact-info { font-size: 13px; }
.contact-line { margin: 0 0 8px; display: flex; gap: 10px; }
.contact-line .dim { min-width: 46px; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; padding-top: 2px; }
.socials { list-style: none; display: flex; gap: 12px; padding: 0; margin: 16px 0; font-size: 12px; }
.tiny { font-size: 10px; color: var(--muted); margin-top: 18px; }

.footer {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  margin-top: 60px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 11px; color: var(--muted);
}

/* ------------------------------- detalle ----------------------------- */
.detail { max-width: 820px; padding: 36px 0 0; }
.crumb { font-size: 11px; color: var(--muted); margin-bottom: 22px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--green); }
.detail-head h1 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -.02em; }
.lead { font-size: 15px; color: var(--fg); }
.price-big { color: var(--amber); font-size: 13px; }
.detail-image { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); margin: 10px 0 22px; }
.prose { font-size: 14px; }
.prose h2 { font-size: 16px; margin: 30px 0 10px; color: var(--green); }
.prose h3 { font-size: 14px; color: var(--fg-strong); }
.prose ul, .prose ol { padding-left: 20px; color: var(--fg); }
.prose li { margin-bottom: 6px; }
.prose blockquote { margin: 16px 0; }
.h2-inline { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 30px 0 12px; }
.detail-cta {
  margin: 40px 0 10px; padding: 22px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--panel); display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
.detail-cta p { margin: 0 auto 0 0; font-size: 14px; }

/* -------------------------------- 404 -------------------------------- */
.error-page { display: flex; flex-direction: column; }
.error-box { margin: auto; padding: 60px 0; max-width: 640px; }
.error-box pre { color: var(--green-dim); font-size: 12px; overflow-x: auto; }
.error-box h1 { font-size: 28px; margin-top: 18px; }

.reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.reveal.revealed { opacity: 1; transform: none; }
.error-page { grid-column: 1 / -1; min-height: 100vh; }

/* ------------------------------ clásica ------------------------------ */
body.view-classic .console,
body.view-classic .banner,
body.view-classic .prompt-sign { display: none; }
body.view-classic .hero { padding-top: 56px; }
body.view-classic .hero-tags { color: var(--muted); }
body.view-classic .rail-nav .cmd { display: none; }

/* ------------------------------ responsive ---------------------------- */
@media (max-width: 1024px) {
  .app { grid-template-columns: 1fr; }
  .rail {
    position: static; height: auto; padding: 16px 18px;
    border-right: 0; border-bottom: 1px solid var(--line);
    flex-direction: row; align-items: center; gap: 10px; overflow-x: auto;
  }
  .rail-top { display: flex; align-items: center; gap: 10px; }
  .rail-nav { flex-direction: row; gap: 4px; }
  .rail-label, .status, .rail-note, .rail-toggles { display: none; }
  .rail-nav a { white-space: nowrap; padding: 5px 9px; border-left: 0; border-bottom: 2px solid transparent; font-size: 12px; }
  .rail-nav a.active { border-bottom-color: var(--green); }
  .rail-nav .cmd { display: none; }
  .rail-bottom { margin-left: auto; }
  .rail-cta { padding: 6px 12px; font-size: 12px; }
  .main { padding: 0 18px 32px; }
  .about, .contact { grid-template-columns: 1fr; gap: 22px; }
}

@media (max-width: 620px) {
  body.site { font-size: 14px; }
  .titlebar-clock { display: none; }
  .hero { padding-top: 34px; }
  .field-row { grid-template-columns: 1fr; }
  .metrics { gap: 18px; }
  .metrics dd { font-size: 16px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { flex: 1 1 auto; }
  .detail-cta .btn { width: 100%; }
  .footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
