/* John Mathew Architects — minimalist architectural aesthetic */
:root {
  --bg: #f6f3ef;
  --bg-elevated: #fffcf8;
  --ink: #2a2420;
  --ink-soft: #6b6158;
  --line: #e3d9ce;
  --accent: #5c5049;
  --accent-warm: #5c5049;
  --accent-soft: #8a7a6e;
  --accent-muted: #a89888;
  --sand: #d4c4b0;
  --hero-overlay: linear-gradient(120deg, rgba(42,36,32,0.78) 0%, rgba(42,36,32,0.4) 55%, rgba(42,36,32,0.22) 100%);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --serif-sc: "Cinzel", "Cormorant SC", "Trajan Pro", Georgia, serif;
  --sans: "Outfit", system-ui, -apple-system, sans-serif;
  --radius: 2px;
  --shadow: 0 20px 50px rgba(92,80,73,0.1);
  --header-h: 4.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent-warm); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 1000;
}
.skip-link:focus { top: 1rem; }

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin: 0 0 0.75rem;
}

h1, h2, h3 {
  font-family: var(--serif-sc);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: var(--ink);
}

h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); letter-spacing: 0.06em; text-transform: uppercase; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); letter-spacing: 0.08em; text-transform: uppercase; }
h3 { font-size: 1.15rem; letter-spacing: 0.04em; font-family: var(--serif); text-transform: none; }

.firm-name {
  font-family: var(--serif-sc);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.services-tagline {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-soft);
  font-style: normal !important;
}

.address-sc {
  font-family: var(--serif-sc);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.7;
  color: var(--ink);
}

.section {
  padding: clamp(4rem, 10vw, 7rem) 0;
}

.section-header {
  max-width: 36rem;
  margin-bottom: 2.5rem;
}

.section-lead {
  color: var(--ink-soft);
  margin: 0;
}

/* Header — scroll progress --hp (0 over hero → 1 solid brown) */
.site-header {
  --hp: 1; /* no-JS / no-hero: solid brown */
  --hp-inv: calc(1 - var(--hp));
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: rgba(247, 245, 242, calc(0.92 * var(--hp)));
  backdrop-filter: blur(calc(12px * var(--hp)));
  -webkit-backdrop-filter: blur(calc(12px * var(--hp)));
  box-shadow: 0 1px 0 rgba(227, 217, 206, var(--hp));
  transition:
    background 0.4s ease-out,
    box-shadow 0.4s ease-out,
    backdrop-filter 0.4s ease-out,
    -webkit-backdrop-filter 0.4s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .site-header {
    transition: none;
  }
}

