/* ---------- Tokens ---------- */
:root {
  --navy-deep: #121826;
  --navy: #1f2a44;
  --blue: #3f5170;
  --paper: #f6f4ee;
  --paper-dim: #ece9e0;
  --ink: #15181f;
  --ink-soft: rgba(21, 24, 31, 0.62);
  --white: #ffffff;
  --white-soft: rgba(255, 255, 255, 0.7);
  --white-faint: rgba(255, 255, 255, 0.42);
  --line-on-dark: rgba(255, 255, 255, 0.14);
  --line-on-light: rgba(21, 24, 31, 0.12);
  --cyan: #8fb2d1;

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --section-pad: clamp(56px, 6.5vw, 96px);
  --gutter: clamp(20px, 5vw, 64px);
  --container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  /* The slow practice-area strip keeps looping (pauses on hover) even with reduced motion. */
  .ticker-track { animation-duration: var(--ticker-duration, 32s) !important; animation-iteration-count: infinite !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 500;
}

h1, h2, h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 600;
  margin: 0;
  line-height: 1.04;
  letter-spacing: 0.005em;
}

/* ---------- Blueprint grid background ---------- */
.grid-bg-dark {
  background-color: var(--navy);
  background-image:
    linear-gradient(var(--line-on-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-on-dark) 1px, transparent 1px);
  background-size: 48px 48px;
}
.grid-bg-light {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--line-on-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-on-light) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ---------- Nav ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  background: transparent;
  transition: background-color 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}
.site-nav.scrolled {
  background: rgba(18, 24, 38, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08);
  padding-top: 12px;
  padding-bottom: 12px;
}
.nav-brand { display: flex; align-items: center; }
/* The real logo files: white over the photo, navy once the bar turns light. */
.brand-set { display: flex; align-items: center; gap: 12px; }
.brand-set img { width: auto; }
.brand-icon { height: 44px; }
.brand-word { height: 41px; }
.brand-dark { display: none; }
.site-nav.scrolled .brand-light { display: none; }
.site-nav.scrolled .brand-dark { display: flex; }
@media (max-width: 760px) { .brand-icon { height: 36px; } .brand-word { height: 34px; } }
.nav-links {
  display: flex;
  gap: clamp(16px, 3vw, 36px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--white-soft);
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--white); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 6px;
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    inset: 0 0 auto 0;
    top: 0;
    flex-direction: column;
    background: var(--navy-deep);
    padding: 100px 32px 40px;
    gap: 26px;
    transform: translateY(-100%);
    transition: transform 0.4s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { font-size: 1.1rem; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--white);
  overflow: hidden;
  padding-top: 120px;
  padding-bottom: 80px;
}
.hero-icon {
  position: absolute;
  right: -6vw;
  top: 50%;
  transform: translateY(-50%);
  width: min(46vw, 560px);
  opacity: 0.08;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; }
.hero .eyebrow { color: var(--cyan); margin-bottom: 22px; display: block; }
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  max-width: 15ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--cyan);
}
.hero-sub {
  margin-top: 28px;
  max-width: 56ch;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--white-soft);
}
.hero-cta {
  margin-top: 44px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.btn {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  padding: 15px 30px;
  border-radius: 2px;
  border: 1px solid var(--white);
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
  display: inline-block;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--white); color: var(--navy); }
.btn-solid:hover { background: var(--cyan); border-color: var(--cyan); }
.btn-outline { color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.1); }


/* ---------- Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}
[data-reveal].in-view { will-change: auto; }
[data-reveal].in-view { opacity: 1; transform: translateY(0); }
[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.22s; }
[data-reveal-delay="3"] { transition-delay: 0.34s; }

/* ---------- Statement section ---------- */
.statement {
  background: var(--navy);
  color: var(--white);
  padding: var(--section-pad) 0;
}
.statement-line {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(1.5rem, 4vw, 2.7rem);
  line-height: 1.35;
  max-width: 22ch;
  color: var(--white-faint);
  padding: 10px 0;
}
.statement-line strong {
  color: var(--white);
  font-weight: 600;
}
.statement-line + .statement-line { margin-top: clamp(24px, 4vw, 48px); }

/* ---------- Ticker ---------- */
.ticker-wrap {
  background: var(--paper-dim);
  border-top: 1px solid var(--line-on-light);
  border-bottom: 1px solid var(--line-on-light);
  overflow: hidden;
  padding: 22px 0;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker var(--ticker-duration, 32s) linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  letter-spacing: 0.02em;
  color: var(--navy);
  padding: 0 28px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 28px;
}
.ticker-item::after { content: "\2014"; color: var(--cyan); }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Section shared ---------- */
.section { padding: var(--section-pad) 0; }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head .eyebrow { color: var(--blue); margin-bottom: 16px; }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.section-head p { margin-top: 20px; font-size: 1.05rem; color: var(--ink-soft); max-width: 60ch; }

.section-dark { background: var(--navy-deep); color: var(--white); }
.section-dark .section-head .eyebrow { color: var(--cyan); }
.section-dark .section-head p { color: var(--white-soft); }

/* ---------- Featured project ---------- */
.project-card {
  border: 1px solid var(--line-on-dark);
  padding: clamp(28px, 5vw, 56px);
  position: relative;
}
.project-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-bottom: 22px;
}
.project-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.project-title { font-size: clamp(1.9rem, 4vw, 3.2rem); }
.project-location { margin-top: 10px; color: var(--white-soft); font-size: 1.05rem; }

.project-stats {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 28px;
  border-top: 1px solid var(--line-on-dark);
  padding-top: 32px;
}
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--white);
}
.stat .label {
  margin-top: 6px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white-faint);
}
.project-desc {
  margin-top: 40px;
  max-width: 70ch;
  color: var(--white-soft);
  font-size: 1.05rem;
}
.project-collab {
  margin-top: 24px;
  font-size: 0.92rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-display);
}

