/* Roy Construction Management — brand stylesheet */

:root {
  /* Brand palette — taken from the capability statement and site hoarding */
  --burgundy:      #671013;
  --burgundy-deep: #470B0E;
  --burgundy-lift: #8A2029;
  --ink:           #16110F;
  --ink-soft:      #2A2321;
  --bone:          #F4F1EC;
  --bone-dim:      #E7E2DA;
  --grey:          #D9D6D0;
  --grey-mid:      #9C968E;
  --grey-text:     #6E6862;

  --bg:      var(--bone);
  --fg:      var(--ink);
  --muted:   var(--grey-text);
  --rule:    rgba(22, 17, 15, 0.14);

  --font-display: 'Jost', 'Futura', 'Century Gothic', sans-serif;
  --font-body:    'Satoshi', 'Inter', system-ui, sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   clamp(1.5rem, 2.4vw, 2rem);
  --text-2xl:  clamp(2rem, 4.4vw, 3rem);
  --text-hero: clamp(2.5rem, 7.2vw, 6rem);

  --space-1: 0.25rem;  --space-2: 0.5rem;   --space-3: 0.75rem;
  --space-4: 1rem;     --space-6: 1.5rem;   --space-8: 2rem;
  --space-12: 3rem;    --space-16: 4rem;    --space-20: 5rem;
  --space-24: 6rem;    --space-32: 8rem;

  --pad-x: clamp(1.25rem, 5vw, 5rem);
  --hdr: clamp(74px, 6.4vw, 92px);   /* height of the fixed header */
  --section: clamp(4rem, 9vw, 9rem);
  --maxw: 1560px;
  --prose: 62ch;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.05; }

::selection { background: var(--burgundy); color: var(--bone); }

/* ---------- Type utilities ---------- */

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-6);
}
.eyebrow--light { color: rgba(244, 241, 236, 0.62); }

.display {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1.02;
}
.display--caps {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 300;
}

.h-hero    { font-family: var(--font-display); font-weight: 300; font-size: var(--text-hero); line-height: 0.98; letter-spacing: -0.02em; }
.h-section { font-family: var(--font-display); font-weight: 300; font-size: var(--text-2xl); line-height: 1.05; letter-spacing: -0.012em; }
.h-sub     { font-family: var(--font-display); font-weight: 300; font-size: var(--text-xl); line-height: 1.15; }
.h-small   { font-family: var(--font-display); font-size: var(--text-sm); font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase; }

.lede { font-size: clamp(1.125rem, 1.7vw, 1.5rem); line-height: 1.5; letter-spacing: -0.005em; }
.prose { max-width: var(--prose); }
.prose--tight { max-width: 54ch; }
.prose p { margin: 0 0 1.15em; }
.prose p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.small { font-size: var(--text-sm); }
.xs { font-size: var(--text-xs); }

/* ---------- Layout ---------- */

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad-x); }
.section { padding-block: var(--section); }
.bleed { width: 100%; }

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

.grid { display: grid; gap: var(--space-8); }
@media (min-width: 900px) {
  .grid--2       { grid-template-columns: repeat(2, 1fr); }
  .grid--3       { grid-template-columns: repeat(3, 1fr); }
  .grid--4       { grid-template-columns: repeat(4, 1fr); }
  .grid--sidebar { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 7rem); }
  .grid--label   { grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: clamp(2rem, 5vw, 6rem); }
}

/* ---------- Dark / burgundy panels ---------- */

.panel-dark, .panel-burgundy { color: var(--bone); }
.panel-dark { background: var(--ink); }
.panel-burgundy { background: var(--burgundy); }
.panel-dark .muted, .panel-burgundy .muted { color: rgba(244, 241, 236, 0.66); }
.panel-dark .rule, .panel-burgundy .rule { background: rgba(244, 241, 236, 0.2); }
.panel-dark .eyebrow, .panel-burgundy .eyebrow { color: rgba(244, 241, 236, 0.62); }

/* ---------- Logo ---------- */

.logo { display: block; }
.logo svg { display: block; height: auto; }
.logo-mark { width: clamp(104px, 9.5vw, 138px); display: block; }

