/* ytbud landing site. Brand faces come from the extension package. */
@font-face { font-family: 'Bricolage'; src: url(fonts/bricolage-grotesque-800.woff2) format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(fonts/inter-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(fonts/inter-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(fonts/jetbrains-mono-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --ink: #141019;        /* plum ink, the page */
  --ink-2: #1c1625;      /* raised panels */
  --ink-3: #251d31;
  --line: #31283f;
  --text: #efeaf6;
  --muted: #aaa0ba;
  --brand: #9d8cff;      /* the extension's lilac */
  --brand-ink: #120c22;
  --tally: #ffb547;      /* tally light amber, the one second accent */
  --skin-fill: #9d8cff;  /* set from the skin on show */
  --skin-glow: #9d8cff;
  --display: 'Bricolage', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --r: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--text); font: 400 17px/1.6 var(--body); overflow-x: hidden; padding-bottom: 28px; }
img, video, canvas { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.08; }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: 1.15rem; font-weight: 600; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--tally); outline-offset: 3px; border-radius: 6px; }
.muted { color: var(--muted); }
.wrap { width: min(1240px, 100%); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--tally); color: #000; padding: 10px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.eyebrow { font: 400 0.78rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }

/* Buttons --------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; text-decoration: none; transition: transform .2s, background .2s, box-shadow .2s; cursor: pointer; background: transparent; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn-primary:hover { background: #b2a5ff; }
.btn-ghost { background: color-mix(in srgb, var(--ink-2) 70%, transparent); }
.btn-small { min-height: 44px; padding: 0 16px; font-size: .92rem; }
.btn-big { min-height: 58px; padding: 0 30px; font-size: 1.08rem; }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand); text-decoration: none; min-height: 44px; }
.more svg { width: 16px; height: 16px; transition: transform .2s; }
.more:hover svg { transform: translateX(3px); }
.badge { display: inline-block; vertical-align: middle; font: 400 .68rem/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--tally); border: 1px solid color-mix(in srgb, var(--tally) 45%, transparent); border-radius: 999px; padding: 4px 8px; margin-left: 6px; }

/* Nav -------------------------------------------------------------------- */
.nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 24px; padding: 10px var(--gutter); background: color-mix(in srgb, var(--ink) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.3rem/1 var(--display); letter-spacing: -0.03em; text-decoration: none; min-height: 44px; }
.brand img { border-radius: 9px; }
.nav nav { margin-left: auto; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; border-radius: 8px; }
.nav nav a:hover, .nav nav a[aria-current] { color: var(--text); }

