/* =========================================================
   BHA | Bilal Hoss Architects — main.css
   Design system: see ../../DESIGN.md ("The coordinated drawing set")
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --paper: #F5F3EE;
  --paper-2: #ECE8E0;
  --concrete: #C7C0B4;
  --stone: #8F877A;
  --charcoal: #2E2C28;
  --ink: #191813;
  --line: #D8D3C8;
  --line-dark: #3A3833;

  --font-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
  --font-logo: "Jost", "Century Gothic", var(--font-sans);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --container: 1320px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-pad: clamp(4rem, 9vw, 8rem);

  --z-header: 100;
  --z-menu: 200;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; display: block; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

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

/* Focus */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.on-dark :focus-visible, .site-footer :focus-visible, .band-dark :focus-visible {
  outline-color: var(--paper);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------- Type ---------- */
.display-1 {
  font-size: clamp(2.5rem, 6vw, 5.25rem);
  font-weight: 275;
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.display-2 {
  font-size: clamp(1.9rem, 4vw, 3.25rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.display-3 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  font-weight: 300;
  line-height: 1.55;
  color: var(--charcoal);
  max-width: 34em;
}
.body-max { max-width: 68ch; }
.text-muted { color: var(--charcoal); }

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
}
.on-dark .mono-label { color: var(--concrete); }

.sheet-code {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--stone);
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-pad); }
.section-tight { padding-block: clamp(3rem, 6vw, 5rem); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.on-dark .section-head, .band-dark .section-head { border-color: var(--line-dark); }

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

/* Drawing-margin ticks on framed figures */
.ticked { position: relative; }
.ticked::before, .ticked::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
}
.ticked::before {
  top: -1px; left: -1px;
  border-top: 1px solid var(--stone);
  border-left: 1px solid var(--stone);
}
.ticked::after {
  bottom: -1px; right: -1px;
  border-bottom: 1px solid var(--stone);
  border-right: 1px solid var(--stone);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 200ms ease, border-color 200ms ease;
}
.site-header.is-solid {
  background: rgba(245, 243, 238, 0.96);
  border-bottom-color: var(--line);
}
.site-header.on-ink { color: var(--paper); }
.site-header.on-ink.is-solid { color: var(--ink); }

.header-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 0 var(--gutter);
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  flex: none;
}
.brand-mark { width: 44px; height: 44px; flex: none; }
.brand-mark .mark-frame { stroke: currentColor; }
.brand-mark .mark-text { fill: currentColor; }
.brand-name {
  font-family: var(--font-logo);
  font-weight: 300;
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  line-height: 1.2;
  white-space: nowrap;
}
.brand-descriptor {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.575rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
  margin-top: 2px;
}

.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.75rem); }
.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.35rem 0;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 300ms var(--ease-out);
}
.site-nav a:hover, .site-nav a.is-current { background-size: 100% 1px; }