/* ---------- Header ---------- */

/* Fixed, not sticky: pages that open on a full-bleed hero let the image run to
   the top of the viewport and the header floats over it. Pages without a hero
   reserve the space with main's padding-top instead. */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  background: rgba(244, 241, 236, 0.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
  transition: background .4s var(--ease), border-color .4s var(--ease), color .4s var(--ease);
}
.header__inner {
  max-width: var(--maxw); margin: 0 auto; padding: var(--space-4) var(--pad-x);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-8);
}
.header--over {
  background: transparent; border-bottom-color: transparent; color: var(--bone);
}
/* While the mobile drawer is open the header sits on top of a full-bleed dark
   panel, so it has to adopt the same treatment as the over-hero state. */
body:has(.drawer[data-open="true"]) .header {
  background: transparent; border-bottom-color: transparent; color: var(--bone);
}
body:has(.drawer[data-open="true"]) .header::before { content: none; }
body:has(.drawer[data-open="true"]) .burger span { background: var(--bone); }

/* Keeps bone nav legible over bright patches of a hero photograph. */
.header--over::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(22,17,15,.52) 0%, rgba(22,17,15,0) 100%);
}
.header--over .nav__link { color: rgba(244, 241, 236, 0.86); }
.header--over .nav__link:hover, .header--over .nav__link[aria-current="page"] { color: var(--bone); }
.header--over .burger span { background: var(--bone); }

.nav { display: none; align-items: center; gap: clamp(1.25rem, 2.4vw, 2.5rem); }
@media (min-width: 940px) { .nav { display: flex; } }
.nav__link {
  font-family: var(--font-display); font-size: var(--text-xs); font-weight: 400;
  letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none;
  color: var(--muted); padding-block: 4px; position: relative; transition: color .3s var(--ease);
}
.nav__link::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--fg); }
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__cta {
  font-family: var(--font-display); font-size: var(--text-xs); letter-spacing: 0.16em;
  text-transform: uppercase; text-decoration: none;
  border: 1px solid currentColor; padding: 0.7em 1.4em; border-radius: 2px;
  transition: background .35s var(--ease), color .35s var(--ease);
}
.nav__cta:hover { background: var(--burgundy); border-color: var(--burgundy); color: var(--bone); }
.header--over .nav__cta:hover { background: var(--bone); border-color: var(--bone); color: var(--ink); }

