/* supa.company page layout. Page layout is not a design-system component:
   this file places the components (a left-aligned column up to 1200px,
   space-16 margins, space-24 between sections) and styles the few plain
   elements between them. Colours, type, edges and depth come from tokens.css
   and supa.css. Copied to public/ds/site.css by the build. */

html { scroll-behavior: auto; }
body { background: var(--paper); color: var(--ink); }
img, video { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 2px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.wrap { max-width: 1328px; margin: 0 auto; padding: 0 var(--space-16); }

/* ---------- nav ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); padding-top: var(--space-6); padding-bottom: var(--space-6); }
.nav-links { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.nav-link, .nav-link:visited { color: inherit; text-decoration: none; font: var(--text-kicker); font-size: 17px; text-transform: lowercase; }
.nav-link:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---------- hero: volume 3 ---------- */
.hero-wrap { padding-left: var(--space-8); padding-right: var(--space-8); max-width: 1264px; }
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: var(--space-12); align-items: center; padding: var(--space-12) var(--space-8) var(--space-16); }
/* The ident and the TV carry their own tape noise, so they sit above the slate's grain layer. */
.hero-copy > .ident-cell, .hero-art { position: relative; z-index: 6; }
.ident-cell { display: inline-flex; align-items: center; justify-content: center; padding: var(--space-8) var(--space-12) var(--space-12) var(--space-8); background: var(--ink); border-radius: var(--radius-lg); overflow: hidden; isolation: isolate; }
.ident-cell .supa-grain { z-index: 0; }
.ident-cell .supa-wm { position: relative; z-index: 1; }
.hero-title { margin: var(--space-8) 0 0; font: var(--text-h1); text-transform: uppercase; color: var(--paper); }
.hero .lead { margin: var(--space-4) 0 var(--space-8); max-width: 520px; font: var(--text-lead); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6); }
.on-slate { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.hero-art { justify-self: center; padding: var(--space-6) 0 var(--space-12); }

/* the photocopied TV, its screen cut out, a scene playing behind the hole */
.tv { position: relative; width: 400px; height: 297px; }
.tv-screen { position: absolute; left: 31.5%; top: 31.03%; width: 37.5%; height: 49.92%; border-radius: 13.3% / 13.5%; overflow: hidden; background: var(--ink); }
.tv-screen > .supa-shader, .tv-screen > .supa-tx { position: absolute; inset: 0; width: 100%; height: 100% !important; border-radius: 0; }
.supa-frame__pic .tv-body { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

/* Live media over still stand-ins: the still shows until the first frame is drawn. */
.settle { position: relative; display: inline-block; }
.settle-still { position: absolute; left: 0; top: 0; }
.settle-live { position: relative; visibility: hidden; }
.settle.is-ready .settle-live { visibility: visible; }
.settle.is-ready .settle-still { visibility: hidden; }
.settle.is-failed .settle-live { display: none; }
.settle.is-failed .settle-still { position: relative; }
.tv-screen > .supa-shader, .supa-card__media > .supa-shader { background: transparent; }

/* ---------- catalogue: volume 2 ---------- */
.sec { padding-top: var(--space-24); }
.sec > .supa-l3, .how .supa-l3 { margin-bottom: var(--space-12); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-6); }

/* ---------- how they work: quieter, evidence ---------- */
.how { margin-top: var(--space-24); padding: var(--space-24) 0; background: var(--paper-sunk); }
.how-row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-12); align-items: center; }
.how-row + .how-row { margin-top: var(--space-24); }
.how-row.flip .how-media { order: 2; }
.how-media { margin: 0; min-width: 0; }
.how-media .shot { display: block; width: 100%; height: auto; border: var(--stroke) solid var(--ink); background: var(--paper); }
.how-media figcaption { margin-top: var(--space-3); font: var(--text-caption); color: var(--ink-soft); }
.how-num { margin: 0 0 var(--space-2); }
.how-num .pop { font: var(--text-kicker); text-transform: lowercase; }
.how-num .num { font: var(--text-timecode); }
.how-title { margin: 0 0 var(--space-4); font: var(--text-h3); text-transform: uppercase; }
.how-text > p { margin: 0 0 var(--space-4); max-width: 520px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-6); margin: var(--space-6) 0; max-width: 520px; }
.facts > div { display: contents; }
.facts dt { font: var(--text-micro); text-transform: uppercase; padding-top: 4px; }
.facts dd { margin: 0; font: var(--text-small); }
pre.sample, pre.code { margin: 0 0 var(--space-4); padding: var(--space-4); overflow-x: auto; background: var(--paper); border: var(--stroke-hair) solid var(--line); font: var(--text-code); font-size: 14px; line-height: 22px; white-space: pre; }
pre.code { padding: var(--space-6); background: var(--ink); color: var(--paper); border: 0; border-radius: var(--radius-md); }
pre.code .c { color: var(--mint); }