/* Hero ------------------------------------------------------------------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 6vw, 80px); position: relative; }
.hero::before { content: ''; position: absolute; inset: -20% 0 auto; height: 120%; background: radial-gradient(50% 45% at 72% 40%, color-mix(in srgb, var(--skin-glow) 22%, transparent), transparent 70%); pointer-events: none; transition: background .8s; z-index: -1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4.7rem); line-height: .95; margin-bottom: 26px; }
.hero h1 .line { display: block; }
.hero h1 em { font-style: normal; background: var(--skin-text, var(--skin-glow)); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 22px color-mix(in srgb, var(--skin-glow) 45%, transparent)); }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: #d6cfe2; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 0; font: 400 .82rem/1.4 var(--mono); color: var(--muted); }
.facts li::before { content: '✓ '; color: var(--tally); }
.tally { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tally); margin-right: 10px; box-shadow: 0 0 10px var(--tally); vertical-align: 1px; }

.hero-player { margin: 0; }
.screen { position: relative; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; background: #000; border: 1px solid color-mix(in srgb, var(--skin-glow) 35%, var(--line)); box-shadow: 0 40px 90px -30px color-mix(in srgb, var(--skin-glow) 55%, transparent), 0 0 0 8px color-mix(in srgb, var(--ink-2) 80%, transparent); transition: box-shadow .8s, border-color .8s; }
.screen img, .screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen canvas { opacity: 0; transition: opacity .4s; }
.screen.gpu canvas { opacity: 1; }
.osd { position: absolute; left: 16px; top: 14px; font: 400 clamp(.7rem, 1.2vw, .9rem)/1 var(--mono); letter-spacing: .12em; color: #fff; background: rgba(0, 0, 0, .55); padding: 7px 10px; border-radius: 4px; text-shadow: 0 0 6px rgba(255, 255, 255, .6); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 18px 2px 6px; scrollbar-width: thin; }
.chip { flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--ink-2); font-weight: 600; font-size: .9rem; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.chip::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--chip); box-shadow: 0 0 8px var(--chip); }
.chip[aria-pressed='true'] { background: var(--text); color: var(--ink); border-color: var(--text); }
.caption { font-size: .85rem; margin: 6px 0 0; }

/* Download band ------------------------------------------------------- */
.download { border-block: 1px solid var(--line); background: linear-gradient(180deg, var(--ink-2), var(--ink)); padding: 40px 0; }
.download-grid { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 28px; align-items: center; }
.download-grid img { border-radius: 26px; }
.download h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin-bottom: 8px; }
.download p { margin: 0; max-width: 36em; }
.numbers { display: flex; gap: 28px; margin: 0; }
.numbers div { display: flex; flex-direction: column-reverse; }
.numbers dt { font: 400 .72rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.numbers dd { margin: 0; font: 800 2.4rem/1 var(--display); }

/* Sections --------------------------------------------------------------- */
main > section:not(.hero):not(.download) { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head h2 { margin-bottom: 14px; }

/* Skins */
.skin-viewer { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; }
.skin-list { display: flex; flex-direction: column; gap: 4px; }
.skin-list button { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 8px 12px; border: 1px solid transparent; border-radius: 12px; background: none; text-align: left; cursor: pointer; }
.skin-list button:hover { background: var(--ink-2); }
.skin-list button[aria-selected='true'] { background: var(--ink-2); border-color: var(--line); }
.skin-list strong { display: block; font-weight: 600; }
.skin-list small { color: var(--muted); font-size: .8rem; }
.swatch { width: 34px; height: 8px; border-radius: 2px; background: var(--fill); box-shadow: 0 0 10px color-mix(in srgb, var(--chip) 60%, transparent); flex: none; }
.views { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: auto auto; gap: 14px; }
.view { margin: 0; position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #000; }
.view-main { grid-row: span 2; }
.view img { width: 100%; height: 100%; object-fit: cover; }
.view figcaption { position: absolute; left: 10px; bottom: 10px; font: 400 .72rem/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; background: rgba(0, 0, 0, .65); padding: 6px 8px; border-radius: 4px; }
.skin-blurb { margin-top: 18px; color: #d6cfe2; }
.pages-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 56px; }
.pages-row figure { margin: 0; }
.pages-row img { border-radius: var(--r); border: 1px solid var(--line); }
.pages-row figcaption { font-size: .9rem; color: var(--muted); margin-top: 10px; }

/* Tools */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.filters button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: none; cursor: pointer; font-weight: 600; font-size: .9rem; }
.filters button[aria-pressed='true'] { background: var(--text); color: var(--ink); }
.group { margin-bottom: 56px; }
.group[hidden] { display: none; }
.group h3 { font: 800 1.5rem/1.2 var(--display); letter-spacing: -0.02em; margin-bottom: 20px; }
.group h3 .muted { font: 400 1rem var(--body); letter-spacing: 0; margin-left: 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.card { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.clip-wrap { position: relative; aspect-ratio: 16 / 10; background: #000; }
.clip { width: 100%; height: 100%; object-fit: cover; }
.clip-missing { aspect-ratio: 16 / 10; background: repeating-linear-gradient(135deg, var(--ink-3) 0 10px, var(--ink-2) 10px 20px); }
.clip-note { position: absolute; right: 8px; bottom: 8px; font: 400 .68rem/1 var(--mono); background: rgba(0, 0, 0, .7); padding: 5px 7px; border-radius: 4px; color: var(--muted); }
.card-body { padding: 16px 18px 10px; }
.card h4 { font-size: 1.02rem; font-weight: 600; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: .94rem; margin-bottom: 4px; }

/* How it works: a real sequence, so it is numbered */
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 0; margin: 0; }
.steps li { counter-increment: step; padding: 26px; border: 1px solid var(--line); border-radius: var(--r); background: var(--ink-2); position: relative; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font: 800 1.1rem var(--display); margin-bottom: 18px; }
.steps h3 { font: 800 1.35rem/1.2 var(--display); letter-spacing: -0.02em; margin-bottom: 8px; }
.steps p { color: var(--muted); margin: 0; }

/* Guides */
.guide-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.guide-grid a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; background: var(--ink-2); transition: border-color .2s, transform .2s; }
.guide-grid a:hover { border-color: var(--brand); transform: translateY(-2px); }
.guide-grid .kw { font: 400 .72rem/1.3 var(--mono); color: var(--tally); text-transform: lowercase; }
.guide-grid strong { font-weight: 600; line-height: 1.35; }
.guide-grid .muted { font-size: .9rem; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 10px 0; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; font: 400 1.5rem/1 var(--mono); color: var(--brand); transition: transform .2s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list h3 { font-size: 1.08rem; font-weight: 600; line-height: 1.4; }
.faq-list details p { color: #d6cfe2; padding-bottom: 14px; }

/* CTA */
.cta { position: relative; overflow: hidden; text-align: center; background: radial-gradient(60% 80% at 50% 100%, #3a2a5c, var(--ink)); }
.cta canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1s; }
.cta.gpu canvas { opacity: .85; }
.cta-inner { position: relative; }
.cta h2 { font-size: clamp(2.2rem, 5.4vw, 4.4rem); margin-bottom: 16px; }
.cta p { color: #e3dcef; font-size: 1.1rem; margin-bottom: 30px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 56px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1.4fr 1fr; gap: 32px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: var(--muted); text-decoration: none; }
.footer li a:hover { color: var(--text); }
.footer li a svg { width: 16px; height: 16px; }
.legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }

/* The page's progress bar: chapters are sections, the fill is a skin's ---- */
.scrub { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: 28px; padding: 0 0 0; pointer-events: none; }
.scrub-track { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255, 255, 255, .14); transition: height .2s; }
.scrub-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--skin-fill); box-shadow: 0 0 12px var(--skin-glow); }
.scrub ol { position: absolute; inset: 0; display: flex; list-style: none; margin: 0; padding: 0; pointer-events: auto; }
.scrub li { position: relative; flex: 1 1 0; }
.scrub li + li::before { content: ''; position: absolute; left: 0; bottom: 0; width: 3px; height: 9px; background: var(--ink); z-index: 1; }
.scrub a { position: absolute; inset: 0; display: block; }
.scrub a span { position: absolute; left: 0; bottom: 14px; white-space: nowrap; font: 400 .72rem/1 var(--mono); background: var(--ink-2); border: 1px solid var(--line); padding: 6px 8px; border-radius: 4px; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; pointer-events: none; }
.scrub a:hover span, .scrub a:focus-visible span, .scrub a[aria-current] span.show { opacity: 1; transform: none; }
.scrub:hover .scrub-track, .scrub:focus-within .scrub-track { height: 9px; }

/* Guide pages --------------------------------------------------------- */
.guide { max-width: 860px; padding-top: 32px; padding-bottom: 64px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 28px; font: 400 .8rem var(--mono); color: var(--muted); }
.crumbs li + li::before { content: '/'; margin-right: 6px; }
.crumbs a { color: var(--muted); }
.guide h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 12px; }
.updated { font: 400 .8rem var(--mono); }
.answer { margin: 28px 0; padding: 24px 26px; border-radius: var(--r); background: var(--ink-2); border: 1px solid var(--line); border-left: 4px solid var(--skin-glow); }
.answer p { font-size: 1.12rem; color: var(--text); }
.guide .answer > .eyebrow { font: 400 .78rem/1.4 var(--mono); margin-bottom: 10px; }
.guide-media { margin: 32px 0; }
.guide-media video, .guide-media img { border-radius: var(--r); border: 1px solid var(--line); width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: #000; }
.guide-media figcaption { font-size: .88rem; color: var(--muted); margin-top: 10px; }
.guide section { margin: 44px 0; }
.guide section > h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); margin-bottom: 16px; }
.guide ol:not(.howto), .guide ul:not(.guide-grid) { padding-left: 1.3em; }
.guide li { margin-bottom: 6px; }
.howto { list-style: none; counter-reset: s; padding: 0; margin: 0; }
.howto li { counter-increment: s; position: relative; padding: 14px 0 14px 54px; border-bottom: 1px solid var(--line); margin: 0; }
.howto li::before { content: counter(s); position: absolute; left: 0; top: 12px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font: 800 .95rem var(--display); }
.more-list { display: grid; gap: 14px; margin: 0; }
.more-list div { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); }
.more-list dt { font-weight: 600; margin-bottom: 4px; }
.more-list dd { margin: 0; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
thead th { font: 400 .75rem var(--mono); text-transform: uppercase; color: var(--muted); }
.guide-cta { margin: 56px 0; padding: 36px; border-radius: 20px; text-align: center; background: radial-gradient(80% 120% at 50% 0%, color-mix(in srgb, var(--skin-glow) 22%, var(--ink-2)), var(--ink-2)); border: 1px solid var(--line); }
.guide-cta h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 10px; }
.related h2 { font-size: 1.4rem; margin-bottom: 16px; }
.guide-grid-wide { margin-top: 32px; }