.burger { display: grid; gap: 5px; background: none; border: 0; padding: 8px 0; cursor: pointer; }
@media (min-width: 940px) { .burger { display: none; } }
.burger span { display: block; width: 26px; height: 1px; background: var(--fg); transition: transform .35s var(--ease), opacity .3s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.drawer {
  position: fixed; inset: 0; z-index: 55; background: var(--ink); color: var(--bone);
  padding: calc(var(--space-24) + 1rem) var(--pad-x) var(--space-12);
  display: flex; flex-direction: column; justify-content: space-between;
  transform: translateY(-100%); transition: transform .6s var(--ease);
  overflow-y: auto;
}
.drawer[data-open="true"] { transform: translateY(0); }
.drawer__links { display: grid; gap: var(--space-4); }
.drawer__links a {
  font-family: var(--font-display); font-weight: 300; font-size: clamp(1.75rem, 8vw, 3rem);
  text-decoration: none; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.1;
}
.drawer__meta { font-size: var(--text-sm); color: rgba(244,241,236,.66); display: grid; gap: 6px; }
.drawer__meta a { text-decoration: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.7em;
  font-family: var(--font-display); font-size: var(--text-sm); font-weight: 400;
  letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  padding: 1.05em 1.9em; border-radius: 2px; border: 1px solid var(--burgundy);
  background: var(--burgundy); color: var(--bone); cursor: pointer;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn:hover { background: var(--burgundy-deep); border-color: var(--burgundy-deep); }
.btn--ghost { background: transparent; color: currentColor; border-color: currentColor; }
.btn--ghost:hover { background: currentColor; border-color: currentColor; }
.panel-dark .btn--ghost:hover, .panel-burgundy .btn--ghost:hover { color: var(--ink); }
.btn--light { background: var(--bone); border-color: var(--bone); color: var(--ink); }
.btn--light:hover { background: #fff; border-color: #fff; color: var(--ink); }
.btn__arrow { transition: transform .4s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(5px); }

.textlink {
  font-family: var(--font-display); font-size: var(--text-sm); letter-spacing: 0.14em;
  text-transform: uppercase; text-decoration: none; display: inline-flex; align-items: center; gap: .6em;
  border-bottom: 1px solid currentColor; padding-bottom: 3px;
}
.textlink .btn__arrow { transition: transform .4s var(--ease); }
.textlink:hover .btn__arrow { transform: translateX(5px); }

/* ---------- Hero ---------- */

main { padding-top: var(--hdr); }
main.main--hero { padding-top: 0; }

.hero { position: relative; min-height: 92svh; display: flex; align-items: flex-end; color: var(--bone); overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
.hero__media img, .hero__media video { width: 100%; height: 100%; object-fit: cover; }
/* Two scrims: a vertical one to seat the header and footer of the frame, and a
   left-weighted one so the headline never competes with detail in the photo. */
.hero__media::before, .hero__media::after { content: ''; position: absolute; inset: 0; }
.hero__media::before {
  background: linear-gradient(180deg, rgba(22,17,15,.46) 0%, rgba(22,17,15,.10) 34%, rgba(22,17,15,.72) 100%);
}
.hero__media::after {
  background: linear-gradient(96deg, rgba(22,17,15,.80) 0%, rgba(22,17,15,.62) 34%, rgba(22,17,15,.20) 62%, rgba(22,17,15,0) 84%);
}
@media (max-width: 780px) {
  .hero__media::after { background: linear-gradient(180deg, rgba(22,17,15,.40) 0%, rgba(22,17,15,.58) 45%, rgba(22,17,15,.80) 100%); }
}
.hero__body { position: relative; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: calc(var(--hdr) + var(--space-12)) var(--pad-x) clamp(2.5rem, 6vw, 5rem); }
.hero__title { max-width: 19ch; text-wrap: balance; }

/* The homepage hero is the site hoarding, which carries the ROY mark itself.
   Nudge the frame so the painted logo clears the headline instead of sitting
   underneath it. */
.hero--brand .hero__media img { transform: scale(1.16) translateX(7%); transform-origin: center; }
@media (max-width: 780px) { .hero--brand .hero__media img { transform: none; } }
.hero__sub { max-width: 46ch; margin: var(--space-6) 0 var(--space-8); color: rgba(244,241,236,.9); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.hero__caption {
  position: absolute; right: var(--pad-x); bottom: clamp(2.5rem, 6vw, 5rem);
  font-size: var(--text-xs); color: rgba(244,241,236,.7); text-align: right; display: none;
}
@media (min-width: 1100px) { .hero__caption { display: block; } }

.hero--page { min-height: 62svh; }

/* ---------- Statement ---------- */

/* Direct children only — a descendant selector here would also restyle the
   body copy nested inside the statement block. */
.statement > p {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.375rem, 2.9vw, 2.35rem); line-height: 1.22; letter-spacing: -0.012em;
  max-width: 30ch; margin: 0;
  text-wrap: pretty;
}
.statement--wide > p { max-width: 44ch; }

/* ---------- Project cards ---------- */

.project-card { display: block; text-decoration: none; color: inherit; }
.project-card__media { position: relative; overflow: hidden; background: var(--grey); aspect-ratio: 4 / 3; }
.project-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease), filter .6s var(--ease);
}
.project-card:hover .project-card__media img { transform: scale(1.04); }
.project-card__tag {
  position: absolute; top: var(--space-4); left: var(--space-4);
  background: var(--burgundy); color: var(--bone);
  font-family: var(--font-display); font-size: var(--text-xs); letter-spacing: 0.14em;
  text-transform: uppercase; padding: 0.5em 0.9em; border-radius: 2px;
}
.project-card__body { padding-top: var(--space-4); display: flex; justify-content: space-between; gap: var(--space-4); align-items: baseline; }
.project-card__name { font-family: var(--font-display); font-weight: 300; font-size: var(--text-xl); line-height: 1.1; }
.project-card__meta { font-size: var(--text-xs); color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.project-card__credits { font-size: var(--text-sm); color: var(--muted); padding-top: var(--space-1); }

.project-card--tall .project-card__media { aspect-ratio: 3 / 4; }
.project-card--wide .project-card__media { aspect-ratio: 16 / 9; }

/* ---------- Numbers / proof ---------- */

.proof { display: grid; gap: 1px; background: rgba(244,241,236,.2); }
@media (min-width: 700px) { .proof { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .proof { grid-template-columns: repeat(4, 1fr); } }
.proof__item { background: var(--ink); padding: clamp(1.5rem, 3vw, 2.5rem); display: flex; flex-direction: column; gap: var(--space-3); }
.panel-burgundy .proof { background: rgba(244,241,236,.24); }
.panel-burgundy .proof__item { background: var(--burgundy); }
.proof__num { font-family: var(--font-display); font-weight: 300; font-size: clamp(2.25rem, 4.6vw, 3.5rem); line-height: 1; letter-spacing: -0.02em; }
.proof__label { font-family: var(--font-display); font-size: var(--text-xs); letter-spacing: 0.16em; text-transform: uppercase; }
.proof__note { font-size: var(--text-sm); color: rgba(244,241,236,.66); }

/* ---------- Steps ---------- */

.stage { border-top: 1px solid var(--rule); padding-top: var(--space-8); margin-top: var(--space-16); }
.stage:first-child { margin-top: 0; }
.steps { display: grid; gap: 1px; background: var(--rule); margin-top: var(--space-8); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1180px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { background: var(--bg); padding: var(--space-6) clamp(1rem, 2vw, 1.75rem) var(--space-8); display: flex; flex-direction: column; gap: var(--space-3); }
.step__n { font-family: var(--font-display); font-size: var(--text-xs); letter-spacing: 0.18em; color: var(--burgundy); }
.step__t { font-family: var(--font-display); font-weight: 400; font-size: var(--text-lg); line-height: 1.2; }
.step__d { font-size: var(--text-sm); color: var(--muted); }

/* ---------- Values ---------- */

.value { border-top: 1px solid var(--rule); padding-top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.value__t { font-family: var(--font-display); font-weight: 300; font-size: var(--text-xl); }
.value__d { font-size: var(--text-sm); color: var(--muted); }
.panel-dark .value, .panel-burgundy .value { border-top-color: rgba(244,241,236,.24); }
.panel-dark .value__d, .panel-burgundy .value__d { color: rgba(244,241,236,.66); }

/* Live projects — on site now, no photography yet */
.lives { display: grid; gap: var(--space-8); }
@media (min-width: 760px) { .lives { grid-template-columns: repeat(3, 1fr); gap: var(--space-6); } }
.live { border-top: 1px solid var(--rule); padding-top: var(--space-5); }
.live__t { font-family: var(--font-display); font-weight: 300; font-size: var(--text-xl); line-height: 1.15; display: flex; flex-direction: column; }
.live__sub { font-family: var(--font-body); font-size: var(--text-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: var(--space-2); }
.live__d { font-size: var(--text-sm); color: var(--muted); margin-top: var(--space-4); }
.live__c { font-size: var(--text-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: var(--space-4); }
.live__c a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
.live__c a:hover { border-bottom-color: currentColor; }

/* Values, long form — capability statement wording, label beside prose */
.valrows { display: grid; gap: var(--space-10); }
.valrow { display: grid; gap: var(--space-4); border-top: 1px solid var(--rule); padding-top: var(--space-6); }
.valrow__t { font-family: var(--font-display); font-weight: 300; font-size: var(--text-2xl); line-height: 1.1; }
.valrow__d p { font-size: var(--text-base); color: var(--muted); max-width: 62ch; margin: 0; }
@media (min-width: 860px) {
  .valrow { grid-template-columns: 18rem 1fr; gap: var(--space-8); align-items: start; }
  .valrow__t { padding-top: .15em; }
}

/* ---------- Galleries ---------- */

.gallery { display: grid; gap: clamp(.5rem, 1.4vw, 1.25rem); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 860px) { .gallery { grid-template-columns: repeat(6, 1fr); } }
.gallery figure { margin: 0; background: var(--grey); overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.gallery figure:hover img { transform: scale(1.03); }
.g-wide  { grid-column: span 2; aspect-ratio: 3 / 2; }
.g-tall  { grid-column: span 1; aspect-ratio: 2 / 3; }
.g-full  { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
@media (min-width: 860px) {
  .g-wide { grid-column: span 4; }
  .g-tall { grid-column: span 2; }
  .g-half { grid-column: span 3; aspect-ratio: 3 / 2; }
}
@media (max-width: 859px) {
  .g-half { grid-column: span 2; aspect-ratio: 3 / 2; }
}

/* ---------- Spec list ---------- */

.spec { display: grid; gap: 0; }
.spec__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--space-4); padding: var(--space-4) 0; border-top: 1px solid var(--rule); }
.spec__k { font-family: var(--font-display); font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.spec__v { font-size: var(--text-sm); }
.spec__v a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.spec__v a:hover { border-bottom-color: currentColor; }

/* ---------- Quote / testimonial ---------- */

.quote { display: flex; flex-direction: column; gap: var(--space-6); }
.quote__mark { width: 26px; opacity: .5; }
.quote blockquote {
  margin: 0; font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.25rem, 2.2vw, 1.85rem); line-height: 1.3; letter-spacing: -0.01em; max-width: 34ch;
}
.quote figcaption { font-size: var(--text-sm); color: var(--muted); }
.quote--placeholder blockquote { color: var(--grey-text); font-style: italic; }

/* Full-length testimonial: multiple paragraphs inside one blockquote, so the
   quote size steps down from the pull-quote treatment to stay readable. */
.quote--large blockquote { font-size: var(--text-xl); line-height: 1.45; max-width: 30ch; }
.quote--large blockquote p + p { margin-top: var(--space-6); }
@media (min-width: 900px) { .quote--large blockquote { max-width: 34ch; } }

/* ---------- Collaborators ---------- */

.collab { display: grid; gap: 1px; background: var(--rule); }
@media (min-width: 640px) { .collab { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .collab { grid-template-columns: repeat(3, 1fr); } }
.collab__item { background: var(--bg); padding: var(--space-6) var(--space-4); display: flex; flex-direction: column; gap: 6px; text-decoration: none; }
.collab__item:hover { background: var(--bone-dim); }
/* A trailing item alone on its row spans the width, so no dead cells show */
@media (min-width: 640px) and (max-width: 1023px) { .collab__item:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .collab__item:last-child:nth-child(3n+1) { grid-column: 1 / -1; } .collab__item:last-child:nth-child(3n+2) { grid-column: span 2; } }
.collab__n { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 400; }
.collab__r { font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Form ---------- */

.form { display: grid; gap: var(--space-6); }
.field { display: grid; gap: var(--space-2); }
.field label { font-family: var(--font-display); font-size: var(--text-xs); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: var(--text-base); color: var(--fg);
  background: transparent; border: 0; border-bottom: 1px solid var(--rule);
  padding: var(--space-3) 0; border-radius: 0; width: 100%;
  transition: border-color .3s var(--ease);
}
.field textarea { resize: vertical; min-height: 7rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--burgundy); }
.field--row { display: grid; gap: var(--space-6); }
@media (min-width: 700px) { .field--row { grid-template-columns: repeat(2, 1fr); } }
.form__note { font-size: var(--text-xs); color: var(--muted); }
.form__status { font-size: var(--text-sm); min-height: 1.4em; }

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--rule); }
.faq__item { border-bottom: 1px solid var(--rule); }
.faq__q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer; color: inherit;
  font-family: var(--font-display); font-weight: 400; font-size: var(--text-lg);
  padding: var(--space-6) 0; display: flex; justify-content: space-between; gap: var(--space-6); align-items: center;
}
.faq__icon { flex: none; width: 14px; height: 14px; position: relative; }
.faq__icon::before, .faq__icon::after { content: ''; position: absolute; background: var(--burgundy); transition: transform .4s var(--ease); }
.faq__icon::before { left: 0; top: 6px; width: 14px; height: 1px; }
.faq__icon::after  { top: 0; left: 6px; height: 14px; width: 1px; }
.faq__q[aria-expanded="true"] .faq__icon::after { transform: rotate(90deg); }
.faq__a { overflow: hidden; height: 0; transition: height .45s var(--ease); }
.faq__a > div { padding-bottom: var(--space-6); max-width: 68ch; font-size: var(--text-base); color: var(--muted); }

/* ---------- Footer ---------- */

.footer { background: var(--ink); color: var(--bone); padding-block: var(--section) var(--space-8); }
.footer a { text-decoration: none; }
.footer__top { display: grid; gap: var(--space-12); }
@media (min-width: 1000px) { .footer__top { grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 3fr) minmax(0, 3fr); gap: var(--space-8); } }
.footer__col { display: flex; flex-direction: column; gap: var(--space-3); font-size: var(--text-sm); color: rgba(244,241,236,.72); }
.footer__col a:hover { color: var(--bone); }
.footer__h { font-family: var(--font-display); font-size: var(--text-xs); letter-spacing: 0.18em; text-transform: uppercase; color: rgba(244,241,236,.5); margin-bottom: var(--space-2); }
.footer__logo { width: clamp(200px, 26vw, 340px); color: var(--bone); margin-bottom: var(--space-6); }
.footer__tag { font-family: var(--font-display); font-size: var(--text-xs); letter-spacing: 0.2em; text-transform: uppercase; color: rgba(244,241,236,.6); }
.footer__bottom {
  margin-top: var(--space-16); padding-top: var(--space-6); border-top: 1px solid rgba(244,241,236,.18);
  display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-8); justify-content: space-between;
  font-size: var(--text-xs); color: rgba(244,241,236,.5);
}
.footer__creds { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6); }

/* ---------- Next project ---------- */

.next { position: relative; display: block; text-decoration: none; color: var(--bone); overflow: hidden; min-height: 58svh; display: flex; align-items: center; }
.next img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.next::after { content: ''; position: absolute; inset: 0; background: rgba(22,17,15,.5); }
.next:hover img { transform: scale(1.05); }
.next__body { position: relative; z-index: 2; width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad-x); }

/* ---------- Reveal ---------- */

/* Hidden only when JS is available to reveal them — never trap content. */
.js [data-reveal] { opacity: 0; transform: translateY(22px); }
.js .revealed[data-reveal] { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---------- Skip link ---------- */

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--burgundy); color: var(--bone); padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
}
.skip:focus { left: 0; }
:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 3px; }
.panel-dark :focus-visible, .panel-burgundy :focus-visible, .hero :focus-visible { outline-color: var(--bone); }

