/* ============================================================
   Block Studios design system v3
   Dark canvas, bone type, volt accent. Clash Display + Switzer.
   Rendered 3D block art, hairline structure, index rows.
   One theme, locked.
   ============================================================ */

/* ---------- Fonts (self-hosted variable fonts) ---------- */
@font-face {
  font-family: 'Roboto Flex';
  font-style: normal;
  font-weight: 100 1000;
  font-stretch: 25% 151%;
  font-display: swap;
  src: url('/assets/fonts/roboto-flex-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/plex-mono-400-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/plex-mono-500-latin.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #0e0e10;
  --bg-raised: #16161a;
  --ink: #f2f1ea;
  --ink-72: rgba(242, 241, 234, 0.74);
  --ink-50: rgba(242, 241, 234, 0.52);
  --line: rgba(242, 241, 234, 0.16);
  --line-soft: rgba(242, 241, 234, 0.08);
  --volt: #d7ff3e;
  --volt-press: #c2ea2c;
  --on-volt: #121303;

  --font-display: 'Roboto Flex', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-sans: 'Roboto Flex', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Plex Mono', 'Courier New', monospace;

  --wrap: 1280px;
  --gutter: clamp(20px, 4vw, 52px);
  --section: clamp(80px, 11vw, 140px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* z-scale: 10 header, 40 menu backdrop, 50 menu */
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 410;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--volt); color: var(--on-volt); }

:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; }

.skip {
  position: absolute; left: -999px; top: 12px;
  background: var(--volt); color: var(--on-volt);
  padding: 10px 18px; z-index: 60; text-decoration: none;
  font-weight: 600;
}
.skip:focus { left: 12px; }

/* ---------- Layout primitives ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--rule { border-top: 1px solid var(--line-soft); }

/* ---------- Type ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.98;
  text-wrap: balance;
}
.h1 { font-size: clamp(2.9rem, 7vw, 6.2rem); }
.h2 {
  font-family: var(--font-display);
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.03;
  font-size: clamp(2rem, 4vw, 3.2rem);
  text-wrap: balance;
}
.h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.008em;
  line-height: 1.12;
  font-size: clamp(1.25rem, 1.9vw, 1.55rem);
}
.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.28rem);
  line-height: 1.55;
  color: var(--ink-72);
  max-width: 32em;
  text-wrap: pretty;
}
.body { color: var(--ink-72); max-width: 60ch; text-wrap: pretty; }

.mono-tag {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-50);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  font-weight: 560;
  font-size: 0.98rem; line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--ink);
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.3s var(--ease);
}
.btn:active { transform: translate3d(var(--mx, 0px), calc(var(--my, 0px) + 1px), 0) scale(0.985); }
.btn--volt { background: var(--volt); border-color: var(--volt); color: var(--on-volt); font-weight: 620; }
.btn--volt:hover { background: var(--volt-press); border-color: var(--volt-press); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--volt); color: var(--volt); }

.text-link {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-weight: 560;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.text-link:hover { color: var(--volt); border-color: var(--volt); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(14, 14, 16, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header__inner {
  height: 66px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.brand img { width: 30px; height: 30px; }
.nav { display: flex; align-items: center; gap: 36px; }
.nav__links { display: flex; gap: 30px; }
.nav__links a {
  text-decoration: none;
  font-weight: 460; font-size: 0.98rem;
  color: var(--ink-72);
  transition: color 0.2s var(--ease);
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--volt); }
.nav .btn { padding: 11px 20px; font-size: 0.92rem; }

.burger {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column; align-items: center; justify-content: center; gap: 7px;
}
.burger span {
  width: 22px; height: 2px; background: var(--ink);
  transition: transform 0.3s var(--ease);
}
.burger[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* ---------- Mobile menu ---------- */
.menu-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.menu-backdrop.is-open { opacity: 1; }
.menu {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: min(380px, 94vw);
  background: var(--bg);
  border-left: 1px solid var(--line);
  padding: 16px var(--gutter) 40px;
  display: flex; flex-direction: column;
  transform: translateX(102%);
  transition: transform 0.4s var(--ease);
  visibility: hidden;
}
.menu.is-open { transform: translateX(0); visibility: visible; }
.menu__head {
  display: flex; align-items: center; justify-content: space-between;
  height: 50px; margin-bottom: 44px;
}
.menu__links { display: flex; flex-direction: column; }
.menu__links a {
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem; letter-spacing: -0.015em;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
  transition: color 0.2s var(--ease), padding-left 0.25s var(--ease);
}
.menu__links a:hover { color: var(--volt); padding-left: 8px; }
.menu .btn { margin-top: auto; justify-content: center; }