.header-inner {
  width: min(100% - 2rem, 1200px);
  margin-inline: auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--ink);
}
.logo-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.logo-mark .logo-img {
  grid-area: 1 / 1;
  height: 2.6rem;
  width: auto;
  display: block;
  transition: opacity 0.4s ease-out, filter 0.4s ease-out;
}
/* Default (no-JS): brown visible. With --hp from JS: crossfade white↔brown. */
.logo-img--white {
  opacity: var(--hp-inv);
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0, calc(0.55 * var(--hp-inv))))
          drop-shadow(0 0 6px rgba(0,0,0, calc(0.25 * var(--hp-inv))));
}
.logo-img--brown {
  opacity: var(--hp);
  filter: none;
}
@media (prefers-reduced-motion: reduce) {
  .logo-mark .logo-img {
    transition: none;
  }
}
.logo-text-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  line-height: 1.15;
}
.logo-text {
  font-family: var(--serif-sc);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, #ffffff calc(var(--hp-inv) * 100%), var(--ink) calc(var(--hp) * 100%));
  text-shadow: 0 1px 3px rgba(0, 0, 0, calc(0.55 * var(--hp-inv)));
  transition: color 0.4s ease-out, text-shadow 0.4s ease-out;
}
.logo-sub {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: color-mix(in srgb, rgba(255,255,255,0.85) calc(var(--hp-inv) * 100%), var(--accent-soft) calc(var(--hp) * 100%));
  text-shadow: 0 1px 3px rgba(0, 0, 0, calc(0.55 * var(--hp-inv)));
  transition: color 0.4s ease-out, text-shadow 0.4s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .logo-text, .logo-sub { transition: none; }
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.75rem;
}
.site-nav a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, #ffffff calc(var(--hp-inv) * 100%), var(--ink) calc(var(--hp) * 100%));
  text-shadow: 0 1px 3px rgba(0, 0, 0, calc(0.55 * var(--hp-inv)));
  opacity: 0.85;
  transition: color 0.4s ease-out, text-shadow 0.4s ease-out, opacity 0.2s;
}
.site-nav a:hover { opacity: 1; color: var(--accent-warm); }
@media (prefers-reduced-motion: reduce) {
  .site-nav a { transition: none; }
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  width: 1.4rem;
  background: color-mix(in srgb, #ffffff calc(var(--hp-inv) * 100%), var(--ink) calc(var(--hp) * 100%));
  transition: transform 0.3s var(--ease), background 0.4s ease-out;
  margin-inline: auto;
}
@media (prefers-reduced-motion: reduce) {
  .nav-toggle span { transition: transform 0.3s var(--ease); }
}

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  color: #fff;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
}
.hero-content {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: calc(var(--header-h) + 2rem) 0 6rem;
}
.hero .eyebrow,
.hero .brand-sub { color: rgba(255,255,255,0.72); }
.hero h1.firm-name,
.hero h1 { color: #fff; }
.hero .services-tagline {
  color: rgba(255,255,255,0.78);
  margin: 0 0 0.85rem;
  max-width: 40rem;
}
.hero .hero-lead {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-style: italic;
  font-weight: 400;
  max-width: 28rem;
  margin: 0 0 2rem;
  color: rgba(255,255,255,0.88);
}
.hero .tagline:not(.services-tagline) {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-style: italic;
  font-weight: 400;
  max-width: 28rem;
  margin: 0 0 2rem;
  color: rgba(255,255,255,0.88);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1rem;
}
.hero .btn.hero-cta {
  font-family: var(--serif-sc);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.95rem 1.65rem;
  min-height: 2.85rem;
  border-radius: var(--radius);
  text-shadow: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transition:
    background 0.45s var(--ease),
    color 0.45s var(--ease),
    border-color 0.45s var(--ease),
    box-shadow 0.45s var(--ease),
    transform 0.45s var(--ease);
}
.hero .btn-primary.hero-cta {
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.96);
}
.hero .btn-primary.hero-cta:hover {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}
.hero .btn-ghost.hero-cta {
  background: rgba(42, 36, 32, 0.22);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.hero .btn-ghost.hero-cta:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}
#projects,
#contact {
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  border: 1px solid transparent;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.btn-primary {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}
.btn-primary:hover {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.7);
}
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.45);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
  color: #fff;
}
.contact .btn-primary,
.btn-solid {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.contact .btn-primary:hover,
.btn-solid:hover {
  background: transparent;
  color: var(--accent);
}

.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 1.5rem;
  height: 2.4rem;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 999px;
  display: grid;
  place-items: start center;
  padding-top: 0.4rem;
}
.scroll-hint span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  animation: scroll-dot 1.6s infinite;
}
@keyframes scroll-dot {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* Filters + Gallery */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.filter-btn {
  border: 1px solid var(--line);
  background: transparent;
  padding: 0.55rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.project-card {
  background: var(--bg-elevated);
  overflow: hidden;
  transition: opacity 0.35s, transform 0.35s var(--ease);
}
.project-card.is-hidden {
  display: none;
}
.project-card-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.project-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #ddd;
}
.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  --img-scale: 1;
  scale: var(--img-scale);
  transition: scale 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.project-card:hover .project-image img {
  --img-scale: 1.05;
}
.project-meta {
  padding: 1.1rem 1.15rem 1.3rem;
}
.project-type {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 0.35rem;
}
.project-meta h3 { margin-bottom: 0.25rem; }
.project-loc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Lightbox */
.lightbox[hidden] { display: none !important; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,0.88);
  opacity: 0;
}
.lightbox.is-open .lightbox-backdrop { opacity: 1; }
.lightbox-dialog {
  position: relative;
  width: min(100%, 920px);
  background: #111;
  color: #fff;
  box-shadow: var(--shadow);
  overflow: visible;
}
.lightbox.is-animating .lightbox-dialog {
  overflow: visible;
  background: transparent;
  box-shadow: none;
}
.lightbox-dialog figure { margin: 0; }
.lightbox-dialog img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #0a0a0a;
  will-change: transform, opacity;
  display: block;
}
.lightbox-dialog figcaption,
.lightbox-caption {
  position: relative;
  padding: 1.15rem 1.5rem 1.35rem;
  opacity: 1;
}
.lightbox-project,
#lightbox-title {
  margin: 0 0 0.35rem;
  font-family: var(--serif-sc);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f3efe8; /* ivory — high contrast on dark dialog */
  line-height: 1.2;
}
.lightbox-type,
#lightbox-type {
  margin: 0 0 0.4rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243, 239, 232, 0.78);
  line-height: 1.35;
}
.lightbox-loc,
#lightbox-loc {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(243, 239, 232, 0.58);
  line-height: 1.4;
}
.lightbox-count {
  position: absolute;
  right: 1.5rem;
  bottom: 1.35rem;
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: rgba(243, 239, 232, 0.42);
  font-variant-numeric: tabular-nums;
}
.lightbox-close {
  position: absolute;
  top: 0.6rem;
  right: 0.75rem;
  z-index: 2;
  border: 0;
  background: rgba(0,0,0,0.45);
  color: #fff;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  opacity: 1;
}
.lightbox-nav {
  position: absolute;
  top: 40%;
  z-index: 2;
  border: 0;
  background: rgba(0,0,0,0.4);
  color: #fff;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.8rem;
  cursor: pointer;
  opacity: 1;
}
.lightbox-nav.prev { left: 0.5rem; }
.lightbox-nav.next { right: 0.5rem; }

