/* ============================================================
   HURGE® — styles.css
   Minimalist gallery system: bright white matte, sharp type,
   one fluorescent accent (#DDFF00) reserved for interaction.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg:        #ffffff;
  --bg-soft:   #f2f2ee;
  --ink:       #0d0d0c;
  --ink-soft:  #65655f;
  --line:      #e4e4de;
  --accent:    #ddff00;   /* fluorescent yellow — interaction only */

  --font: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;

  --ease:   cubic-bezier(.22, 1, .36, 1);   /* snappy out */
  --fast:   .22s;
  --move:   .55s;

  --rail: 216px;    /* left HUD rail on desktop */
  --matte: 48px;    /* gallery matte / window frame */

  --spring: var(--ease);
}

/* physical, gently overshooting curve where the browser supports it */
@supports (animation-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, .25 5%, .55 11%, .83 18%, 1.02 26%, 1.06 32%, 1.03 41%, .995 52%, 1.002 66%, 1);
  }
}

/* ---------- reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }

::selection { background: var(--accent); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

/* ============================================================
   PAGE TRANSITION WIPE
   Covers the page in accent yellow between navigations.
   Only active when JS runs (html.js).
   ============================================================ */
.wipe {
  position: fixed; inset: 0;
  background: var(--accent);
  z-index: 200;
  pointer-events: none;
  transform: scaleY(0);
  transform-origin: top;
}
html.js .wipe { transform: scaleY(1); }
html.js body.ready .wipe {
  transform: scaleY(0);
  transition: transform .48s var(--ease);
}
html.js body.leaving .wipe {
  transform-origin: bottom;
  transform: scaleY(1);
  transition: transform .26s var(--ease);
}

/* content enters as the wipe recedes */
html.js .stage, html.js .page { opacity: 0; transform: translateY(14px); }
html.js body.ready .stage, html.js body.ready .page {
  opacity: 1; transform: none;
  transition: opacity .55s .12s, transform .55s .12s var(--ease);
}

/* FAILSAFE — both the wipe and the hidden content are released by JS adding
   body.ready. If js/main.js ever fails to load (bad upload, network error),
   that never happens and the site would sit behind a blank yellow overlay
   forever. These reveal it anyway after 4s. Scoped to :not(.ready) so a
   healthy page never reaches them. Reduced motion is already safe: it hides
   the wipe and unhides content outright. */
@keyframes failsafe-wipe   { to { transform: scaleY(0); } }
@keyframes failsafe-reveal { to { opacity: 1; transform: none; } }

html.js body:not(.ready) .wipe { animation: failsafe-wipe 0s linear 4s forwards; }
html.js body:not(.ready) .stage,
html.js body:not(.ready) .page { animation: failsafe-reveal 0s linear 4s forwards; }

/* ============================================================
   HUD — fixed navigation, top left
   ============================================================ */
.hud {
  position: fixed;
  top: 44px; left: 44px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: calc(var(--rail) - 76px);
  transition: opacity .3s var(--ease);
}

/* project detail is immersive: chrome steps aside */
body.detail-open .hud,
body.detail-open .hud-corner {
  opacity: 0;
  pointer-events: none;
}

.hud-logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .05em;
}
.hud-logo sup { font-size: .5em; font-weight: 500; }
.hud-logo:hover { color: var(--ink); }

.hud-nav { display: flex; flex-direction: column; gap: 7px; }
.hud-nav a {
  width: max-content;
  font-size: .76rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--ink-soft);
  padding-bottom: 1px;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 0% 46%;
  background-position: 0 88%;
  transition: background-size var(--fast) var(--ease), color var(--fast);
}
.hud-nav a:hover, .hud-nav a:focus-visible { color: var(--ink); background-size: 100% 46%; }
.hud-nav a[aria-current="page"] { color: var(--ink); }
.hud-nav a[aria-current="page"]::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 9px;
  background: var(--accent);
  box-shadow: inset 0 0 0 1px var(--ink);
  vertical-align: 6%;
}

.hud-lang {
  display: flex; align-items: center; gap: 6px;
  font-size: .72rem;
  letter-spacing: .12em;
  color: var(--ink-soft);
}
.hud-lang button {
  padding: 2px 5px;
  color: var(--ink-soft);
  transition: background var(--fast), color var(--fast);
}
.hud-lang button:hover { color: var(--ink); }
.hud-lang button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
}

.hud-corner {
  position: fixed;
  bottom: 44px;
  z-index: 100;
  transition: opacity .3s var(--ease);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--ink-soft);
}
.hud-corner sup { font-size: .6em; }
.hud-corner--bl { left: 44px; max-width: 140px; line-height: 1.7; }
.hud-corner--br { right: var(--matte); }