/* ==========================================================================
   IMAGE-BEHIND-TEXT TREATMENTS
   The photo library was measured for brightness under the text zone
   (scrim.py). Only 5% of it can carry text at full strength, so there are
   four treatments and the photo decides which one it gets — not the slot.
   ========================================================================== */

/* Shared full-bleed frame. --scrim is set per instance from the measured
   value, so a dark hoarding gets 0.03 and a pale interior gets 0.55 rather
   than every section being flattened by the same heavy overlay. */
.bleed {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: clamp(420px, 62svh, 720px);
  color: var(--bone);
  --scrim: .5;
  --scrim-from: .06;
}
.bleed > picture, .bleed > img { position: absolute; inset: 0; z-index: -2; }
.bleed > img { width: 100%; height: 100%; object-fit: cover; }
.bleed::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg,
    rgba(22, 17, 15, var(--scrim-from)) 0%,
    rgba(22, 17, 15, calc(var(--scrim) * .72)) 46%,
    rgba(22, 17, 15, var(--scrim)) 100%);
}
/* Text held to the left, so the right of the photo stays readable. */
.bleed--left::after {
  background:
    linear-gradient(96deg, rgba(22,17,15,var(--scrim)) 0%,
      rgba(22,17,15,calc(var(--scrim) * .82)) 38%, rgba(22,17,15,0) 74%),
    linear-gradient(180deg, rgba(22,17,15,calc(var(--scrim) * .30)) 0%,
      rgba(22,17,15,calc(var(--scrim) * .55)) 100%);
}
.bleed--centre { align-items: center; text-align: center; }
.bleed__body {
  padding: clamp(2rem, 5vw, 5rem) 0;
  max-width: 42ch;
}
.bleed--centre .bleed__body { max-width: 34ch; margin-inline: auto; }
.bleed--tall { min-height: clamp(520px, 82svh, 860px); }
@media (max-width: 780px) {
  /* Narrow screens put text over the middle of the photo whatever the
     intent, so the side-weighted gradient is replaced by a vertical one. */
  .bleed--left::after {
    background: linear-gradient(180deg, rgba(22,17,15,calc(var(--scrim) * .55)) 0%,
      rgba(22,17,15,calc(var(--scrim) * .78)) 45%, rgba(22,17,15,.86) 100%);
  }
  .bleed { min-height: clamp(380px, 56svh, 560px); }
}

