/* ==========================================================================
   RWC BIRMINGHAM — Run With Christ Running Club, Birmingham, Alabama
   Stylesheet. Tokens and type scale are documented in DESIGN.md.
   Brand palette + typefaces come from "BHAM RWC Brand Book" (BRANDING.png).
   ========================================================================== */

/* --- Base reset (mirrors the Artifact publish skeleton so the hosted site
       and the published artifact render identically) ---------------------- */
:root {
  color-scheme: light dark;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  /* The header is sticky, so anything scrolled to by anchor or by script has
     to clear it. --header-stack is the header's full height, which is one row
     wide and two rows narrow (see the 800px breakpoint). */
  scroll-padding-top: calc(var(--header-stack, 59px) + 1rem);
}
* { box-sizing: border-box; }
body { margin: 0; }
img { height: auto; max-width: 100%; }
[hidden] { display: none !important; }

/* --- Tokens: light (primary — the brand is white-dominant) --------------- */
:root {
  --red:          #FF3232;
  --red-deep:     #CE3232;
  --ink:          #000000;
  --ink-soft:     #151212;
  --grey:         #545454;
  --grey-soft:    #8C8686;
  --paper:        #FFFFFF;
  --wash:         #F4F1F1;
  --line:         rgba(0, 0, 0, 0.14);
  --line-hard:    rgba(0, 0, 0, 0.82);
  --on-red:       #FFFFFF;
  --scrim:        rgba(0, 0, 0, 0.52);
  --tile:         #FFFFFF;

  --font-display: "Anton", "Arial Narrow", "Haettenschweiler", sans-serif;
  --font-statement: "Archivo Black", "Arial Black", Impact, sans-serif;
  --font-body:    "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono:    "Roboto Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter:       clamp(1rem, 4vw, 3.25rem);
  --band:         clamp(3.5rem, 8vw, 7rem);
  --measure:      64ch;
  --header-h:     58px;   /* one header row */
  --header-stack: 59px;   /* the whole sticky header, borders included */
  --ease:         cubic-bezier(0.22, 0.61, 0.36, 1);
}
/* Narrow, the header stacks into two rows. Declared here rather than inside
   the header block so the token is set before anything reads it. */
@media (max-width: 800px) {
  :root { --header-stack: 101px; }
}

/* --- Tokens: dark (system preference, unless light is explicitly chosen) - */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink:       #FFFFFF;
    --ink-soft:  #F2EDED;
    --grey:      #A9A2A2;
    --grey-soft: #6E6767;
    --paper:     #0B0A0A;
    --wash:      #161313;
    --line:      rgba(255, 255, 255, 0.16);
    --line-hard: rgba(255, 255, 255, 0.78);
    --scrim:     rgba(0, 0, 0, 0.58);
    --tile:      #1B1717;
  }
}
/* --- Tokens: dark (explicit choice wins in both directions) ------------- */
:root[data-theme="dark"] {
  --ink:       #FFFFFF;
  --ink-soft:  #F2EDED;
  --grey:      #A9A2A2;
  --grey-soft: #6E6767;
  --paper:     #0B0A0A;
  --wash:      #161313;
  --line:      rgba(255, 255, 255, 0.16);
  --line-hard: rgba(255, 255, 255, 0.78);
  --scrim:     rgba(0, 0, 0, 0.58);
  --tile:      #1B1717;
}

/* ==========================================================================
   Page shell
   ========================================================================== */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--red);
  color: var(--on-red);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  padding: 0.75rem 1.25rem;
  text-transform: uppercase;
  text-decoration: none;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}
/* <main> and the panels are focus targets for the skip link and the router,
   not controls. They are page-sized, so an outline round one reads as a stray
   red border rather than a focus ring. The scroll position says where you are. */
main:focus, main:focus-visible,
.view:focus, .view:focus-visible { outline: none; }

