/* ============================================================
   City Door and Hardware — site styles
   Palette: crimson / black / warm neutrals (brand continuity)
   Type: Big Shoulders (display) + Public Sans (body)
   ============================================================ */

:root {
  --red: #8b0000;
  --red-bright: #cb2026; /* sampled from the official logo */
  --red-hot: #e13a42;
  --ink: #141414;
  --ink-soft: #1d1d1d;
  --paper: #f6f4f1;
  --paper-card: #ffffff;
  --line: #dcd8d2;
  --line-dark: #2e2c2c;
  --gray: #55524e;
  --gray-light: #b9b4ad;
  --focus: #1a6fb5;

  --font-display: "Big Shoulders", "Arial Narrow", sans-serif;
  --font-body: "Public Sans", "Helvetica Neue", Arial, sans-serif;

  --container: 72rem;
  --header-h: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--red); }
a:hover { color: var(--red-hot); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 6px 6px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; color: #fff; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

abbr[title] {
  text-decoration: underline dotted;
  text-underline-offset: 0.2em;
  cursor: help;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn:active { transform: translateY(1px); }

.btn-solid {
  background: var(--red-bright);
  color: #fff;
  border-color: var(--red-bright);
}
.btn-solid:hover { background: var(--red-hot); border-color: var(--red-hot); color: #fff; }

.btn-nav { padding: 0.55rem 1.1rem; font-size: 0.95rem; }
.nav-cta-item { margin-left: 0.75rem; }

.hero-ctas { margin-top: 2.25rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: #fff;
  border-bottom: 3px solid var(--red-bright);
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(0 0 0 / 0.35); }

.header-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #fff;
}
.brand:hover { color: #fff; }
.brand:hover .brand-mark { transform: scale(1.06); }

.brand-mark {
  width: auto;
  height: 2.1rem;
  flex: none;
  transition: transform 0.2s ease;
}

.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.brand-sub {
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: lowercase;
  color: var(--gray-light);
  margin-top: 0.28rem;
  padding-top: 0.28rem;
  border-top: 1px solid currentColor;
}

/* Nav */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
}

.nav-link {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  color: #e8e5e1;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 3px;
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.25rem;
  height: 2px;
  background: var(--red-hot);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-link:hover { color: #fff; }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: #fff; }

/* Hamburger (hidden on desktop) */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  color: #fff;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
}
.nav-toggle-box {
  position: relative;
  width: 20px;
  height: 14px;
  display: inline-block;
}
.nav-toggle-line,
.nav-toggle-box::before,
.nav-toggle-box::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: #fff;
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}
.nav-toggle-box::before { top: 0; }
.nav-toggle-line { top: 6px; }
.nav-toggle-box::after { top: 12px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-box::before { top: 6px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-line { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-box::after { top: 6px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, #fffdfa 0%, var(--paper) 100%);
  color: var(--ink);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

/* ---- Photo hero ----
   Two different photos, not one photo two ways: mobile gets a portrait 4:3 crop
   (Bay Bridge + downtown) that survives a tall narrow viewport, desktop gets the
   16:9 Golden Gate shot. A single 16:9 file cropped to portrait loses its subject,
   which is why this is split by breakpoint rather than by background-position. */
.hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url('../images/hero-sf-mobile.jpg') center bottom / cover no-repeat;
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  /* vertical on mobile: darkest where the copy sits, opening up over the water */
  /* measured against the photo: this is the lightest gradient that still keeps
     body text at WCAG AA (4.5:1). Any lighter and the copy fails. */
  background: linear-gradient(180deg,
    rgba(14 13 13 / 0.84) 0%,
    rgba(14 13 13 / 0.76) 48%,
    rgba(14 13 13 / 0.34) 100%);
}
.hero-photo .hero-inner,
.hero-photo .hero-strip { position: relative; z-index: 1; }
.hero-photo .hero-doors { display: none; }   /* watermark redundant over a photo */

.hero-photo .hero-kicker { color: var(--red-hot); }
.hero-photo .hero-title span:first-child { color: #cfcbc7; }
.hero-photo .hero-title-big,
.hero-photo .hero-tagline { color: #fff; }
.hero-photo .hero-copy { color: #efedea; }   /* brighter, so the gradient can be lighter */

@media (min-width: 52.0625rem) {
  .hero-photo::before {
    background-image: url('../images/hero-sf.jpg');
    background-position: center 42%;
  }
  .hero-photo::after {
    background: linear-gradient(90deg,
      rgba(14 13 13 / 0.93) 0%,
      rgba(14 13 13 / 0.78) 45%,
      rgba(14 13 13 / 0.30) 100%);
  }
}

/* oversized watermark of the door mark */
.hero-doors {
  position: absolute;
  right: -6rem;
  top: 50%;
  transform: translateY(-58%) rotate(6deg);
  width: min(34rem, 55vw);
  height: auto;
  opacity: 0.07;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(4.5rem, 12vh, 8.5rem) 1.25rem clamp(4rem, 10vh, 7rem);
}

.hero-kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--red-hot);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
  color: var(--gray);
}
.hero-title-big {
  font-weight: 800;
  font-size: clamp(3.2rem, 8.5vw, 6.2rem);
  letter-spacing: 0.01em;
  color: var(--ink);
}
.accent-dot { color: var(--red-hot); }

.hero-tagline {
  margin-top: 1.5rem;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 600;
  max-width: 34ch;
  line-height: 1.35;
}

.hero-copy {
  margin-top: 1rem;
  max-width: 56ch;
  color: var(--gray);
}

/* static capability strip */
.hero-strip {
  position: relative;
  border-top: 1px solid var(--line);
  background: #fffdfa;
  padding-block: 1rem;
}
.hero-strip-track {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2.2rem;
}
.hero-strip-track span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray);
  white-space: nowrap;
}
.hero-strip-track span:not(:last-child)::after {
  content: "◆";
  color: var(--red-bright);
  margin-left: 2.2rem;
  font-size: 0.6em;
  vertical-align: middle;
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 9vh, 6.5rem); }

.section-dark {
  background: var(--ink);
  color: #eceae7;
}
.section-dark .section-title { color: #fff; }

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 5vh, 3.5rem); }
/* for headings too long to sit on one line at the default measure */
.section-head-wide { max-width: 54rem; }

.section-kicker {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--red-bright);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.section-dark .section-kicker { color: var(--red-hot); }

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  text-wrap: balance; /* keeps orphans off the last line when it does wrap */
}

.section-sub { margin-top: 0.9rem; color: var(--gray); }
.section-dark .section-sub { color: var(--gray-light); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.lede { font-size: 1.2rem; font-weight: 500; line-height: 1.55; }
.about-copy p + p { margin-top: 1rem; }

.check-list {
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}
.check-list li {
  padding-left: 1.7rem;
  position: relative;
  font-weight: 500;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 0.85rem;
  height: 0.45rem;
  border-left: 3px solid var(--red-bright);
  border-bottom: 3px solid var(--red-bright);
  transform: rotate(-45deg);
}

.about-facts { display: grid; gap: 1rem; }

.fact-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink);
  padding: 1.4rem 1.5rem;
  border-radius: 4px;
}
.fact-card-red { border-left-color: var(--red-bright); }
.fact-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.fact-card p { color: var(--gray); font-size: 0.97rem; }