/* ---------- Hero ---------- */
.hero { overflow: hidden; padding-block: clamp(40px, 6vw, 88px) clamp(48px, 7vw, 96px); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 6.5fr) minmax(0, 5.5fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}
.hero__title { margin-bottom: 30px; font-size: clamp(2.5rem, 4.8vw, 4.4rem); }
.hero__title em { font-style: normal; color: var(--volt); }
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.hero__title .line span { display: block; transform: translateY(115%); }
.is-in .hero__title .line span { animation: rise 0.9s var(--ease) forwards; }
.is-in .hero__title .line:nth-child(2) span { animation-delay: 0.12s; }
@keyframes rise { to { transform: translateY(0); } }
.hero__sub { margin-bottom: 36px; }
.hero__media { position: relative; }
.hero__media img {
  width: 118%; max-width: none; height: auto;
  animation: heroFloat 9s ease-in-out infinite;
  -webkit-mask-image: radial-gradient(105% 105% at 55% 45%, #000 52%, transparent 92%);
  mask-image: radial-gradient(105% 105% at 55% 45%, #000 52%, transparent 92%);
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Marquee (volt band) ---------- */
.marquee {
  background: var(--volt);
  color: var(--on-volt);
  overflow: hidden;
  padding-block: 13px;
}
.marquee__track {
  display: flex; gap: 64px; width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee__group { display: flex; gap: 64px; align-items: center; }
.marquee__item {
  display: flex; align-items: center; gap: 64px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  white-space: nowrap;
}
.marquee__item::after {
  content: ""; width: 10px; height: 10px; background: var(--on-volt);
  flex: none;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Section intro ---------- */
.section-head { margin-bottom: clamp(36px, 5vw, 60px); }
.section-head--row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.section-head .body { margin-top: 14px; }

/* ---------- Product index ---------- */
.index { border-top: 1px solid var(--line); }
.index__row {
  position: relative;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) minmax(220px, 330px) 44px;
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
  padding-block: clamp(26px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background-color 0.3s var(--ease);
}
.index__row:hover { background: var(--bg-raised); }
.index__status {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--ink-50);
}
.index__status::before {
  content: ""; width: 8px; height: 8px; flex: none;
  border: 1px solid var(--ink-50);
}
.index__status--live { color: var(--volt); }
.index__status--live::before { background: var(--volt); border-color: var(--volt); }
.index__title {
  font-family: var(--font-display);
  font-weight: 750; letter-spacing: -0.018em; line-height: 1;
  font-size: clamp(1.9rem, 4.2vw, 3.5rem);
  transition: color 0.25s var(--ease), transform 0.35s var(--ease);
}
.index__row:hover .index__title { transform: translateX(10px); }
a.index__row:hover .index__title { color: var(--volt); }
.index__row--queued .index__title { color: var(--ink-50); }
.index__desc { color: var(--ink-72); font-size: 0.98rem; line-height: 1.5; }
.index__arrow {
  font-family: var(--font-display); font-weight: 500;
  font-size: 1.7rem; line-height: 1;
  color: var(--ink-50);
  transition: color 0.25s var(--ease), transform 0.35s var(--ease);
}
a.index__row:hover .index__arrow { color: var(--volt); transform: translateX(6px); }
.index__peek {
  position: absolute; right: clamp(60px, 22vw, 360px); top: 50%;
  width: 300px;
  transform: translateY(-44%) rotate(-2deg) scale(0.97);
  opacity: 0;
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.index__row:hover .index__peek { opacity: 1; transform: translateY(-50%) rotate(-2deg) scale(1); }

/* ---------- Imagery ---------- */
.ph { overflow: hidden; background: var(--bg-raised); }
.ph img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s var(--ease);
}
a:hover .ph img, .ph:hover img { transform: scale(1.025); }

/* ---------- Split ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: center;
}
.split .h2 { margin-bottom: 18px; }
.split .body { margin-bottom: 28px; }
.split__media { aspect-ratio: 16 / 10; }

/* ---------- Social / contact rows ---------- */
.link-rows { border-top: 1px solid var(--line); max-width: 560px; }
.link-rows a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 17px 2px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-weight: 560;
  transition: color 0.2s var(--ease), padding-left 0.25s var(--ease);
}
.link-rows a:hover { color: var(--volt); padding-left: 10px; }
.link-rows span:last-child { color: var(--ink-50); font-weight: 420; font-size: 0.95rem; }
.link-rows a:hover span:last-child { color: var(--volt); }

/* ---------- Statement band ---------- */
.statement { border-top: 1px solid var(--line-soft); }
.statement .h2 { max-width: 14em; margin-bottom: 18px; }
.statement .body { margin-bottom: 36px; }
.statement__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }

/* ---------- Page head (subpages) ---------- */
.page-head { padding-block: clamp(48px, 7vw, 96px) 0; }
.page-head__grid { padding-bottom: clamp(48px, 7vw, 92px); }
.page-head .h1 { margin-bottom: 26px; max-width: 10em; }
.page-head .lede { max-width: 40em; }
.page-head__media { aspect-ratio: 16 / 8; margin-top: clamp(36px, 5vw, 60px); }
.page-head__media img { width: 100%; }

/* ---------- Cross band ---------- */
.cross-band { border-top: 1px solid var(--line-soft); }
.cross-band__box {
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
  border: 1px solid var(--line);
  padding: clamp(28px, 4vw, 52px);
  background: var(--bg-raised);
}
.cross-band__box .h2 { margin-bottom: 10px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); }
.footer__mark { padding-block: clamp(44px, 6vw, 80px) 0; }
.footer__mark .display {
  font-size: clamp(2.4rem, 8.6vw, 7.2rem);
  color: transparent;
  -webkit-text-stroke: 1px var(--ink-72);
}
.footer__mark .display span {
  color: var(--volt);
  -webkit-text-stroke: 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-block: clamp(44px, 6vw, 68px);
}
.footer__brand p { color: var(--ink-72); margin-top: 12px; max-width: 26ch; }
.footer h4 {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-50);
  margin-bottom: 16px;
}
.footer nav { display: flex; flex-direction: column; gap: 10px; }
.footer nav a {
  text-decoration: none; color: var(--ink-72);
  font-weight: 430; font-size: 0.98rem;
  transition: color 0.2s var(--ease);
}
.footer nav a:hover { color: var(--volt); }
.footer__base {
  border-top: 1px solid var(--line-soft);
  padding-block: 22px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--ink-50); font-size: 0.9rem;
}

