/* LEONIDA.SYS — cyberpunk surface */

:root {
  --bg: #05060a;
  --bg-2: #0a0c14;
  --ink: #dfe6ff;
  --dim: #7d87ab;
  --hot: #ff2e88;
  --cyan: #22e0ff;
  --acid: #c6ff3d;
  --line: rgba(120, 140, 200, .22);
  --glow-h: 0 0 14px rgba(255, 46, 136, .55), 0 0 44px rgba(255, 46, 136, .22);
  --glow-c: 0 0 12px rgba(34, 224, 255, .5);
  --cut: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 clamp(15px, 1.05vw, 17px)/1.65 "Archivo", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; }
.dim { color: var(--dim); }
.fine { font-size: 11px; color: var(--dim); letter-spacing: .1em; text-transform: uppercase; }

img { display: block; max-width: 100%; }
a { color: inherit; }

::selection { background: var(--hot); color: #08040c; }

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

/* ---------- fixed atmosphere ---------- */

.fx { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

.fx-grid {
  position: absolute; inset: -10% -10% -30%;
  background-image:
    linear-gradient(rgba(34, 224, 255, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 224, 255, .1) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  transform: perspective(520px) rotateX(62deg) translateY(18%) scale(1.9);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(to bottom, #000 30%, transparent 78%);
  animation: grid-run 9s linear infinite;
}

@keyframes grid-run { to { background-position: 0 64px, 64px 0; } }

.fx-scan {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .34) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
  opacity: .55;
}

.fx-noise {
  position: absolute; inset: 0;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noise .6s steps(2) infinite;
}

@keyframes noise { 50% { transform: translate(-2%, 1%); } }

.fx-bloom {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 45% at 12% 8%, rgba(255, 46, 136, .2), transparent 70%),
    radial-gradient(50% 45% at 92% 30%, rgba(34, 224, 255, .16), transparent 70%),
    radial-gradient(70% 60% at 50% 110%, rgba(198, 255, 61, .1), transparent 70%);
}

/* ---------- boot overlay ---------- */

.boot {
  position: fixed; inset: 0; z-index: 90;
  background: #04050a;
  display: grid; place-content: center; gap: 20px;
  padding: 24px;
  transition: opacity .5s ease, visibility .5s;
}

.boot.gone { opacity: 0; visibility: hidden; }

.boot-log {
  margin: 0; min-height: 8.5em; min-width: min(78vw, 560px);
  font: 500 12px/1.8 "JetBrains Mono", ui-monospace, monospace;
  color: var(--acid);
  white-space: pre-wrap;
  text-shadow: 0 0 10px rgba(198, 255, 61, .35);
}

.boot-bar { height: 2px; background: #16203a; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--hot)); }
.boot.ready .boot-bar i { width: 100%; transition: width .5s ease; }

.boot-skip {
  justify-self: start; background: none; border: 0; padding: 0;
  color: var(--dim); cursor: pointer;
  font: 500 11px/1 "JetBrains Mono", monospace; letter-spacing: .2em; text-transform: uppercase;
}

.boot-skip:hover { color: var(--cyan); }

/* ---------- header ---------- */

.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: clamp(14px, 2.4vw, 40px);
  padding: 14px clamp(16px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 6, 10, .72);
  backdrop-filter: blur(14px) saturate(140%);
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { filter: drop-shadow(0 0 10px rgba(255, 46, 136, .6)); }
.brand-txt { font: 800 15px/1 "Archivo", sans-serif; letter-spacing: .26em; }
.brand-txt em { font-style: normal; color: var(--hot); }

.flicker { animation: flicker 7s infinite steps(1); }
@keyframes flicker {
  0%, 92%, 100% { opacity: 1; }
  93% { opacity: .45; }
  94% { opacity: 1; }
  96% { opacity: .6; }
}

.nav { display: flex; gap: clamp(10px, 1.6vw, 26px); margin-left: auto; }
.nav a {
  position: relative; text-decoration: none; color: var(--dim);
  font: 600 11px/1 "JetBrains Mono", monospace; letter-spacing: .18em; text-transform: uppercase;
  padding: 10px 2px;
  transition: color .2s;
}
.nav a::before { content: attr(data-n); color: var(--hot); opacity: .55; margin-right: 6px; font-size: 9px; }
.nav a:hover { color: var(--ink); }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 4px; height: 1px;
  background: var(--hot); box-shadow: var(--glow-h);
  transition: right .28s ease;
}
.nav a:hover::after { right: 0; }

.burger { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.burger i { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; transition: transform .25s, opacity .2s; }
.burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- buttons ---------- */

.btn {
  --cut: 12px;
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; text-decoration: none; cursor: pointer;
  color: var(--ink); background: rgba(20, 26, 44, .55);
  border: 1px solid rgba(140, 160, 220, .35);
  font: 700 12px/1 "Archivo", sans-serif; letter-spacing: .16em; text-transform: uppercase;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: color .18s, background .18s, border-color .18s, box-shadow .2s, transform .18s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--cyan); color: #fff; box-shadow: var(--glow-c); }
.btn .ico { color: var(--cyan); font-size: 10px; }
.btn b { color: var(--dim); font-weight: 500; letter-spacing: .1em; }

.btn-hot { background: var(--hot); border-color: var(--hot); color: #12030c; box-shadow: var(--glow-h); }
.btn-hot b, .btn-hot .ico { color: rgba(18, 3, 12, .7); }
.btn-hot:hover { background: #ff4d9c; border-color: #ff4d9c; color: #12030c; }

.btn-ghost { background: transparent; border-style: dashed; }
.btn-sm { padding: 10px 16px; font-size: 10px; }

/* ---------- hero ---------- */

main { position: relative; z-index: 1; }

.hero {
  min-height: min(88vh, 760px);
  display: grid; align-content: center; gap: clamp(16px, 2.5vh, 26px);
  padding: clamp(44px, 9vh, 96px) clamp(18px, 4vw, 54px) clamp(30px, 6vh, 64px);
  max-width: 1180px;
}

.hero-tag {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim);
  border: 1px solid var(--line); width: max-content; max-width: 100%; padding: 7px 12px;
  line-height: 1.5;
}
.hero-tag .dot { width: 6px; height: 6px; background: var(--acid); box-shadow: 0 0 8px var(--acid); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.glitch {
  position: relative; margin: 0;
  font: 900 clamp(64px, 15vw, 190px)/.86 "Archivo", "Helvetica Neue", sans-serif;
  letter-spacing: -.02em; text-transform: uppercase;
  text-shadow: 0 0 30px rgba(255, 46, 136, .28);
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  clip-path: inset(0 0 100% 0);
  pointer-events: none;
}
.glitch::before { color: var(--cyan); transform: translate(-4px, -2px); animation: g1 4.4s infinite steps(1); }
.glitch::after { color: var(--hot); transform: translate(4px, 2px); animation: g2 5.1s infinite steps(1); }
@keyframes g1 {
  0%, 84%, 100% { clip-path: inset(0 0 100% 0); }
  86% { clip-path: inset(12% 0 58% 0); }
  88% { clip-path: inset(62% 0 18% 0); }
  90% { clip-path: inset(34% 0 44% 0); }
}
@keyframes g2 {
  0%, 74%, 100% { clip-path: inset(0 0 100% 0); }
  76% { clip-path: inset(48% 0 30% 0); }
  78% { clip-path: inset(8% 0 76% 0); }
  80% { clip-path: inset(70% 0 8% 0); }
}

.kick { margin: 0; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--cyan); }
.lede { margin: 10px 0 0; max-width: 46ch; color: #b9c3e0; font-size: clamp(15px, 1.15vw, 18px); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 6px 0 0; padding: 0; list-style: none;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim);
}
.hero-meta b { color: var(--ink); }

/* ---------- marquee ---------- */

.marquee {
  overflow: hidden; border-block: 1px solid var(--line);
  background: rgba(255, 46, 136, .06);
}
.marquee-in {
  display: flex; gap: 40px; width: max-content; padding: 11px 0;
  font: 700 11px/1 "JetBrains Mono", monospace; letter-spacing: .3em; color: var(--hot);
  animation: slide 32s linear infinite;
}
.marquee-in span { display: flex; align-items: center; gap: 40px; }
.marquee-in span::after { content: "◆"; color: var(--cyan); font-size: 7px; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */

.sec {
  padding: clamp(56px, 9vh, 110px) clamp(18px, 4vw, 54px);
  max-width: 1180px;
  border-top: 1px solid var(--line);
}

.sec-head { max-width: 62ch; margin-bottom: clamp(26px, 4vh, 44px); }
.sec-head h2 { margin: 10px 0 12px; font: 800 clamp(28px, 3.6vw, 46px)/1.05 "Archivo", sans-serif; letter-spacing: -.01em; }
.sec-note { margin: 0; color: var(--dim); max-width: 52ch; }
.hl { color: var(--hot); text-shadow: 0 0 18px rgba(255, 46, 136, .4); }

.grid-3 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  --cut: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(22, 28, 48, .78), rgba(8, 10, 18, .6));
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover { border-color: rgba(34, 224, 255, .45); transform: translateY(-3px); box-shadow: 0 18px 46px rgba(0, 0, 0, .5); }
.card h3 { margin: 6px 0 10px; font: 700 19px/1.2 "Archivo", sans-serif; }
.card p { margin: 0; color: var(--dim); font-size: 14.5px; }
.card-n { margin: 0; font-size: 9px; letter-spacing: .3em; color: var(--hot); }

/* terminal */

.sec-split { display: grid; gap: clamp(24px, 4vw, 54px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .sec-split { grid-template-columns: 1.05fr .95fr; align-items: center; } }

.term { border: 1px solid rgba(34, 224, 255, .3); background: #060810; box-shadow: inset 0 0 60px rgba(34, 224, 255, .05); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2b3352; }
.term-bar i:first-child { background: var(--hot); }
.term-bar i:nth-child(2) { background: #ffb44a; }
.term-bar i:nth-child(3) { background: var(--acid); }
.term-bar span { margin-left: auto; font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.term-body { padding: 18px; font-size: 12.5px; line-height: 2; }
.tline { margin: 0; color: #a9b6d6; }
.tline .ok { color: var(--acid); }
.tline .warn { color: #ffb44a; }
.caret { display: inline-block; width: 8px; height: 15px; background: var(--acid); margin-left: 6px; vertical-align: -2px; animation: pulse 1s steps(1) infinite; }

.ticks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 26px; color: #b9c3e0; }
.ticks li::before {
  content: "▸"; position: absolute; left: 0; top: 0; color: var(--hot);
  text-shadow: var(--glow-h);
}

/* stills */

.stills { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 820px) { .stills { grid-template-columns: repeat(4, minmax(0, 1fr)); } .still.span2 { grid-column: span 2; } }

.still {
  position: relative; padding: 0; border: 1px solid var(--line); background: #080a12;
  cursor: zoom-in; overflow: hidden; aspect-ratio: 8 / 5;
}
.still img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) contrast(1.06); transition: transform .5s ease, filter .3s; }
.still:hover img { transform: scale(1.05); filter: saturate(1.15) contrast(1.1); }
.still .mono {
  position: absolute; left: 0; bottom: 0; padding: 6px 9px;
  font-size: 9px; letter-spacing: .2em; text-transform: uppercase;
  background: rgba(5, 6, 10, .82); border-top: 1px solid var(--line); color: var(--cyan);
}

/* tape */

.tape { margin: 0; border: 1px solid var(--line); background: #06080f; }
.tape video { width: 100%; aspect-ratio: 16 / 10; background: #000; filter: saturate(1.05); }
.tape figcaption {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border-top: 1px solid var(--line);
  font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim);
}
.tape figcaption a { color: var(--cyan); text-decoration: none; }
.tape figcaption a:hover { text-decoration: underline; }

/* download */

.dl { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 34px; }
.card-dl { display: grid; gap: 10px; align-content: start; }
.card-dl .btn { justify-self: start; margin-top: 8px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: s; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.steps li { border-left: 2px solid var(--hot); padding: 4px 0 4px 16px; }
.steps li > span { font-size: 10px; letter-spacing: .3em; color: var(--hot); }
.steps h4 { margin: 6px 0 6px; font: 700 17px/1.2 "Archivo", sans-serif; }
.steps p { margin: 0; color: var(--dim); font-size: 14px; }
code { font-family: "JetBrains Mono", monospace; font-size: .88em; color: var(--cyan); background: rgba(34, 224, 255, .09); padding: 1px 5px; }

/* faq */

.faq { display: grid; gap: 10px; max-width: 78ch; }
.faq details { border: 1px solid var(--line); background: rgba(12, 15, 26, .6); }
.faq details[open] { border-color: rgba(255, 46, 136, .4); }
.faq summary {
  cursor: pointer; padding: 15px 18px; list-style: none;
  font: 700 14px/1.4 "Archivo", sans-serif; letter-spacing: .04em;
  display: flex; justify-content: space-between; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--hot); font-family: monospace; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 0; padding: 0 18px 16px; color: var(--dim); font-size: 14.5px; max-width: 66ch; }

/* footer */

.foot {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center;
  padding: 22px clamp(16px, 4vw, 54px); border-top: 1px solid var(--line);
  color: var(--dim); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
}
.foot-l { display: flex; align-items: center; gap: 10px; }
.foot-r { display: flex; gap: 10px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--cyan); }

/* lightbox */

.lightbox {
  position: fixed; inset: 0; z-index: 80; display: none;
  place-items: center; padding: 4vmin;
  background: rgba(3, 4, 8, .94); backdrop-filter: blur(6px);
}
.lightbox.on { display: grid; }
.lightbox img { max-height: 88vh; border: 1px solid rgba(34, 224, 255, .4); box-shadow: 0 0 80px rgba(34, 224, 255, .12); }
.lb-close {
  position: absolute; top: 18px; right: 18px;
  background: none; border: 1px solid var(--line); color: var(--ink);
  padding: 8px 12px; cursor: pointer; font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
}

/* reveal */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 800px) {
  .burger { display: block; margin-left: auto; }
  .nav {
    position: fixed; inset: 62px 0 auto; margin: 0;
    flex-direction: column; gap: 0; padding: 8px 18px 18px;
    background: rgba(5, 6, 10, .97); border-bottom: 1px solid var(--line);
    transform: translateY(-120%); transition: transform .3s ease;
  }
  .nav.open { transform: none; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
  .top .btn-sm { display: none; }
}

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