/* /reel — split page: cyberpunk / EDM (left) and hybrid minimal (right). Standalone: loaded without main.css. */

@font-face { font-family: 'Raleway'; src: url('../fonts/raleway-regular.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Raleway'; src: url('../fonts/raleway-semibold.woff') format('woff'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Raleway'; src: url('../fonts/raleway-bold.woff') format('woff'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #000F14;
  --bg-deep: #00070b;
  --ink: #f8f8f2;
  --ink-2: rgba(248, 248, 242, 0.66);
  --ink-3: rgba(248, 248, 242, 0.40);
  --line: rgba(248, 248, 242, 0.12);
  --pink: #F92672;
  --cyan: #00d2eb;
  --teal: #a1efe4;
  --violet: #ae81ff;
  --f-display: 'Raleway', 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'Courier New', Courier, ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: dark;
}
.fam-cyber, [data-fam="cyber"]   { --fc: var(--pink); --fc2: var(--cyan); }
.fam-hybrid, [data-fam="hybrid"] { --fc: var(--teal); --fc2: var(--violet); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-display); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
svg { display: block; }
:focus-visible { outline: 1px dashed var(--fc, var(--cyan)); outline-offset: 3px; }
[hidden] { display: none !important; }

/* controls ---------------------------------------------------------------- */
.i-pause { display: none; }
.is-playing .i-play { display: none; }
.is-playing .i-pause { display: block; }
.pbtn {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid color-mix(in srgb, var(--fc) 50%, transparent);
  color: var(--fc); transition: background .15s ease, color .15s ease;
}
.pbtn svg { width: 13px; height: 13px; }
.pbtn:hover, .pbtn.is-playing { background: var(--fc); color: #000; }
.cta {
  font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--pink); border-bottom: 1px solid rgba(249, 38, 114, .4); padding-bottom: 2px;
  transition: color .15s ease, border-color .15s ease;
}
.cta:hover { color: var(--ink); border-bottom-color: rgba(248, 248, 242, .4); }

/* header ------------------------------------------------------------------ */
.reel-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px;
  padding: calc(32px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px));
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px));
  background: linear-gradient(210deg, rgba(4, 21, 78, 1) 0%, rgba(0, 7, 11, 1) 70%);
  border-bottom: 1px solid var(--line);
}
.reel-head h1 { font-weight: 400; text-transform: uppercase; letter-spacing: .16em; font-size: clamp(24px, 3vw, 34px); line-height: 1.2; }
.reel-head h1 a:hover { color: var(--pink); }
.reel-sub { font-family: var(--f-mono); font-size: 13px; color: var(--ink-3); margin-top: 6px; }