.cert-banner {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--ink);
  color: #f0edea;
  border-radius: 4px;
  padding: 1.6rem 2rem;
  border-left: 5px solid var(--red-bright);
}
.cert-mark {
  width: auto;
  height: 3.1rem;
  flex: none;
  color: var(--red-bright);
}
.cert-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.cert-banner p { color: #cfc9c2; font-size: 0.98rem; max-width: 62ch; }
.cert-banner strong { color: #fff; }

.team-block { margin-top: clamp(2.5rem, 6vh, 4rem); }
.team-heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.team-sub { margin-top: 0.4rem; color: var(--gray); max-width: 52ch; }
.team-grid {
  list-style: none;
  padding: 0;
  margin-top: 1.25rem;
  display: grid;
  /* auto-fit so the row reflows as people are added/removed rather than
     needing a hard column count each time */
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 1rem;
}
.team-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red-bright);
  border-radius: 4px;
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.team-photo {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 1px var(--line);
  margin-bottom: 0.9rem;
}
.team-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.team-role {
  color: var(--gray);
  font-size: 0.85rem;
  letter-spacing: 0.07em; /* long titles wrap badly at wider tracking */
  text-transform: uppercase;
  line-height: 1.35;
}

.stat-row {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 2px solid var(--ink);
}
.stat {
  padding: 1.25rem 1rem 0.25rem;
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: none; padding-left: 0; }
.stat dt {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
}
.stat dd {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  color: var(--red-bright);
}

/* ---------- Certifications & affiliations ---------- */
/* white panel, not the section's paper tone — the logos ship with white
   backgrounds, so on #f6f4f1 each one reads as a visible white rectangle.
   Matching the panel to the artwork makes them look cut out. */
.certs {
  margin-top: clamp(2rem, 5vh, 3rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(1.4rem, 3.5vw, 2.25rem);
}
.certs-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 1.25rem;
}
.certs-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
  align-items: start;
}
.cert {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
}
/* logos arrive at wildly different aspect ratios — cap the box, not the file,
   so they optically match instead of one dwarfing the rest */
