/* Shared layout and components for the homepage and project hubs. Tokens live in tokens.css. */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  letter-spacing: -.01em;
}

a { color: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
:root { --anchor-offset: 6rem; }
#main, #project-content, #work, #platform, #about, #contact,
#project-phasesync, #project-dimmerly, #project-stormtunnel { scroll-margin-top: var(--anchor-offset); }

.site-header {
  position: sticky;
  top: .75rem;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  width: min(calc(100% - 3rem), var(--measure));
  margin: .75rem auto 0;
  padding: .7rem .85rem .7rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: .15rem;
  /*
    Opaque on purpose. A translucent surface let display type ghost through and
    dropped nav contrast to 4.43:1 in light theme; it also composited to within
    2/255 of --surface-panel over the page, so it bought nothing. Elevation comes
    from the panel surface plus the border, which both themes can express — a
    black shadow tops out at 1.12:1 on the dark page and cannot.
  */
  background: var(--surface-panel);
  transition: transform 220ms var(--ease);
  will-change: transform;
}

.site-header.is-hidden { transform: translateY(calc(-100% - 1rem)); }

.wordmark, nav a, .theme-button, .site-footer, dt {
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.wordmark, nav a, .theme-button { font-size: var(--type-chrome); }

.wordmark { display: inline-flex; align-items: center; min-height: 44px; margin: -.35rem 0; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .04em; }
nav { display: flex; gap: 1.25rem; }
nav a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--text-muted); text-decoration: none; transition: color 180ms var(--ease); }
nav a:hover, nav a:focus-visible, nav a[aria-current="location"] { color: var(--blue); }

.theme-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  /* Fits the widest label ("auto · light") so cycling the theme cannot shift the header. */
  min-width: 10.5rem;
  white-space: nowrap;
  justify-self: end;
  padding: .45rem .65rem;
  border: 1px solid transparent;
  border-radius: .2rem;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 180ms var(--ease), color 180ms var(--ease), background 180ms var(--ease);
}

/* The button is inline-flex, which would drop the space after "Theme:". */
.theme-button__prefix { white-space: pre; }

/* Without JS the control can't do anything, so it stays hidden until the script reveals it. */
.theme-button[hidden] { display: none; }
.theme-button:hover, .theme-button:focus-visible { border-color: var(--blue); color: var(--blue); background: var(--blue-wash); }

.skip-link { position: absolute; top: .75rem; left: 1rem; z-index: 20; display: inline-flex; align-items: center; min-height: 44px; padding: .65rem .8rem; border: 1px solid var(--focus-ring); background: var(--surface-panel); color: var(--text); font-family: var(--mono); font-size: var(--type-label); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; transform: translateY(-200%); }
.skip-link:focus-visible { transform: translateY(0); }

/* Text for assistive technology only, e.g. to name which project a repeated link opens. */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

main { width: min(calc(100% - 3rem), var(--measure)); margin: 0 auto; }

.hero {
  position: relative;
  display: grid;
  align-content: center;
  padding: 3rem 0 1.5rem;
  isolation: isolate;
}

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; line-height: 1.02; letter-spacing: -.035em; text-wrap: balance; }
p, dd { text-wrap: pretty; }
/* One step down at each level: the thesis is the largest line on the page, section names sit under it. */
/* Capped so the thesis leaves the first screen to the two paths and their evidence. */
h1 { max-width: 20ch; font-size: clamp(2.4rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(2rem, 3.4vw, 3.1rem); letter-spacing: -.03em; }
h3 { font-size: clamp(1.7rem, 2.6vw, 2.4rem); }
/* The thesis and who says it, side by side; the two paths take the full measure underneath. */
.hero-head { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); align-items: end; }
.hero-copy { max-width: 26rem; margin: 0; font-size: var(--type-lead); color: var(--text); }