/* ---------- Work grid ---------- */
.work-more-label {
  margin-top: clamp(56px, 8vw, 96px);
  margin-bottom: 32px;
  font-size: 1.1rem;
  letter-spacing: 0.14em;
  color: var(--white-faint);
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(24px, 3vw, 40px);
}
.work-card-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line-on-dark);
  background: var(--navy);
}
.work-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
@media (hover: hover) { .work-card:hover .work-card-img img { transform: scale(1.06); } }
.work-card-body { padding-top: 18px; }
.work-tag {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
}
.work-card h3 {
  margin-top: 10px;
  font-size: 1.25rem;
  text-transform: none;
  letter-spacing: 0;
}
.work-loc {
  margin-top: 6px;
  color: var(--white-soft);
  font-size: 0.92rem;
}
.work-stat {
  margin-top: 12px;
  color: var(--white-faint);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-display);
}
.work-desc {
  margin-top: 14px;
  color: var(--white-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ---------- Studio ---------- */
[hidden] { display: none !important; }
.studio-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  column-gap: clamp(32px, 6vw, 90px);
  row-gap: 0;
  align-items: start;
}
/* Heading, headline and paragraphs stack on the left; the logo sits on the paragraphs' row,
   centred vertically against them. */
.studio-text { display: contents; }
.studio-text .section-head { grid-column: 1; grid-row: 1; }
.studio-text .studio-lead { grid-column: 1; grid-row: 2; }
.studio-text .studio-copy { grid-column: 1; grid-row: 3; }
.studio-text > .ed-add { grid-column: 1; grid-row: 4; }
.studio-figure { grid-column: 2; grid-row: 3; align-self: center; }
.studio-text .section-head { margin-bottom: 28px; max-width: none; }
.studio-lead {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  line-height: 1.18;
  color: var(--navy);
  margin: 0 0 32px;
  text-wrap: balance;
}
.studio-copy p { font-size: 1.08rem; color: var(--ink-soft); margin: 0 0 20px; }
.studio-copy p:last-child { margin-bottom: 0; }
/* Logo lockup, centred beside the text. */
.studio-figure { display: flex; flex-direction: column; }
.studio-logo {
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  justify-content: center;
}
.studio-logo img { width: min(74%, 440px); height: auto; }
@media (max-width: 820px) {
  .studio-grid { grid-template-columns: 1fr; }
  .studio-text .section-head, .studio-text .studio-lead, .studio-text .studio-copy, .studio-text > .ed-add { grid-column: 1; grid-row: auto; }
  .studio-figure { grid-column: 1; grid-row: auto; margin-top: 40px; }
}

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line-on-light);
  border-left: 1px solid var(--line-on-light);
}
/* The principal's card has a whole row to itself (the long bio runs in two columns like a newspaper);
   the rest of the team sits underneath, two per row. */
.team-card.wide { grid-column: 1 / -1; }
.team-card.wide .bios { column-count: 2; column-gap: clamp(24px, 3vw, 44px); }
@media (max-width: 640px) {
  .team-grid { grid-template-columns: 1fr; }
  .team-card.wide .bios { column-count: auto; }
}
body.editing .team-card.wide .bios { column-count: 1; }
/* The principal's headshot is large: a portrait on the left, name and bio to its right. */
.team-card.wide.has-photo {
  display: grid; grid-template-columns: minmax(200px, 320px) minmax(0, 1fr);
  column-gap: clamp(28px, 4.5vw, 64px); align-items: start;
}
.team-card.wide.has-photo > .initial.has-photo {
  grid-column: 1; grid-row: 1 / span 4; width: 100%; height: auto; min-height: 320px; align-self: stretch;
  margin-bottom: 0; border-radius: 2px; position: relative;
}
/* The portrait runs the full height of the card, so there is never an empty gap under it. */
.team-card.wide.has-photo > .initial.has-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.team-card.wide.has-photo > .ed-photo-actions { grid-column: 1; grid-row: 5; }
.team-card.wide.has-photo > h3,
.team-card.wide.has-photo > .role,
.team-card.wide.has-photo > .bios { grid-column: 2; }
.team-card.wide.has-photo > h3 { margin-top: 0; }
@media (max-width: 760px) {
  .team-card.wide.has-photo { display: block; }
  .team-card.wide.has-photo > .initial.has-photo { width: min(100%, 300px); min-height: 0; aspect-ratio: 1 / 1; margin-bottom: 24px; }
}
.team-card {
  background: var(--paper);
  border-right: 1px solid var(--line-on-light);
  border-bottom: 1px solid var(--line-on-light);
  padding: clamp(28px, 4vw, 40px);
}
.team-card .initial {
  width: 56px; height: 56px;
  border: 1px solid var(--navy);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
}
.team-card h3 { font-size: 1.3rem; }
.team-card .role {
  margin-top: 6px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
  color: var(--blue);
}
.team-card .bios { margin-top: 18px; }
.team-card p.bio { margin: 0 0 12px; font-size: 0.98rem; color: var(--ink-soft); }
.team-card p.bio:last-child { margin-bottom: 0; }
/* Phones: show a short taste of each bio with a "Read more" button (only if the bio is cut off). */
.bio-toggle { display: none; }
@media (max-width: 640px) {
  .team-card:not(.open) .bios {
    max-height: 8.5rem; overflow: hidden;
    -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent);
  }
  .team-card.can-expand .bio-toggle, .team-card.open .bio-toggle {
    display: inline-block; margin-top: 14px; padding: 6px 0; border: 0; background: none; cursor: pointer;
    font-family: var(--font-body, inherit); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--blue);
    border-bottom: 1px solid currentColor;
  }
}
body.editing .bio-toggle { display: none !important; }
/* ---------- Collaborators ---------- */
.collab {
  background: var(--paper-dim);
  border-top: 1px solid var(--line-on-light);
  padding: clamp(56px, 8vw, 96px) 0;
}
.collab-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(32px, 6vw, 90px);
  align-items: start;
}
.collab-intro .eyebrow { color: var(--blue); display: block; margin-bottom: 16px; }
.collab-intro h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.collab-intro p { margin-top: 20px; color: var(--ink-soft); font-size: 1.02rem; max-width: 46ch; }
.collab-list { padding-top: 36px; }
.collab-item { padding-left: 28px; border-left: 2px solid var(--navy); }
.collab-item + .collab-item { margin-top: 36px; }
.collab-item h3 { font-size: 1.25rem; color: var(--navy); }
.collab-item p { margin-top: 12px; color: var(--ink-soft); font-size: 0.98rem; }
/* Descriptions can contain blank lines (paragraph breaks) typed in the editors. */
.work-desc, .collab-item p, .collab-intro p, .service-row p, .project-desc { white-space: pre-line; }
@media (max-width: 820px) {
  .collab-grid { grid-template-columns: 1fr; }
  .collab-list { padding-top: 0; }
}

/* ---------- Services ---------- */
.services-list { border-top: 1px solid var(--line-on-dark); }
.service-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line-on-dark);
  flex-wrap: wrap;
}
.service-row .num { font-family: var(--font-display); color: var(--cyan); font-size: 0.95rem; }
.service-row h3 { font-size: clamp(1.3rem, 2.6vw, 1.9rem); flex: 1 1 260px; }
.service-row p { margin: 0; max-width: 42ch; color: var(--white-soft); font-size: 0.98rem; flex: 1 1 280px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(32px, 6vw, 90px);
}
.contact-big {
  font-size: clamp(2rem, 5vw, 3.6rem);
  max-width: 14ch;
}
/* Email and phone sit at the bottom of the column, level with the bottom of the map panel. */
.contact-main { display: flex; flex-direction: column; }
.contact-list { margin-top: auto; padding-top: 40px; }
.contact-item {
  display: block;
  padding: 20px 0;
  border-top: 1px solid var(--line-on-light);
  font-size: 1.1rem;
}
.contact-item:last-child { border-bottom: 1px solid var(--line-on-light); }
.contact-item .label {
  display: block;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--blue);
  margin-bottom: 6px;
}
.contact-item a:hover, .contact-item.static:hover { color: var(--blue); }
.contact-side {
  border: 1px solid var(--line-on-light);
  padding: clamp(24px, 4vw, 36px);
  background: var(--paper-dim);
  display: flex; flex-direction: column; align-items: flex-start;
}
/* The map takes up whatever height the left column leaves, so the panel never has an empty gap. */
.contact-map {
  position: relative; display: block; overflow: hidden;
  flex: 1 1 auto; width: 100%; min-height: 240px; margin-top: 24px;
  border: 1px solid var(--line-on-light); background: var(--paper);
}
.contact-map img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
@media (hover: hover) { .contact-map:hover img { transform: scale(1.03); } }
.contact-map-cue {
  position: absolute; top: 10px; right: 10px; padding: 7px 10px; background: rgba(255, 255, 255, 0.92); color: var(--navy);
  font-family: var(--font-body); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
}
.contact-map:hover .contact-map-cue { background: var(--navy); color: #fff; }
/* The picture itself opens Google Maps; the label is shown only in the editor ("Click to replace the map picture"). */
.contact-map-cue { display: none; }
body.editing .contact-map-cue { display: block; }
body.editing .contact-map { cursor: pointer; }
.contact-side .eyebrow { color: var(--blue); }
.contact-side h3 { margin-top: 16px; font-size: 1.4rem; }
.contact-side p { color: var(--ink-soft); margin-top: 14px; font-size: 0.98rem; }
.contact-side .map-link {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--navy);
  border-bottom: 1px solid var(--navy);
  padding-bottom: 2px;
}
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: var(--white-soft);
  padding: 52px 0 34px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line-on-dark);
}
.footer-top img { height: 34px; }
.footer-nav { display: flex; gap: 26px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.footer-nav a { font-family: var(--font-display); text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.08em; }
.footer-bottom {
  margin-top: 26px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.66);
}