/* --- Shared wrappers ---------------------------------------------------- */
.wrap {
  margin-inline: auto;
  max-width: 1180px;
  padding-inline: var(--gutter);
  width: 100%;
}
.wrap--narrow { max-width: 860px; }

.band { padding-block: var(--band); }
.band--paper { background: var(--paper); color: var(--ink); }
.band--wash  { background: var(--wash);  color: var(--ink); }
.band--ink   { background: #000;         color: #fff; }
.band--red   { background: var(--red);   color: var(--on-red); }
.band--tight { padding-block: clamp(2.25rem, 5vw, 3.75rem); }

/* ==========================================================================
   Brand marks
   ========================================================================== */
/* The RWC logotype is Anton Italic, letter-spacing -25, #FF3232 (brand book).
   Anton ships upright only, so the italic is reproduced with a skew. */
.logotype {
  color: var(--red);
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: -0.025em;
  line-height: 0.8;
  text-transform: uppercase;
  transform: skewX(-11deg);
}
.logotype--lg { font-size: clamp(4rem, 15vw, 11rem); }
.logotype--on-dark { color: var(--red); }

/* Strike device — from the merch: ISOLATED struck through, INTEGRATED kept.
   Used site-wide as the section-marker system. */
.strike { position: relative; white-space: nowrap; }
.strike::after {
  background: var(--red);
  content: "";
  height: 2px;
  left: -0.04em;
  position: absolute;
  right: -0.04em;
  top: 50%;
  transform: translateY(-50%) rotate(-2.5deg);
}

/* Eyebrow: the recurring mono label above every section headline. */
.eyebrow {
  align-items: center;
  color: var(--grey);
  display: flex;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  gap: 0.5em;
  letter-spacing: 0.22em;
  margin: 0 0 1.25rem;
  text-transform: uppercase;
}
.band--ink .eyebrow, .band--red .eyebrow { color: rgba(255, 255, 255, 0.72); }
.band--red .strike::after { background: #fff; }
.eyebrow .cross { color: var(--red); font-size: 1.1em; line-height: 1; }
.band--red .eyebrow .cross { color: #fff; }

/* ==========================================================================
   Headings & text
   ========================================================================== */
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }

.display {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5.75rem);
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 0.92;
  text-transform: uppercase;
}
.display--sm { font-size: clamp(1.875rem, 5.2vw, 3.5rem); }
.display--xs { font-size: clamp(1.375rem, 3.4vw, 2.125rem); line-height: 1; }

.statement {
  font-family: var(--font-statement);
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  letter-spacing: -0.015em;
  line-height: 1.05;
  text-transform: uppercase;
}

.lede {
  font-size: clamp(1.0625rem, 1.9vw, 1.375rem);
  line-height: 1.5;
  max-width: var(--measure);
}
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1em; }
.prose p:last-child { margin-bottom: 0; }
.prose--center { margin-inline: auto; }

.quiet { color: var(--grey); }
.band--ink .quiet, .band--red .quiet { color: rgba(255, 255, 255, 0.7); }

.meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
/* The padding does not change the line box, but it lifts a 16px-tall inline
   link to a comfortable 26px tap target. */
.meta a { color: var(--red); padding-block: 0.3125rem; }

