/* ============================================================
   layout.css — header, navigation, footer. Shared by every page.
   ============================================================ */

/* ============================================================
   header
   ============================================================ */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 50;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
  border-block-end: 1px solid transparent;
}
/* Set by js/nav.js once the page scrolls past the hero. */
.site-header.is-stuck {
  background: rgba(10, 15, 22, 0.88);
  backdrop-filter: blur(12px);
  border-block-end-color: var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  min-block-size: 68px;
}
@media (min-width: 1024px) { .site-header__inner { min-block-size: 84px; } }

/* ---- wordmark ---- */
.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: var(--text);
  flex: none;
}
.brand:hover { color: var(--text); }

/* 3x3 pixel module — the signature device at its smallest useful size */
.brand__mark {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  inline-size: 22px;
  block-size: 22px;
  flex: none;
}
.brand__mark span { background: var(--line-strong); transition: background var(--dur) var(--ease); }
.brand__mark span:nth-child(1),
.brand__mark span:nth-child(5),
.brand__mark span:nth-child(9) { background: var(--accent); }
.brand:hover .brand__mark span { background: var(--accent); }

.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-stretch: 110%;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.brand__name b { font-weight: 700; }
.brand__name span { font-weight: 400; }
.brand__region {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-block-start: 4px;
}

/* ---- desktop navigation ---- */
.nav { display: none; }
@media (min-width: 1024px) {
  .nav { display: flex; align-items: center; gap: var(--sp-6); }
}
.nav__list { display: flex; align-items: center; gap: var(--sp-6); }
.nav__link {
  position: relative;
  font-size: var(--step-sm);
  text-decoration: none;
  color: var(--text);
  padding-block: var(--sp-2);
  transition: color var(--dur) var(--ease);
}
.nav__link:hover { color: var(--accent-hi); }
/* Current page marked by a lit module, not an underline. */
.nav__link[aria-current="page"] { color: var(--accent-hi); }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-block-end: -2px;
  inset-inline-start: 0;
  inline-size: 8px;
  block-size: 3px;
  background: var(--accent);
}

/* ---- mobile toggle ---- */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  inline-size: 48px;
  block-size: 48px;
  padding: 0 12px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
@media (min-width: 1024px) { .nav-toggle { display: none; } }
.nav-toggle span {
  display: block;
  block-size: 1.5px;
  background: var(--text);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---- mobile panel ---- */
.mobile-nav {
  position: fixed;
  inset: 68px 0 0 0;
  z-index: 45;
  background: var(--bg);
  padding: var(--sp-6) var(--gutter) var(--sp-8);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.mobile-nav.is-open { opacity: 1; transform: none; visibility: visible; }
@media (min-width: 1024px) { .mobile-nav { display: none; } }

.mobile-nav__list { display: flex; flex-direction: column; }
.mobile-nav__link {
  display: block;
  padding-block: var(--sp-4);
  border-block-end: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: var(--step-m);
  font-stretch: 104%;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}
.mobile-nav__link[aria-current="page"] { color: var(--accent-hi); }
.mobile-nav__meta {
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  color: var(--muted);
  line-height: 1.8;
}
.mobile-nav__meta a { display: block; }

body.nav-open { overflow: hidden; }

/* ============================================================
   page header — the band at the top of every non-home page
   ============================================================ */
.page-head {
  position: relative;
  padding-block: calc(68px + var(--sp-8)) var(--sp-8);
  overflow: hidden;
  border-block-end: 1px solid var(--line);
}
@media (min-width: 1024px) {
  .page-head { padding-block: calc(84px + var(--sp-9)) var(--sp-9); }
}
.page-head__inner { position: relative; z-index: 1; }
.page-head .lead { margin-block-start: var(--sp-5); max-width: 52ch; }

/* ============================================================
   footer
   ============================================================ */
.site-footer {
  background: var(--surface);
  border-block-start: 1px solid var(--line);
  padding-block: var(--sp-8) var(--sp-6);
}
.site-footer__grid {
  display: grid;
  gap: var(--sp-7);
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .site-footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--sp-6); } }

.site-footer__title {
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-block-end: var(--sp-4);
}
.site-footer__list { display: flex; flex-direction: column; gap: var(--sp-3); }
.site-footer__list a { color: var(--text); text-decoration: none; font-size: var(--step-sm); }
.site-footer__list a:hover { color: var(--accent-hi); }

.site-footer address {
  font-style: normal;
  font-size: var(--step-sm);
  line-height: 1.7;
  color: var(--muted);
}
.site-footer address a { color: var(--text); text-decoration: none; }
.site-footer address a:hover { color: var(--accent-hi); }
.site-footer address strong { color: var(--text); font-weight: 600; display: block; margin-block-end: var(--sp-2); }

.site-footer__brandline {
  max-width: 32ch;
  color: var(--muted);
  font-size: var(--step-sm);
  margin-block-start: var(--sp-4);
}

.site-footer__base {
  margin-block-start: var(--sp-8);
  padding-block-start: var(--sp-5);
  border-block-start: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4) var(--sp-5);
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  color: var(--muted);
}
.site-footer__base nav { display: flex; flex-wrap: wrap; gap: var(--sp-5); }
.site-footer__base a { color: var(--muted); text-decoration: none; }
.site-footer__base a:hover { color: var(--accent-hi); }

/* ============================================================
   shared: call-to-action band, closes most pages
   ============================================================ */
.cta-band { position: relative; overflow: hidden; border-block-start: 1px solid var(--line); }
.cta-band__inner { position: relative; z-index: 1; text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta-band .eyebrow { justify-content: center; }
.cta-band .lead { margin-block: var(--sp-5) var(--sp-7); max-width: 44ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: center; }

/* ============================================================
   placeholder image slots
   ------------------------------------------------------------
   Every slot states its own spec so the asset brief is readable
   straight off the page. Swap the <img> src, delete the class.
   ============================================================ */
.slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  padding: var(--sp-5);
  overflow: hidden;
}
.slot::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right,  var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: var(--px-pitch) var(--px-pitch);
  opacity: 0.5;
}
.slot > * { position: relative; }
.slot__kind {
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-hi);
}
.slot__spec {
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  color: var(--muted);
}
.slot--16x9 { aspect-ratio: 16 / 9; }
.slot--4x3  { aspect-ratio: 4 / 3; }
.slot--3x2  { aspect-ratio: 3 / 2; }
.slot--1x1  { aspect-ratio: 1 / 1; }
.slot--tall { aspect-ratio: 3 / 4; }