@media (prefers-reduced-motion: reduce) {
  .lightbox-backdrop,
  .lightbox-dialog img,
  .lightbox-dialog figcaption,
  .lightbox-close,
  .lightbox-nav {
    transition: opacity 0.2s ease !important;
  }
}

/* Ongoing / 3D */
.ongoing {
  background: #111;
  color: #f3f1ee;
}
.ongoing .eyebrow { color: #a89888; }
.ongoing .section-lead { color: rgba(243,241,238,0.65); }
.ongoing-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.ongoing-tab {
  border: 1px solid rgba(255,255,255,0.18);
  background: transparent;
  color: rgba(255,255,255,0.75);
  padding: 0.6rem 1.1rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.ongoing-tab.active,
.ongoing-tab:hover {
  background: #fff;
  color: #111;
  border-color: #fff;
}

.viewer-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 1.5rem;
  align-items: stretch;
}
.viewer-stage {
  position: relative;
  background: linear-gradient(160deg, #1c1c1c, #0d0d0d);
  min-height: 420px;
  border: 1px solid rgba(255,255,255,0.06);
}
#model-canvas {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: block;
  touch-action: none;
  cursor: grab;
}
#model-canvas:active { cursor: grabbing; }
.viewer-hint {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  pointer-events: none;
}
.viewer-info {
  padding: 0.5rem 0.25rem;
}
.viewer-info h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
.placeholder-note {
  color: rgba(243,241,238,0.7);
  border-left: 2px solid rgba(92,80,73,0.45);
  padding-left: 1rem;
  margin: 0 0 1.5rem;
}
.model-stats {
  display: grid;
  gap: 1rem;
  margin: 0;
}
.model-stats div {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 0.75rem;
}
.model-stats dt {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.25rem;
}
.model-stats dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.about-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.placeholder-block {
  border: 1px dashed var(--line);
  background: rgba(255,255,255,0.5);
  padding: 1.25rem 1.35rem;
  margin: 1.25rem 0 1.75rem;
}
.placeholder-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin: 0 0 0.75rem;
}
.about-values {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.about-values li {
  padding-left: 1rem;
  border-left: 2px solid var(--accent-warm);
  color: var(--ink-soft);
}
.about-values strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

/* Contact */
.contact {
  background: var(--bg-elevated);
  border-top: 1px solid var(--line);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.contact-details {
  font-style: normal;
  display: grid;
  gap: 1.35rem;
  margin-top: 2rem;
}
.contact-details .label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 0.35rem;
}
.contact-details p { margin: 0; }
.contact-details a { text-decoration: none; }
.contact-details a:hover { text-decoration: underline; }

.contact-form {
  background: var(--bg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
}
.form-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
  padding: 0.75rem 0.9rem;
  background: rgba(92,80,73,0.08);
  border-left: 2px solid var(--accent-warm);
}
.form-row {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}
.form-row label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}
.form-row input,
.form-row textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--ink);
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
}
.footer-inner p { margin: 0; }
.footer-note { opacity: 0.8; }

/* Responsive */
@media (max-width: 900px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .viewer-layout,
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .about-media img { aspect-ratio: 16 / 10; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    background: rgba(247,245,242,0.97);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s;
    z-index: 60;
  }
  .site-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .site-nav ul {
    flex-direction: column;
    gap: 0.25rem;
  }
  .site-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.65rem 0;
  }
  .site-nav.open a {
    color: var(--ink) !important;
    text-shadow: none !important;
  }
  /* logo text handled via .logo-text-group */
}