/* ---------- Inline editor (only active while body.editing) ---------- */
body.editing { padding-bottom: 96px; }
body.editing [data-reveal] { opacity: 1; transform: none; }
body.editing [data-edit] {
  outline: 1px dashed transparent;
  outline-offset: 3px;
  border-radius: 2px;
  cursor: text;
  transition: outline-color 0.15s, background-color 0.15s;
}
body.editing [data-edit]:hover { outline-color: var(--cyan); }
body.editing [data-edit]:focus {
  outline: 2px solid var(--cyan);
  background: rgba(143, 178, 209, 0.14);
}
body.editing [data-edit]:empty::before { content: "(empty — click to type)"; opacity: 0.5; }
body.editing [data-multi] { display: block; white-space: pre-wrap; }
body.editing [data-item] { position: relative; }
body.editing .ed-ctrl {
  position: absolute; top: 8px; right: 8px; z-index: 30;
  display: flex; gap: 4px; opacity: 0.55; transition: opacity 0.15s;
}
body.editing [data-item]:hover > .ed-ctrl,
body.editing [data-item]:focus-within > .ed-ctrl { opacity: 1; }
.ed-ctrl button {
  font: 600 0.8rem/1 var(--font-body);
  width: 28px; height: 28px; padding: 0;
  background: #fff; color: var(--navy);
  border: 1px solid var(--navy); border-radius: 3px; cursor: pointer;
}
.ed-ctrl button:hover { background: var(--cyan); }
.ed-ctrl .ed-del:hover { background: #c0392b; color: #fff; border-color: #c0392b; }
.ed-add {
  display: block; margin: 24px 0 0;
  font: 600 0.8rem/1 var(--font-display); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 12px 20px; background: #fff; color: var(--navy);
  border: 1px dashed var(--navy); border-radius: 3px; cursor: pointer;
}
.ed-add:hover { background: var(--cyan); }
body.editing .work-card:hover .work-card-img img { transform: none; }
body.editing .work-card-img { cursor: pointer; position: relative; }
body.editing .work-card-img::after {
  content: "Click to replace photo";
  position: absolute; inset: auto 0 0 0; padding: 10px; text-align: center;
  font: 600 0.75rem/1 var(--font-display); letter-spacing: 0.1em; text-transform: uppercase;
  background: rgba(18, 24, 38, 0.8); color: #fff; opacity: 0; transition: opacity 0.15s;
}
body.editing .work-card-img:hover::after { opacity: 1; }
.work-card-empty {
  height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--white-faint); font: 500 0.85rem var(--font-display); letter-spacing: 0.1em; text-transform: uppercase;
}
body.editing .ticker-wrap { overflow: visible; padding: 44px 0 20px; }
body.editing .ticker-track { animation: none; width: auto; flex-wrap: wrap; padding: 0 var(--gutter); row-gap: 28px; }
body.editing .ticker-item { position: relative; }
body.editing .ticker-item .ed-ctrl { top: -34px; right: auto; left: 20px; }
body.editing .ticker-wrap .ed-add { margin: 20px var(--gutter) 0; }

#edBar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 400;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 14px var(--gutter);
  background: var(--navy-deep); color: #fff;
  border-top: 2px solid var(--cyan);
  font: 0.9rem/1.3 var(--font-body);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.25);
}
#edBar .ed-msg strong { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; margin-right: 8px; }
#edBar .ed-hint { flex: 1; color: var(--white-faint); font-size: 0.8rem; min-width: 220px; }
#edBar .ed-btns { display: flex; gap: 10px; }
#edBar button {
  font: 600 0.82rem/1 var(--font-display); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 12px 18px; border-radius: 3px; cursor: pointer;
  background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.5);
}
#edBar button.ed-primary { background: var(--cyan); color: var(--navy-deep); border-color: var(--cyan); }
#edBar button:disabled { opacity: 0.4; cursor: default; }
#edStatus.ed-ok { color: #7fd99a; }
#edStatus.ed-err { color: #ff9b8f; }