.cert img {
  height: 3.5rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.cert span {
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--gray);
}

/* ---------- Products ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1rem;
}

.product-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.4rem 1.4rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--red-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0 0 0 / 0.08); }
.product-card:hover::before { transform: scaleX(1); }

.product-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.brand-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.brand-list li {
  font-size: 0.83rem;
  color: var(--gray);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.22rem 0.6rem;
  border-radius: 99px;
  white-space: nowrap;
}

.product-note { color: var(--gray); font-size: 0.95rem; }

/* ---------- Services ---------- */
.service-list {
  list-style: none;
  padding: 0;
  counter-reset: svc;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 2px solid var(--ink);
  border-left: 2px solid var(--ink);
}
.service-item {
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: 1.5rem 1.25rem 1.75rem;
  background: var(--paper-card);
  transition: background 0.2s ease;
}
.service-item:hover { background: #fdf3f2; }
.service-index {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--line);
  line-height: 1;
  margin-bottom: 0.6rem;
  transition: color 0.2s ease;
}
.service-item:hover .service-index { color: var(--red-bright); }
.service-item h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.15;
}

.keying-banner {
  margin-top: 2rem;
  background: var(--red);
  background: linear-gradient(120deg, var(--red) 0%, var(--red-bright) 100%);
  color: #fff;
  border-radius: 4px;
  padding: 1.6rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2.5rem;
}
.keying-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.keying-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  font-weight: 600;
}
.keying-list li {
  position: relative;
  padding-left: 1.1rem;
}
.keying-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 0.5rem;
  height: 0.5rem;
  background: #fff;
  transform: rotate(45deg);
}

/* ---------- Projects ---------- */
.project-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
  gap: 1rem;
}

.project-card {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background: var(--ink-soft);
  border: 1px solid var(--line-dark);
}
.project-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.92);
  transition: transform 0.35s ease, filter 0.35s ease;
}
.project-card:hover img { transform: scale(1.05); filter: saturate(1.05); }

.project-caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 1.4rem 0.9rem 0.7rem;
  background: linear-gradient(transparent, rgba(10 8 8 / 0.88));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.project-caption::before {
  content: "";
  display: block;
  width: 1.6rem;
  height: 3px;
  background: var(--red-hot);
  margin-bottom: 0.35rem;
  transition: width 0.25s ease;
}
.project-card:hover .project-caption::before { width: 2.6rem; }

/* ---- Projects: subheads between the three tiers ---- */
.projects-subhead {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: clamp(3rem, 7vh, 4.5rem);
  padding-top: 1.5rem;
  border-top: 2px solid var(--line-dark);
}
.projects-note { color: var(--gray-light); margin-top: 0.4rem; }

/* ---- Recent work: equal-weight cards, replaces stacked full-width blocks ---- */
.work-grid {
  list-style: none;
  padding: 0;
  margin-top: 1.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}
.work-card { display: flex; flex-direction: column; }
.work-figure {
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.work-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}
/* credits stay on one line so the cards keep an even rhythm */
.work-figure .img-credit {
  font-size: 0.68rem;
  padding: 0.35rem 0.6rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.work-kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red-hot);
}
.work-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.15;
  margin-top: 0.35rem;
}
.work-sub { color: var(--gray-light); font-size: 0.95rem; margin-top: 0.3rem; }
.work-copy { color: var(--gray-light); margin-top: 0.7rem; }