.nav-cta {
  border: 1px solid currentColor;
  padding: 0.6rem 1.1rem !important;
  transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out);
  background-image: none !important;
}
.nav-cta:hover { background: var(--ink); color: var(--paper); }
.site-header.on-ink:not(.is-solid) .nav-cta:hover { background: var(--paper); color: var(--ink); }
.nav-cta:active { transform: scale(0.98); }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
}
.menu-toggle span {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform 200ms var(--ease-out), opacity 200ms ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  background: var(--paper);
  display: none;
  flex-direction: column;
  padding: calc(76px + 2rem) var(--gutter) 3rem;
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  text-decoration: none;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a.is-current { color: var(--stone); }
.mobile-menu .mobile-menu-close {
  position: absolute;
  top: 16px;
  right: var(--gutter);
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  font-weight: 300;
}
.mobile-menu .mono-label { margin-bottom: 1rem; }

@media (max-width: 960px) {
  .site-nav { display: none; }
  .menu-toggle { display: flex; }
}
@media (max-width: 720px) {
  /* Long descriptor must never widen the layout on phones */
  .header-inner { gap: 1rem; }
  .brand { min-width: 0; flex: 1; gap: 0.65rem; }
  .brand-descriptor { display: none; }
  .brand-name {
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .brand-mark { width: 38px; height: 38px; }
  .menu-toggle { flex: none; }
  .hero-basefacts span { white-space: normal; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  min-height: 44px;
  transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--charcoal); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.on-dark .btn-solid, .band-dark .btn-solid { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.on-dark .btn-solid:hover, .band-dark .btn-solid:hover { background: var(--concrete); border-color: var(--concrete); }
.on-dark .btn-ghost, .band-dark .btn-ghost { border-color: var(--paper); color: var(--paper); }
.on-dark .btn-ghost:hover, .band-dark .btn-ghost:hover { background: var(--paper); color: var(--ink); }

.btn .arrow { transition: transform 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover .arrow { transform: translateX(4px); }
}

.text-link {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--concrete);
  padding-bottom: 3px;
  transition: border-color 200ms ease;
}
.text-link:hover { border-color: var(--ink); }
.on-dark .text-link:hover, .band-dark .text-link:hover { border-color: var(--paper); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92svh;
  display: flex;
  align-items: flex-end;
  padding-top: 120px;
  padding-bottom: clamp(3rem, 7vh, 5.5rem);
  overflow: hidden;
}
.hero-linework {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
}
/* Text-protection fade: keeps the drawing linework away from the copy */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(90deg, var(--paper) 0%, rgba(245, 243, 238, 0.85) 40%, rgba(245, 243, 238, 0) 70%),
    linear-gradient(0deg, var(--paper) 0%, rgba(245, 243, 238, 0) 32%),
    linear-gradient(180deg, var(--paper) 0%, rgba(245, 243, 238, 0) 14%);
}
.hero-inner { position: relative; z-index: 1; width: 100%; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-bottom: clamp(1.5rem, 3vh, 2.5rem);
}
.hero h1 { max-width: 13em; }
.hero .lede { margin-top: 1.75rem; }
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}
.hero-basefacts {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
}
.hero-basefacts span { white-space: nowrap; }

/* Load-in sequence (home hero) */
.hero .rise {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
body.is-loaded .hero .rise { opacity: 1; transform: none; }
.hero .rise:nth-child(2) { transition-delay: 80ms; }
.hero .rise:nth-child(3) { transition-delay: 160ms; }
.hero .rise:nth-child(4) { transition-delay: 240ms; }
.hero .rise:nth-child(5) { transition-delay: 320ms; }

/* Clean hero on small screens: typography-led, no background linework */
@media (max-width: 960px) {
  .hero-linework, .hero::after { display: none; }
  .hero {
    min-height: auto;
    padding-top: calc(76px + clamp(2.5rem, 7vh, 4.5rem));
  }
}
@media (max-width: 720px) {
  .hero-meta { flex-direction: column; align-items: flex-start; gap: 0.45rem; }
  .hero-basefacts .sheet-code { display: none; }
}

/* Page hero (inner pages) */
.page-hero {
  padding-top: calc(76px + clamp(3.5rem, 8vw, 6.5rem));
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.page-hero .mono-label { display: block; margin-bottom: 1.25rem; }
.page-hero .lede { margin-top: 1.5rem; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .hero .rise {
    transform: none;
    transition: opacity 200ms ease;
  }
  .btn .arrow, .btn, .nav-cta { transition: none; }
}

/* ---------- Credibility strip ---------- */
.cred-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.cred-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.75rem 1.5rem;
}
.cred-cell .value {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.cred-cell .value .unit { font-size: 0.55em; color: var(--stone); font-weight: 400; }
.cred-cell p { margin-top: 0.5rem; font-size: 0.9rem; color: var(--charcoal); }

/* ---------- Two-column intro ---------- */
.split, .split-reverse {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.split-reverse { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
@media (max-width: 860px) {
  .split, .split-reverse { grid-template-columns: 1fr; }
}
.split .display-2 { margin-bottom: 1.5rem; }
.split p + p { margin-top: 1.1rem; }

/* ---------- Drawing-sheet figure (signature placeholder) ---------- */
.sheet-figure {
  position: relative;
  border: 1px solid var(--charcoal);
  background: var(--paper);
  display: flex;
  flex-direction: column;
}
.sheet-field {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 1px solid var(--charcoal);
}
.sheet-figure.is-tall .sheet-field { aspect-ratio: 3 / 3.4; }
.sheet-field-inner {
  position: absolute;
  inset: 0;
  transition: transform 700ms ease;
}
@media (hover: hover) and (pointer: fine) {
  a.project-card:hover .sheet-field-inner { transform: scale(1.025); }
}
.sheet-field img { width: 100%; height: 100%; object-fit: cover; }

/* Hatch conventions (per sector) */
.hatch-diagonal {
  background-image: repeating-linear-gradient(45deg, var(--concrete) 0 1px, transparent 1px 9px);
}
.hatch-crosshatch {
  background-image:
    repeating-linear-gradient(45deg, var(--concrete) 0 1px, transparent 1px 11px),
    repeating-linear-gradient(-45deg, var(--concrete) 0 1px, transparent 1px 11px);
}
.hatch-dots {
  background-image: radial-gradient(var(--concrete) 1px, transparent 1.5px);
  background-size: 12px 12px;
}
.hatch-grid {
  background-image:
    repeating-linear-gradient(0deg, var(--concrete) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, var(--concrete) 0 1px, transparent 1px 22px);
}
.hatch-vertical {
  background-image: repeating-linear-gradient(90deg, var(--concrete) 0 1px, transparent 1px 8px);
}
.hatch-horizontal {
  background-image: repeating-linear-gradient(0deg, var(--concrete) 0 1px, transparent 1px 8px);
}

.sheet-badge {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.3rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal);
}
.sheet-badge-right {
  left: auto;
  right: 0.9rem;
}

/* Title block */
.title-block { padding: 1rem 1.1rem 1.1rem; }
.title-block .tb-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.title-block h3 {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.title-block .tb-meta {
  margin-top: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.9rem;
}
.title-block .tb-role {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--charcoal);
  line-height: 1.5;
}
.title-block .tb-role strong { font-weight: 500; }

/* ---------- Project grids ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: clamp(1.25rem, 3vw, 2.25rem);
}
a.project-card { text-decoration: none; display: block; }
a.project-card .sheet-figure { transition: border-color 200ms ease; height: 100%; }
a.project-card:hover .sheet-figure { border-color: var(--ink); }

/* ---------- Filters ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line);
  color: var(--charcoal);
  min-height: 40px;
  transition: border-color 200ms ease, background-color 200ms ease, color 200ms ease;
}
.filter-btn:hover { border-color: var(--charcoal); }
.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.project-card.is-hidden { display: none; }
.project-card { transition: opacity 200ms ease; }
.project-card.is-fading { opacity: 0; }

.results-note {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--stone);
  margin-bottom: 1.5rem;
}

/* ---------- Services ---------- */
.service-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.service-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.75rem 1.5rem 2rem;
  text-decoration: none;
  display: block;
  transition: background-color 200ms ease;
}
.service-cell:hover { background: var(--paper-2); }
.service-cell .svc-num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--stone);
  display: block;
  margin-bottom: 1.1rem;
}
.service-cell h3 { font-size: 1.05rem; font-weight: 500; line-height: 1.35; }
.service-cell p { margin-top: 0.65rem; font-size: 0.9rem; color: var(--charcoal); }

.service-detail {
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 100px;
}
.service-detail:last-of-type { border-bottom: 0; }
.service-detail .split { margin-top: 1.75rem; }
.service-detail h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.7rem;
}
.service-detail .facts-list + h4, .service-detail p + h4 { margin-top: 1.6rem; }