#edToast {
  position: fixed; right: 20px; bottom: 104px; z-index: 450; max-width: 360px;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 16px; background: #fff; color: var(--ink);
  border-left: 4px solid var(--cyan); border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  font: 0.88rem/1.4 var(--font-body);
}
#edToast .ed-toast-text { display: flex; flex-direction: column; gap: 4px; }
#edToast strong { font-weight: 600; }
#edToast span { color: var(--ink-soft); font-size: 0.8rem; }
#edToast button {
  flex: none; padding: 10px 14px; cursor: pointer;
  font: 600 0.78rem/1 var(--font-display); letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--navy); color: #fff; border: 0; border-radius: 3px;
}
@media (max-width: 520px) { #edToast { left: 12px; right: 12px; max-width: none; } }

@media print { #edBar, #edToast, .ed-ctrl, .ed-add { display: none !important; } }

/* ==================================================================
   PRINT — a copy for marking up on paper. Not a pixel replica of the
   on-screen site: fixed/scroll-driven layout is normalized and
   backgrounds are simplified to save ink.
   ================================================================== */
@media print {
  @page { size: letter; margin: 0.55in; }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
    animation: none !important;
    transition: none !important;
  }

  body { background: #fff; }

  .site-nav, .hero-icon, .btn { display: none !important; }

  [data-reveal] { opacity: 1 !important; transform: none !important; }

  .grid-bg-dark, .grid-bg-light { background-image: none !important; }

  header.hero {
    min-height: 0;
    padding: 0.3in 0;
  }

  .section { padding: 0.35in 0; }

  .container { padding-left: 0; padding-right: 0; }

  .ticker-wrap { overflow: visible; padding: 12px 0; }
  .ticker-track { width: auto; flex-wrap: wrap; }
  .ticker-item.dup { display: none; }
  .ticker-item::after { content: none; }

  .project-card, .work-card, .team-card, .service-row, .studio-figure {
    page-break-inside: avoid;
  }

  .work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .work-card-img { aspect-ratio: 3 / 2; }

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

  /* Force a fixed column count so a wrapped row never leaves a dangling
     empty grid cell showing the gap background. The grid itself (not
     just each card) needs page-break-inside: avoid, or its gap-line
     background bleeds onto the page its cards fled to. */
  .team-grid { grid-template-columns: repeat(2, 1fr) !important; page-break-inside: avoid; }

  /* Undo the mobile stack/reorder for Studio — at print width that left
     the compass mark alone on one page and the copy alone on the next. */
  .studio-grid { grid-template-columns: 1.7fr 1fr !important; }
  .studio-logo { padding: 20px !important; }
  .studio-logo img { width: 70% !important; }
  .team-card.wide .bios { column-count: 2 !important; }
  .team-card .bios { max-height: none !important; -webkit-mask-image: none !important; mask-image: none !important; }
  .bio-toggle, .contact-map { display: none !important; }
}

/* ==================================================================
   FINAL DESIGN: Gallery
   Light editorial type and colour, full-bleed photo hero, uniform
   three-column project grid.
   ================================================================== */

/* ---------- Light editorial base ---------- */
:root {
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-label: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --paper: #f5f2ec;
  --paper-dim: #ebe7de;
  --paper-white: #fbfaf7;
  --ink: #17191e;
  --ink-soft: rgba(23, 25, 30, 0.66);
  --blue: #3f5170;
  --cyan: #4f78a0;

  /* The "on dark" tokens now describe ink on paper, because every
     section is light. Dark components below re-scope them. */
  --white: #17191e;
  --white-soft: rgba(23, 25, 30, 0.68);
  --white-faint: rgba(23, 25, 30, 0.46);
  --line-on-dark: rgba(23, 25, 30, 0.16);
  --line-on-light: rgba(23, 25, 30, 0.14);
}

/* Dark components keep white-on-navy */
.site-footer, #edBar {
  --white: #ffffff;
  --white-soft: rgba(255, 255, 255, 0.7);
  --white-faint: rgba(255, 255, 255, 0.42);
  --line-on-dark: rgba(255, 255, 255, 0.14);
}
#edBar { --cyan: #8fb2d1; }
#edToast { --ink: #17191e; --ink-soft: rgba(23, 25, 30, 0.62); }

/* ---------- Type ---------- */
h1, h2, h3 {
  text-transform: none;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.02;
}
.eyebrow, .btn, .nav-links a, .nav-brand-text, .project-status, .work-tag, .work-stat,
.stat .label, .team-card .role, .contact-item .label, .studio-figure-cap,
.contact-side .map-link, .work-more-label, .footer-nav a, .service-row .num,
.project-collab, #edBar, #edBar button, .ed-add, .ed-ctrl button, #edToast button,
.work-card-img::after, .work-card-empty, body.editing [data-edit]:empty::before {
  font-family: var(--font-label);
}
.eyebrow { letter-spacing: 0.2em; font-size: 0.7rem; font-weight: 500; }

/* ---------- Nav ---------- */
.nav-links a { font-size: 0.72rem; letter-spacing: 0.16em; }
.site-nav.scrolled {
  background: rgba(245, 242, 236, 0.92);
  box-shadow: 0 1px 0 var(--line-on-light);
}
@media (max-width: 760px) {
  .nav-links { background: var(--paper); }
}

/* ---------- Hero ---------- */
.hero.grid-bg-dark {
  background-color: var(--paper);
  background-image: none;
  color: var(--ink);
}
.hero-icon { filter: invert(1); opacity: 0.04; }
.hero .eyebrow { color: var(--blue); }
.hero h1 {
  font-size: clamp(3.6rem, 10vw, 9rem);
  line-height: 0.95;
  max-width: 14ch;
  font-weight: 500;
}
.hero h1 em {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: var(--blue);
  text-transform: lowercase;
}
.hero h1 em::first-letter { text-transform: uppercase; }
.hero-sub { color: var(--ink-soft); max-width: 52ch; }
.btn { border-radius: 0; border-color: var(--ink); font-size: 0.72rem; letter-spacing: 0.16em; font-weight: 500; }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--blue); border-color: var(--blue); }
.btn-outline { color: var(--ink); }
.btn-outline:hover { background: rgba(23, 25, 30, 0.06); }

/* ---------- Statement ---------- */
.statement {
  background: var(--paper);
  color: var(--ink);
  border-top: 1px solid var(--line-on-light);
}
.statement-line {
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.12;
  text-transform: none;
  max-width: 26ch;
  font-weight: 400;
}
.statement-line strong { color: var(--ink); font-weight: 600; font-style: italic; }

/* ---------- Ticker ---------- */
.ticker-wrap { background: var(--paper-white); border-color: var(--ink); }
.ticker-item {
  text-transform: none;
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  color: var(--ink);
}
.ticker-item::after { content: "\00B7"; color: var(--cyan); font-style: normal; }

/* ---------- Sections ---------- */
.section-dark, #work, #services { background: var(--paper-white); color: var(--ink); }
#studio.grid-bg-light, #contact.grid-bg-light { background-color: var(--paper); background-image: none; }
#team.grid-bg-light { background-color: var(--paper-white); background-image: none; }

.section-head {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 3fr;
  column-gap: clamp(20px, 4vw, 56px);
  border-top: 1px solid var(--ink);
  padding-top: 22px;
}
.section-head .eyebrow { grid-column: 1; grid-row: 1 / span 3; color: var(--blue); margin: 0; padding-top: 14px; }
.section-head h2 { grid-column: 2; font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 500; }
.section-head p { grid-column: 2; color: var(--ink-soft); }
.section-dark .section-head .eyebrow { color: var(--blue); }
.section-dark .section-head p { color: var(--ink-soft); }
@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; }
  .section-head .eyebrow, .section-head h2, .section-head p { grid-column: 1; grid-row: auto; }
  .section-head .eyebrow { margin-bottom: 14px; padding-top: 0; }
}

/* ---------- Work ---------- */
.project-card { border-color: var(--line-on-light); }
.project-status { color: var(--cyan); }
.work-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(48px, 6vw, 88px) clamp(24px, 4vw, 56px);
}
@media (min-width: 821px) { .work-card:nth-child(even) { margin-top: clamp(24px, 6vw, 88px); } }
@media (max-width: 820px) { .work-grid { grid-template-columns: 1fr; } }
.work-card-img { aspect-ratio: 3 / 2; border: 0; background: var(--paper-dim); }
/* The photo fades in a moment after its card, instead of arriving with it. */
.work-card-img img { opacity: 0; transition: opacity 0.9s ease 0.15s, transform 1.2s ease; }
.work-card.in-view .work-card-img img { opacity: 1; }
body.editing .work-card-img img { opacity: 1; transition: transform 1.2s ease; }
@media (hover: hover) { .work-card:hover .work-card-img img { transform: scale(1.03); } }
.work-card-body { padding-top: 20px; }
.work-tag { color: var(--cyan); font-size: 0.68rem; letter-spacing: 0.16em; font-weight: 500; }
.work-card h3 { font-size: clamp(1.9rem, 3vw, 2.5rem); font-weight: 500; margin-top: 12px; }
.work-loc { color: var(--ink); font-size: 0.95rem; }
.work-stat { color: var(--white-faint); font-size: 0.68rem; letter-spacing: 0.14em; }
.work-desc { color: var(--ink-soft); font-size: 0.95rem; max-width: 52ch; }
.work-card-empty { color: var(--white-faint); }

