/* cycletron.naderlabs.io — the app's palette (ui/style.css): dark glass,
   cyan phosphor, magenta edge light. The look carries the aesthetic; the
   words stay plain. */

:root {
    color-scheme: dark;
    --bg: #05060a;
    --bg-light: #0b0f18;
    --bg-lighter: #111827;
    --border: #26324c;
    --text: #f2f7ff;
    --text-secondary: #a7b7d6;
    --text-muted: #687797;
    --accent: #47f6ff;
    --accent-subtle: rgba(71, 246, 255, 0.12);
    --neon-glow: rgba(71, 246, 255, 0.34);
    --magenta: #ff2bd6;
    --yellow: #f7ff5a;
    --pixel-grid: rgba(71, 246, 255, 0.055);
    --edge-3d: 3px 3px 0 rgba(255, 43, 214, 0.45);
    --text-glitch: 2px 0 0 rgba(255, 43, 214, 0.45), 0 0 6px var(--neon-glow);
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --measure: 72ch;
    --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-secondary);
    font: 16px/1.6 var(--font-sans);
    background:
        linear-gradient(var(--pixel-grid) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(90deg, var(--pixel-grid) 1px, transparent 1px) 0 0 / 32px 32px,
        radial-gradient(ellipse at 50% -10%, rgba(71, 246, 255, 0.12), transparent 60%),
        var(--bg);
}

main {
    flex: 1;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 2rem var(--gutter) 4rem;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #bdffff; }

h1, h2, h3, h4 {
    color: var(--text);
    font-family: var(--font-mono);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.01em;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 1rem; }
.hero__title { text-shadow: var(--text-glitch); }
h2 { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.05rem; margin: 1.75rem 0 0.5rem; }

code, pre { font-family: var(--font-mono); font-size: 0.9em; }
code { color: var(--text); background: var(--accent-subtle); padding: 0.1em 0.35em; border-radius: 3px; }
pre {
    overflow-x: auto;
    padding: 1rem 1.25rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent);
    line-height: 1.5;
}
pre code { background: none; padding: 0; color: var(--text-secondary); }

.lede { font-size: 1.1rem; color: var(--text-secondary); max-width: var(--measure); }

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

.site-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 1120px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem var(--gutter);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.wordmark {
    color: var(--text);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    text-shadow: var(--text-glitch);
}

.site-nav { display: flex; gap: 1.25rem; flex: 1; overflow-x: auto; }
.site-nav a { color: var(--text-muted); text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--accent); }

.site-version {
    color: var(--yellow);
    text-decoration: none;
    border: 1px solid rgba(247, 255, 90, 0.35);
    padding: 0.1rem 0.5rem;
    white-space: nowrap;
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem var(--gutter) 2.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}
.site-footer p { margin: 0.25rem 0; }

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

.button {
    display: inline-flex;
    gap: 0.5rem;
    align-items: baseline;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    background: var(--bg-light);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-decoration: none;
    transition: border-color 120ms, box-shadow 120ms;
}
.button span { color: var(--text-muted); }
.button:hover { border-color: var(--accent); color: var(--text); }
.button--primary {
    border-color: var(--accent);
    background: var(--accent-subtle);
    box-shadow: var(--edge-3d), 0 0 18px var(--neon-glow);
    font-size: 1rem;
    padding: 0.8rem 1.3rem;
}
.button--primary span { color: var(--text-secondary); }

.downloads__list { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; padding: 0; list-style: none; align-items: center; }
.downloads__meta { margin: 0.9rem 0 0; font-size: 0.85rem; color: var(--text-muted); }
.downloads__phone { display: none; }
.downloads--phone .downloads__phone { display: block; color: var(--text); }

/* ---- home ---- */

.hero { padding: 3rem 0 2.5rem; }
.hero__title {
    font-size: clamp(2.6rem, 8vw, 5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}
.hero__lede { font-size: 1.2rem; max-width: 60ch; color: var(--text); margin: 0 0 1.75rem; }

.demo { margin: 1rem 0 3rem; }
.caption { font-size: 0.875rem; color: var(--text-muted); margin: 0.6rem 0 0; max-width: var(--measure); }

.yt {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 0;
    border: 1px solid var(--border);
    background: #000;
    cursor: pointer;
    box-shadow: 0 0 40px rgba(71, 246, 255, 0.08);
}
.yt img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.9; }
.yt:hover img { opacity: 1; }
.yt__play {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 72px;
    height: 72px;
    translate: -50% -50%;
    border: 2px solid var(--accent);
    border-radius: 50%;
    background: rgba(5, 6, 10, 0.7);
    box-shadow: 0 0 24px var(--neon-glow);
}
.yt__play::after {
    content: '';
    position: absolute;
    inset: 50% auto auto 54%;
    translate: -50% -50%;
    border-left: 20px solid var(--accent);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}
iframe.yt { cursor: auto; }

.band h2 { margin-top: 0; }
.band > p { max-width: var(--measure); }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-top: 1.5rem; }
.shots figure { margin: 0; }
.shots img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; border: 1px solid var(--border); }
.shots figcaption { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.35rem; }

.links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-top: 3rem; }
.link-card {
    display: block;
    padding: 1.25rem;
    border: 1px solid var(--border);
    background: rgba(11, 15, 24, 0.85);
    color: var(--text-secondary);
    text-decoration: none;
    transition: border-color 120ms;
}
.link-card:hover { border-color: var(--accent); color: var(--text-secondary); }
.link-card h2 { margin: 0 0 0.4rem; font-size: 1.05rem; color: var(--accent); }
.link-card p { margin: 0; font-size: 0.9rem; }