.facts-list { list-style: none; }
.facts-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--charcoal);
}
.facts-list li:last-child { border-bottom: 0; }

/* ---------- Sectors ---------- */
.sector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.sector-tile {
  background: var(--paper);
  padding: 1.5rem 1.4rem;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}
.sector-tile .sector-hatch {
  position: absolute;
  inset: auto 0 0 auto;
  width: 76px;
  height: 52px;
  opacity: 0.55;
}
.sector-tile h3 { font-size: 0.98rem; font-weight: 500; line-height: 1.35; max-width: 75%; }
.sector-tile .mono-label { font-size: 0.625rem; }

/* ---------- Process ---------- */
.process-list { list-style: none; counter-reset: step; }
.process-step {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 16rem) 1fr;
  gap: 1.25rem 2rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line-dark);
  align-items: baseline;
}
.process-step:last-child { border-bottom: 0; }
.process-step .step-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--concrete);
}
.process-step h3 {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 300;
  letter-spacing: -0.01em;
}
.process-step p { color: var(--concrete); font-size: 0.95rem; max-width: 52ch; }
@media (max-width: 720px) {
  .process-step { grid-template-columns: 3.5rem 1fr; }
  .process-step p { grid-column: 2; }
}

/* ---------- Dark bands ---------- */
.band-dark {
  background: var(--ink);
  color: var(--paper);
}
.band-dark .lede, .band-dark .text-muted { color: var(--concrete); }
.band-dark .rule { border-color: var(--line-dark); }
.band-dark ::selection { background: var(--paper); color: var(--ink); }