/*
  The two ways in carry equal weight on purpose: product collaborators and platform
  clients are both primary audiences, and each path holds the evidence for itself.

  They are drawn the way Phase Sync works: two paths on one line, each with its own
  marker, joined by a tether. Pink and blue are the game's two characters. Hovering
  either path moves both markers together: one move, two paths.
*/
.hero-paths { --path-gap: clamp(1.5rem, 3vw, 2.75rem); --node-shift: 0; position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--path-gap); margin-top: 2.5rem; border-top: 1px solid var(--line-strong); }
.hero-paths:has(.entry:hover, .entry:focus-visible) { --node-shift: .5rem; }
.entry { --path-accent: var(--blue); position: relative; display: flex; flex-direction: column; gap: .7rem; padding: 1.6rem 0 .25rem; color: var(--text); text-decoration: none; }
.entry--product { --path-accent: var(--pink); }
.entry::before { content: ""; position: absolute; z-index: 1; top: -5px; left: 0; width: 9px; height: 9px; background: var(--path-accent); transform: translateX(var(--node-shift)); transition: transform 320ms var(--ease); }
/* The tether: from the first marker to the second, coloured from one character to the other. */
.entry--product::after { content: ""; position: absolute; top: -1px; left: 0; width: calc(100% + var(--path-gap)); height: 2px; background: linear-gradient(90deg, var(--pink), var(--blue)); transform-origin: left center; transform: translateX(var(--node-shift)); transition: transform 320ms var(--ease); animation: tether-draw 900ms cubic-bezier(.16, 1, .3, 1) 160ms backwards; }
@keyframes tether-draw { from { transform: scaleX(0); } }
.entry__title { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; overflow-wrap: anywhere; hyphens: auto; font-family: var(--display); font-size: clamp(1.55rem, 2.2vw, 2rem); line-height: 1.15; letter-spacing: -.02em; transition: color 180ms var(--ease); }
/* → for links that stay on the site, ↗ only for links that leave it. */
.entry__title::after { flex-shrink: 0; content: "→"; color: var(--path-accent); font-family: var(--sans); font-size: 1.1rem; transition: transform 180ms var(--ease); }
.entry__body { color: var(--text-muted); font-size: 1rem; line-height: 1.55; }
.entry__shots { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .2rem 0; }
.entry__shot { display: grid; gap: .4rem; min-width: 0; }
.entry__shots img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--image-edge); background: var(--surface-inset); }
.entry__shot-label { color: var(--text-muted); font-family: var(--mono); font-size: var(--type-label); letter-spacing: .08em; text-transform: uppercase; }
.entry__record { display: grid; gap: .7rem; margin: .35rem 0 .2rem; padding: 0; list-style: none; }
.entry__record li { display: grid; grid-template-columns: 6.5rem 1fr; gap: .75rem; align-items: baseline; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.entry__record li:last-child { padding-bottom: 0; border-bottom: 0; }
.entry__record b { color: var(--text-muted); font-family: var(--mono); font-size: var(--type-label); font-weight: 400; letter-spacing: .08em; text-transform: uppercase; }
.entry:hover .entry__title, .entry:focus-visible .entry__title { color: var(--path-accent); }
.entry:hover .entry__title::after, .entry:focus-visible .entry__title::after { transform: translateX(.25rem); }


.work-section, .platform-section, .about-section { padding: 6rem 0; border-top: 1px solid var(--line-strong); }
/* Close under the hero, so the first project card starts as near the fold as the hero allows. */
.work-section { padding-top: 3rem; }
.work-section .section-intro { margin-bottom: 1.5rem; }
.work-section .section-intro h2 { margin-bottom: 0; }
.platform-section { --accent: var(--blue); }
.section-intro { margin-bottom: 3rem; }
.work-section h2, .platform-section h2, .about-section h2 { margin-bottom: 1.25rem; }

.project-list { display: grid; gap: 2rem; }
.project-card { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(18rem, .9fr); gap: clamp(2rem, 6vw, 7rem); padding: clamp(1.2rem, 3vw, 3rem); border: 1px solid var(--line); border-radius: .15rem; background: var(--surface-panel); overflow: hidden; }
.project-card:nth-child(even):not(.project-card--phasesync) { grid-template-columns: minmax(18rem, .9fr) minmax(0, 1.1fr); }
.project-card:nth-child(even) .project-card__content { order: 2; }
.project-card:nth-child(even) .project-card__media { order: 1; }
.project-card--dimmerly, .project-card--stormtunnel { --accent: var(--blue); }
/* The game keeps its own colour, so it doesn't read as another utility. Its art gets the bigger column. */
.project-card--phasesync { --accent: var(--pink); }
.project-card.project-card--phasesync { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.project-card--phasesync .project-card__media { align-self: start; }
.project-card h3 { margin-bottom: .6rem; color: var(--accent); }
.project-card__tagline { max-width: 24ch; margin: 0 0 1.5rem; font-family: var(--display); font-size: clamp(1.35rem, 1.9vw, 1.7rem); line-height: 1.2; letter-spacing: -.02em; color: var(--text); text-wrap: balance; }
.project-card__content > p:not(.project-card__tagline) { max-width: 34rem; color: var(--text-muted); }
.project-facts { display: grid; gap: .7rem; margin: 2rem 0; padding-top: 1rem; border-top: 1px solid var(--line); }
.project-facts div { display: grid; grid-template-columns: 6rem 1fr; align-items: baseline; gap: 1rem; }
/*
  Claim, then invitation, then record. The ask comes before the history in source
  order, so phones and keyboards reach it first. On wide screens the note and the
  invitation share the left column and the invitation sticks beside the record.
*/
.platform-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); grid-template-rows: auto 1fr; column-gap: clamp(2.5rem, 6vw, 6rem); row-gap: 1.5rem; margin-top: 3rem; align-items: start; }
.platform-note { grid-column: 1; grid-row: 1; }
.platform-record { grid-column: 2; grid-row: 1 / span 2; }
.platform-cta { grid-column: 1; grid-row: 2; position: sticky; top: 7rem; }
.platform-summary { max-width: 44ch; margin: 0; font-family: var(--display); font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.3; letter-spacing: -.02em; text-wrap: balance; }
.platform-note { max-width: 30rem; margin: 0; color: var(--text-muted); }
.platform-cta { display: grid; justify-items: start; gap: 1rem; margin-top: .5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.platform-cta p { max-width: 26rem; margin: 0; color: var(--text); font-size: var(--type-lead); }

.history { display: grid; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.history__entry { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); column-gap: 1.5rem; padding: 1.5rem 0 1.6rem; border-bottom: 1px solid var(--line); }
.history__entry > * { grid-column: 2; }
.history__when { grid-column: 1; grid-row: 1 / span 2; margin: .35rem 0 0; color: var(--text-muted); font-family: var(--mono); font-size: var(--type-label); letter-spacing: .08em; text-transform: uppercase; }
.history__role { font-size: clamp(1.3rem, 1.8vw, 1.6rem); line-height: 1.2; letter-spacing: -.02em; }
.history__entry p:not(.history__when) { max-width: 34rem; margin: .5rem 0 0; color: var(--text-muted); }
.history-note { max-width: 34rem; margin: 1.5rem 0 0; color: var(--text-muted); }
.history-source { margin-top: .25rem; }
.nowrap { white-space: nowrap; }
dt { color: var(--text-muted); }
dd { margin: 0; color: var(--text); font-size: var(--type-fact); line-height: 1.45; }
/* The primary action gets its own line; the secondary links sit together under it, so nothing wraps alone. */
.project-actions { display: grid; justify-items: start; gap: .5rem; margin-top: 2rem; }
.project-links { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.project-action { display: inline-flex; align-items: center; gap: 1rem; min-height: 44px; padding: .75rem 1rem; border: 1px solid var(--accent); background: var(--accent); color: var(--text-on-accent); font-family: var(--sans); font-size: var(--type-action); font-weight: 600; letter-spacing: 0; text-decoration: none; transition: background 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease); }
.project-action::after { content: "→"; color: var(--text-on-accent); }
.project-link::after { content: "→"; color: var(--accent); }
.project-action[target="_blank"]::after, .project-link[target="_blank"]::after { content: "↗"; }
.project-action:hover, .project-action:focus-visible, .contact-action:not(.contact-action--secondary):hover, .contact-action:not(.contact-action--secondary):focus-visible { transform: translateY(-2px); filter: brightness(1.08); }
.project-link { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; color: var(--text); font-size: var(--type-fact); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: .3em; transition: color 180ms var(--ease), text-decoration-color 180ms var(--ease); }
.project-link:hover, .project-link:focus-visible { color: var(--blue); text-decoration-color: currentColor; }

/* The card is the frame; the image edge is enough inside it. */
.project-card__media { align-self: center; margin: 0; }
.project-card__media img { display: block; width: 100%; height: auto; border: 1px solid var(--image-edge); }
figcaption { margin: .75rem .1rem 0; color: var(--text-muted); font-size: .9rem; line-height: 1.45; text-wrap: pretty; }


/* Three working rules side by side, each a claim with its proof in the sentence under it. */
.about-copy { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem); margin: 3rem 0 0; padding: 0; list-style: none; color: var(--text-muted); }
.about-copy li { padding-top: 1.25rem; border-top: 1px solid var(--line-strong); }
.about-copy b { display: block; margin-bottom: .5rem; color: var(--text); font-family: var(--display); font-size: clamp(1.2rem, 1.6vw, 1.4rem); font-weight: 400; line-height: 1.25; letter-spacing: -.015em; }
.about-copy p { margin: 0; }
/* Inline padding widens the hit area without moving the line. */
.about-copy a { padding-block: .72em; color: var(--text); text-decoration-color: var(--line-strong); text-underline-offset: .3em; }
.about-copy a:hover, .about-copy a:focus-visible { color: var(--blue); text-decoration-color: currentColor; }