/* Shaders gallery ------------------------------------------------------- */
.shaders-page main { padding: 40px var(--gutter) 80px; }
.shaders-page h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 14px; }
.shader-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.shader { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--ink-2); display: flex; flex-direction: column; }
.shader[hidden] { display: none; }
.shader-media { position: relative; aspect-ratio: 1; background: #000; }
.shader-media img, .shader-media canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shader-body { padding: 14px 16px; display: flex; flex-direction: column; flex: 1; }
.shader-body h2 { font: 600 1.05rem var(--body); letter-spacing: 0; margin-bottom: 6px; }
.shader-body p { font-size: .88rem; margin-bottom: 8px; }
.tag { font: 400 .68rem var(--mono); text-transform: uppercase; border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; }
.shader-actions { margin-top: auto; display: flex; align-items: center; gap: 12px; }
.shader-actions svg { width: 16px; height: 16px; }

/* Reveal hooks (GSAP sets the start state only when motion is allowed) */
.js-motion [data-reveal] { will-change: transform, opacity; }

/* Responsive ---------------------------------------------------------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .download-grid { grid-template-columns: auto minmax(0, 1fr); }
  .download-grid .numbers, .download-grid .btn { grid-column: 1 / -1; }
  .skin-viewer { grid-template-columns: 1fr; }
  .skin-list { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .skin-list button { flex: none; }
  .faq-grid { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav nav { display: none; }
  .nav .btn { margin-left: auto; }
  .views { grid-template-columns: 1fr; }
  .view-main { grid-row: auto; }
  .pages-row, .steps { grid-template-columns: 1fr; }
  .download-grid img { width: 72px; height: 72px; border-radius: 18px; }
  .numbers { gap: 20px; }
  .numbers dd { font-size: 2rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .scrub a span { display: none; }
  .answer { padding: 20px; }
  .howto li { padding-left: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
}
