/* Lepton OS site - Monokai-inspired, light and dark */
:root {
  --bg: #1b1d1e;
  --bg-alt: #232526;
  --surface: #272822;
  --surface-2: #2f302a;
  --border: #3b3c35;
  --text: #f1f1ec;
  --muted: #a8a99f;
  --accent: #66d9ef;
  --pink: #f92672;
  --green: #a6e22e;
  --yellow: #e6db74;
  --orange: #fd971f;
  --purple: #ae81ff;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #fbfaf5;
  --bg-alt: #f2f0e6;
  --surface: #ffffff;
  --surface-2: #f6f5ef;
  --border: #e0ddd0;
  --text: #1d1e19;
  --muted: #5d5e55;
  --accent: #0b7f99;
  --pink: #c4114f;
  --green: #4f7d0e;
  --yellow: #8a7a00;
  --orange: #b55d00;
  --purple: #6e46c9;
  --shadow: 0 18px 40px rgba(40, 38, 20, 0.14);
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fbfaf5;
    --bg-alt: #f2f0e6;
    --surface: #ffffff;
    --surface-2: #f6f5ef;
    --border: #e0ddd0;
    --text: #1d1e19;
    --muted: #5d5e55;
    --accent: #0b7f99;
    --pink: #c4114f;
    --green: #4f7d0e;
    --yellow: #8a7a00;
    --orange: #b55d00;
    --purple: #6e46c9;
    --shadow: 0 18px 40px rgba(40, 38, 20, 0.14);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
code, kbd, pre { font-family: var(--mono); }
code { font-size: 0.92em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 5px; border: 1px solid var(--border); }
kbd { font-size: 0.85em; padding: 0.1em 0.45em; border-radius: 5px; border: 1px solid var(--border); border-bottom-width: 2px; background: var(--surface); }

.wrap { width: min(1140px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #000; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Nav ---------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: 0.2px; }
.logo { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #1b1d1e; font-family: var(--mono); font-weight: 800; }
.nav-links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }

@media (max-width: 820px) { .nav-links { display: none; } }

/* Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px; border-radius: 12px; font-weight: 650; text-decoration: none;
  background: var(--accent); color: #11181b; border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { box-shadow: none; border-color: var(--muted); }
.btn-small { padding: 8px 14px; font-size: 0.9rem; border-radius: 10px; }

/* Hero ---------------------------------------------------------------- */
.hero { padding: 72px 0 56px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; position: relative; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow { font-family: var(--mono); color: var(--accent); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 12px; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.08; margin: 0 0 20px; letter-spacing: -0.02em; }
.accent { background: linear-gradient(90deg, var(--accent), var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 56ch; margin: 0 0 28px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Terminal ------------------------------------------------------------ */
.terminal { background: #1b1d1e; border: 1px solid #34352f; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #2a2b26; border-bottom: 1px solid #34352f; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.term-title { color: #a8a99f; font: 13px var(--mono); margin-left: 8px; }
.term-replay { margin-left: auto; background: none; border: 1px solid #44453e; color: #d9d9d0; border-radius: 7px; width: 28px; height: 26px; cursor: pointer; }
.term-body {
  margin: 0; padding: 16px 18px; height: 400px; overflow: hidden;
  color: #f1f1ec; font: 13.5px/1.55 var(--mono); white-space: pre-wrap;
}
.term-body .g { color: #a6e22e; } .term-body .b { color: #66d9ef; } .term-body .p { color: #ae81ff; }
.term-body .y { color: #e6db74; } .term-body .r { color: #f92672; } .term-body .m { color: #8f908a; }
.term-body .cursor { display: inline-block; width: 8px; background: #f1f1ec; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Stats --------------------------------------------------------------- */
.stats { border-block: 1px solid var(--border); background: var(--bg-alt); }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; padding: 26px 0; }
@media (max-width: 820px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { display: flex; flex-direction: column; gap: 2px; }
.num { font: 700 1.9rem var(--mono); color: var(--text); }
.lbl { color: var(--muted); font-size: 0.92rem; }

/* Sections -------------------------------------------------------------- */
.section { padding: 84px 0; }
.section.alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0 0 12px; letter-spacing: -0.01em; }
.section-lead { color: var(--muted); font-size: 1.08rem; max-width: 70ch; margin: 0 0 36px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.card h3 { margin: 12px 0 8px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.card-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font: 700 1.05rem var(--mono); color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }

/* Tabs ------------------------------------------------------------------- */
.tab-list { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tab-list button {
  font: 600 0.92rem var(--mono); padding: 9px 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
}
.tab-list button[aria-selected="true"] { color: #11181b; background: var(--accent); border-color: var(--accent); }
.split { display: grid; grid-template-columns: 1.25fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.code {
  margin: 0; background: #1b1d1e; color: #f1f1ec; border: 1px solid #34352f; border-radius: var(--radius);
  padding: 18px; font-size: 13.5px; line-height: 1.6; overflow-x: auto; white-space: pre;
}
.code .k { color: #f92672; } .code .s { color: #e6db74; } .code .c { color: #8f908a; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { padding-left: 30px; position: relative; color: var(--text); }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; color: #11181b; background: var(--green); }

/* Architecture ------------------------------------------------------------- */
.arch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
@media (max-width: 900px) { .arch-grid { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 8px; }
.layer { border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 3px; border: 1px solid var(--border); }
.layer strong { font-size: 1.05rem; }
.layer span { color: var(--muted); font: 0.86rem var(--mono); }
.l-elixir { background: color-mix(in srgb, var(--purple) 18%, var(--surface)); border-color: color-mix(in srgb, var(--purple) 45%, var(--border)); padding: 22px 18px; }
.l-otp { background: color-mix(in srgb, var(--pink) 12%, var(--surface)); }
.l-linux { background: color-mix(in srgb, var(--yellow) 12%, var(--surface)); }
.l-hw { background: var(--surface-2); }

.timeline { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 14px; }
.timeline li { counter-increment: step; position: relative; padding-left: 46px; color: var(--muted); }
.timeline li b { color: var(--text); }
.timeline li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font: 700 0.85rem var(--mono); background: var(--surface); border: 1px solid var(--accent); color: var(--accent);
}

.honest { margin-top: 36px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 20px; }
.honest summary { cursor: pointer; font-weight: 650; padding: 12px 0; }
.honest table { width: 100%; border-collapse: collapse; margin: 6px 0 16px; font-size: 0.95rem; }
.honest th, .honest td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--border); vertical-align: top; }
.honest th { color: var(--muted); font-weight: 600; }
@media (max-width: 620px) { .honest table, .honest tbody, .honest tr, .honest td { display: block; } .honest thead { display: none; } .honest td { border-top: none; padding: 4px 0; } .honest tr { border-top: 1px solid var(--border); padding: 10px 0; } }

/* Gallery ------------------------------------------------------------------ */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 720px) { .gallery { grid-template-columns: 1fr; } }
.gallery figure { margin: 0; }
.shot { display: block; width: 100%; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #000; cursor: zoom-in; box-shadow: var(--shadow); }
.shot img { display: block; width: 100%; height: auto; image-rendering: pixelated; transition: transform 0.3s ease; }
.shot:hover img { transform: scale(1.015); }
figcaption { margin-top: 10px; color: var(--muted); font-size: 0.95rem; }

.lightbox { border: none; padding: 0; background: transparent; max-width: min(1100px, 95vw); }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.82); }
.lightbox img { display: block; width: 100%; height: auto; border-radius: 10px; image-rendering: pixelated; }
.lightbox p { color: #e9e9e2; text-align: center; margin: 10px 0 0; }
.lightbox .close { position: absolute; top: -6px; right: -6px; width: 36px; height: 36px; border-radius: 50%; border: none; background: #f1f1ec; color: #111; font-size: 22px; cursor: pointer; }

/* Steps --------------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.step h3 { margin: 0 0 8px; display: flex; align-items: center; gap: 10px; }
.step p { color: var(--muted); margin: 0 0 14px; }
.n { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--accent); color: #11181b; font: 700 0.9rem var(--mono); }
.copy-block { position: relative; margin-top: auto; }
.copy-block pre { margin: 0; background: #1b1d1e; color: #f1f1ec; border-radius: 10px; padding: 14px; overflow-x: auto; font-size: 13px; border: 1px solid #34352f; }
.copy-block pre code { background: none; border: none; padding: 0; color: inherit; }
.copy { position: absolute; top: 8px; right: 8px; font: 600 12px var(--sans); padding: 5px 10px; border-radius: 7px; border: 1px solid #44453e; background: #2a2b26; color: #e9e9e2; cursor: pointer; }

/* Roadmap ------------------------------------------------------------------- */
.roadmap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 960px) { .roadmap { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .roadmap { grid-template-columns: 1fr; } }
.rm { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.rm h3 { margin: 12px 0 6px; font-size: 1.05rem; }
.rm p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.tag { font: 700 0.72rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; padding: 4px 8px; border-radius: 6px; }
.done .tag { background: color-mix(in srgb, var(--green) 22%, transparent); color: var(--green); }
.next .tag { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.later .tag { background: color-mix(in srgb, var(--orange) 22%, transparent); color: var(--orange); }

.credits p { max-width: 75ch; }
.muted { color: var(--muted); }

/* Footer -------------------------------------------------------------------- */
.footer { border-top: 1px solid var(--border); padding: 26px 0; color: var(--muted); font-size: 0.92rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Reveal on scroll ---------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Download ------------------------------------------------------------------ */
.btn-note { margin-left: 8px; font: 600 0.78rem var(--mono); opacity: 0.75; }
.download { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px 40px; align-items: start; }
.download .verify { grid-column: 1 / -1; }
@media (max-width: 900px) { .download { grid-template-columns: 1fr; } }
.iso-facts { margin: 0; display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.iso-facts div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.iso-facts dt { color: var(--muted); }
.iso-facts dd { margin: 0; min-width: 0; }
.hash { word-break: break-all; font-size: 0.8rem; }
@media (max-width: 480px) { .iso-facts div { grid-template-columns: 1fr; gap: 2px; } }

/* Grid children must be allowed to shrink so long code lines scroll inside
   their block instead of widening the page. */
.step, .card, .rm, .download > *, .split > *, .arch-grid > * { min-width: 0; }

/* Keep the Copy button clear of the first code line. */
.copy-block pre { padding-top: 42px; }