.contact-section { position: relative; margin: 2rem 0 7rem; padding: clamp(2rem, 6vw, 5rem); border: 1px solid var(--line-strong); border-radius: .15rem; background: var(--surface-inset); overflow: hidden; }
.contact-section h2 { max-width: 17ch; margin-bottom: 1.5rem; }
.contact-section > p { max-width: 34rem; color: var(--text-muted); font-size: var(--type-lead); }
.contact-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
@media (min-width: 64.01rem) {
  /* Question on the left, answer and actions on the right, so the panel is used edge to edge. */
  .contact-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(2rem, 5vw, 5rem); align-items: start; }
  .contact-section h2 { grid-row: 1; margin-bottom: 0; }
  .contact-section > p { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  /* Under the question, so neither column is left empty; stacked as a pair at one shared width. */
  .contact-actions { grid-column: 1; grid-row: 2; display: inline-grid; justify-self: start; margin-top: 2.5rem; }
}
.contact-action { display: inline-flex; align-items: center; min-height: 44px; padding: .75rem 1rem; border: 1px solid var(--blue); background: var(--blue); color: var(--text-on-accent); font-family: var(--sans); font-size: var(--type-action); font-weight: 600; letter-spacing: 0; text-decoration: none; transition: background 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease); }
.contact-action::after { content: "↗"; margin-left: 1rem; color: var(--text-on-accent); }
/* The product-side invitation takes the product path's colour. */
.contact-action--product { border-color: var(--pink); background: var(--pink); }
.contact-action--secondary { border-color: var(--line-strong); background: transparent; color: var(--text); }
.contact-action--secondary::after { color: var(--blue); }
.contact-action--secondary:hover, .contact-action--secondary:focus-visible { border-color: var(--blue); background: var(--blue-wash); transform: translateY(-2px); }

