:root {
  --void: #050505;
  --panel: #0a0f14;
  --panel-2: #0d1712;
  --border: #163726;
  --border-soft: rgba(255,255,255,0.05);
  --green: #3ddc84;
  --green-deep: #22a35f;
  --green-dim: #1f6b45;
  --text: #eafff0;
  --muted: #9bbfb0;
  --muted-2: #c9e8d6;
  --amber: #febc2e;
  --mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ---------- focus states (teclado) ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- i18n ----------
   Todos los nodos traducibles son <span data-es>/<span data-en>.
   Por defecto (lang es o sin lang) se muestra ES, incluso sin JS.
*/
html:not([lang="en"]) [data-en] { display: none; }
html[lang="en"] [data-en] { display: inline; }
html[lang="en"] [data-es] { display: none; }
html:not([lang="en"]) [data-es] { display: inline; }

.mesh-bg {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; opacity: 0.45;
}

/* ---------- nav ---------- */
header {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(12px);
  background: rgba(5,5,5,0.8);
  border-bottom: 1px solid var(--border);
}
nav {
  max-width: 1120px; margin: 0 auto;
  padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.logo {
  font-family: var(--mono); font-weight: 700; font-size: 1.25rem;
  letter-spacing: 0.5px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 9px;
}
.logo .g { color: var(--green); }
.logo-mark { width: 26px; height: 26px; flex-shrink: 0; }
.logo-mark svg { width: 100%; height: 100%; display: block; }
.cursor {
  display: inline-block; width: 9px; height: 1rem;
  background: var(--green); margin-left: 2px; vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.nav-links { display: flex; gap: 26px; font-family: var(--mono); font-size: 0.85rem; color: var(--muted-2); }
.nav-links a:hover { color: var(--green); }

.nav-right { display: flex; align-items: center; gap: 14px; }

.lang-toggle {
  display: flex; font-family: var(--mono); font-size: 0.75rem;
  border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
  position: relative;
}
.lang-toggle button {
  background: transparent; border: none; color: var(--muted);
  padding: 6px 11px; cursor: pointer; font-family: var(--mono); font-size: 0.75rem;
  transition: all .12s ease;
}
.lang-toggle button.active { background: var(--green-dim); color: var(--text); }
.lang-toggle button:hover:not(.active) { color: var(--green); }

.nav-cta {
  font-family: var(--mono); font-size: 0.82rem;
  padding: 8px 15px; border: 1px solid var(--green-dim);
  border-radius: 6px; color: var(--green); transition: all .15s ease; white-space: nowrap;
}
.nav-cta:hover { background: var(--green); color: #04140b; border-color: var(--green); }

/* ---------- menú hamburguesa ---------- */
.nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--border);
  border-radius: 6px; color: var(--green);
  width: 42px; height: 42px; cursor: pointer;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-toggle svg { width: 22px; height: 22px; display: block; }

/* ---------- hero ---------- */
.hero { position: relative; z-index: 1; padding: 88px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 52px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

.eyebrow {
  font-family: var(--mono); font-size: 0.78rem; color: var(--green);
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green); flex-shrink: 0;
}

h1 {
  font-family: var(--mono);
  font-size: clamp(2.2rem, 4.8vw, 3.4rem);
  line-height: 1.06; font-weight: 700; margin-bottom: 20px; letter-spacing: -0.5px;
}
h1 .g { color: var(--green); }
h1.slogan { line-height: 1.18; letter-spacing: -1px; }
h1.slogan > span[data-es],
h1.slogan > span[data-en] { display: block; }
html[lang="en"] h1.slogan > span[data-es] { display: none; }

.lede { font-size: 1.05rem; color: var(--muted-2); max-width: 48ch; margin-bottom: 30px; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.btn-primary, .btn-secondary {
  font-family: var(--mono); font-size: 0.9rem; padding: 13px 21px;
  border-radius: 8px; display: inline-flex; align-items: center; gap: 8px;
  transition: all .15s ease; border: 1px solid transparent;
}
.btn-primary { background: var(--green); color: #04140b; font-weight: 700; }
.btn-primary:hover { background: #5aeba0; transform: translateY(-1px); }
.btn-soon {
  background: transparent; color: var(--green);
  border: 1px dashed var(--green-dim); font-weight: 500;
  cursor: default; letter-spacing: 0.5px;
}
.btn-soon:hover { background: transparent; transform: none; border-color: var(--green); }
.btn-secondary { border-color: var(--border); color: var(--muted-2); }
.btn-secondary:hover { border-color: var(--green-dim); color: var(--text); }

.meta-line { font-family: var(--mono); font-size: 0.76rem; color: var(--muted); }
.meta-line b { color: var(--muted-2); font-weight: 500; }

/* ---------- terminal ---------- */
.terminal {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.7), 0 0 40px -12px rgba(61,220,132,0.09);
}
.terminal-bar {
  background: #16191b; padding: 9px 12px; position: relative;
  display: flex; align-items: center; border-bottom: 1px solid #0a0d0e;
}
.win-btns {
  margin-left: auto; display: flex; gap: 14px;
  font-family: var(--sans); font-size: 0.72rem; color: #8a9296; line-height: 1;
}
.win-btns span { cursor: default; }
.win-btns .close:hover { color: #d0d4d6; }
.terminal-title {
  font-family: var(--sans); font-size: 0.78rem; color: #c8cdd0;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.terminal-body {
  padding: 20px; font-family: var(--mono); font-size: 0.82rem;
  color: var(--muted-2); min-height: 210px;
}
.terminal-body .prompt { color: var(--green); }
.terminal-body .line { margin-bottom: 3px; white-space: pre-wrap; word-break: break-word; }
.terminal-body .out { color: var(--muted); }
.cursor-line::after { content: '_'; color: var(--green); animation: blink 1s steps(1) infinite; }

/* ---------- sections ---------- */
section { position: relative; z-index: 1; padding: 62px 0; }
.section-head { margin-bottom: 36px; }
.section-tag {
  font-family: var(--mono); color: var(--green); font-size: 0.76rem;
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px;
}
h2 { font-family: var(--mono); font-size: 1.8rem; font-weight: 700; letter-spacing: -0.3px; }
.section-sub { color: var(--muted); max-width: 58ch; margin-top: 10px; }

/* ---------- package list ---------- */
.pkg-output {
  font-family: var(--mono); background: var(--panel);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 4px 0; margin-bottom: 36px; overflow-x: auto;
}
.pkg-row {
  display: grid; grid-template-columns: 190px 1fr; gap: 16px;
  padding: 12px 22px; border-bottom: 1px solid var(--border-soft); font-size: 0.83rem;
}
.pkg-row:last-child { border-bottom: none; }
.pkg-name { color: var(--green); white-space: nowrap; }
.pkg-desc { color: var(--muted-2); }
@media (max-width: 700px) {
  .pkg-row { grid-template-columns: 1fr; gap: 4px; }
}

.pkg-select .pkg-row { grid-template-columns: 200px minmax(150px, 1fr) 1fr; }
.pkg-head { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; }
.pkg-head .pkg-name { color: var(--muted); }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px; transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--green-dim); transform: translateY(-2px); }
.card .icon { font-family: var(--mono); color: var(--green); font-size: 1.3rem; margin-bottom: 10px; }
.card h3 { font-family: var(--mono); font-size: 0.95rem; margin-bottom: 7px; }
.card p { color: var(--muted); font-size: 0.85rem; }

/* ---------- lista de cambios ---------- */
.changes-list {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 2px; background: var(--border);
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
@media (max-width: 800px) { .changes-list { grid-template-columns: 1fr; } }
.change {
  background: var(--panel); padding: 20px 22px;
  display: flex; gap: 14px; align-items: flex-start;
}
.change-n {
  font-family: var(--mono); font-size: 0.75rem; color: var(--green);
  padding-top: 3px; flex-shrink: 0; opacity: 0.8;
}
.change p { color: var(--muted-2); font-size: 0.88rem; margin: 0; }
.change code {
  font-family: var(--mono); background: var(--void); color: var(--green);
  padding: 1px 6px; border-radius: 4px; font-size: 0.82rem;
}

/* ---------- security ---------- */
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .sec-grid { grid-template-columns: 1fr; } }
.sec-card {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border); border-radius: 10px; padding: 22px;
  position: relative; overflow: hidden;
}
.sec-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--green), transparent);
}
.sec-card h3 { font-family: var(--mono); font-size: 0.95rem; margin-bottom: 9px; color: var(--text); }
.sec-card p { color: var(--muted); font-size: 0.85rem; }
.sec-card code {
  font-family: var(--mono); background: var(--void); color: var(--green);
  padding: 1px 6px; border-radius: 4px; font-size: 0.8rem;
}