/* ---- download ---- */

.installers { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.95rem; }
.installers th { text-align: left; color: var(--text-muted); font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }
.installers th, .installers td { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.installers td:first-child { color: var(--text); white-space: nowrap; }
.installers td:nth-child(3) { white-space: nowrap; font-family: var(--font-mono); font-size: 0.85rem; }
.installers tr.is-yours td { background: var(--accent-subtle); }

/* ---- prose (changelog, guide) ---- */

.prose { max-width: var(--measure); }
.prose table { border-collapse: collapse; margin: 1rem 0; font-size: 0.9rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 0.4rem 0.6rem; text-align: left; vertical-align: top; }
.prose th { color: var(--text); background: var(--bg-light); }
.prose img { max-width: 100%; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.prose li + li { margin-top: 0.25rem; }
.prose strong { color: var(--text); }
.anchor { color: var(--text-muted); text-decoration: none; margin-left: -1.1em; padding-right: 0.3em; opacity: 0; }
:is(h2, h3, h4):hover > .anchor { opacity: 1; }

.release { padding: 0.5rem 0 1.5rem; border-bottom: 1px solid var(--border); }
.release h2 { margin: 1.5rem 0 0.2rem; }
.release h2 a { color: var(--text); text-decoration: none; }
.release h2 a:hover { color: var(--accent); }
.release__meta { margin: 0 0 1rem; font-size: 0.85rem; color: var(--text-muted); }
.release .prose h3 { font-size: 0.95rem; color: var(--accent); }

.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 3rem; align-items: start; }
.doc__nav { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; font-family: var(--font-mono); font-size: 0.8rem; display: flex; flex-direction: column; gap: 0.35rem; }
.doc__nav > a { color: var(--text-muted); text-decoration: none; }
.doc__nav > a[aria-current] { color: var(--accent); }
.doc__toc { list-style: none; margin: 0.5rem 0 0; padding: 0 0 0 0.75rem; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.25rem; }
.doc__toc a { color: var(--text-muted); text-decoration: none; }
.doc__toc a:hover { color: var(--text); }
.doc__source { margin-top: 3rem; font-size: 0.8rem; color: var(--text-muted); }

/* ---- small screens ---- */

@media (max-width: 760px) {
    .site-header { flex-wrap: wrap; gap: 0.75rem 1.25rem; }
    .site-nav { order: 3; flex-basis: 100%; flex-wrap: wrap; gap: 0.4rem 1.1rem; overflow: visible; }
    .shots { grid-template-columns: 1fr; }
    .links { grid-template-columns: 1fr; }
    .doc { grid-template-columns: 1fr; gap: 1rem; }
    .doc__nav { position: static; max-height: none; }
    .doc__toc { display: none; }
    .installers thead { display: none; }
    .installers tr { display: grid; grid-template-columns: auto 1fr auto; gap: 0 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
    .installers td { border: 0; padding: 0.15rem 0; }
    .installers td:last-child { grid-column: 1 / -1; color: var(--text-muted); font-size: 0.85rem; }
}

/* ---- examples ---- */

.example-section h2 { margin-top: 3rem; }
.example-section h3 { color: var(--accent); font-size: 0.95rem; margin: 1.5rem 0 0.4rem; }
.example-section__intro { color: var(--text-muted); margin: 0 0 1rem; }
.examples { list-style: none; margin: 0; padding: 0; }
.example {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}
.example > a { color: var(--text); text-decoration: none; }
.example > a:hover { color: var(--accent); }
.example__bpm { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.75rem; }
.example__about {
    grid-column: 1 / -1;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.genres { columns: 3; column-gap: 2rem; list-style: none; margin: 0; padding: 0; }
.genres li { break-inside: avoid; padding: 0.2rem 0; }

.crumbs, .example-meta, .note { color: var(--text-muted); font-size: 0.875rem; }
.crumbs { margin: 0 0 0.5rem; }
.crumbs a { color: var(--text-muted); }
.play-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 1.25rem 0; }
.code { font-size: 0.85rem; max-height: none; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; font-size: 0.9rem; }

@media (max-width: 760px) {
    .genres { columns: 1; }
}

/* ---- demos ---- */

.videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.5rem; margin-top: 2rem; }
.video h2 { font-size: 1rem; margin: 0.75rem 0 0.2rem; }
.video p { margin: 0.2rem 0; font-size: 0.9rem; }
.video__meta { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.8rem !important; }

@media (max-width: 760px) {
    .videos { grid-template-columns: 1fr; }
}

/* ---- packs ---- */

.pack { padding: 1rem 0 1.5rem; border-bottom: 1px solid var(--border); }
.pack h2 { margin-bottom: 0.4rem; }
.pack__version { color: var(--text-muted); font-size: 0.8rem; font-weight: 400; margin-left: 0.4rem; }
.pack > p { max-width: var(--measure); }
.pack h3 { color: var(--accent); font-size: 0.9rem; margin: 1.25rem 0 0.4rem; }
.pack__list { list-style: none; margin: 0; padding: 0; }
.pack__list li { padding: 0.35rem 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; }
.pack__credit { color: var(--text-muted); font-size: 0.85rem; }