/* archive tiles sit smaller than the recent work above them */
.project-grid-sm { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
.project-grid-sm .project-caption { font-size: 0.82rem; padding: 1.1rem 0.7rem 0.55rem; }

/* ---- SFO feature: the flagship, and the only full-bleed element on the page ----
   It breaks out of .container so the banner runs edge to edge, then fades into the
   dark section above and below so it dissolves into the page instead of ending on
   a hard line. `overflow-x: clip` on the section contains the 100vw breakout so a
   classic scrollbar can't cause horizontal overflow. */
.section-dark { overflow-x: clip; }

.sfo-block.sfo-feature {
  /* its own darker full-bleed band, so the feature reads as a contained zone
     rather than flowing straight into the Recent work below */
  background: #0c0c0c;
  border: 0;
  border-block: 1px solid #333030;
  padding: clamp(2.5rem, 6vh, 4rem) 0 clamp(3rem, 7vh, 4.5rem);
  border-radius: 0;
  padding-inline: 0;
  margin-inline: calc(50% - 50vw);
  width: 100vw;
  max-width: 100vw;
}
/* everything except the banner returns to the normal measure */
.sfo-block.sfo-feature > *:not(.sfo-banner) {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
/* "SPOTLIGHT" is a solid red badge sitting on the image — a shape, not a third
   line of red letterspaced text. That's what stops it reading as another
   section header. The image leads; the name follows underneath. */
.sfo-badge {
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: max(1.25rem, calc(50% - (var(--container) / 2) + 1.25rem));
  background: var(--red-bright);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  padding: 0.6rem 1.2rem 0.55rem;
}
/* sentence case — every other heading on the site is uppercase, so this alone
   marks the feature as a different kind of thing. Sits BELOW the section title
   in size so the hierarchy reads parent → child. */
.sfo-block.sfo-feature .sfo-head { margin-top: 1.75rem; }
.sfo-block.sfo-feature .sfo-title {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  text-transform: none;
  letter-spacing: 0;
}

.sfo-block.sfo-feature .sfo-banner {
  position: relative;
  overflow: visible;   /* badge hangs on the bottom edge */
  margin-inline: 0;
  border-radius: 0;
  border: 0;
}
.sfo-block.sfo-feature .sfo-banner img { max-height: 30rem; }
/* soft fade to the section colour: subtle at the top, longer at the bottom so the
   banner melts into the six SFO photos underneath */
.sfo-block.sfo-feature .sfo-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* fades to the BAND colour (#0c0c0c), not the section colour — mismatching
     those leaves a visible seam. Long bottom ramp so the photo bleeds down
     into the six SFO tiles instead of stopping on an edge. */
  background: linear-gradient(to bottom,
    rgb(12 12 12 / 0.9) 0%,
    rgb(12 12 12 / 0) 18%,
    rgb(12 12 12 / 0) 40%,
    rgb(12 12 12 / 0.35) 62%,
    rgb(12 12 12 / 0.8) 84%,
    rgb(12 12 12 / 1) 100%);
}

/* SFO spotlight */
.sfo-block {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  border: 1px solid var(--line-dark);
  border-top: 4px solid var(--red-bright);
  border-radius: 4px;
  background: var(--ink-soft);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.sfo-kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--red-hot);
}
.sfo-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  margin-top: 0.35rem;
}
.sfo-sub { color: var(--gray-light); margin-top: 0.4rem; }

.sfo-banner {
  margin-top: 1.75rem;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line-dark);
}
.sfo-banner img {
  width: 100%;
  max-height: 22rem;
  object-fit: cover;
  display: block;
}
/* for images that lose too much to the 22rem letterbox crop (e.g. aerial renderings) */
.sfo-banner-full img { max-height: none; }

.sfo-photo-grid {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.img-credit {
  padding: 0.5rem 0.9rem;
  font-size: 0.78rem;
  color: var(--gray-light);
  background: rgba(0 0 0 / 0.4);
}
.img-credit a { color: var(--gray-light); }
.img-credit a:hover { color: #fff; }

.sfo-cols {
  margin-top: 1.75rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 2rem;
}
.sfo-col h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-hot);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line-dark);
  margin-bottom: 0.75rem;
}
.sfo-col ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.sfo-copy {
  margin-top: 1.25rem;
  color: #d8d3cd;
  max-width: 70ch;
}