/* ============================================================
   HOME — accordion stage
   Tall narrow cards in a white matte: the film-reel wall.
   ============================================================ */
.stage {
  height: 100svh;
  min-height: 540px;
  padding: var(--matte) var(--matte) 84px var(--rail);
  display: flex;
  align-items: center;   /* pieces hang at eye level, not floor-to-ceiling */
}

/* the reel scrolls; card sizes never depend on how many projects exist */
.strip {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 30px;                   /* wall between the frames */
  height: min(70vh, 600px);
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--ink) transparent;
}
.strip::-webkit-scrollbar { height: 6px; }
.strip::-webkit-scrollbar-track { background: transparent; }
.strip::-webkit-scrollbar-thumb { background: var(--ink); }

.card {
  position: relative;
  flex: 0 0 auto;
  width: clamp(150px, 12.5vw, 205px);
  min-width: 0;
  overflow: hidden;
  scroll-margin: 32px;
  border: 1px solid var(--ink);
  background: var(--bg-soft);
  cursor: pointer;
  transition: width var(--move) var(--spring), transform .18s var(--ease);
}
.card:hover, .card:focus-visible, .card.is-hot { width: clamp(340px, 30vw, 460px); }
.card:active {
  transform: scale(.99);
  transition-duration: var(--move), .06s; /* press-in is instant; release keeps the slow curve */
}

.card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--accent);
}

.card-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(.92) contrast(1.02);
  transform: scale(1.001);
  transition: filter .5s var(--ease), transform .9s var(--ease);
}
.card:hover .card-img, .card:focus-visible .card-img, .card.is-hot .card-img {
  filter: none;
  transform: scale(1.04);
}

/* frame number chip — top left of each frame */
.card-num {
  position: absolute; top: 10px; left: 10px;
  z-index: 2;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .14em;
  background: var(--bg);
  color: var(--ink);
  padding: 4px 7px;
  border: 1px solid var(--ink);
}

/* collapsed state: vertical title, like a film-canister label */
.card-vlabel {
  position: absolute; bottom: 12px; left: 10px;
  z-index: 2;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: .78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .2em;
  background: var(--bg);
  color: var(--ink);
  padding: 8px 4px;
  border: 1px solid var(--ink);
  white-space: nowrap;
  opacity: 1;
  transition: opacity .25s var(--ease);
}
.card:hover .card-vlabel, .card:focus-visible .card-vlabel, .card.is-hot .card-vlabel { opacity: 0; }