.rule {
  background: var(--line);
  border: 0;
  height: 1px;
  margin: 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  align-items: center;
  background: var(--red);
  border: 2px solid var(--red);
  color: var(--on-red);
  cursor: pointer;
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  gap: 0.6em;
  justify-content: center;
  letter-spacing: 0.14em;
  line-height: 1;
  padding: 1.0625rem 1.5rem;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease),
              color 0.18s var(--ease), transform 0.18s var(--ease);
}
.btn:hover { background: var(--red-deep); border-color: var(--red-deep); transform: translateY(-2px); }
.btn .arr { transition: transform 0.18s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

.btn--ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn--ghost:hover { background: currentColor; border-color: currentColor; color: var(--paper); transform: translateY(-2px); }
.band--ink .btn--ghost:hover { color: #000; }
.band--red .btn--ghost:hover { color: var(--red); }

.btn--onred { background: #fff; border-color: #fff; color: var(--red); }
.btn--onred:hover { background: #000; border-color: #000; color: #fff; }

.btn[aria-disabled="true"] {
  background: transparent;
  border-color: var(--line);
  color: var(--grey);
  cursor: not-allowed;
  transform: none;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ==========================================================================
   Header + tab navigation
   ========================================================================== */
.site-header {
  background: #000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: env(safe-area-inset-top, 0px);
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 100;
}
.site-header__inner {
  align-items: center;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  min-height: var(--header-h);
}
.brand {
  align-items: baseline;
  display: flex;
  gap: 0.6rem;
  min-width: 0;
  text-decoration: none;
}
.brand__city {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* Tabs — the site's primary navigation. Hash-routed; see rwc.js */
.tabs {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  margin: 0;
  overflow-x: auto;
  padding: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  padding: 1.0625rem 0;
  position: relative;
  text-transform: uppercase;
  transition: color 0.16s var(--ease);
  white-space: nowrap;
}
.tab::after {
  background: var(--red);
  bottom: 0;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s var(--ease);
}
.tab:hover { color: #fff; }
.tab[aria-selected="true"] { color: #fff; font-weight: 700; }
.tab[aria-selected="true"]::after { transform: scaleX(1); }

.header-cta { flex-shrink: 0; padding: 0.75rem 1.125rem; }

/* Narrow: two stacked rows — brand + CTA, then a scrollable tab strip. */
@media (max-width: 800px) {
  .site-header__inner {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
  }
  .brand-row {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    min-height: var(--header-h);
  }
  .tabs {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
  }
  .tab { padding: 0.8125rem 0; }
}

/* Phone: the six labels are tightened so the whole strip fits on screen rather
   than scrolling the last tab out of sight. Below ~340px it still scrolls, so
   `.tabs--overflow` (set by rwc.js) fades the right edge to say so. */
@media (max-width: 430px) {
  .tabs { gap: 0.5rem; }
  .tab { font-size: 0.625rem; letter-spacing: 0.08em; }
}
.tabs--overflow {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}

/* Wide: one row reading brand | tabs | CTA. `display: contents` dissolves the
   mobile-only wrapper so all three sit in the header's own flex row. */
@media (min-width: 801px) {
  .brand-row { display: contents; }
  .brand { order: 1; }
  .site-header__inner > nav { margin-left: auto; order: 2; }
  .header-cta { order: 3; }
}

/* ==========================================================================
   Views (tab panels)
   ========================================================================== */
/* Panels slide up slightly when a tab is opened. No opacity and no fill mode:
   the resting state is fully visible, so a panel is never parked invisible
   before the animation starts (or if it never runs at all). */
.view { animation: view-in 0.3s var(--ease); }
@keyframes view-in {
  from { transform: translateY(10px); }
}

/* View plate — the black opener each non-home tab leads with. */
.plate {
  background: #000;
  color: #fff;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.plate__grid {
  align-items: end;
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}
@media (max-width: 760px) { .plate__grid { grid-template-columns: 1fr; } }
.plate .display { color: #fff; }
.plate__note {
  border-left: 3px solid var(--red);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9375rem;
  padding-left: 1.125rem;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background: #000;
  display: grid;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(4rem, 12vw, 8.5rem);
  position: relative;
}
.hero__media {
  inset: 0;
  position: absolute;
  z-index: -2;
}
.hero__media img {
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
  width: 100%;
}
.hero::before {
  background:
    linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.45) 48%, rgba(0,0,0,0.65) 100%);
  content: "";
  inset: 0;
  position: absolute;
  z-index: -1;
}
.hero__inner { color: #fff; position: relative; }
.hero .eyebrow { color: rgba(255, 255, 255, 0.8); }
.hero h1 { color: #fff; }
.hero__strap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 1.25em;
  margin-top: 1.75rem;
}
.hero__strap span {
  align-items: center;
  color: #fff;
  display: flex;
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.6vw, 0.9375rem);
  gap: 0.75em;
  letter-spacing: 0.06em;
}
.hero__strap span::before {
  background: var(--red);
  border-radius: 50%;
  content: "";
  height: 6px;
  width: 6px;
}
/* Narrow, the three straplines wrap two-then-one and read as a broken list.
   Stack them instead so they land as the three beats they are. */
@media (max-width: 560px) {
  .hero__strap { flex-direction: column; gap: 0.45rem; }
}
.hero .btn-row { margin-top: 2.25rem; }
/* One full-width button per row on the narrowest phones, so neither the
   GroupMe CTA nor the ghost button ends up on a stranded half-line. */
@media (max-width: 400px) {
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row .btn { width: 100%; }
}

/* ==========================================================================
   Marquee — the culture statement, on red
   ========================================================================== */
.marquee {
  background: var(--red);
  border-block: 2px solid #000;
  overflow: hidden;
  padding-block: 0.75rem;
  white-space: nowrap;
}
.marquee__track {
  animation: marquee 44s linear infinite;
  display: inline-flex;
  gap: 0;
  will-change: transform;
}
.marquee__group {
  display: inline-flex;
  gap: 2.5rem;
  padding-right: 2.5rem;
}
.marquee__group span {
  color: var(--on-red);
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2.6vw, 1.75rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.marquee__group span::after {
  color: #000;
  content: " †";
  margin-left: 0.5rem;
}
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .marquee { overflow-x: auto; }
  .view { animation: none; }
}

/* ==========================================================================
   Thesis block
   ========================================================================== */
.thesis {
  display: grid;
  gap: clamp(1.75rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
}
@media (max-width: 840px) { .thesis { grid-template-columns: 1fr; } }
.thesis__shift {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.6vw, 3.25rem);
  gap: 0.35em;
  line-height: 1;
  text-transform: uppercase;
}
.thesis__shift small {
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
}

/* ==========================================================================
   Pillars
   ========================================================================== */
.pillars {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  background: #000;
  color: #fff;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  position: relative;
}
.pillar__media { aspect-ratio: 4 / 3; overflow: hidden; }
.pillar__media img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
  width: 100%;
}
.pillar:hover .pillar__media img { transform: scale(1.05); }
.pillar__body { padding: clamp(1.25rem, 3vw, 2rem); }
.pillar__n {
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}
.pillar h3 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1;
  margin: 0.5rem 0 0.75rem;
  text-transform: uppercase;
}
.pillar p { color: rgba(255, 255, 255, 0.76); font-size: 0.9375rem; margin: 0; }

/* ==========================================================================
   Detail list — the run facts (day / start / pace / cost)
   ========================================================================== */
.facts {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.fact {
  border-top: 1px solid var(--line);
  padding: 1.375rem 1.5rem 1.375rem 0;
}
.band--ink .fact { border-color: rgba(255, 255, 255, 0.18); }
.fact dt {
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.band--ink .fact dt { color: rgba(255, 255, 255, 0.6); }
.fact dd {
  font-family: var(--font-statement);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.2;
  margin: 0;
  text-transform: uppercase;
}
.fact dd small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0;
  margin-top: 0.4rem;
  text-transform: none;
}
.band--ink .fact dd small { color: rgba(255, 255, 255, 0.68); }

/* ==========================================================================
   Split feature (image bleeding to one edge)
   ========================================================================== */
.split {
  align-items: center;
  display: grid;
  gap: clamp(1.75rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
.split__media { overflow: hidden; position: relative; }
.split__media img { display: block; max-width: 100%; width: 100%; }

/* Portrait run photos would otherwise tower over the text beside them and
   leave a tall void. Cap the frame and let the photo crop into it. */
.split__media--photo img {
  aspect-ratio: 4 / 5;
  max-height: 32rem;
  object-fit: cover;
}
.split__media figcaption {
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  padding-top: 0.75rem;
  text-transform: uppercase;
}
.band--ink .split__media figcaption { color: rgba(255, 255, 255, 0.6); }

/* ==========================================================================
   Card grid (model, culture, links)
   ========================================================================== */
.grid-2 { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--tile);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}
.card h3 {
  font-family: var(--font-statement);
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.card p { color: var(--grey); font-size: 0.9375rem; margin: 0; }
.card__n {
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}

/* Culture statement tiles — the six tenets */
.tenets {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 860px) { .tenets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .tenets { grid-template-columns: 1fr; } }
.tenet {
  background: #000;
  color: #fff;
  min-height: 150px;
  padding: clamp(1.25rem, 3vw, 1.875rem);
  position: relative;
  transition: background 0.2s var(--ease);
}
.tenet:hover { background: var(--red); }
.tenet__n {
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  transition: color 0.2s var(--ease);
}
.tenet:hover .tenet__n { color: #000; }
.tenet h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.625rem);
  line-height: 1.02;
  margin-top: 0.75rem;
  text-transform: uppercase;
}

/* Ordered steps — a real sequence (how a run goes), so it is numbered */
.steps { counter-reset: step; display: grid; gap: 0; list-style: none; margin: 0; padding: 0; }
.steps li {
  border-top: 1px solid var(--line);
  counter-increment: step;
  display: grid;
  gap: 0.5rem 1.5rem;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  padding-block: 1.5rem;
}
.steps li::before {
  color: var(--red);
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
}
.steps h3 {
  font-family: var(--font-statement);
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.steps p { color: var(--grey); font-size: 0.9375rem; grid-column: 2; margin: 0; }
@media (max-width: 520px) {
  .steps li { grid-template-columns: 2.25rem minmax(0, 1fr); }
  .steps li::before { font-size: 1.125rem; }
}

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery {
  display: grid;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  grid-template-columns: repeat(6, 1fr);
}
.gallery__item {
  background: var(--wash);
  border: 0;
  cursor: zoom-in;
  display: block;
  grid-column: span 2;
  margin: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
}
.gallery__item img {
  aspect-ratio: 3 / 4;
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease), filter 0.3s var(--ease);
  width: 100%;
}
.gallery__item:hover img { filter: saturate(1.1); transform: scale(1.04); }
.gallery__item--wide { grid-column: span 3; }
.gallery__item--wide img { aspect-ratio: 3 / 2; }
.gallery__item--hero { grid-column: span 4; }
.gallery__item--hero img { aspect-ratio: 4 / 3; }
@media (max-width: 760px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery__item,
  .gallery__item--wide,
  .gallery__item--hero { grid-column: span 1; }
  .gallery__item--hero { grid-column: span 2; }
}

/* Photo strip (home teaser) */
.strip {
  display: grid;
  gap: clamp(0.5rem, 1.2vw, 0.75rem);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 700px) { .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.strip img { aspect-ratio: 1 / 1; display: block; object-fit: cover; width: 100%; }

/* Lightbox */
/* Deliberately no `display` here: a closed <dialog> must keep the UA's
   display:none, or it covers the page with its own backdrop colour. */
.lightbox {
  background: rgba(0, 0, 0, 0.94);
  border: 0;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  padding: clamp(1rem, 4vw, 3rem);
  width: 100%;
}
/* align-content keeps the photo and its bar together as one centred block,
   rather than pinning the bar to the bottom of a tall empty dialog. */
.lightbox[open] {
  align-content: center;
  display: grid;
  gap: 0.25rem;
  grid-template-rows: auto auto;
  justify-items: center;
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.94); }
.lightbox img {
  max-height: 78vh;
  object-fit: contain;
  width: auto;
}
/* Landscape phone: 78vh plus the bar overflows a ~390px-tall viewport, and a
   dialog does not scroll, so the controls would simply be cut off. */
@media (max-height: 560px) {
  .lightbox { padding: 0.75rem; }
  .lightbox img { max-height: 62vh; }
  .icon-btn { height: 34px; width: 34px; }
}
.lightbox__bar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding-top: 1rem;
  width: 100%;
}
.lightbox__count {
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  gap: 0 1rem;
  letter-spacing: 0.12em;
  min-width: 0;
}
.lightbox__index { color: rgba(255, 255, 255, 0.4); }
.lightbox__nav { display: flex; gap: 0.5rem; }
.icon-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  height: 40px;
  transition: background 0.15s var(--ease);
  width: 40px;
}
.icon-btn:hover { background: var(--red); border-color: var(--red); }

/* ==========================================================================
   Merch
   ========================================================================== */
.notice {
  background: var(--wash);
  border-left: 3px solid var(--red);
  display: grid;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem;
}
.notice strong {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.notice p { color: var(--grey); font-size: 0.9375rem; margin: 0; max-width: var(--measure); }

.products {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.25rem) clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  scroll-margin-top: calc(var(--header-stack, 59px) + 1rem);
}
/* Two-up all the way down. Twelve tees in one column is a 9,000px scroll on a
   phone, and a mockup blown up to the full screen width tells you no more than
   a half-width one does. */
@media (max-width: 880px) {
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .products { gap: 1.25rem 0.75rem; }
  .product__tag { font-size: 0.5rem; letter-spacing: 0.12em; padding: 0.3rem 0.45rem; }
  /* Half a phone screen is a narrow measure, so ease the type down rather than
     let every product name break across three lines. */
  .product__name { font-size: 0.8125rem; }
  .product__line { font-size: 0.625rem; letter-spacing: 0.06em; }
}

.product { display: flex; flex-direction: column; gap: 0.875rem; }
/* Mockup tiles keep a white ground in both themes — the artwork is drawn on
   white — so they carry their own hairline rather than the theme's. */
.product__frame {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.14);
  cursor: pointer;
  display: block;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 100%;
}
.product__frame img {
  aspect-ratio: 4 / 5;
  display: block;
  object-fit: contain;
  transition: opacity 0.35s var(--ease);
  width: 100%;
}
.product__frame img + img { inset: 0; opacity: 0; position: absolute; }
.product__frame:hover img + img,
.product__frame:focus-visible img + img { opacity: 1; }
.product__tag {
  background: #000;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 700;
  left: 0;
  letter-spacing: 0.16em;
  padding: 0.4rem 0.625rem;
  position: absolute;
  text-transform: uppercase;
  top: 0;
}
.product__tag--red { background: var(--red); }
.product__info { display: flex; flex-direction: column; gap: 0.3rem; }
.product__name {
  font-family: var(--font-statement);
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.product__line { color: var(--grey); font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; }
.product__price { font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 500; }
/* 0.75rem leaves exactly enough room for the swatches' overhanging hit areas
   to meet without overlapping, so a tap never selects the wrong colour. */
.product__swatches { display: flex; gap: 0.75rem; margin-top: 0.15rem; }
/* 16px square is the brand-book swatch size, and far too small to tap. Keep
   the mark at 16px and hang a 28px hit area off it. */
.swatch {
  border: 1px solid var(--line-hard);
  cursor: pointer;
  height: 16px;
  padding: 0;
  position: relative;
  width: 16px;
}
.swatch::after { content: ""; inset: -7px; position: absolute; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--red); }

/* Product detail panel */
.detail[hidden] { display: none !important; }
.detail {
  background: var(--paper);
  border: 1px solid var(--line);
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  scroll-margin-top: calc(var(--header-stack, 59px) + 1rem);
}
@media (max-width: 800px) { .detail { grid-template-columns: 1fr; } }
.detail__media { background: #fff; border-right: 1px solid rgba(0, 0, 0, 0.14); }
@media (max-width: 800px) { .detail__media { border-bottom: 1px solid rgba(0, 0, 0, 0.14); border-right: 0; } }
.detail__media img { aspect-ratio: 4 / 5; display: block; object-fit: contain; width: 100%; }
/* Stacked, a 4:5 mockup at the full page width runs taller than the screen and
   pushes every control below the fold. Cap it and let it letterbox: the
   mockup's own ground is white, so the frame stays seamless. */
@media (max-width: 800px) {
  .detail__media img { aspect-ratio: auto; height: min(56vh, 28rem); }
}
.detail__views { border-top: 1px solid var(--line); display: flex; gap: 0; }
.detail__views button {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--grey);
  cursor: pointer;
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  padding: 0.75rem 0.5rem;
  text-transform: uppercase;
}
.detail__views button[aria-pressed="true"] { background: #000; color: #fff; }
.detail__body { display: flex; flex-direction: column; gap: 1.25rem; padding: clamp(1.5rem, 4vw, 2.5rem); }
.detail__close {
  align-self: flex-start;
  background: none;
  border: 0;
  color: var(--grey);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  padding: 0;
  text-transform: uppercase;
}
.detail__close:hover { color: var(--red); }
.sizes { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.size {
  background: transparent;
  border: 1px solid var(--line-hard);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  min-width: 48px;
  padding: 0.6875rem 0.5rem;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.size:hover { background: var(--wash); }
.size[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.field-label {
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  margin-bottom: 0.625rem;
  text-transform: uppercase;
}

/* ==========================================================================
   Link list (Connect)
   ========================================================================== */
.links { display: grid; gap: 0; }
.link-row {
  align-items: center;
  border-top: 1px solid var(--line);
  color: inherit;
  display: grid;
  gap: 0.35rem 1.5rem;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  padding-block: 1.375rem;
  text-decoration: none;
  transition: padding-inline 0.2s var(--ease), color 0.2s var(--ease);
}
.link-row:last-child { border-bottom: 1px solid var(--line); }
.link-row:hover { color: var(--red); padding-inline: 0.75rem; }
.link-row__n { color: var(--grey); font-family: var(--font-mono); font-size: 0.625rem; font-weight: 500; letter-spacing: 0.14em; }
.link-row__main { min-width: 0; }
.link-row__title { font-family: var(--font-statement); font-size: 1.0625rem; letter-spacing: -0.01em; margin-inline-end: 0.75rem; text-transform: uppercase; }
.link-row__sub { color: var(--grey); font-size: 0.875rem; overflow-wrap: anywhere; }
.link-row:hover .link-row__sub { color: inherit; }
.link-row__arr { font-family: var(--font-mono); font-size: 1rem; }
@media (max-width: 560px) {
  .link-row { grid-template-columns: minmax(0, 1fr) auto; }
  .link-row__n { display: none; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: #000; color: #fff; padding-block: clamp(2.5rem, 6vw, 4rem); }
.site-footer a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.site-footer a:hover { color: var(--red); }
.footer__top {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr));
  padding-bottom: 2.5rem;
}
@media (max-width: 760px) { .footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer__top { grid-template-columns: 1fr; } }
.footer__col { display: flex; flex-direction: column; gap: 0.625rem; }
.footer__col h4 {
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  margin-bottom: 0.375rem;
  text-transform: uppercase;
}
.footer__col a, .footer__col p { font-size: 0.9375rem; margin: 0; }
.footer__bottom {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  letter-spacing: 0.1em;
  padding-top: 1.5rem;
  text-transform: uppercase;
}
.footer__tagline { color: var(--red); }

/* Logo lockup image */
.lockup { display: block; max-width: 340px; width: 100%; }