/* columns ----------------------------------------------------------------- */
.reel-tabs { display: none; }
.reel-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.reel-col { position: relative; isolation: isolate; overflow: hidden; min-width: 0; padding: 44px var(--gutter) 96px; }
.reel-col.fam-cyber { background: var(--bg-deep); padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); }
.reel-col.fam-hybrid { background: var(--bg); border-left: 1px solid var(--line); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.col-head { display: grid; gap: 4px; justify-items: start; margin-bottom: 32px; }
.eyebrow { font-family: var(--f-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--fc); }
.reel-col h2 { margin: 10px 0 12px; line-height: 1.05; font-size: clamp(30px, 3.8vw, 50px); }
.fam-cyber h2 { font-weight: 700; text-transform: uppercase; letter-spacing: .03em; text-shadow: 3px 0 rgba(249, 38, 114, .6), -3px 0 rgba(0, 210, 235, .6); }
.fam-hybrid h2 { font-weight: 400; letter-spacing: .01em; text-transform: lowercase; color: color-mix(in srgb, var(--teal) 60%, var(--ink)); }
.blurb { color: var(--ink-2); margin-bottom: 16px; }
.uses { display: flex; flex-wrap: wrap; gap: 6px; }
.uses li {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em; padding: 3px 10px; border-radius: 20px;
  background: color-mix(in srgb, var(--fc) 14%, transparent); color: var(--fc);
}

/* cards ------------------------------------------------------------------- */
.cards { display: grid; }
.fam-cyber .cards { gap: 10px; }
.card { display: grid; gap: 10px; }
.card-top { display: flex; align-items: center; gap: 14px; }
.card h3 { flex: 1; min-width: 0; font-weight: 400; }
.time { font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.meta { font-family: var(--f-mono); font-size: 11px; color: var(--ink-3); }
canvas.wave { display: block; width: 100%; cursor: pointer; }

.fam-cyber .card { padding: 14px 16px; background: rgba(0, 4, 7, .72); border: 1px solid rgba(249, 38, 114, .22); border-radius: 2px; transition: border-color .15s ease; }
.fam-cyber .card:hover { border-color: rgba(249, 38, 114, .5); }
.fam-cyber .card.is-current { border-color: var(--pink); }
.fam-cyber .card h3 { font-family: var(--f-mono); font-size: 14px; font-weight: bold; text-transform: uppercase; letter-spacing: .1em; }
.fam-cyber .wave { height: 54px; }
.fam-cyber .pbtn { border-radius: 2px; }

.fam-hybrid .card { padding: 20px 0 22px; border-top: 1px solid rgba(248, 248, 242, .08); }
.fam-hybrid .card h3 { font-size: 19px; font-weight: 400; letter-spacing: .02em; }
.fam-hybrid .card.is-current h3 { color: var(--teal); }
.fam-hybrid .wave { height: 46px; }
.fam-hybrid .pbtn { border-color: rgba(161, 239, 228, .3); }

/* now-playing chip ---------------------------------------------------------- */
.chip {
  position: fixed; z-index: 40; left: 50%; transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px);
  padding: 6px 16px 6px 6px; border-radius: 40px;
  background: rgba(0, 0, 0, .92); border: 1px solid color-mix(in srgb, var(--fc, var(--ink)) 45%, transparent);
  font-family: var(--f-mono); font-size: 12px;
}
.chip .pbtn { width: 30px; height: 30px; }
.chip-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chip-f { color: var(--fc); white-space: nowrap; }
.chip-c { color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* backgrounds: clear behind the column heading, densest at the bottom (--fade-start set in reel.js) */
.bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent calc(var(--fade-start, 400px) * 0.4), #000 78%);
  mask-image: linear-gradient(to bottom, transparent 0, transparent calc(var(--fade-start, 400px) * 0.4), #000 78%); }
.bg > * { position: absolute; inset: 0; }

/* cyberpunk: the site's grain split into pink / cyan specks; boils only while a cyberpunk clip plays */
.grain-mono { opacity: .11; }
.grain-pink { transform: translateX(1.5px); opacity: .12; }
.grain-cyan { transform: translateX(-1.5px); opacity: .09; }
.grain-scan { background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0, 0, 0, .08) 2px 3px); }
.grain-mono, .grain-pink, .grain-cyan { animation: boil .5s steps(1, end) infinite paused; inset: -60px !important; }
.grain-cyan { animation-delay: -.25s; }
.is-live .grain-mono, .is-live .grain-pink, .is-live .grain-cyan { animation-play-state: running; }
@keyframes boil {
  0% { background-position: 0 0; } 20% { background-position: -37px 21px; } 40% { background-position: 18px -44px; }
  60% { background-position: -52px -9px; } 80% { background-position: 29px 38px; } 100% { background-position: 0 0; }
}
/* hybrid: dust motes drawn in reel.js; drift only while a hybrid clip plays */
.bg-dust canvas { width: 100%; height: 100%; display: block; }

/* footer ------------------------------------------------------------------ */
.reel-foot {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px;
  padding: 22px max(16px, env(safe-area-inset-right, 0px)) calc(80px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--line);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .15em; color: rgba(248, 248, 242, .35);
}
.reel-foot a:hover { color: var(--ink); }

/* phones: one family at a time ------------------------------------------- */
@media (max-width: 820px) {
  .reel-tabs {
    display: grid; grid-template-columns: 1fr 1fr;
    position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top, 0px);
    background: rgba(0, 7, 11, .96); border-bottom: 1px solid var(--line);
  }
  .reel-tabs button { padding: 12px 8px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); border-bottom: 2px solid transparent; }
  .reel-tabs button[aria-selected="true"] { color: var(--fc); border-bottom-color: var(--fc); }
  .reel-split { grid-template-columns: minmax(0, 1fr); }
  .reel-split[data-show="cyber"] .fam-hybrid, .reel-split[data-show="hybrid"] .fam-cyber { display: none; }
  .reel-col.fam-cyber, .reel-col.fam-hybrid {
    border-left: 0;
    padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .grain-mono, .grain-pink, .grain-cyan { animation: none !important; }
}