/* Under each audience button: where it goes, and what to do there. */
.cta-action { display: grid; justify-items: start; gap: .5rem; }
.work-cta .cta-hint, .platform-cta .cta-hint { max-width: none; margin: 0; color: var(--text-muted); font-size: .9rem; line-height: 1.45; }

/* The product-side invitation, matching the one that closes the Platform section. */
.work-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.work-cta p { max-width: 34rem; margin: 0; color: var(--text); font-size: var(--type-lead); }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem 2rem; width: min(calc(100% - 3rem), var(--measure)); margin: 0 auto; padding: 1rem 0 2rem; color: var(--text-muted); }
.site-footer p { margin: 0; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin: 0; padding: 0; list-style: none; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; margin: -.5rem 0; color: var(--text); text-underline-offset: .3em; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--blue); }

.reveal { animation: rise-in 260ms var(--ease) both; }
@keyframes rise-in { from { opacity: 0; transform: translateY(.75rem); } to { opacity: 1; transform: translateY(0); } }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 4px; }
::selection { background: var(--blue); color: var(--text-on-accent); }

@media (max-width: 44rem) {
  html, body { overflow-x: clip; }
  .site-header { position: sticky; top: .5rem; display: grid; grid-template-columns: minmax(0, 1fr); width: min(calc(100% - 2rem), var(--measure)); max-width: calc(100% - 2rem); min-width: 0; gap: 0; padding: .3rem .75rem .35rem; overflow: hidden; }
  .wordmark, nav, .theme-button { max-width: 100%; min-width: 0; }
  nav { grid-column: auto; width: 100%; justify-content: flex-start; gap: .65rem; flex-wrap: wrap; }
  /* The button sits on the wordmark row only, so that row alone gives up the space; the nav keeps the full width. */
  .wordmark { margin: 0 10rem 0 0; }
  .theme-button { position: absolute; top: .45rem; right: .45rem; min-height: 44px; min-width: 9.6rem; padding-inline: .45rem; font-size: var(--type-label); letter-spacing: .04em; }
  main, .site-footer { width: min(calc(100% - 2rem), var(--measure)); max-width: calc(100% - 2rem); min-width: 0; }
  .hero, .hero-copy, h1, h2, h3 { max-width: 100%; min-width: 0; }
  :root { --anchor-offset: 7rem; }
  h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }
  /* A step smaller than the wide thesis so the product path's screenshots and the platform path both clear a 390×844 fold. */
  h1 { width: 100%; max-width: 100%; min-width: 0; font-size: clamp(2rem, 8.4vw, 3.2rem); hyphens: manual; }
  /* The paths stack, so the line and the tether turn vertical. The platform path keeps two of its records. */
  .hero-paths { grid-template-columns: minmax(0, 1fr); --path-gap: 1.75rem; margin-left: .25rem; padding-left: 1.4rem; border-top: 0; border-left: 1px solid var(--line-strong); }
  .entry { gap: .45rem; padding: 0; }
  .entry::before { top: .55rem; left: calc(-1.4rem - 5px); transform: none; }
  .entry--product::after { top: .55rem; left: calc(-1.4rem - 1px); width: 2px; height: calc(100% + var(--path-gap)); background: linear-gradient(180deg, var(--pink), var(--blue)); transform: none; transform-origin: center top; animation-name: tether-draw-down; }
  @keyframes tether-draw-down { from { transform: scaleY(0); } }
  .entry__record li:nth-child(n+3) { display: none; }
  .entry__record { gap: .35rem; margin: 0; }
  .entry__record li { grid-template-columns: 3.5rem 1fr; padding-bottom: 0; border-bottom: 0; }
  .entry__title { font-size: 1.35rem; }
  /* A short strip, so the work shows on the first screen and the platform path still clears the fold. */
  .entry__shots { gap: .5rem; margin: 0; }
  .entry__shots img { aspect-ratio: 2 / 1; }
  .entry__shot { gap: .3rem; }
  .entry__body { font-size: .95rem; }
  .about-copy { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; margin-top: 2rem; }
  .hero { padding: 1.5rem 0 3rem; }
  .hero-head { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .hero-paths { margin-top: 1.75rem; }
  .hero-copy { width: 100%; max-width: 30rem; min-width: 0; }
  .hero h1, .hero-copy, .section-intro h2 { width: 100%; max-width: 100%; }
  .project-card, .project-card:nth-child(even) { grid-template-columns: minmax(0, 1fr); gap: 2rem; min-width: 0; }
  .project-card__content, .project-card__media { max-width: 100%; min-width: 0; }
  .project-card__content, .project-card:nth-child(even) .project-card__content { order: 2; }
  .project-card__media, .project-card:nth-child(even) .project-card__media { order: 1; }
  .project-card__media img { max-width: 100%; min-width: 0; }
  .project-card--phasesync .project-card__media { position: static; }
  /* Label above value, so a long value never runs past the card edge. */
  .project-facts div { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
  nav { gap: 0 .4rem; margin-left: -.35rem; }
  nav a { padding-inline: .35rem; }
  .hero-copy { font-size: 1rem; }
  .history__entry { grid-template-columns: minmax(0, 1fr); }
  .history__entry > *, .history__when { grid-column: 1; grid-row: auto; }
  .history__when { margin: 0 0 .4rem; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

@media (max-width: 64rem) {
  /* Stacked in source order, so reading order and keyboard order stay the same. */
  .platform-layout { grid-template-columns: minmax(0, 1fr); row-gap: 3rem; }
  .platform-note, .platform-record, .platform-cta { grid-column: 1; grid-row: auto; }
  .platform-cta { position: static; }
  .platform-note { max-width: 38rem; }
}

@media (min-width: 44.01rem) and (max-width: 64rem) {
  .hero-head { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .hero-copy { max-width: 34rem; }
}

/* The narrowest phones: the wordmark and the four section links each keep one row. */
@media (max-width: 23rem) {
  /* Too narrow for the strip: here it would push the platform path below the fold. */
  .entry__shots { display: none; }
  .theme-button__prefix { display: none; }
  .theme-button { min-width: 6.6rem; }
  .wordmark { margin-right: 7.2rem; }
  /* Down to 290px usable width (320 with a classic scrollbar) the four links keep one row; "Work" keeps a 44px target. */
  nav { gap: 0; margin-inline: -4px; }
  nav a { min-width: 44px; justify-content: center; padding-inline: 4px; }
  nav a { font-size: var(--type-label); letter-spacing: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/*
  The design leans on background fills for structure (grid dividers are a parent
  background showing through 1px gaps), and those are all flattened here — so
  restate the structure as borders in the system palette.
*/
@media (forced-colors: active) {
  .site-header, .theme-button, .project-action, .contact-action,
  .project-card, .contact-section, .project-card__media { border: 1px solid CanvasText; }
  .project-action, .contact-action { background: ButtonFace; color: ButtonText; }
  .entry::before, .entry--product::after { background: CanvasText; }
  ::selection { background: Highlight; color: HighlightText; }
  :focus-visible { outline-color: Highlight; }
}