/* ---------- Studio ---------- */
/* Heading, short rule, one clear headline statement, then evenly sized body text. */
#studio .section-head {
  display: block;
  border-top: 0;
  padding-top: 0;
  margin-bottom: 30px;
}
#studio .section-head .eyebrow { display: block; margin: 0 0 14px; padding-top: 0; }
#studio .section-head h2 { font-size: clamp(3rem, 6.4vw, 5.4rem); }
#studio .section-head::after {
  content: "";
  display: block;
  width: 54px;
  height: 2px;
  margin-top: 26px;
  background: var(--cyan);
}
.studio-lead {
  font-family: var(--font-display);
  text-transform: none;
  font-weight: 500;
  font-size: clamp(1.9rem, 3.2vw, 2.9rem);
  line-height: 1.14;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-bottom: 34px;
}
.studio-copy p { color: var(--ink-soft); font-size: 1.08rem; }
.studio-logo { background: transparent; }

/* ---------- Team ---------- */
.team-card { background: transparent; }
.team-card .initial {
  border-radius: 50%;
  border-color: var(--ink);
  color: var(--ink);
  font-style: italic;
  font-size: 1.4rem;
}
.team-card h3 { font-size: 1.9rem; }
.team-card .role { color: var(--blue); font-size: 0.7rem; letter-spacing: 0.16em; }

/* ---------- Collaborators ---------- */
.collab { background: var(--paper-dim); }
.collab-intro .eyebrow { color: var(--blue); }
.collab-intro h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
.collab-item { border-left: 1px solid var(--ink); }
.collab-item h3 { color: var(--ink); font-size: 1.7rem; }

/* ---------- Services ---------- */
.services-list { border-top-color: var(--ink); }
.service-row { padding: 36px 0; }
.service-row .num { color: var(--blue); font-size: 0.72rem; letter-spacing: 0.16em; }
.service-row h3 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }

/* ---------- Contact ---------- */
.contact-big { font-size: clamp(2.8rem, 6.4vw, 5.4rem); max-width: 12ch; font-weight: 500; }
.contact-side { background: var(--paper-dim); }
.contact-side h3 { font-size: 1.9rem; }
.contact-side .map-link { color: var(--ink); border-bottom-color: var(--ink); font-size: 0.7rem; letter-spacing: 0.16em; }
.contact-item { font-size: 1.15rem; }
.contact-item .label { color: var(--blue); letter-spacing: 0.16em; }

/* ---------- Footer stays a dark anchor ---------- */
.site-footer { background: var(--navy-deep); }
.footer-nav a { letter-spacing: 0.14em; }

/* ---------- Gallery ---------- */
/* ---------- Hero with photo ---------- */
.hero.grid-bg-dark {
  background-color: #14171d;
  background-image: none;
  color: #fff;
}
/* Photos sit behind a soft dark veil so the white text always reads. */
.hero-slides { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-slide {
  position: absolute; inset: 0;
  background-color: #14171d;
  background-size: cover;
  background-position: center 45%;
  visibility: hidden;
  will-change: transform;
}
.hero-slide.on { visibility: visible; }
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(14, 18, 28, 0.62) 0%, rgba(14, 18, 28, 0.36) 38%, rgba(14, 18, 28, 0.78) 100%);
}
/* The page-wide reduced-motion rule makes transitions instant; the hero photos still fade. */
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition-duration: 0.8s !important; }
}
/* Rotating photos: swipe/drag sideways, arrows, dots and a pause button. */
.hero.has-slides { touch-action: pan-y; }
.hero.dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.hero-controls { position: absolute; z-index: 3; right: var(--gutter); bottom: 28px; display: flex; align-items: center; gap: 12px; }
.hero-dots { display: flex; align-items: center; }
.hero-dot { position: relative; width: 24px; height: 32px; padding: 0; border: 0; background: transparent; cursor: pointer; transition: width 0.35s ease; }
.hero-dot[aria-current="true"] { width: 52px; }
.hero-dot::before, .hero-dot::after {
  content: ""; box-sizing: border-box; position: absolute; left: 50%; top: 50%; height: 10px; margin-top: -5px; border-radius: 5px;
  width: 10px; margin-left: -5px; transition: width 0.35s ease, margin-left 0.35s ease, background 0.2s ease;
}
.hero-dot::before { border: 1px solid rgba(255, 255, 255, 0.9); background: transparent; }
.hero-dot::after { display: none; }
/* The photo on screen: its dot stretches into a bar that fills up as the next photo gets closer. */
/* One element draws both the outline and the fill: the fill is a background that grows inside the same
   rounded shape (clipped to the padding box, inside the border), so it can never be misaligned or squashed. */