/* expanded state: accent info bar slides up from the bottom */
.card-info {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 3;
  background: var(--accent);
  color: var(--ink);
  border-top: 1px solid var(--ink);
  padding: 16px 18px 18px;
  transform: translateY(101%);
  transition: transform .38s var(--ease);
}
.card:hover .card-info, .card:focus-visible .card-info, .card.is-hot .card-info {
  transform: translateY(0);
}
.card-info h2 {
  font-size: clamp(1.05rem, 1.7vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-info p {
  margin-top: 5px;
  font-size: .7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .18em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- CTA card (always first / left) ---------- */
.card--cta {
  position: sticky;   /* pinned: the reel scrolls past behind it */
  left: 0;
  z-index: 4;
  box-shadow: 30px 0 0 var(--bg); /* keeps the matte gutter where cards emerge — matches .strip gap */
  border: 1px dashed var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  transition: width var(--move) var(--spring), height var(--move) var(--spring), background var(--fast) var(--ease), transform .18s var(--ease);
}
.card--cta:hover, .card--cta:focus-visible, .card--cta.is-hot {
  background: var(--accent);
  border-style: solid;
}
/* .card:focus-visible would otherwise replace the CTA's gutter mask with the
   focus ring, letting passing cards touch it during keyboard navigation */
.card--cta:focus-visible { box-shadow: 30px 0 0 var(--bg), 0 0 0 6px var(--accent); }

.cta-plus {
  font-size: 3.4rem;
  font-weight: 400;
  line-height: 1;
  transition: transform .45s var(--spring);
  animation: cta-pulse 3.6s ease-in-out infinite;
}
.card--cta:hover .cta-plus, .card--cta:focus-visible .cta-plus {
  transform: rotate(90deg);
  animation: none;
}
@keyframes cta-pulse {
  0%, 100% { transform: scale(1); opacity: .85; }
  50%      { transform: scale(1.16); opacity: 1; }
}

.cta-text {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .22em;
  line-height: 2;
  padding: 0 8px;
}
.cta-sub {
  display: block;
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: .16em;
}
.card--cta:hover .cta-sub, .card--cta:focus-visible .cta-sub { color: var(--ink); }

/* ============================================================
   ZOOMER — the clicked card flying open (FLIP)
   ============================================================ */
.zoomer {
  position: fixed;
  z-index: 60;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--ink);
  will-change: top, left, width, height;
  transition:
    top .52s var(--ease), left .52s var(--ease),
    width .52s var(--ease), height .52s var(--ease),
    border-color .52s var(--ease);
}
.zoomer.is-full { border-color: transparent; }
.zoomer img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ============================================================
   PROJECT DETAIL — the card become a page
   ============================================================ */
.detail {
  position: fixed; inset: 0;
  z-index: 70;
  background: var(--bg);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.detail.is-open { opacity: 1; }

.detail-inner {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 56px;
  padding: 44px var(--matte) 96px 44px;
  max-width: 1600px;
}

.detail-side {
  position: sticky;
  top: 44px;
  align-self: start;
}

.detail-close {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .18em;
  padding: 10px 14px;
  border: 1px solid var(--ink);
  background: var(--bg);
  transition: background var(--fast), transform var(--fast) var(--ease);
}
.detail-close:hover { background: var(--accent); transform: translateX(-3px); }

.detail-index {
  margin-top: 44px;
  font-size: clamp(4rem, 7vw, 6.5rem);
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--ink); /* no unprefixed equivalent ships in any browser */
}

.detail-title {
  margin-top: 18px;
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.02;
}

.detail-meta { margin-top: 36px; display: grid; gap: 18px; }
.detail-meta dt {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--ink-soft);
  margin-bottom: 3px;
}
.detail-meta dd { font-size: 1rem; font-weight: 500; }

.detail-main {
  min-width: 0;
  padding-top: 2px;
  transition: opacity .22s var(--ease);
}
.detail-main.is-swapping { opacity: 0; }

.detail-hero {
  border: 1px solid var(--ink);
  overflow: hidden;
  height: min(74vh, 760px);
}
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }

.detail-lede {
  margin-top: 52px;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -.01em;
  max-width: 30ch;
}

.detail-body { margin-top: 32px; }
.detail-body p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #3a3a37;
  max-width: 60ch;
}
.detail-body p + p { margin-top: 1.2em; }

.detail-next {
  margin-top: 72px;
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 18px;
  text-align: left;
  border-top: 1px solid var(--ink);
  padding: 26px 12px;
  transition: background var(--fast), padding-left var(--fast) var(--ease);
}
.detail-next:hover { background: var(--accent); padding-left: 24px; }
.detail-next > span:first-child {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--ink-soft);
}
.detail-next:hover > span:first-child { color: var(--ink); }
.detail-next strong { font-size: clamp(1.3rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: -.01em; }
.detail-next-arrow {
  margin-left: auto;
  font-size: 1.5rem;
  transition: transform .35s var(--spring);
}
.detail-next:hover .detail-next-arrow { transform: translateX(8px); }

body.detail-open { overflow: hidden; }

/* ============================================================
   CURSOR PILL — "VIEW →" follower on project cards
   ============================================================ */
.pill {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  background: var(--ink);
  color: var(--bg);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .18em;
  padding: 9px 14px;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -140%) scale(.6);
  transition: opacity .16s var(--ease), transform .16s var(--ease);
}
.pill.on { opacity: 1; transform: translate(-50%, -140%) scale(1); }
.pill--accent { background: var(--accent); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

/* ============================================================
   INNER PAGES — about / ideas / contact
   ============================================================ */
.page {
  min-height: 100svh;
  padding: 150px var(--matte) 140px var(--rail);
  max-width: 1500px;
}

.page-kicker {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .24em;
  color: var(--ink-soft);
}
.page-kicker::before {
  content: '';
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--accent);
  box-shadow: inset 0 0 0 1px var(--ink);
  margin-right: 12px;
  vertical-align: -1%;
}

