/* onevarez.swf — the page reads fine without JS or motion; html.fx turns the show on. */
:root {
  --bg: #07070a;
  --surface: #101016;
  --surface-2: #17171f;
  --text: #f1f1ee;
  --muted: #9a9aa6;
  --border: #24242e;
  --lime: #c6ff3d;
  --pink: #ff3d7f;
  --red: #ff2a2a;
  --display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pixel: "Silkscreen", ui-monospace, Menlo, monospace;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--lime); color: var(--bg); }

a { color: inherit; text-decoration-color: var(--lime); text-underline-offset: 3px; }
a:hover { color: var(--lime); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 100; }

h1, h2, h3 { line-height: 1.05; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 12px; display: flex; align-items: center; gap: 14px; }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
.muted { color: var(--muted); }

main > section, .foot { max-width: 1120px; margin: 0 auto; padding: 96px 16px; }

/* ---------- header ---------- */
.top {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px clamp(16px, 4vw, 40px);
  background: linear-gradient(var(--bg), transparent);
}
.logo { font: 400 15px var(--pixel); text-decoration: none; }
.logo span { color: var(--lime); }
.top nav { display: flex; gap: 20px; flex-wrap: wrap; font: 400 12px var(--pixel); text-transform: uppercase; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--lime); }
@media (max-width: 560px) { .top nav { gap: 12px; font-size: 10px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 12px 20px; border-radius: 999px; text-decoration: none;
  background: var(--lime); color: var(--bg); font-weight: 700; border: 1px solid var(--lime);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { color: var(--bg); transform: translateY(-2px); box-shadow: 0 10px 30px -10px var(--lime); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--lime); box-shadow: none; }

/* ---------- hero ---------- */
main > .hero {
  position: relative; max-width: none; min-height: 100svh; padding: 120px clamp(16px, 4vw, 40px) 80px;
  display: flex; align-items: flex-end; overflow: hidden;
}
#particles { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.hero-copy { position: relative; max-width: 1120px; margin: 0 auto; width: 100%; }
.eyebrow { font: 400 13px var(--pixel); color: var(--lime); margin: 0 0 16px; text-transform: uppercase; }
.hero h1 { font-size: clamp(3.25rem, 13vw, 9rem); font-weight: 700; letter-spacing: -0.05em; line-height: .9; max-width: 11ch; }
.lede { font-size: clamp(1.1rem, 2.2vw, 1.5rem); color: var(--muted); max-width: 36ch; margin: 24px 0 0; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-hint { display: none; position: absolute; right: clamp(16px, 4vw, 40px); bottom: 28px; font: 400 11px var(--pixel); color: var(--muted); text-transform: uppercase; }

/* ---------- intro / stats ---------- */
.intro .big { font-size: clamp(1.25rem, 2.6vw, 2rem); line-height: 1.35; max-width: 32ch; margin: 0 0 56px; letter-spacing: -0.01em; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 0 0 56px; }
.stats div { border-top: 1px solid var(--border); padding-top: 16px; }
.stats dd { margin: 0; font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 700; letter-spacing: -0.04em; color: var(--lime); line-height: 1; }
.stats dt { font: 400 12px var(--pixel); color: var(--muted); margin-top: 10px; text-transform: uppercase; }
.now h2 { font-size: 1.5rem; }
.now ul { margin: 12px 0 0; padding-left: 20px; color: var(--muted); }
.now li { margin: 6px 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--lime); animation: pulse 1.6s infinite; flex: none; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgb(198 255 61 / .6); } 50% { box-shadow: 0 0 0 8px rgb(198 255 61 / 0); } }

/* ---------- reel (projects as keyframes) ---------- */
main > .reel { max-width: none; padding: 0; }
.reel-pin { display: flex; flex-direction: column; gap: 24px; padding: 96px 0 40px; }
.reel-head { max-width: 1120px; margin: 0 auto; padding: 0 16px; width: 100%; }
.reel-head p { margin: 0; }

.track {
  display: flex; gap: 24px; padding: 8px max(16px, calc((100vw - 1120px) / 2)) 24px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }

.frame { flex: 0 0 min(86vw, 820px); scroll-snap-align: center; transition: transform .6s var(--ease), opacity .6s var(--ease), filter .6s var(--ease); }
.frame-meta { display: flex; justify-content: space-between; gap: 12px; font: 400 11px var(--pixel); color: var(--muted); text-transform: uppercase; margin-bottom: 10px; }
.window {
  /* Kineto treatment: gradient backdrop, padding, rounded corners, shadow. */
  background: linear-gradient(135deg, var(--c1), var(--c2));
  padding: clamp(16px, 4vw, 40px);
  border-radius: 24px;
}
.window-bar, .window-body { background: #0c0c11; }
.window-bar {
  display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-radius: 14px 14px 0 0;
  border-bottom: 1px solid var(--border); box-shadow: 0 30px 60px -20px rgb(0 0 0 / .6);
}
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3a46; }
.window-bar i:nth-child(1) { background: #ff5f57; } .window-bar i:nth-child(2) { background: #febc2e; } .window-bar i:nth-child(3) { background: #28c840; }
.window-bar span { margin-left: 10px; font: 12px var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.window-body {
  padding: clamp(20px, 4vw, 40px); border-radius: 0 0 14px 14px; min-height: 300px;
  display: flex; flex-direction: column; gap: 16px; box-shadow: 0 40px 80px -30px rgb(0 0 0 / .7);
}
.window-body h3 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -0.04em; }
.window-body h3 a { text-decoration: none; }
.window-body h3 a:hover { color: inherit; background: linear-gradient(90deg, var(--c1), var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.window-body p { margin: 0; color: var(--muted); max-width: 52ch; }
.window-body .open { margin-top: auto; align-self: flex-start; font: 400 12px var(--pixel); text-transform: uppercase; text-decoration: none; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; }
.window-body .open:hover { border-color: var(--c2); color: var(--c2); }

.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font: 12px var(--mono); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; color: #cfcfd8; }

/* Flash-style timeline */
.timeline {
  max-width: 1120px; width: calc(100% - 32px); margin: 0 auto;
  display: grid; grid-template-columns: 150px 1fr; border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: var(--surface); font: 400 10px var(--pixel); color: var(--muted); user-select: none;
}
.tl-label { padding: 30px 12px 0; border-right: 1px solid var(--border); text-transform: uppercase; line-height: 1.4; }
.tl-body { position: relative; height: 76px; cursor: ew-resize; touch-action: none; }
.ruler {
  position: absolute; inset: 0 0 auto; height: 22px; border-bottom: 1px solid var(--border);
}
.ruler span { position: absolute; top: 5px; transform: translateX(-50%); }
.keys {
  position: absolute; inset: 22px 0 0;
  background-image: linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: calc(100% / var(--frames)) 100%;
}
.key {
  position: absolute; top: 0; bottom: 0; left: calc(var(--i) * 12 / var(--frames) * 100%);
  width: calc(12 / var(--frames) * 100%); padding: 0; border: 0; border-left: 1px solid #3a3a46;
  background: linear-gradient(#1c1c25, #15151c); color: var(--muted); font: inherit; cursor: pointer; text-align: left;
}
.key::before { content: ""; position: absolute; left: 4px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--text); }
.key span { position: absolute; left: 16px; right: 4px; top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; }
.key:hover, .key.active { background: linear-gradient(#2a2a36, #1f1f29); color: var(--text); }
.key.active::before { background: var(--lime); }
.playhead { position: absolute; top: 0; bottom: 0; left: 0; width: 1px; background: var(--red); pointer-events: none; transform: translateX(var(--x, 0px)); }
.playhead span { position: absolute; top: 2px; left: 0; background: var(--red); color: #fff; padding: 1px 4px; border-radius: 2px; }
@media (max-width: 700px) {
  .timeline { grid-template-columns: 1fr; }
  .tl-label { display: none; }
  .key span, .ruler .minor { display: none; }
}

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--border); padding: 18px 0; margin: 56px 0 0; white-space: nowrap; }
.marquee > div { display: inline-flex; gap: 28px; font-size: clamp(1.5rem, 4vw, 2.75rem); font-weight: 700; letter-spacing: -0.03em; animation: marquee 50s linear infinite; }
.marquee b { color: var(--lime); font-weight: 400; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- production ---------- */
.role { display: grid; grid-template-columns: 80px 1fr; gap: 16px; padding: 32px 0; border-bottom: 1px solid var(--border); }
.role-num { font: 400 28px var(--pixel); color: var(--lime); }
.role-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.role-head h3 { font-size: clamp(1.4rem, 3vw, 2rem); }
.role-head span { font: 400 12px var(--pixel); color: var(--lime); text-transform: uppercase; }
.role p { margin: 8px 0; }
.role ul { margin: 12px 0 0; padding-left: 20px; color: #cfcfd8; }
.role li { margin: 6px 0; }
@media (max-width: 560px) { .role { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- stack / writing / contact ---------- */
.stack-row { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); align-items: start; }
@media (max-width: 560px) { .stack-row { grid-template-columns: 1fr; } }
.plain { list-style: none; padding: 0; margin: 16px 0 0; font-size: 1.1rem; }

.contact p { max-width: 60ch; }
.shout { font-size: clamp(3.5rem, 15vw, 12rem); letter-spacing: -0.06em; line-height: .85; position: relative; display: inline-block; margin-bottom: 32px; }
.shout::before, .shout::after { content: attr(data-text); position: absolute; inset: 0; opacity: 0; }
.shout:hover::before { opacity: .8; color: var(--pink); animation: glitch .35s steps(2) infinite; }
.shout:hover::after { opacity: .8; color: var(--lime); animation: glitch .35s steps(2) infinite reverse; mix-blend-mode: screen; }
@keyframes glitch {
  0% { transform: translate(0); clip-path: inset(0 0 60% 0); }
  50% { transform: translate(-4px, 2px); clip-path: inset(40% 0 20% 0); }
  100% { transform: translate(4px, -2px); clip-path: inset(70% 0 0 0); }
}
.links { list-style: none; padding: 0; margin: 24px 0 0; display: flex; gap: 20px; flex-wrap: wrap; font: 400 12px var(--pixel); text-transform: uppercase; }

.foot { padding-top: 32px; padding-bottom: 48px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.foot p { margin: 0; }
.foot .muted { font: 400 11px var(--pixel); text-transform: uppercase; }

/* ---------- preloader ---------- */
#preloader { display: none; }
.fx:not(.seen) #preloader {
  display: flex; position: fixed; inset: 0; z-index: 50; background: var(--bg);
  align-items: center; justify-content: center; transition: opacity .6s var(--ease), visibility .6s;
}
.fx.loaded #preloader { opacity: 0; visibility: hidden; }
.pl-inner { width: min(420px, 80vw); font-family: var(--pixel); }
.pl-file { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.pl-count { font-size: clamp(5rem, 22vw, 9rem); line-height: 1; color: var(--text); }
.pl-count small { font-size: .35em; color: var(--lime); }
.pl-bar { height: 6px; border: 1px solid var(--muted); padding: 1px; margin: 12px 0; }
.pl-bar i { display: block; height: 100%; width: 0; background: var(--lime); }
.pl-log { font-size: 11px; color: var(--muted); min-height: 1.4em; text-transform: uppercase; }
.pl-skip {
  position: absolute; bottom: 32px; right: 32px; background: none; border: 0; color: var(--text);
  font: 400 13px var(--pixel); cursor: pointer; animation: blink 1s steps(2) infinite;
}
.pl-skip:hover { color: var(--lime); animation: none; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- motion layer ---------- */
.fx #particles { display: block; }
.fx .hero-hint { display: block; }
@media (hover: none) { .hero-hint .cursor-only { display: none; } }
.fx .hero h1 { color: transparent; } /* the particles draw it; the text stays for search engines and screen readers */
.fx .hero h1::selection { color: var(--text); }
.fx .reveal { opacity: 0; transform: translateY(32px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.fx .reveal.in { opacity: 1; transform: none; }

.fx .frame { transform: scale(.88); opacity: .45; filter: saturate(.5); }
.fx .frame.active { transform: scale(1); opacity: 1; filter: none; }

/* Scroll-driven pinning on wide screens (class set by app.js). */
.reel.pinned { height: calc(var(--scenes) * 70vh + 100vh); }
.reel.pinned .reel-pin { position: sticky; top: 0; height: 100vh; padding-top: 80px; padding-bottom: 24px; justify-content: center; overflow: hidden; }
.reel.pinned .track { overflow: visible; scroll-snap-type: none; will-change: transform; padding-top: 0; }
.reel.pinned .frame { flex-basis: min(64vw, 820px); }
.reel.pinned .window-body { min-height: 0; }
@media (max-height: 820px) {
  .reel.pinned .window-body { padding: 20px 28px; gap: 10px; }
  .reel.pinned .window { padding: 20px; }
  .reel.pinned .window-body h3 { font-size: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee > div, .dot, .pl-skip { animation: none; }
  .marquee { white-space: normal; }
}