/* Duotone. For the 30% of photos too bright for a plain scrim but not
   precious enough to protect: the image becomes a graphic surface in brand
   colour. Never use on finished work — it throws away the photography. */
.duo { background: var(--burgundy-deep); }
.duo > img {
  mix-blend-mode: luminosity;
  opacity: .62;
  filter: grayscale(1) contrast(1.06);
}
.duo::after {
  background: linear-gradient(180deg, rgba(71,11,14,.10) 0%, rgba(71,11,14,.55) 100%);
}
.duo--ink { background: var(--ink); }
.duo--ink::after { background: linear-gradient(180deg, rgba(22,17,15,.10) 0%, rgba(22,17,15,.58) 100%); }

/* The quiet treatment: full-bleed photo, no text on it at all, caption
   underneath. Costs nothing in legibility and is the correct answer for
   most of the library. Use it as a breath between text-heavy sections. */
.quiet { margin-block: var(--section); }
.quiet img {
  width: 100%; height: clamp(300px, 58svh, 680px);
  object-fit: cover; display: block;
}
.quiet figcaption {
  font-size: var(--text-sm); color: var(--muted);
  padding: var(--space-4) 0 0;
  display: flex; gap: var(--space-6); flex-wrap: wrap;
}
.quiet figcaption b { font-weight: 500; color: var(--ink); }
.panel-dark .quiet figcaption b, .panel-burgundy .quiet figcaption b { color: var(--bone); }