.page-title {
  margin-top: 26px;
  font-size: clamp(2.4rem, 5.4vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.0;
  max-width: 17ch;
  text-wrap: balance;
}

.mark {
  background: var(--accent);
  box-shadow: inset 0 0 0 1px var(--ink);
  padding: .04em .18em;
}

/* ---------- about ---------- */
.about-statement {
  margin-top: 26px;
  font-size: clamp(2rem, 4.4vw, 4rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.06;
  max-width: 24ch;
  text-wrap: balance;
}

.about-grid {
  margin-top: 84px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 72px;
  align-items: start;
}

.about-portrait {
  border: 1px solid var(--ink);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}
.about-portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter .5s var(--ease);
}
.about-portrait:hover img { filter: none; }

.about-copy { max-width: 640px; }
.about-body p {
  font-size: 1.12rem;
  line-height: 1.75;
  color: #3a3a37;
  max-width: 56ch;
}
.about-body p + p { margin-top: 1.2em; }

.about-services-title {
  margin-top: 60px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .24em;
  color: var(--ink-soft);
}
.about-services {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.about-services li {
  border: 1px solid var(--ink);
  padding: 9px 16px;
  font-size: .82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  transition: background var(--fast), transform .3s var(--spring);
  cursor: default;
}
.about-services li:hover { background: var(--accent); transform: translateY(-2px); }

.about-copy .btn { margin-top: 56px; }

/* ---------- ideas ---------- */
.ideas-list { margin-top: 72px; border-top: 1px solid var(--ink); }
.idea { border-bottom: 1px solid var(--ink); }

.idea-row {
  width: 100%;
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: baseline;
  gap: 24px;
  text-align: left;
  padding: 28px 8px;
  transition: background var(--fast);
}
.idea-row:hover { background: var(--bg-soft); }

.idea-date {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--ink-soft);
}
.idea-title {
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  font-weight: 500;
  letter-spacing: -.01em;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 0% 40%;
  background-position: 0 84%;
  transition: background-size var(--fast) var(--ease);
}
.idea-row:hover .idea-title { background-size: 100% 40%; }

.idea-toggle {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  font-size: 1.1rem;
  line-height: 1;
  transition: background var(--fast), transform .45s var(--spring);
}
.idea.is-open .idea-toggle { background: var(--accent); transform: rotate(45deg); }

.idea-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease);
}
.idea.is-open .idea-panel { grid-template-rows: 1fr; }
.idea-panel-inner { overflow: hidden; }
.idea-panel-inner p {
  font-size: 1.02rem;
  line-height: 1.75;
  color: #3a3a37;
  max-width: 58ch;
  margin: 0 8px 1.2em 120px;
}
.idea-panel-inner p:first-child { margin-top: 4px; }
.idea-panel-inner p:last-child { margin-bottom: 32px; }

/* ---------- contact ---------- */
.contact-lede {
  margin-top: 30px;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 44ch;
}

.form {
  margin-top: 72px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 56px;
  max-width: 880px;
}
.field { display: flex; flex-direction: column; }
.field--wide { grid-column: 1 / -1; }

.field label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.field input,
.field textarea {
  font: inherit;
  font-size: 1.25rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 8px 2px 12px;
  transition: box-shadow var(--fast);
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }

.field input:focus,
.field textarea:focus {
  outline: none;
  box-shadow: 0 3px 0 0 var(--accent);
}