/* ---------- screenshots / slideshow ---------- */
.slideshow {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}
.slider-stage {
  position: relative;
  height: min(76vh, 640px);
  min-height: 320px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 120%, rgba(61,220,132,0.10), transparent 60%),
    linear-gradient(180deg, #0a0f14, #06090d);
}
.slide {
  position: absolute; inset: 0;
  margin: 0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
  cursor: zoom-in;
}
.slide:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.slide img {
  display: block; width: auto; height: auto;
  max-width: 100%; max-height: 100%;
  object-fit: contain; object-position: center;
}
.slide figcaption {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted-2);
  background: rgba(7,11,14,0.78); border: 1px solid var(--border);
  padding: 4px 11px; border-radius: 6px;
  max-width: calc(100% - 96px);
}

/* prev / next */
.slide-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 3; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,15,20,0.8); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 1rem; line-height: 1; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  opacity: 0.85;
}
.slide-btn:hover { background: var(--green); color: #04140b; border-color: var(--green); opacity: 1; }
.slide-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.slide-prev { left: 12px; }
.slide-next { right: 12px; }

.slider-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; padding: 13px 18px;
  border-top: 1px solid var(--border);
}
.slide-counter {
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
}
.slide-dots { display: flex; gap: 8px; }
.slide-dot {
  width: 9px; height: 9px; padding: 0; border-radius: 50%;
  background: var(--green-dim); border: none; cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.slide-dot:hover { background: var(--green-deep); }
.slide-dot[aria-current="true"] {
  background: var(--green); box-shadow: 0 0 8px rgba(61,220,132,0.6);
  transform: scale(1.2);
}
.slide-dot:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(3,6,8,0.92);
  backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox[hidden] { display: none; }
.lightbox-img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.85);
}
.lightbox-close {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,15,20,0.85); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 1.15rem; cursor: pointer; line-height: 1;
  transition: border-color .15s ease, color .15s ease;
}
.lightbox-close:hover { border-color: var(--green); color: var(--green); }
.lightbox-close:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* ---------- changelog ---------- */
.log { border-left: 2px solid var(--border); padding-left: 26px; margin-left: 6px; }
.log-entry { position: relative; padding-bottom: 30px; }
.log-entry:last-child { padding-bottom: 0; }
.log-entry::before {
  content: ''; position: absolute; left: -33px; top: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--void); border: 2px solid var(--green-dim);
}
.log-entry.current::before { background: var(--green); border-color: var(--green); box-shadow: 0 0 10px var(--green); }
.log-ver {
  font-family: var(--mono); font-size: 0.95rem; color: var(--green);
  margin-bottom: 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.log-date { color: var(--muted); font-size: 0.76rem; }
.badge {
  font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase;
  letter-spacing: 1px; padding: 2px 8px; border-radius: 20px;
  border: 1px solid var(--green-dim); color: var(--green);
}
.badge.planned { border-color: var(--border); color: var(--muted); }
.log ul { list-style: none; margin-top: 8px; }
.log li {
  color: var(--muted-2); font-size: 0.87rem; padding: 3px 0;
  display: flex; gap: 9px; align-items: flex-start;
}
.log li::before { content: '·'; color: var(--green); flex-shrink: 0; }

/* ---------- installer split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.split p { color: var(--muted-2); margin-bottom: 14px; }
.split ul { list-style: none; font-family: var(--mono); font-size: 0.83rem; color: var(--muted-2); }
.split li { padding: 5px 0; display: flex; gap: 10px; align-items: flex-start; }
.split li::before { content: '✓'; color: var(--green); flex-shrink: 0; }

/* ---------- extras ---------- */
.installer-h2 { margin-bottom: 16px; }
.netinstall-note {
  color: var(--muted); font-size: 0.88rem; max-width: 62ch;
}
.netinstall-note code {
  font-family: var(--mono); color: var(--green);
}
.download-tag { display: flex; justify-content: center; }
.download-note {
  margin-top: 24px; margin-bottom: 0;
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
}

/* ---------- download ---------- */
.download-box {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--green-dim); border-radius: 14px;
  padding: 46px 32px; text-align: center;
}
.download-box h2 { margin-bottom: 10px; }
.download-box p { color: var(--muted-2); margin-bottom: 26px; }
.checksum {
  margin-top: 22px; font-family: var(--mono); font-size: 0.7rem; color: var(--muted);
  background: var(--void); border: 1px solid var(--border); border-radius: 6px;
  padding: 10px 16px; display: inline-block; word-break: break-all; max-width: 100%;
}
.download-cta { margin: 0; }
.checksum-block {
  margin-top: 26px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.checksum-block .checksum { margin-top: 0; }
.checksum-label {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted);
}
.checksum-copy {
  font-family: var(--mono); font-size: 0.74rem; color: var(--green);
  background: transparent; border: 1px solid var(--green-dim);
  border-radius: 6px; padding: 6px 14px; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.checksum-copy:hover { background: var(--green-dim); color: var(--text); }
.checksum-copy[data-copied="true"] {
  background: var(--green); color: #04140b; border-color: var(--green);
}

/* ---------- contact ---------- */
.contact-form {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 26px;
  display: flex; flex-direction: column; gap: 18px;
  max-width: 640px; margin: 0 auto;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field label {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 1px;
  text-transform: uppercase; color: var(--muted);
}
.contact-form input,
.contact-form textarea {
  font-family: var(--mono); font-size: 0.86rem; color: var(--text);
  background: var(--void); border: 1px solid var(--border);
  border-radius: 8px; padding: 11px 13px; resize: vertical;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--muted); opacity: 0.6; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none; border-color: var(--green-deep);
  box-shadow: 0 0 0 3px rgba(61,220,132,0.12);
}
.contact-form input[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] { border-color: #e5484d; }
.form-actions {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 4px;
}
.form-status { font-size: 0.85rem; font-family: var(--mono); color: var(--muted); }
.form-status.error { color: #e5484d; }
.form-status.success { color: var(--green); }
.cf-turnstile { min-height: 65px; }

#contact .section-head { text-align: center; }
#contact .section-sub { margin-left: auto; margin-right: auto; }

footer {
  border-top: 1px solid var(--border); padding: 30px 0; margin-top: 30px;
  font-family: var(--mono); font-size: 0.76rem; color: var(--muted);
}
.footer-inner { display: flex; flex-direction: column; gap: 18px; }
.footer-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--green); }
footer a:hover { color: var(--green); }
.footer-brand { display: flex; align-items: center; gap: 8px; color: var(--muted-2); }
.footer-brand .logo-mark { width: 20px; height: 20px; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .nav-links {
    position: fixed; left: 0; right: 0; top: 0; bottom: 0;
    background: rgba(5,5,5,0.98); backdrop-filter: blur(12px);
    flex-direction: column; align-items: center; justify-content: center;
    gap: 28px; font-size: 1.1rem; z-index: 40;
    display: flex;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-toggle { display: inline-flex; position: relative; z-index: 60; }
  header { padding: 0; }
  nav { flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; position: relative; z-index: 50; }
}

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