/* ---------- 404 ---------- */
.notfound {
  min-height: 72vh;
  display: grid; place-content: center;
  gap: 18px;
}
.notfound .display { font-size: clamp(4.5rem, 16vw, 10rem); color: var(--volt); }

/* ---------- Reveal motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 100ms);
}
.reveal.is-in { opacity: 1; transform: none; }
.no-observer .reveal { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; }
  .hero__media img { animation: none; }
  .hero__title .line span { transform: none; animation: none; }
  .ph img { transition: none; }
  .index__peek { display: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { order: -1; max-width: 560px; margin-inline: auto; }
  .hero__media img { width: 100%; }
  .split { grid-template-columns: 1fr; }
  .split__media { order: -1; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .index__row { grid-template-columns: minmax(0, 1fr) 44px; row-gap: 12px; }
  .index__status { grid-column: 1 / -1; }
  .index__desc { grid-column: 1 / -1; }
  .index__arrow { grid-row: 2; grid-column: 2; }
  .index__title { grid-row: 2; }
  .index__peek { display: none; }
}
@media (max-width: 760px) {
  .nav__links, .nav .btn { display: none; }
  .burger { display: flex; }
  .cross-band__box { align-items: flex-start; flex-direction: column; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .page-head__media { aspect-ratio: 4 / 3; }
}