/* Beside: photo and text share a row, photo at full fidelity. The default
   for finished work that needs to sit next to an argument. */
.beside { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.beside img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 900px) {
  .beside { grid-template-columns: 1fr 1fr; }
  .beside--wide { grid-template-columns: 1.35fr 1fr; }
  .beside--flip > *:first-child { order: 2; }
}

/* ==========================================================================
   PROJECT STREAM  (sticky credits rail + dense scrolling image column)
   The reference builders both hold project identity and credits fixed while
   the photography scrolls past. It suits this business twice over: the
   credits stay on screen the entire time a visitor looks at the work, and
   the layout wants many photos rather than a curated few.
   ========================================================================== */

.stream { display: grid; }

@media (min-width: 1000px) {
  .stream {
    grid-template-columns: minmax(360px, 38%) 1fr;
    align-items: start;
    gap: clamp(2rem, 4vw, 4rem);
  }
  .stream__rail {
    position: sticky;
    top: var(--hdr);
    /* Sits in the space beside the images rather than scrolling with them.
       The rail can be taller than the viewport on short screens, so it scrolls
       internally — with a visible thin bar and a bottom fade, because a hidden
       scrollbar here silently truncates the credits and the description. */
    padding: clamp(1.75rem, 4vw, 3.5rem) var(--space-6) clamp(1.75rem, 4vw, 3rem) var(--pad-x);
    max-height: calc(100svh - var(--hdr));
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--grey) transparent;
    -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 2.5rem), transparent 100%);
            mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 2.5rem), transparent 100%);
  }
  /* No fade or inner scroll when everything already fits. */
  @media (min-height: 1000px) {
    .stream__rail { -webkit-mask-image: none; mask-image: none; }
  }
  .stream__rail::-webkit-scrollbar { width: 6px; }
  .stream__rail::-webkit-scrollbar-thumb { background: var(--grey); border-radius: 3px; }
  .stream__rail::-webkit-scrollbar-track { background: transparent; }
}