.form-error {
  grid-column: 1 / -1;
  font-size: .95rem;
  font-weight: 500;
  color: #b3261e;
  border-left: 3px solid #ff5148;
  padding-left: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  padding: 17px 30px;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .18em;
  cursor: pointer;
  transition: background var(--fast), color var(--fast), transform var(--fast) var(--ease);
}
.btn:hover, .btn:focus-visible { background: var(--accent); color: var(--ink); }
.btn:active { transform: translateY(2px); transition-duration: .06s; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn--submit { grid-column: 1 / -1; justify-self: start; margin-top: 4px; }

.contact-direct {
  margin-top: 72px;
  font-size: .95rem;
  color: var(--ink-soft);
}
.contact-direct a {
  color: var(--ink);
  font-weight: 500;
  margin-left: 6px;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 100% 3px;
  background-position: 0 100%;
  transition: background-size var(--fast) var(--ease);
}
.contact-direct a:hover { background-size: 100% 42%; }

.contact-sent-body {
  margin-top: 34px;
  font-size: 1.2rem;
  color: var(--ink-soft);
}
.contact-sent .btn { margin-top: 52px; }

/* links written as [label](url) in case text, About and Ideas —
   the same accent sweep as the contact address, so they read as
   part of the house language rather than default browser links */
.rich-link {
  color: var(--ink);
  font-weight: 500;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 100% 3px;
  background-position: 0 100%;
  transition: background-size var(--fast) var(--ease);
}
.rich-link:hover, .rich-link:focus-visible { background-size: 100% 42%; }

/* ============================================================
   TYPOGRAPHIC DETAIL
   ============================================================ */
.card-num, .idea-date, .detail-index, .detail-meta dd, .hud-corner {
  font-variant-numeric: tabular-nums;
}

.detail-body p, .about-body p, .idea-panel-inner p, .contact-lede {
  text-wrap: pretty;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  :root { --rail: 190px; --matte: 32px; }
}

@media (max-width: 860px) {
  :root { --matte: 22px; }

  /* HUD becomes a top bar */
  .hud {
    top: 0; left: 0; right: 0;
    width: auto;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 18px;
    padding: calc(10px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right)) 10px calc(18px + env(safe-area-inset-left));
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  /* translucent bar material where the browser can blur what scrolls under it */
  @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .hud {
      background: rgba(255, 255, 255, .78);
      -webkit-backdrop-filter: saturate(1.8) blur(18px);
      backdrop-filter: saturate(1.8) blur(18px);
    }
  }
  .hud-logo { font-size: 1rem; margin-right: 6px; }
  .hud-nav { flex-direction: row; gap: 8px; }
  .hud-nav a { font-size: .68rem; letter-spacing: .12em; padding: 12px 4px; }
  .hud-nav a[aria-current="page"]::before { width: 6px; height: 6px; margin-right: 5px; }
  .hud-lang { margin-left: auto; }
  .hud-lang button { padding: 10px 8px; }
  .hud-corner { display: none; }

  /* accordion rotates: vertical stack of horizontal bands.
     Top padding must match the sticky CTA's own `top` offset below
     (same --hud-h + 10px) — otherwise the CTA's static flow position
     sits higher than its pinned position, and sticky "pushes" it down
     over the very next card without the layout reserving room for it. */
  .stage {
    display: block;   /* no vertical centering — the stack scrolls */
    height: auto;
    min-height: 100svh;
    padding: calc(var(--hud-h, 64px) + 18px) var(--matte) calc(32px + env(safe-area-inset-bottom));
  }
  /* the reel turns vertical: fixed-height bands, the page itself scrolls */
  .strip {
    flex-direction: column;
    height: auto;
    overflow: visible;
    padding-bottom: 0;
    gap: 18px;
  }
  .card {
    width: auto;
    height: 108px;
    scroll-margin: 96px; /* keeps a focused card clear of the fixed top bar */
    transition: height var(--move) var(--spring), transform .18s var(--ease);
  }
  .card:hover, .card:focus-visible, .card.is-hot { width: auto; height: 360px; }

  .card-vlabel {
    writing-mode: horizontal-tb;
    transform: none;
    bottom: 10px; left: 10px;
    padding: 5px 8px;
    letter-spacing: .16em;
  }
  .card-info { padding: 12px 14px 14px; }

  .card--cta {
    flex-direction: row;
    gap: 16px;
    left: auto;
    top: calc(var(--hud-h, 64px) + 18px); /* pins below the measured top bar */
    box-shadow: 0 18px 0 var(--bg);
  }
  .card--cta:focus-visible { box-shadow: 0 18px 0 var(--bg), 0 0 0 6px var(--accent); }
  .cta-plus { font-size: 2.2rem; }
  .cta-text { text-align: left; }

  /* detail overlay stacks */
  .detail-inner {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 80px var(--matte) 72px;
  }
  .detail-side { position: static; }
  .detail-index { margin-top: 30px; }
  .detail-meta { grid-template-columns: 1fr 1fr; margin-top: 26px; }
  .detail-hero { height: 52svh; }
  .detail-lede { margin-top: 36px; }
  .detail-next { margin-top: 48px; flex-wrap: wrap; }

  /* inner pages */
  .page { padding: calc(120px + env(safe-area-inset-top)) var(--matte) calc(90px + env(safe-area-inset-bottom)); }
  .about-grid { grid-template-columns: 1fr; gap: 44px; margin-top: 56px; }
  .about-portrait { max-width: 340px; }
  .ideas-list { margin-top: 44px; }
  .idea-row { grid-template-columns: 1fr auto; }
  .idea-date { grid-column: 1 / -1; }
  .idea-panel-inner p { margin-left: 8px; }
  .form { grid-template-columns: 1fr; gap: 38px; margin-top: 48px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .001ms !important;
    animation: none !important;
  }
  html { scroll-behavior: auto; }
  html.js .wipe { display: none; }
  html.js .stage, html.js .page { opacity: 1; transform: none; }

  /* reduced motion is not no feedback: spatial motion becomes a gentle cross-fade */
  .detail, .detail-main { transition: opacity .18s ease !important; }
}

@media (max-width: 860px) and (prefers-reduced-transparency: reduce) {
  .hud {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