.sfo-facts {
  list-style: none;
  padding: 0;
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem 2.5rem;
}

.sfo-col li,
.sfo-facts li {
  font-size: 0.95rem;
  color: #d8d3cd;
  padding-left: 1.1rem;
  position: relative;
}
.sfo-col li::before,
.sfo-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.4rem;
  height: 0.4rem;
  background: var(--red);
  transform: rotate(45deg);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.contact-logo {
  max-width: 18rem;
  height: auto;
  margin-bottom: 1.75rem;
}

.contact-block { font-style: normal; }
.contact-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red-bright);
  margin-top: 1.25rem;
  margin-bottom: 0.25rem;
}
.contact-label:first-child { margin-top: 0; }
.contact-block p { font-size: 1.05rem; }
.contact-block a { font-weight: 600; text-decoration: none; }
.contact-block a:hover { text-decoration: underline; }
.contact-fax { color: var(--gray); font-size: 0.95rem; }

.map-wrap {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--line);
}
.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0e0d0d;
  color: var(--gray-light);
  padding-block: 2.75rem;
  border-top: 3px solid var(--red-bright);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
.brand-footer .brand-name { color: #fff; }
.footer-line a { color: #e8e5e1; text-decoration: none; }
.footer-line a:hover { color: #fff; text-decoration: underline; }
.footer-copy { font-size: 0.85rem; color: #7c7770; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.26s; }
.d4 { transition-delay: 0.34s; }
.d5 { transition-delay: 0.44s; }

/* no-JS fallback: everything visible */
.no-observer .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 64rem) {
  .service-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 52rem) {
  .nav-toggle { display: inline-flex; }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink);
    border-bottom: 3px solid var(--red-bright);
    padding: 0.5rem 1.25rem 1.25rem;
    display: none;
    box-shadow: 0 18px 30px rgba(0 0 0 / 0.4);
  }
  .nav-menu.is-open { display: flex; }

  .nav-link { display: block; padding: 0.85rem 0.5rem; font-size: 1.05rem; border-bottom: 1px solid var(--line-dark); }
  .nav-link::after { display: none; }
  .nav-link.is-active { color: var(--red-hot); }
  .nav-cta-item { margin: 1rem 0 0; }
  .btn-nav { display: block; text-align: center; }

  /* the desktop hero padding (12vh/10vh) leaves ~180px of dead space on a phone */
  .hero-inner { padding-block: clamp(2.25rem, 6vh, 3.5rem) clamp(1.75rem, 5vh, 3rem); }

  /* On phones the centred flex-wrap breaks at ragged widths and strands the ◆
     separators at line ends. Switch to a tidy two-column grid and drop the ◆. */
  .hero-strip-track {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 1rem;
    justify-content: stretch;
  }
  .hero-strip-track span {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    white-space: normal;
    line-height: 1.25;
  }
  .hero-strip-track span:not(:last-child)::after { content: none; }

  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }

  /* 4 team members read better two-up than stacked, even on a phone */
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .sfo-cols { grid-template-columns: 1fr; }
  .cert-banner { flex-direction: column; align-items: flex-start; }
  .sfo-photo-grid { grid-template-columns: repeat(2, 1fr); }
  .sfo-facts { grid-template-columns: 1fr; }

  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(odd) { border-left: none; padding-left: 0; }
  .stat { padding-top: 1rem; }
}

@media (max-width: 34rem) {
  .service-list { grid-template-columns: 1fr; }
  .hero-doors { right: -8rem; opacity: 0.05; }
  /* 10rem tiles + gap need 336px but a 375px phone gives the container 335px —
     one pixel short, so the archive collapsed to a single column and ran 16 rows
     deep. 9rem guarantees two across. */
  .project-grid { grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); }
  .project-grid-sm { grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); }
  /* SFO is the flagship — give its photos full width on a phone, matching the
     one-per-row Recent work cards. Desktop keeps 3-across. */
  .sfo-photo-grid { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .product-card, .project-card img, .brand-mark { transition: none; }
}