/* ---------- about: quiet ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-12); align-items: center; }
.about-h { margin: 0 0 var(--space-4); font: var(--text-h2); text-transform: uppercase; }
.about p { margin: 0 0 var(--space-4); max-width: 560px; }
.about-lead { font: var(--text-lead); }
.h4 { margin: var(--space-8) 0 var(--space-2); font: var(--text-h4); }
.about-art { justify-self: center; padding-bottom: var(--space-12); }

/* ---------- footer ---------- */
.band { height: var(--space-6); margin-top: var(--space-24); }
.foot { background: var(--ink); color: var(--paper); }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-12); padding-top: var(--space-12); padding-bottom: var(--space-12); }
.foot-right { text-align: right; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-6); margin-bottom: var(--space-3); }
.foot p { margin: 0; font: var(--text-timecode); line-height: 20px; }

/* ---------- 404 ---------- */
.page-404 .off-air { min-height: 100vh; }
.off-band { height: var(--space-6); }
.off-inner { position: relative; max-width: 1200px; padding: var(--space-16); display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-12); }
.off-ident { position: relative; z-index: 6; }
.off-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-6); }
.off-text { margin: 0; max-width: 520px; font: var(--text-lead); }

/* ---------- narrower screens ---------- */
@media (max-width: 1060px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-art { justify-self: start; }
  .how-row, .how-row.flip { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
  .how-row.flip .how-media { order: 0; }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .about-art { justify-self: start; }
}
@media (max-width: 720px) {
  .wrap, .hero-wrap { padding-left: var(--space-4); padding-right: var(--space-4); }
  .nav { flex-wrap: wrap; }
  .nav-links { gap: var(--space-6); }
  .hero { padding: var(--space-6) var(--space-4) var(--space-8); gap: var(--space-8); }
  .ident-cell { padding: var(--space-6) var(--space-8) var(--space-8) var(--space-6); }
  .ident-cell .supa-wm { --wm: 84px !important; }
  .hero-title { font: var(--text-h2); }
  .hero .lead { font: var(--text-body); font-size: 18px; line-height: 28px; }
  .hero-art { padding: 0 0 var(--space-8); }
  .tv { width: 290px; height: 215px; }
  .hero-art .supa-frame__pic { width: 290px !important; height: 215px !important; }
  .sec, .how { padding-top: var(--space-16); }
  .how { margin-top: var(--space-16); padding-bottom: var(--space-16); }
  .how-row + .how-row { margin-top: var(--space-16); }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: var(--space-2); }
  .about-art .supa-frame__pic { width: 260px !important; height: 195px !important; }
  .band { margin-top: var(--space-16); }
  .foot-right { text-align: left; }
  .foot-links { justify-content: flex-start; }
  .off-inner { padding: var(--space-8) var(--space-4); }
  .off-ident .supa-wm { --wm: 84px !important; }
}