/* ---------- Collaborations ---------- */
.collab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}
.collab-card {
  border: 1px solid var(--line);
  padding: 1.9rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 210px;
  background: var(--paper);
}
.band-dark .collab-card { border-color: var(--line-dark); background: transparent; }
.collab-card h3 { font-size: 1.12rem; font-weight: 500; line-height: 1.35; }
.collab-card p { font-size: 0.92rem; color: var(--charcoal); flex: 1; }
.band-dark .collab-card p { color: var(--concrete); }
.collab-card .mono-label { font-size: 0.625rem; }

/* ---------- Insights ---------- */
.insight-list { border-top: 1px solid var(--line); }
.insight-row {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr) minmax(0, 22rem) 8rem;
  gap: 1rem 2rem;
  align-items: baseline;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.insight-row h3 {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  transition: color 200ms ease;
}
.insight-row p { font-size: 0.92rem; color: var(--charcoal); }
.insight-row .insight-status { text-align: right; }
@media (max-width: 860px) {
  .insight-row { grid-template-columns: 1fr; gap: 0.4rem; }
  .insight-row .insight-status { text-align: left; }
}

/* ---------- CTA band ---------- */
.cta-band { text-align: left; }
.cta-band .display-2 { max-width: 16em; }
.cta-band .lede { margin-top: 1.4rem; }
.cta-band .hero-ctas { margin-top: 2.25rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2.3fr));
  gap: 2.5rem;
  padding-bottom: 3rem;
}
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand .brand-mark { width: 56px; height: 56px; margin-bottom: 1.1rem; }
.footer-brand .fb-name { font-family: var(--font-logo); font-weight: 300; letter-spacing: 0.08em; font-size: 1.1rem; }
.footer-brand .fb-desc {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--concrete);
  margin-top: 0.4rem;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: grid; gap: 0.55rem; }
.footer-col a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--concrete);
  transition: color 200ms ease;
}
.footer-col a:hover { color: var(--paper); }
.footer-col li { font-size: 0.92rem; color: var(--concrete); }

.footer-base {
  border-top: 1px solid var(--line-dark);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--stone);
}
.footer-base a { color: var(--stone); text-decoration: none; }
.footer-base a:hover { color: var(--paper); }

/* ---------- Case study ---------- */
.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 7.5fr) minmax(0, 4.5fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 900px) { .case-layout { grid-template-columns: 1fr; } }

.case-facts {
  position: sticky;
  top: 100px;
  border: 1px solid var(--line);
  padding: 1.6rem 1.5rem;
  background: var(--paper);
}
@media (max-width: 900px) { .case-facts { position: static; } }
.case-facts dl { margin: 0; }
.case-facts dt {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  padding-top: 0.9rem;
}
.case-facts dt:first-child { padding-top: 0; }
.case-facts dd {
  margin: 0.25rem 0 0.9rem;
  font-size: 0.95rem;
  color: var(--charcoal);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.9rem;
}
.case-facts dd:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }

.case-section { margin-bottom: clamp(2rem, 4vw, 3rem); }
.case-section h2 {
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 0.9rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}
.case-section p { max-width: 68ch; }
.case-section .placeholder-note {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--stone);
  border: 1px dashed var(--concrete);
  padding: 1rem 1.2rem;
  max-width: 46rem;
}

.case-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 640px) { .case-gallery { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.timeline { list-style: none; border-top: 1px solid var(--line); }
.timeline li {
  display: grid;
  grid-template-columns: 9rem minmax(0, 20rem) 1fr;
  gap: 0.75rem 2rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.timeline .tl-years {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--stone);
  white-space: nowrap;
}
.timeline h3 { font-size: 1.05rem; font-weight: 500; }
.timeline .tl-org { display: block; font-weight: 400; color: var(--charcoal); font-size: 0.92rem; margin-top: 0.2rem; }
.timeline p { font-size: 0.92rem; color: var(--charcoal); max-width: 52ch; }
@media (max-width: 820px) {
  .timeline li { grid-template-columns: 1fr; gap: 0.35rem; }
}

.expertise-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}
.expertise-list li {
  padding: 0.9rem 0.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--charcoal);
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}
.expertise-list .idx {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--stone);
}

.portrait-frame {
  border: 1px solid var(--charcoal);
  aspect-ratio: 3 / 3.6;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait-note {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--stone);
}

/* ---------- Contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4.5fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem 1.5rem;
}
.form-field.wide { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}
.form-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}
.form-field .optional { color: var(--stone); text-transform: none; letter-spacing: 0.04em; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-size: 16px; /* iOS zoom guard */
  padding: 0.8rem 0.9rem;
  background: var(--paper);
  border: 1px solid var(--concrete);
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 200ms ease;
  min-height: 44px;
  color: var(--ink);
}
.form-field select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%232E2C28'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.2rem;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--ink);
  outline: none;
}
.form-field textarea { min-height: 150px; resize: vertical; }
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--stone); }

.form-note {
  font-size: 0.85rem;
  color: var(--stone);
  margin-top: 1rem;
}
.form-status {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--charcoal);
}
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact-direct { border: 1px solid var(--line); padding: 1.75rem 1.5rem; }
.contact-direct h3 { font-size: 1.05rem; font-weight: 500; margin-bottom: 1.25rem; }
.contact-direct ul { list-style: none; display: grid; }
.contact-direct li { border-bottom: 1px solid var(--line); }
.contact-direct li:last-child { border-bottom: 0; }
.contact-direct a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.9rem 0.1rem;
  text-decoration: none;
  transition: background-color 200ms ease;
}
.contact-direct a:hover { background: var(--paper-2); }
.contact-direct .cd-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
}
.contact-direct .cd-value { font-size: 0.95rem; color: var(--ink); text-align: right; word-break: break-word; }

/* ---------- Breadcrumb ---------- */
.crumb {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.crumb a { color: inherit; text-decoration: none; }
.crumb a:hover { color: var(--ink); }

/* ---------- Utility ---------- */
.stack-lg > * + * { margin-top: clamp(2.5rem, 5vw, 4rem); }
.mt-1 { margin-top: 0.75rem; }
.mt-2 { margin-top: 1.5rem; }
.mt-3 { margin-top: 2.5rem; }
.mb-2 { margin-bottom: 1.5rem; }
.center-note {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--stone);
}

/* ---------- Mobile hygiene (kept last so it wins the cascade) ---------- */
@media (max-width: 720px) {
  .section-head { flex-wrap: wrap; row-gap: 0.5rem; }
  .section-head .sheet-code { display: none; }
  .sector-tile .sector-hatch { width: 56px; height: 36px; opacity: 0.4; }
}