@media (max-width: 600px) {
  .project-grid { grid-template-columns: 1fr; }
  .hero-content { padding-bottom: 5rem; }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: min(100%, 22rem);
  }
  .hero .btn.hero-cta {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Brand / contact / footer additions */
.contact-firm {
  margin: 1.25rem 0 0.35rem;
  font-size: 1.05rem;
}
.contact-services {
  margin: 0 0 0.5rem;
  color: var(--accent-soft);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.footer-logo {
  height: 3rem;
  width: auto;
  opacity: 0.95;
}
.footer-firm {
  margin: 0 0 0.15rem;
  font-size: 0.85rem;
}
.footer-copy {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
}
.footer-inner .logo-sub {
  margin: 0;
}
@media (max-width: 900px) {
  .logo-text-group { display: none; }
  .logo-mark .logo-img { height: 2.25rem; }
}

/* ===== Project detail page ===== */
.project-page .site-header {
  background: rgba(246, 243, 239, calc(0.94 * var(--hp)));
}
.project-hero {
  position: relative;
  min-height: 62vh;
  display: grid;
  align-items: end;
  color: #fff;
}
.project-hero > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.project-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(42,36,32,0.25) 0%, rgba(42,36,32,0.72) 100%);
}
.project-hero-content {
  position: relative; z-index: 1;
  padding: calc(var(--header-h) + 3rem) 0 3rem;
}
.project-hero .eyebrow { color: rgba(255,255,255,0.7); }
.project-hero h1 { color: #fff; margin-bottom: 0.5rem; }
.project-hero .services-tagline { color: rgba(255,255,255,0.8); margin: 0; }

.project-intro-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
.project-copy p {
  color: var(--ink-soft);
  max-width: 40rem;
}
.project-specs {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: 1.5rem 1.6rem;
}
.project-specs dl { margin: 0; display: grid; gap: 1rem; }
.project-specs div {
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}
.project-specs div:first-child { border-top: 0; padding-top: 0; }
.project-specs dt {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 0.25rem;
}
.project-specs dd {
  margin: 0;
  font-family: var(--serif-sc);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.gal-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-bottom: 2rem;
}
.gal-jump a {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 0.5rem 0.85rem;
  color: var(--ink-soft);
}
.gal-jump a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.gal-group { margin-bottom: 2.75rem; }
.gal-heading {
  font-family: var(--serif-sc);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  color: var(--accent);
}
.gal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}
.gal-item {
  display: block;
  padding: 0;
  border: 0;
  background: #ddd;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.gal-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  --img-scale: 1;
  scale: var(--img-scale);
  transition: scale 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.gal-item:hover img {
  --img-scale: 1.05;
}
.project-back { padding-top: 0; }

.project-card.featured .project-meta::before {
  content: "Featured";
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.project-card a.project-card-btn { text-decoration: none; color: inherit; }

@media (max-width: 900px) {
  .project-intro-grid { grid-template-columns: 1fr; }
  .gal-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .gal-grid { grid-template-columns: 1fr; }
}

.gal-subheading {
  font-family: var(--serif-sc);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 1.5rem 0 0.75rem;
  font-weight: 500;
}
.gal-group .gal-subheading:first-of-type { margin-top: 0.25rem; }
.gal-group .gal-subheading + .gal-grid { margin-bottom: 0.25rem; }

/* === parallax / glide (variant C) === */
.hero-media,
.project-hero,
.parallax-media,
.gal-item {
  overflow: hidden;
}

/*
  Separate concerns:
  - translate (parallax drift) updates instantly via --parallax-y (no transition)
  - scale (cover bleed + hover zoom) uses the individual `scale` property with a smooth transition
  This avoids the old bug where `transform` + `transition: none` made hover zoom snap.
*/
html.parallax-active .hero-media img[data-parallax],
html.parallax-active .project-hero > img[data-parallax],
html.parallax-active .parallax-media img[data-parallax],
html.parallax-active .gal-item img[data-parallax] {
  --parallax-base: 1.12;
  --img-scale: var(--parallax-base);
  translate: 0 var(--parallax-y, 0px);
  scale: var(--img-scale);
  transition: scale 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
html.parallax-active .gal-item img[data-parallax] {
  --parallax-base: 1.1;
  --img-scale: var(--parallax-base);
}
/* Hover: ~1.05 relative to resting parallax scale */
html.parallax-active .project-card:hover .project-image img[data-parallax] {
  --img-scale: 1.176; /* 1.12 * 1.05 */
}
html.parallax-active .gal-item:hover img[data-parallax] {
  --img-scale: 1.155; /* 1.1 * 1.05 */
}

.glide {
  --glide-y: 0px;
  opacity: 0.28;
  transform: translate3d(0, 24px, 0);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.glide.is-in {
  opacity: 1;
  transform: translate3d(0, var(--glide-y, 0px), 0);
}

@media (max-width: 767px), (pointer: coarse) {
  html.parallax-active .hero-media img[data-parallax],
  html.parallax-active .project-hero > img[data-parallax],
  html.parallax-active .parallax-media img[data-parallax],
  html.parallax-active .gal-item img[data-parallax] {
    translate: none;
    --parallax-base: 1;
    --img-scale: 1;
    will-change: transform;
  }
  html.parallax-active .project-card:hover .project-image img[data-parallax],
  html.parallax-active .gal-item:hover img[data-parallax] {
    --img-scale: 1.05;
  }
  .glide.is-in {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-image img,
  .gal-item img,
  html.parallax-active .hero-media img[data-parallax],
  html.parallax-active .project-hero > img[data-parallax],
  html.parallax-active .parallax-media img[data-parallax],
  html.parallax-active .gal-item img[data-parallax] {
    translate: none !important;
    scale: 1 !important;
    transition: none !important;
    will-change: auto !important;
  }
  .project-card:hover .project-image img,
  .gal-item:hover img {
    --img-scale: 1 !important;
  }
  .glide,
  .glide.is-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* ===== Mobile / tablet polish (≤900px) — desktop unchanged above ===== */
@media (max-width: 900px) {
  .nav-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .filter-btn {
    min-height: 44px;
    padding: 0.7rem 1rem;
  }

  .gal-jump a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.65rem 0.9rem;
  }

  .btn {
    min-height: 44px;
  }

  /* Readable body / meta text on phones */
  .project-loc,
  .form-note,
  .footer-copy,
  .footer-note,
  .section-lead {
    font-size: 15px;
  }

  .project-copy p:not(.eyebrow) {
    font-size: max(15px, 1.05rem);
  }

  /* Lightbox fits phone + 44px controls */
  .lightbox {
    padding: 0.5rem;
    align-items: center;
  }
  .lightbox-dialog {
    width: min(100%, 920px);
    max-height: calc(100svh - 1rem);
    display: flex;
    flex-direction: column;
  }
  .lightbox-dialog figure {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .lightbox-dialog img {
    max-height: min(62svh, calc(100svh - 11rem));
    width: 100%;
  }
  .lightbox-close {
    width: 44px;
    height: 44px;
    top: 0.5rem;
    right: 0.5rem;
  }
  .lightbox-nav {
    width: 44px;
    height: 44px;
    top: 36%;
  }
  .lightbox-dialog figcaption,
  .lightbox-caption {
    padding: 0.9rem 1rem 1.1rem;
  }
}

@media (max-width: 560px) {
  /* Prefer 2-col gallery on phone when space allows a decent tap area;
     keep 1-col only for very narrow — actually keep 1fr as already set.
     Ensure jump chips don't force overflow. */
  .gal-jump {
    gap: 0.45rem;
  }
}

/* ===== About / Contact studio hero (portrait office photo) ===== */
.studio-hero { min-height: 78vh; overflow: hidden; }
.studio-hero > img { object-position: 50% 50%; }
.studio-caption {
  position: absolute; z-index: 1;
  right: clamp(1rem, 4vw, 2.5rem); bottom: 1.1rem; margin: 0;
  font-family: "Cinzel", "Trajan Pro", serif;
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(255,255,255,0.82);
}
.about-media img { object-position: 50% 55%; }
@media (max-width: 900px) { .about-media img { aspect-ratio: 1 / 1; object-position: 50% 100%; } } /* keep bottom-right watermark in frame */
@media (max-width: 900px) {
  .studio-hero { min-height: 70vh; }
  .studio-hero > img { object-position: 50% 22%; }
  .studio-hero .project-hero-content { padding-bottom: 4.5rem; }
}

/* ===== Project name in sticky header (project pages only) ===== */
.site-header { --tp: 1; }
.hdr-project {
  --tp-c: var(--tp, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  margin-left: 0.15rem;
  text-decoration: none;
  opacity: var(--tp-c);
  transform: translateY(calc((1 - var(--tp-c)) * 6px));
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
  pointer-events: none;
}
.site-header[style*="--tp: 1"] .hdr-project { pointer-events: auto; }
.hdr-divider {
  flex: 0 0 1px;
  width: 1px;
  height: 1.6rem;
  background: color-mix(in srgb, rgba(255,255,255,0.7) calc(var(--hp-inv) * 100%), rgba(92,80,73,0.45) calc(var(--hp) * 100%));
}
.hdr-project-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--serif-sc);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  font-variant: small-caps;
  text-transform: none;
  color: color-mix(in srgb, #ffffff calc(var(--hp-inv) * 100%), #5C5049 calc(var(--hp) * 100%));
  text-shadow: 0 1px 3px rgba(0, 0, 0, calc(0.55 * var(--hp-inv)));
  transition: color 0.4s ease-out, text-shadow 0.4s ease-out;
}
.project-page .site-nav { flex-shrink: 0; }
@media (max-width: 900px) {
  .project-page .header-inner { gap: 0.75rem; }
  .hdr-project { gap: 0.7rem; }
  .hdr-divider { height: 1.3rem; }
  .hdr-project-name { font-size: 0.9rem; letter-spacing: 0.1em; }
  .project-page .nav-toggle { flex-shrink: 0; }
  .project-page .logo { flex-shrink: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hdr-project, .hdr-project-name { transition: none; }
}

/* ===== Back to top (floating, scroll-linked opacity via --btt from header.js) ===== */
.back-to-top-wrap {
  --btt: 0;
  position: fixed;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 90; /* below header (100) and lightbox */
  opacity: var(--btt);
  transform: translateY(calc((1 - var(--btt)) * 10px));
  pointer-events: none;
}
.back-to-top-wrap.is-active { pointer-events: auto; }
body:has(.lightbox.is-open) .back-to-top-wrap,
body:has(.lightbox:not([hidden])) .back-to-top-wrap,
.back-to-top-wrap.is-suppressed { display: none; }
.back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.55rem 1.25rem;
  border: 1px solid #5C5049;
  border-radius: 999px;
  color: #5C5049;
  background: rgba(247, 245, 242, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(42, 36, 32, 0.14);
  text-decoration: none;
  font-family: var(--serif-sc);
  font-variant: small-caps;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  transition: background 0.25s ease, color 0.25s ease;
}
.back-to-top .btt-arrow { transition: transform 0.25s ease; flex-shrink: 0; }
.back-to-top:hover,
.back-to-top:focus-visible { background: #5C5049; color: #fff; }
.back-to-top:hover .btt-arrow { transform: translateY(-2px); }
.back-to-top:focus-visible { outline: 2px solid #5C5049; outline-offset: 3px; }
@media (max-width: 900px) {
  .back-to-top-wrap { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .back-to-top { width: 48px; height: 48px; padding: 0; border-radius: 50%; }
  .back-to-top span {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
  .back-to-top .btt-arrow { width: 18px; height: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top, .back-to-top .btt-arrow { transition: none; }
  .back-to-top:hover .btt-arrow { transform: none; }
}

/* leave room so the floating back-to-top never sits on footer text */
.site-footer { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); }

/* Founder / Principal Architect (about.html) */
.founder { border-top: 1px solid var(--line); }
.founder-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.founder-media { margin: 0; overflow: hidden; }
.founder-media img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: 50% 50%; transition: transform 0.9s cubic-bezier(.2,.7,.2,1); }
@media (hover: hover) { .founder-media:hover img { transform: scale(1.03); transform-origin: 50% 40%; } }
@media (prefers-reduced-motion: reduce) { .founder-media img { transition: none; } .founder-media:hover img { transform: none; } }
.founder-content h2 { margin-bottom: 0.25rem; }
.founder-title { font-family: var(--serif-sc); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.85rem; color: #5C5049; margin: 0 0 0.5rem; }
@media (max-width: 900px) { .founder-grid { grid-template-columns: 1fr; } }

/* Compact founder strip on homepage */
.home-founder {
  padding-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}
.home-founder .founder-grid {
  grid-template-columns: 0.95fr 1.15fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.home-founder .founder-media img {
  aspect-ratio: 4 / 3;
}
.home-founder .founder-content h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  margin-bottom: 0.85rem;
}
.home-founder .founder-bio {
  margin: 0 0 1.25rem;
}
.home-founder .founder-bio p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.65;
  max-width: 36rem;
}
.text-link {
  display: inline-block;
  font-family: var(--serif-sc);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5C5049;
  text-decoration: none;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid rgba(92, 80, 73, 0.4);
  transition: border-color 0.35s var(--ease), color 0.35s var(--ease);
}
.text-link:hover,
.text-link:focus-visible {
  color: #5C5049;
  border-bottom-color: #5C5049;
}
@media (max-width: 900px) {
  .home-founder .founder-grid { grid-template-columns: 1fr; }
  .home-founder .founder-media { order: 0; }
  .home-founder .founder-content { order: 1; }
}


/* === Hero slideshow (JMA) === */
.hero-slider { overflow: hidden; }
.hero-slider .hs-track { position: absolute; inset: 0; }
.hero-slider .hs-slide {
  position: absolute; inset: 0; margin: 0; overflow: hidden;
  will-change: transform;
}
.hero-slider .hs-slide.hs-hidden { visibility: hidden; }
.hero-slider .hs-bg { position: absolute; inset: 0; will-change: transform; }
.hero-slider .hs-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-slider .hs-anim,
.hero-slider .hs-anim .hs-bg,
.hero-slider .hs-anim .hs-label,
.hero-slider .hs-anim .hs-title,
.hero-slider .hs-anim .hs-link {
  transition: transform var(--hs-dur, 1600ms) cubic-bezier(0.6, 0.05, 0.22, 1),
              opacity var(--hs-dur, 1600ms) cubic-bezier(0.6, 0.05, 0.22, 1);
}
/* Captions sit above the overlay, in the hero title style */
.hero-slider .hs-cap {
  position: absolute; z-index: 2;
  left: max(1.25rem, calc((100% - var(--max)) / 2));
  right: 1.25rem;
  top: 36%;
  max-width: 34rem;
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.55rem;
  color: #fff;
  pointer-events: none;
}
.hero-slider .hs-slide.is-active .hs-cap { pointer-events: auto; }
.hero-slider .hs-label {
  font-family: var(--serif-sc);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.74);
  display: inline-flex; align-items: center; gap: 0.7rem;
}
.hero-slider .hs-label::before {
  content: ""; width: 2rem; height: 1px; background: rgba(255,255,255,0.6);
}
.hero-slider .hs-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  color: rgba(255,255,255,0.94);
  text-shadow: 0 2px 18px rgba(0,0,0,0.18);
}
.hero-slider .hs-link {
  font-family: var(--serif-sc);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.45);
  margin-top: 0.35rem;
  transition: border-color 0.4s var(--ease), opacity 0.4s;
}
.hero-slider .hs-link:hover,
.hero-slider .hs-link:focus-visible { border-color: #fff; }
.hero-slider .hero-overlay { z-index: 1; }
.hero-slider .hero-content { z-index: 3; pointer-events: none; }
.hero-slider .hero-content a,
.hero-slider .hero-content button { pointer-events: auto; }

/* Controls: thin line arrows, serif counter, slim progress bar */
.hero-slider .hs-controls {
  position: absolute; z-index: 4;
  right: max(1.25rem, calc((100% - var(--max)) / 2));
  bottom: 2.1rem;
  display: flex; align-items: center; gap: 1rem;
  color: #fff;
}
.hero-slider .hs-arrow {
  width: 2.6rem; height: 2.2rem; padding: 0;
  background: none; border: 0; color: rgba(255,255,255,0.72);
  cursor: pointer; display: grid; place-items: center;
  transition: color 0.4s var(--ease), transform 0.4s var(--ease);
}
.hero-slider .hs-arrow svg { width: 2.2rem; height: auto; }
.hero-slider .hs-prev:hover { color: #fff; transform: translateX(-3px); }
.hero-slider .hs-next:hover { color: #fff; transform: translateX(3px); }
.hero-slider .hs-arrow:focus-visible { outline: 1px solid rgba(255,255,255,0.8); outline-offset: 2px; }
.hero-slider .hs-count {
  font-family: var(--serif);
  font-size: 0.95rem; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.7);
  font-variant-numeric: lining-nums tabular-nums;
}
.hero-slider .hs-cur { color: #fff; }
.hero-slider .hs-bar {
  position: relative; width: 6rem; height: 1px;
  background: rgba(255,255,255,0.28); overflow: hidden;
}
.hero-slider .hs-fill {
  position: absolute; inset: 0; background: #fff;
  transform-origin: left center; transform: scaleX(0);
}
.hero-slider .hs-fill.is-running {
  transform: scaleX(1);
  transition: transform var(--hs-wait, 3000ms) linear;
}
.hero-slider .scroll-hint { z-index: 4; }

/* Reduced motion: crossfade only */
.hero-slider.hs-fade .hs-slide { transform: none !important; opacity: 1; z-index: 0; }
.hero-slider.hs-fade .hs-slide.is-active { z-index: 1; }
.hero-slider.hs-fade .hs-slide.hs-leaving { z-index: 2; opacity: 0; transition: opacity 0.8s ease !important; transition-duration: 0.8s !important; }
.hero-slider.hs-fade .hs-fill { display: none; }

@media (max-width: 767px) {
  .hero-slider .hs-cap { top: calc(var(--header-h, 72px) + 2.25rem); right: 1.25rem; }
  .hero-slider .hs-title { font-size: clamp(1.45rem, 6.4vw, 1.9rem); }
  .hero-slider .scroll-hint { display: none; }
  .hero-slider .hs-controls { left: 1.25rem; right: 1.25rem; bottom: 1.1rem; justify-content: space-between; gap: 0.6rem; }
  .hero-slider .hs-bar { flex: 1; width: auto; }
  .hero-slider .hero-content { padding-bottom: 4.6rem; }
}
/* Overlay per slide so captions sit above it */
.hero-slider .hero-overlay { display: none; }
.hero-slider .hs-slide::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: var(--hero-overlay); pointer-events: none;
}

/* Instagram link */
.ig-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #5C5049;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity 0.25s var(--ease, ease), color 0.25s var(--ease, ease);
}
.ig-link .ig-icon { flex: none; transition: transform 0.25s var(--ease, ease); }
.ig-link:hover, .ig-link:focus-visible { opacity: 0.72; }
.ig-link:hover .ig-icon { transform: translateY(-1px); }
.ig-link:focus-visible { outline: 1px solid #5C5049; outline-offset: 3px; }
.footer-social { display: flex; align-items: center; min-height: 44px; }

/* ===== About: studio hero slideshow (same motion as homepage hero; shares js/hero-slider.js) ===== */
.studio-hero .hs-track { position: absolute; inset: 0; }
.studio-hero .hs-slide { position: absolute; inset: 0; margin: 0; overflow: hidden; will-change: transform; }
.studio-hero .hs-slide.hs-hidden { visibility: hidden; }
.studio-hero .hs-bg { position: absolute; inset: 0; will-change: transform; }
.studio-hero .hs-bg img { width: 100%; height: 100%; object-fit: cover; display: block; object-position: var(--pos, 50% 50%); }
.studio-hero .hs-anim,
.studio-hero .hs-anim .hs-bg {
  transition: transform var(--hs-dur, 1600ms) cubic-bezier(0.6, 0.05, 0.22, 1),
              opacity var(--hs-dur, 1600ms) cubic-bezier(0.6, 0.05, 0.22, 1);
}
.studio-hero.hs-fade .hs-slide { transform: none !important; opacity: 1; z-index: 0; }
.studio-hero.hs-fade .hs-slide.is-active { z-index: 1; }
.studio-hero.hs-fade .hs-slide.hs-leaving { z-index: 2; opacity: 0; transition: opacity 0.8s ease !important; transition-duration: 0.8s !important; }
.studio-hero .project-hero-overlay { z-index: 1; }
.studio-hero .project-hero-content { z-index: 2; }
.studio-hero .studio-caption { z-index: 2; }
@media (max-width: 900px) {
  .studio-hero .hs-bg img { object-position: var(--pos-m, var(--pos, 50% 50%)); }
}
/* About slideshow: art-directed <picture> (landscape desktop / portrait mobile) */
.studio-hero .hs-bg picture { display: contents; }

/* Careers */
.careers { padding-top: 0; }
.careers-inner { max-width: 40rem; }
.careers-copy a { color: #5C5049; text-decoration: underline; text-underline-offset: 0.18em; }
.careers-copy a:hover { opacity: 0.75; }
.footer-nav { display: flex; align-items: center; min-height: 44px; margin: 0; }
.footer-nav a {
  color: #5C5049;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 500;
}
.footer-nav a:hover, .footer-nav a:focus-visible { text-decoration: underline; text-underline-offset: 0.2em; }

/* Careers hero uses its own office photo */
.studio-hero > img.careers-hero-img { object-position: 45% 50%; }
@media (max-width: 760px) { .studio-hero > img.careers-hero-img { object-position: 42% 50%; } }
.studio-hero > img.contact-hero-img { object-position: 50% 62%; }
@media (max-width: 760px) { .studio-hero > img.contact-hero-img { object-position: 45% 60%; } }

/* Project walkthrough video */
.project-walkthrough { padding-bottom: 0.5rem; }
.walkthrough-frame {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0.5rem auto 0;
  aspect-ratio: 16 / 9;
  background: #1a1714;
  overflow: hidden;
}
.walkthrough-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #1a1714;
}
.project-walkthrough[hidden] { display: none !important; }
.gal-jump a + a { margin-left: 1.25rem; }