.stream__rail { padding-inline: var(--pad-x); }
.stream__count {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: var(--text-2xl);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.stream__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-6); margin-bottom: var(--space-8);
}
.stream__desc { margin-top: clamp(1.25rem, 3vw, 2rem); max-width: 46ch; }
.stream__rail .spec__row { padding-block: var(--space-3); }
.stream__rail .spec__k { font-size: var(--text-xs); }
.stream__head { margin-bottom: var(--space-6); }
@media (min-width: 1200px) {
  /* Two narrow measures, as the reference does, so a long description does
     not run to an unreadable line length in a 38% column. */
  .stream__desc { columns: 2; column-gap: var(--space-8); }
  .stream__desc p { margin: 0 0 var(--space-4); break-inside: avoid; }
}

/* The image column. Runs to the right edge of the viewport. */
.stream__imgs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(.4rem, 1vw, .9rem);
  padding: clamp(1rem, 3vw, 2rem) var(--pad-x) clamp(2rem, 6vw, 5rem) 0;
}
@media (max-width: 999px) {
  .stream__imgs { padding-inline: var(--pad-x); }
}
.stream__imgs figure { margin: 0; background: var(--grey); overflow: hidden; }
.stream__imgs img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 1.4s var(--ease);
}
.stream__imgs figure:hover img { transform: scale(1.025); }