.hero-dot[aria-current="true"]::before {
  width: 40px; margin-left: -20px;
  background: linear-gradient(#fff, #fff) left top / 0% 100% no-repeat, rgba(255, 255, 255, 0.18);
  background-clip: padding-box;
  animation: hero-fill var(--hero-secs, 10s) linear forwards; animation-play-state: paused;
}
.hero.counting .hero-dot[aria-current="true"]::before { animation-play-state: running; }
@keyframes hero-fill { to { background-size: 100% 100%, auto; } }
/* Paused by the visitor: the bar stops filling (it keeps what it has) and blinks gently. */
.hero.paused .hero-dot[aria-current="true"]::before {
  animation: hero-fill var(--hero-secs, 10s) linear forwards paused, hero-blink 1.4s ease-in-out infinite;
}
@keyframes hero-blink { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) {
  .hero.paused .hero-dot[aria-current="true"]::before { animation: hero-fill var(--hero-secs, 10s) linear forwards paused; opacity: 0.6; }
}
/* The arrows stay invisible until the mouse reaches the left or right edge of the hero. */
.hero-arrow {
  position: absolute; z-index: 3; top: 0; bottom: 0;
  width: max(48px, calc(var(--gutter) - 4px)); padding: 0; border: 0; background: transparent; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.hero-arrow::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.65); background: rgba(14, 18, 28, 0.35);
  opacity: 0; transition: opacity 0.25s ease, background 0.2s ease;
}
.hero-arrow svg { position: relative; opacity: 0; transition: opacity 0.25s ease; }
.hero-arrow:hover::before, .hero-arrow:focus-visible::before,
.hero-arrow:hover svg, .hero-arrow:focus-visible svg { opacity: 1; }
.hero-arrow:hover::before { background: rgba(255, 255, 255, 0.22); }
.hero-prev { left: 0; }
.hero-next { right: 0; }
.hero-controls button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hero-arrow:focus-visible { outline: none; }
/* Touch screens (phones, tablets) swipe instead; the arrows are not shown. */
@media (hover: none), (max-width: 760px) { .hero-arrow { display: none; } }
@media (max-width: 760px) { .hero-controls { bottom: 20px; } }
body.editing .hero-controls, body.editing .hero-arrow { display: none; }
.hero-icon { display: none; }
.hero .eyebrow { color: rgba(255, 255, 255, 0.86); }
.hero h1 { color: #fff; }
.hero h1 em { color: #eadfca; }
.hero-sub { color: rgba(255, 255, 255, 0.88); }
.hero .btn-solid { background: #fff; border-color: #fff; color: #17191e; }
.hero .btn-solid:hover { background: #eadfca; border-color: #eadfca; }
.hero .btn-outline { color: #fff; border-color: rgba(255, 255, 255, 0.85); }
.hero .btn-outline:hover { background: rgba(255, 255, 255, 0.14); }

/* Nav sits on the photo until you scroll */
.site-nav:not(.scrolled) .nav-links a:hover { color: #fff; }
.site-nav:not(.scrolled) .nav-links a,
.site-nav:not(.scrolled) .nav-toggle { color: rgba(255, 255, 255, 0.9); }
@media (max-width: 760px) {
  .nav-links a, .site-nav:not(.scrolled) .nav-links a { color: var(--ink); }
}

/* ---------- Uniform project grid ---------- */
/* Three projects per row. A row that is not full (one or two projects) is centred; once a third
   project arrives it lines up with the rows above. */
.work-grid {
  --wg-x: clamp(20px, 2.4vw, 36px);
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(36px, 4vw, 60px) var(--wg-x);
}
.work-grid > .work-card { flex: 0 0 calc((100% - 2 * var(--wg-x)) / 3); max-width: calc((100% - 2 * var(--wg-x)) / 3); min-width: 0; }
@media (min-width: 821px) { .work-card:nth-child(even) { margin-top: 0; } }
@media (max-width: 1000px) {
  .work-grid > .work-card { flex-basis: calc((100% - var(--wg-x)) / 2); max-width: calc((100% - var(--wg-x)) / 2); }
}
@media (max-width: 640px) {
  .work-grid > .work-card { flex-basis: 100%; max-width: 100%; }
}
@media print {
  .work-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
  .work-grid > .work-card { max-width: none; }
}
.work-card-img { aspect-ratio: 4 / 3; }
.work-card h3 { font-size: clamp(1.5rem, 2vw, 1.9rem); }
.work-desc { font-size: 0.9rem; }

/* ---------- Print: plain hero (no photo, dark text) ---------- */
@media print {
  .hero::before, .hero-slides, .hero-controls, .hero-arrow, .ed-hero-panel { display: none !important; }
  .hero.grid-bg-dark { background: #fff !important; color: var(--ink) !important; }
  .hero h1, .hero h1 em, .hero .eyebrow, .hero-sub { color: var(--ink) !important; }
  .site-footer, .site-footer * { color: var(--ink) !important; background: #fff !important; }
}

/* ---------- Footer social links ---------- */
.footer-social { display: flex; gap: 22px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.footer-social:empty { display: none; }
body.editing .footer-social:empty { display: flex; }
.footer-social a {
  font-family: var(--font-label, var(--font-body));
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--white-soft);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.footer-social a:hover { color: var(--white); border-bottom-color: var(--white); }

/* ---------- Editor-only extras ---------- */
.ed-hero-panel {
  position: absolute; z-index: 6; top: 96px; right: var(--gutter);
  width: min(440px, calc(100% - 2 * var(--gutter)));
  padding: 12px; background: #fff; color: #17191e; border: 1px dashed var(--cyan);
}
.ed-hero-secs { margin: 12px 0 0; font: 0.82rem var(--font-body); }
.ed-hero-secs [data-edit] { display: inline-block; min-width: 2.6em; padding: 2px 8px; border: 1px solid var(--line-on-light); }
.ed-panel { background: #fff; color: var(--ink); border-top: 2px dashed var(--cyan); padding: 36px 0 28px; }
.ed-panel h3 { font-size: 1.5rem; margin-bottom: 18px; text-transform: none; }
.ed-panel h3 small { font: 400 0.8rem var(--font-body); color: var(--ink-soft); }
.ed-label { margin: 18px 0 6px; font: 600 0.72rem var(--font-label, var(--font-body)); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.ed-field { display: block; margin: 0 0 6px; padding: 10px 12px; border: 1px solid var(--line-on-light); background: #fff; min-height: 2.6em; word-break: break-word; }
.ed-note { margin: 14px 0 0; font-size: 0.85rem; color: var(--ink-soft); }
.ed-field-row { margin: 18px 0 0; }
.ed-field-row .ed-field { font-size: 0.85rem; }
body.editing .footer-social { flex-direction: column; gap: 10px; }
body.editing .footer-social li { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; padding-right: 110px; }
.ed-social-label { font-weight: 600; min-width: 5em; }
.ed-social-url { color: var(--white-faint); font-size: 0.85rem; word-break: break-all; }
@media print { .ed-panel, .ed-field-row, .footer-social { display: none !important; } }

/* ---------- Project cards: hover backdrop ---------- */
.work-card-img { position: relative; }
.work-card-cue {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 14px;
  background: rgba(14, 18, 28, 0.5); color: #fff;
  font-family: var(--font-label, var(--font-body));
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.72rem; font-weight: 500;
  opacity: 0; transition: opacity 0.25s ease;
}
.work-card[data-slug]:hover .work-card-cue, .work-card[data-slug]:focus-within .work-card-cue { opacity: 1; }
.work-card h3 a { color: inherit; }
.work-card h3 a:hover { color: var(--blue); }
.work-card[data-slug] .work-card-img, .work-card[data-slug] h3 { cursor: pointer; }
/* Touch screens have no hover, so a small label sits at the bottom of the photo. */
@media (hover: none) {
  .work-card-cue { opacity: 1; background: linear-gradient(transparent 55%, rgba(14, 18, 28, 0.62)); align-items: flex-end; justify-content: flex-start; }
}

/* ---------- Project viewer ---------- */
body.pm-open { overflow: hidden; }
.pm {
  position: fixed; inset: 0; z-index: 300;
  display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr);
  background: var(--paper-white, #fbfaf7); color: var(--ink);
  animation: pmIn 0.25s ease;
}
@keyframes pmIn { from { opacity: 0; } to { opacity: 1; } }
.pm-close {
  position: absolute; top: 14px; right: 18px; z-index: 5;
  width: 44px; height: 44px; border-radius: 50%; padding: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: var(--paper-white, #fbfaf7); color: var(--ink);
  border: 1px solid var(--line-on-light);
}
.pm-close:hover { background: var(--ink); color: var(--paper-white, #fbfaf7); }
.pm-left { display: flex; flex-direction: column; min-width: 0; min-height: 0; max-width: 100%; background: #101216; }
.pm-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.pm-figure { margin: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: clamp(14px, 3vw, 40px); gap: 14px; }
.pm-imgbox { position: relative; display: flex; max-width: 100%; max-height: 100%; min-height: 0; flex: 0 1 auto; }
.pm-imgbox::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 72px; background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5)); pointer-events: none; }
.pm-img { max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; flex: 0 1 auto; opacity: 1; transition: opacity 0.4s ease; }
.pm-img.pm-fade { opacity: 0; transition-duration: 0.28s; }
.pm-bg { display: none; }
.pm-cap { color: rgba(255, 255, 255, 0.78); font: 0.9rem/1.4 var(--font-body); text-align: center; max-width: 70ch; }
/* The arrows stay invisible until the mouse reaches the left or right edge of the photo (touch screens swipe instead). */
.pm-nav {
  position: absolute; top: 0; bottom: 0; z-index: 2; width: 72px; padding: 0; border: 0; background: transparent; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.pm-nav::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.65); background: rgba(14, 18, 28, 0.35); opacity: 0; transition: opacity 0.25s ease, background 0.2s ease;
}
.pm-nav svg { position: relative; opacity: 0; transition: opacity 0.25s ease; }
.pm-nav:hover::before, .pm-nav:focus-visible::before, .pm-nav:hover svg, .pm-nav:focus-visible svg { opacity: 1; }
.pm-nav:hover::before { background: rgba(255, 255, 255, 0.22); }
.pm-nav[hidden] { display: none; }
.pm-prev { left: 0; }
.pm-next { right: 0; }
@media (hover: none), (max-width: 760px) { .pm-nav { display: none; } }
.pm-meta { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 2; display: flex; align-items: center; }
/* Dots like the home page's: the current photo's dot is a bar that fills as the next photo gets closer;
   click it to pause or play. Hidden labels for the other dots are the buttons' aria-labels. */
.pm-dots { display: flex; align-items: center; }
.pm-dots[hidden] { display: none; }
.pm-dot { position: relative; width: 24px; height: 34px; padding: 0; border: 0; background: transparent; cursor: pointer; transition: width 0.35s ease; }
.pm-dot[aria-current="true"] { width: 52px; }
.pm-dot::before, .pm-dot::after {
  content: ""; box-sizing: border-box; position: absolute; left: 50%; top: 50%; height: 10px; width: 10px; margin: -5px 0 0 -5px; border-radius: 5px;
  transition: width 0.35s ease, margin-left 0.35s ease, background 0.2s ease;
}
.pm-dot::before { border: 1px solid rgba(255, 255, 255, 0.9); background: transparent; }
.pm-dot::after { display: none; }
.pm-dot[aria-current="true"]::before {
  width: 40px; margin-left: -20px;
  background: linear-gradient(#fff, #fff) left top / 0% 100% no-repeat, rgba(255, 255, 255, 0.18);
  background-clip: padding-box;
  animation: pm-fill var(--pm-secs, 5s) linear forwards; animation-play-state: paused;
}
.pm-dots.counting .pm-dot[aria-current="true"]::before { animation-play-state: running; }
@keyframes pm-fill { to { background-size: 100% 100%, auto; } }
.pm-dots.paused .pm-dot[aria-current="true"]::before {
  animation: pm-fill var(--pm-secs, 5s) linear forwards paused, pm-blink 1.4s ease-in-out infinite;
}
@keyframes pm-blink { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) {
  .pm-dots.paused .pm-dot[aria-current="true"]::before { animation: pm-fill var(--pm-secs, 5s) linear forwards paused; opacity: 0.6; }
}
/* The photo counter stays for screen readers only. */
.pm-count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pm-info { overflow-y: auto; padding: clamp(28px, 4vw, 56px); padding-top: 72px; }
.pm-status { display: block; font: 500 0.7rem var(--font-label, var(--font-body)); letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); }
.pm-title { margin-top: 14px; font-size: clamp(2rem, 3.4vw, 3rem); text-transform: none; }
.pm-loc { margin: 10px 0 0; font-size: 1.05rem; }
.pm-stat { margin: 6px 0 0; font: 500 0.7rem var(--font-label, var(--font-body)); letter-spacing: 0.14em; text-transform: uppercase; color: var(--white-faint); }
.pm-desc { margin: 26px 0 0; color: var(--ink-soft); white-space: pre-line; line-height: 1.65; }
.pm-collab { margin: 20px 0 0; font-size: 0.92rem; color: var(--blue); }
.pm-projnav { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line-on-light); display: flex; flex-direction: column; gap: 14px; }
.pm-projbtn { text-align: left; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); font: inherit; }
.pm-projlabel { display: block; font: 500 0.68rem var(--font-label, var(--font-body)); letter-spacing: 0.14em; text-transform: uppercase; color: var(--white-faint); }
.pm-projname { display: block; margin-top: 4px; font-family: var(--font-display); font-size: 1.35rem; }
.pm-projbtn:hover .pm-projname { color: var(--blue); }
.pm button:focus-visible, .work-card h3 a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
@media (max-width: 860px) {
  .pm { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; overflow-y: auto; overflow-x: hidden; }
  .pm-info { min-width: 0; }
  /* The photo area is as tall as the photo itself, so no black bars above and below it. */
  .pm { grid-template-rows: max-content max-content; align-content: start; }
  .pm-left { height: auto; min-height: auto; }
  .pm-stage { flex: none; }
  .pm-figure { height: auto; padding: 0; gap: 0; align-items: stretch; justify-content: flex-start; }
  /* One fixed photo area (4:3) for every photo, so the page below never jumps when the slideshow moves on.
     Tall or wide photos sit inside it on a blurred copy of themselves instead of black bars. */
  .pm-imgbox { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: #101216; }
  .pm-bg { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.2); filter: blur(22px) brightness(0.55); }
  .pm-img { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: contain; }
  .pm-cap { padding: 10px 16px 12px; }
  .pm-meta { bottom: 4px; }
  .pm-info { overflow: visible; padding-top: 28px; }
}
@media (prefers-reduced-motion: reduce) { .pm { animation: none; } }
@media print { .pm, .work-card-cue { display: none !important; } }

/* ---------- Editor: photo strip on each project card ---------- */
.ed-gallery { margin-top: 14px; padding: 12px; background: #fff; border: 1px dashed var(--cyan); }
.ed-gallery-title { display: block; margin-bottom: 10px; font: 600 0.68rem var(--font-label, var(--font-body)); letter-spacing: 0.1em; text-transform: uppercase; color: #17191e; }
.ed-gallery-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.ed-thumb { position: relative; width: 112px; }
.ed-thumb-img { width: 112px; height: 80px; background: #e8e6e0; cursor: pointer; overflow: hidden; }
.ed-thumb-img img { width: 100%; height: 100%; object-fit: cover; }
.ed-thumb-cap { display: block; margin-top: 4px; font: 0.72rem/1.3 var(--font-body); color: #17191e; min-height: 1.3em; }
body.editing .ed-thumb-cap:empty::before { content: "Caption (optional)"; opacity: 0.5; }
body.editing .ed-thumb .ed-ctrl { top: 3px; right: 3px; gap: 2px; opacity: 0.9; }
body.editing .ed-thumb .ed-ctrl button { width: 22px; height: 22px; font-size: 0.68rem; }
.ed-add-photos {
  width: 112px; height: 80px; cursor: pointer;
  font: 600 0.7rem/1.2 var(--font-label, var(--font-body)); letter-spacing: 0.06em; text-transform: uppercase;
  background: #fff; color: #17191e; border: 1px dashed #17191e;
}
.ed-add-photos:hover { background: var(--cyan); }

.ed-details { margin-top: 10px; padding: 12px; background: #fff; border: 1px dashed var(--cyan); color: #17191e; }
.ed-details .ed-details-text { margin: 0 0 6px; padding: 10px 12px; border: 1px solid var(--line-on-light); min-height: 4.5em; font-size: 0.9rem; line-height: 1.55; }
.ed-details .ed-note { font-size: 0.75rem; color: rgba(23, 25, 30, 0.6); }


body.editing .pm { display: none !important; }

/* ---------- Team headshots ---------- */
.team-card .initial.has-photo { width: 104px; height: 104px; padding: 0; border: 0; overflow: hidden; background: var(--paper-dim); }
.team-card .initial.has-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
body.editing .team-card .initial.has-photo { cursor: pointer; }
.ed-photo-actions { display: flex; gap: 6px; flex-wrap: wrap; margin: -10px 0 16px; }
.ed-photo-btn {
  font: 600 0.66rem/1 var(--font-label, var(--font-body)); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 8px 10px; background: #fff; color: #17191e; border: 1px dashed #17191e; cursor: pointer;
}
.ed-photo-btn:hover { background: var(--cyan); }
@media print { .ed-photo-actions { display: none !important; } }

/* ---------- Contact form (appears once an access key is set) ---------- */
.contact-form-wrap { margin-top: 36px; }
.cf-row { margin-bottom: 22px; }
.cf label {
  display: block; margin-bottom: 6px; font-family: var(--font-body); font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.16em; font-size: 0.7rem; color: var(--blue);
}
.cf input[type="text"], .cf input[type="email"], .cf select, .cf textarea {
  width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line-on-light); border-radius: 0;
  background: transparent; color: var(--ink); font: inherit; font-size: 1.05rem;
}
.cf textarea { resize: vertical; min-height: 110px; }
.cf input:focus, .cf select:focus, .cf textarea:focus { outline: none; border-bottom-color: var(--navy); box-shadow: 0 1px 0 var(--navy); }
.cf-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cf-submit {
  padding: 16px 28px; border: 0; cursor: pointer; background: var(--navy); color: #fff;
  font-family: var(--font-body, inherit); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
}
.cf-submit:hover { background: #2c3b60; }
.cf-submit:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.cf-submit:disabled { opacity: 0.6; cursor: default; }
.cf-status { margin: 14px 0 0; font-size: 0.95rem; color: var(--ink-soft); min-height: 1.4em; }
.cf-status.ok { color: #2f6b4a; }
.cf-status.err { color: #a13b2e; }
@media print { .contact-form-wrap { display: none !important; } }

/* ---------- Individual project pages (generated by scripts/project-pages.js) ---------- */
.pp { background: var(--paper); color: var(--ink); }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 16px; background: var(--navy); color: #fff; }
.skip-link:focus { left: 8px; }
.pp-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter); border-bottom: 1px solid var(--line-on-light);
}
.pp-brand { display: inline-flex; align-items: center; gap: 12px; }
.pp-brand-icon { height: 40px; width: auto; }
.pp-brand-word { height: 30px; width: auto; }
.pp-links { display: flex; gap: 28px; }
.pp-links a, .pp-crumbs a {
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--navy);
}
.pp-links a:hover, .pp-crumbs a:hover { color: var(--blue); }
.pp-main { padding: clamp(32px, 6vw, 72px) var(--gutter) clamp(48px, 8vw, 96px); max-width: 1200px; margin: 0 auto; }
.pp-crumbs { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 28px; }
.pp-crumbs a { margin-right: 6px; }
.pp-crumbs span { margin-right: 6px; }
.pp-status { font-family: var(--font-body); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue); }
.pp-intro h1 { margin: 14px 0 10px; font-size: clamp(2.2rem, 6vw, 4.2rem); line-height: 1.05; max-width: 20ch; }
.pp-loc { margin: 0; font-size: 1.1rem; color: var(--ink-soft); }
.pp-statline { margin: 6px 0 0; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.pp-gallery { margin: 40px 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pp-fig { margin: 0; background: var(--paper-dim); }
.pp-fig img { width: 100%; height: auto; display: block; }
.pp-fig-lead { grid-column: 1 / -1; }
.pp-fig figcaption { padding: 10px 2px 0; font-size: 0.88rem; color: var(--ink-soft); background: var(--paper); }
.pp-text { max-width: 720px; }
.pp-text p { font-size: 1.1rem; line-height: 1.7; color: var(--ink-soft); margin: 0 0 18px; }
.pp-collab { font-size: 0.95rem !important; font-style: italic; }
.pp-stats { display: flex; flex-wrap: wrap; gap: 32px; margin-bottom: 28px; }
.pp-stat-num { font-family: var(--font-display); font-size: 2.2rem; color: var(--navy); }
.pp-stat-label { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.pp-pager { display: flex; justify-content: space-between; gap: 24px; margin: 56px 0 0; padding-top: 28px; border-top: 1px solid var(--line-on-light); }
.pp-pager a { display: block; max-width: 46%; font-family: var(--font-display); font-size: 1.4rem; color: var(--navy); }
.pp-pager a span { display: block; margin-bottom: 4px; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue); font-family: var(--font-body); }
.pp-pager .pp-next { text-align: right; margin-left: auto; }
.pp-pager a:hover { color: var(--blue); }
.pp-cta { margin-top: 64px; padding: clamp(32px, 6vw, 56px); background: var(--navy); color: #fff; text-align: center; }
.pp-cta h2 { margin: 0 0 22px; font-size: clamp(1.7rem, 4vw, 2.6rem); color: #fff; }
.pp-btn {
  display: inline-block; padding: 16px 28px; background: #fff; color: var(--navy);
  font-family: var(--font-body); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
}
.pp-btn:hover { background: var(--paper-dim); }
.pp a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.pp-cta a:focus-visible { outline-color: #fff; }
.pp-foot {
  display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between;
  padding: 28px var(--gutter); border-top: 1px solid var(--line-on-light); font-size: 0.85rem; color: var(--ink-soft);
}
.pp-foot a { color: var(--navy); }
@media (max-width: 700px) {
  .pp-gallery { grid-template-columns: 1fr; }
  .pp-brand-word { height: 24px; }
  .pp-brand-icon { height: 34px; }
  .pp-links { gap: 16px; }
  .pp-pager a { font-size: 1.15rem; }
}
@media print { .pp-links, .pp-cta, .pp-pager, .skip-link { display: none !important; } }

/* ---------- Keyboard focus: a clear ring on light and dark backgrounds ---------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid #3b5b82; outline-offset: 2px; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.85);
}

/* ---------- Collaborator website link ---------- */
.collab-visit { margin-top: 14px; }
.collab-visit a {
  display: inline-block; padding-bottom: 2px; border-bottom: 1px solid var(--navy); color: var(--navy);
  font-family: var(--font-body); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
}
.collab-visit a:hover { color: var(--blue); border-bottom-color: var(--blue); }
@media print { .collab-visit a::after { content: " (" attr(href) ")"; text-transform: none; letter-spacing: 0; } }