/* Four sizes, cycled, so the column has rhythm instead of a uniform grid. */
.s-hero { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.s-full { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.s-half { grid-column: span 2; aspect-ratio: 4 / 5; }
.s-quarter { grid-column: span 1; aspect-ratio: 3 / 4; }
@media (max-width: 640px) {
  /* Quarter-width thumbnails are unreadable on a phone; pair them instead. */
  .stream__imgs { grid-template-columns: repeat(2, 1fr); }
  .s-quarter { grid-column: span 1; }
  .s-half { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
}

/* ==========================================================================
   RAIL  (horizontal scroll-snap carousel — homepage selected work)
   ========================================================================== */

.rail-wrap { position: relative; }
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(min(78vw, 620px), 1fr);
  gap: clamp(1rem, 2.4vw, 2rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* Without this the snapport starts at the border edge, so the browser
     scrolls the left gutter away and slide one sits flush to the viewport. */
  scroll-padding-inline: var(--pad-x);
  overscroll-behavior-x: contain;
  padding: 0 var(--pad-x) var(--space-6);
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail__fig { margin: 0; }
.rail__fig img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
  background: var(--grey);
}
.rail__cap { padding-top: var(--space-4); display: grid; gap: 2px; }
.rail__cap b { font-weight: 500; }
.rail__cap span { font-size: var(--text-sm); color: var(--muted); }

.rail-nav { display: flex; gap: var(--space-3); align-items: center; }
.rail-btn {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid currentColor; background: none; color: inherit;
  display: grid; place-items: center; cursor: pointer;
  transition: background .4s var(--ease), color .4s var(--ease);
}
.rail-btn:hover:not(:disabled) { background: currentColor; }
.rail-btn:hover:not(:disabled) svg { stroke: var(--bone); }
.panel-dark .rail-btn:hover:not(:disabled) svg,
.panel-burgundy .rail-btn:hover:not(:disabled) svg { stroke: var(--ink); }
.rail-btn:disabled { opacity: .3; cursor: default; }
.rail-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.6; }
@media (prefers-reduced-motion: reduce) { .rail { scroll-behavior: auto; } }
