/* ==========================================================================
   Clara Peru Studio — Premium Architectural Design System
   Palette extracted from the studio's own Google Maps portfolio photography
   ========================================================================== */

:root {
  --bg-ivory: #f7f4ef;
  --bg-stone: #eee9e1;
  --bg-card: #fcfaf7;
  --bg-dark: #191714;
  --bg-dark-2: #221f1b;

  --text-ink: #1f1d1a;
  --text-muted: #6e685f;
  --text-on-dark: #f4efe6;
  --text-on-dark-muted: rgba(244, 239, 230, 0.66);

  --accent-oak: #b08d6c;
  --accent-olive: #616b55;
  --accent-terracotta: #b5785e;

  --border-hairline: rgba(31, 29, 26, 0.12);
  --border-strong: rgba(31, 29, 26, 0.28);
  --border-light: rgba(244, 239, 230, 0.18);

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --container-max: 1360px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --header-h: 84px;
  --radius: 6px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --intro: 0s;
}

.intro {
  --intro: 1.55s;
}

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

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background-color: var(--bg-ivory);
  color: var(--text-ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection {
  background-color: var(--accent-oak);
  color: var(--bg-dark);
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-oak);
  outline-offset: 3px;
}

body:not(.has-dark-hero) main {
  padding-top: var(--header-h);
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container-max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--text-ink);
  color: var(--text-on-dark);
  padding: 0.75rem 1.25rem;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* ==========================================================================
   Cross-document View Transitions (page fade + image morph)
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  ::view-transition-old(root) {
    animation: 0.35s var(--ease) both vt-out;
  }

  ::view-transition-new(root) {
    animation: 0.55s var(--ease) both vt-in;
  }

  ::view-transition-group(proj-hero) {
    animation-duration: 0.8s;
    animation-timing-function: var(--ease);
  }

  ::view-transition-old(proj-hero),
  ::view-transition-new(proj-hero) {
    height: 100%;
    object-fit: cover;
    animation: none;
    mix-blend-mode: normal;
  }

  ::view-transition-old(proj-hero) {
    opacity: 0;
  }

  @keyframes vt-out {
    to {
      opacity: 0;
    }
  }

  @keyframes vt-in {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
  }
}

.site-header {
  view-transition-name: site-header;
}

/* ==========================================================================
   Preloader (first visit per session)
   ========================================================================== */

.preloader {
  display: none;
}

.intro .preloader:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  background-color: var(--bg-dark);
  color: var(--text-on-dark);
  animation: curtain 1s 1.45s var(--ease-io) forwards;
}

.preloader-inner {
  text-align: center;
}

.preloader-word {
  display: flex;
  justify-content: center;
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 9vw, 6.5rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1.1;
}

.preloader-word span {
  display: inline-block;
  transform: translateY(110%);
  animation: letter-up 0.8s calc(0.1s + var(--i) * 0.045s) var(--ease) forwards;
}

.preloader-sub {
  display: block;
  margin-top: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-oak);
  opacity: 0;
  animation: fade-in 0.6s 0.7s ease forwards;
}

.preloader-line {
  display: block;
  width: 140px;
  height: 1px;
  margin: 1.4rem auto 0;
  background-color: var(--border-light);
  overflow: hidden;
}

.preloader-line::after {
  content: '';
  display: block;
  height: 100%;
  background-color: var(--accent-oak);
  transform-origin: left;
  transform: scaleX(0);
  animation: grow-x 1.2s 0.2s var(--ease-io) forwards;
}

@keyframes curtain {
  to {
    clip-path: inset(0 0 100% 0);
  }
}

@keyframes letter-up {
  to {
    transform: translateY(0);
  }
}

@keyframes fade-in {
  to {
    opacity: 1;
  }
}

@keyframes grow-x {
  to {
    transform: scaleX(1);
  }
}

/* ==========================================================================
   Custom cursor (desktop, fine pointer only — added by JS)
   ========================================================================== */

.cursor {
  display: none;
}

.has-cursor .cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background-color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  opacity: 0;
  transition: width 0.45s var(--ease), height 0.45s var(--ease), margin 0.45s var(--ease), background-color 0.3s ease, opacity 0.3s ease;
}

.has-cursor .cursor.is-visible {
  opacity: 1;
}

.has-cursor .cursor.is-link {
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
}

.has-cursor .cursor.is-label {
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  background-color: var(--accent-oak);
  mix-blend-mode: normal;
}

.cursor-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bg-dark);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cursor.is-label .cursor-label {
  opacity: 1;
}

.has-cursor [data-cursor] {
  cursor: none;
}

.magnetic {
  transition: translate 0.5s var(--ease);
}

/* ==========================================================================
   Scroll progress line
   ========================================================================== */

#progress {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 120;
  width: 100%;
  height: 2px;
  background-color: var(--accent-oak);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    @keyframes grow-progress {
      from {
        transform: scaleX(0);
      }
      to {
        transform: scaleX(1);
      }
    }

    #progress {
      animation: grow-progress auto linear;
      animation-timeline: scroll();
    }
  }
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  color: var(--text-ink);
  border-bottom: 1px solid transparent;
  transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease, transform 0.6s var(--ease);
}

.site-header.is-scrolled {
  background-color: rgba(247, 244, 239, 0.86);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border-hairline);
}

.has-dark-hero .site-header:not(.is-scrolled) {
  color: var(--text-on-dark);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

body.menu-open .site-header {
  color: var(--text-on-dark);
  background-color: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
  transform: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.brand-sub {
  margin-top: 0.25rem;
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  opacity: 0.7;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}

.main-nav a {
  position: relative;
  padding: 0.4rem 0;
  font-size: 0.86rem;
  opacity: 0.78;
  transition: opacity 0.3s ease;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}

.main-nav a:hover,
.main-nav a[aria-current='page'] {
  opacity: 1;
}

.main-nav a:hover::after,
.main-nav a[aria-current='page']::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  display: none;
  position: relative;
  z-index: 95;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  border-radius: 999px;
  background-color: transparent;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.3s ease, scale 150ms ease-out;
}

.menu-toggle:focus-visible {
  outline-offset: -2px;
}

.menu-toggle:active {
  scale: 0.94;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background-color: currentColor;
  transition: transform 0.5s var(--ease), width 0.4s var(--ease);
}

.menu-toggle[aria-expanded='true'] span:first-child {
  transform: translateY(4.5px) rotate(45deg);
}

.menu-toggle[aria-expanded='true'] span:last-child {
  transform: translateY(-4.5px) rotate(-45deg);
}

/* Full-screen mobile menu */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  padding: calc(var(--header-h) + 1.5rem) var(--gutter) 2rem;
  background-color: var(--bg-dark);
  color: var(--text-on-dark);
  overflow: hidden;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.75s var(--ease-io), visibility 0s 0.75s;
}

.mobile-nav[hidden] {
  display: flex;
}

.mobile-nav.is-open {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path 0.75s var(--ease-io), visibility 0s;
}

.mobile-nav-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
  scale: 1.15;
  transition: scale 1.4s var(--ease);
  pointer-events: none;
}

.mobile-nav.is-open .mobile-nav-bg {
  scale: 1;
}

.mobile-nav nav {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-block: auto;
}

.mobile-nav nav a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-light);
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 10vw, 3.6rem);
  line-height: 1.1;
  overflow: hidden;
}

.mobile-nav nav a > span:last-child {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.7s var(--ease), color 0.3s ease;
}

.mobile-nav.is-open nav a > span:last-child {
  transform: translateY(0);
}

.mobile-nav.is-open nav a:nth-child(1) > span:last-child { transition-delay: 0.25s; }
.mobile-nav.is-open nav a:nth-child(2) > span:last-child { transition-delay: 0.31s; }
.mobile-nav.is-open nav a:nth-child(3) > span:last-child { transition-delay: 0.37s; }
.mobile-nav.is-open nav a:nth-child(4) > span:last-child { transition-delay: 0.43s; }
.mobile-nav.is-open nav a:nth-child(5) > span:last-child { transition-delay: 0.49s; }

.mn-num {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--accent-oak);
}

.mobile-nav nav a[aria-current='page'] > span:last-child,
.mobile-nav nav a:active > span:last-child {
  color: var(--accent-oak);
  font-style: italic;
}

.mobile-nav-footer {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 1.5rem;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--text-on-dark-muted);
  opacity: 0;
  transition: opacity 0.6s 0.5s ease;
}

.mobile-nav.is-open .mobile-nav-footer {
  opacity: 1;
}

.mobile-nav-footer a {
  color: var(--text-on-dark);
}

body.menu-open {
  overflow: hidden;
}

@media (max-width: 960px) {
  .main-nav,
  .header-actions .btn-header {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 0.95rem 1.2rem 0.95rem 1.65rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.45s var(--ease), border-color 0.45s ease, scale 150ms ease-out, translate 0.5s var(--ease);
}

.btn::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background-color: var(--fill, var(--accent-oak));
  transform: translateY(101%);
  transition: transform 0.55s var(--ease);
}

.btn:hover::before,
.btn:focus-visible::before {
  transform: translateY(0);
}

.btn:active {
  scale: 0.97;
}

.btn-arrow {
  display: inline-grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.8rem;
  transition: rotate 0.5s var(--ease);
}

.btn:hover .btn-arrow {
  rotate: -45deg;
}

.btn-primary {
  background-color: var(--text-ink);
  color: var(--text-on-dark);
  --fill: var(--accent-oak);
}

.btn-primary:hover {
  color: var(--bg-dark);
}

.btn-ghost {
  border-color: var(--border-strong);
  --fill: var(--text-ink);
}

.btn-ghost:hover {
  color: var(--text-on-dark);
  border-color: var(--text-ink);
}

.btn-light {
  background-color: var(--text-on-dark);
  color: var(--text-ink);
  --fill: var(--accent-oak);
}

.btn-outline-light {
  border-color: rgba(244, 239, 230, 0.4);
  color: var(--text-on-dark);
  --fill: var(--text-on-dark);
}

.btn-outline-light:hover {
  color: var(--text-ink);
}

.btn-header {
  padding: 0.6rem 1.3rem;
  border-color: color-mix(in srgb, currentColor 40%, transparent);
  font-size: 0.8rem;
  --fill: currentColor;
}

.btn-header:hover {
  color: var(--bg-ivory);
}

.has-dark-hero .site-header:not(.is-scrolled) .btn-header:hover {
  color: var(--text-ink);
}

.btn-full {
  width: 100%;
}

.round-cta {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 9.5rem;
  height: 9.5rem;
  border-radius: 50%;
  background-color: var(--text-ink);
  color: var(--text-on-dark);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.45;
  text-align: center;
  text-transform: uppercase;
  transition: background-color 0.45s ease, color 0.45s ease, scale 0.5s var(--ease), translate 0.5s var(--ease);
}

.round-cta:hover {
  background-color: var(--accent-oak);
  color: var(--bg-dark);
  scale: 1.06;
}

.round-cta--light {
  background-color: var(--accent-oak);
  color: var(--bg-dark);
}

.round-cta--light:hover {
  background-color: var(--text-on-dark);
}

.round-btn {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  background-color: transparent;
  color: var(--text-on-dark);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, scale 150ms ease-out;
}

.round-btn:hover {
  background-color: var(--text-on-dark);
  color: var(--text-ink);
  border-color: var(--text-on-dark);
}

.round-btn:active {
  scale: 0.92;
}

.link-arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.3rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.link-arrow::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background-color: currentColor;
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}

.link-arrow:hover::after {
  transform: scaleX(0.35);
}

/* ==========================================================================
   Typography
   ========================================================================== */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0 0 1.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-olive);
}

.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background-color: currentColor;
}

.eyebrow--light {
  color: var(--accent-oak);
}

.h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 4.8vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.h2 em,
.page-title em,
.hero-title em,
.project-title em,
.footer-big em {
  font-style: italic;
  color: var(--accent-oak);
}

.lead {
  margin: 0;
  max-width: 58ch;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.25vw, 1.1rem);
}

.lead-lg {
  margin: 0 0 1.5rem;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  line-height: 1.25;
}

.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}

.line > span {
  display: inline-block;
  padding-right: 0.08em;
}

@media (prefers-reduced-motion: no-preference) {
  .line > span {
    animation: line-up 1.15s var(--ease) both;
    animation-delay: calc(var(--intro) + 0.15s + var(--li, 0) * 0.1s);
  }

  .hero-anim {
    animation: fade-up 1s var(--ease) both;
    animation-delay: calc(var(--intro) + var(--d, 0.3s));
  }
}

@keyframes line-up {
  from {
    transform: translateY(112%);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding: clamp(5rem, 10vw, 9rem) 0;
}

.section--stone {
  background-color: var(--bg-stone);
}

.section--dark {
  background-color: var(--bg-dark);
  color: var(--text-on-dark);
}

.section--dark .lead {
  color: var(--text-on-dark-muted);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.section-head .h2 {
  max-width: 17ch;
}

/* ==========================================================================
   Home hero — full-screen slideshow with clip-path reveals
   ========================================================================== */

.hero {
  position: relative;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  color: var(--text-on-dark);
  background-color: var(--bg-dark);
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  clip-path: inset(0 0 0 100%);
}

.hero-slide.is-active {
  z-index: 2;
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.5s var(--ease-io);
}

.hero-slide.is-leaving {
  z-index: 1;
  clip-path: inset(0 0 0 0);
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.16);
  transition: transform 7.5s var(--ease);
}

.hero.is-ready .hero-slide.is-active img {
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(90deg, rgba(14, 12, 10, 0.86) 0%, rgba(14, 12, 10, 0.62) 55%, rgba(14, 12, 10, 0.3) 100%),
    linear-gradient(180deg, rgba(14, 12, 10, 0.72) 0%, rgba(14, 12, 10, 0.28) 35%, rgba(14, 12, 10, 0.65) 70%, rgba(14, 12, 10, 0.9) 100%);
  pointer-events: none;
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(6.75rem, 13vh, 9rem);
  z-index: 4;
}

.hero-content .eyebrow--light {
  display: inline-flex;
  padding: 0.42rem 1rem;
  border-radius: 999px;
  background-color: rgba(20, 18, 15, 0.68);
  border: 1px solid rgba(244, 239, 230, 0.28);
  backdrop-filter: blur(8px);
  color: #f7f4ef;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.hero-title {
  margin: 0 0 1.5rem;
  max-width: 13ch;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(3rem, 7.6vw, 7.2rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: #ffffff;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.55);
}

.hero-title em {
  font-style: italic;
  color: #f3d5a5;
}

.hero-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}

.hero-lead {
  margin: 0;
  max-width: 46ch;
  color: rgba(255, 252, 247, 0.94);
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.hero-ui {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2rem;
  z-index: 4;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
}

.hero-counter {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}

.hero-bar {
  position: relative;
  width: 90px;
  height: 1px;
  background-color: var(--border-light);
  overflow: hidden;
}

.hero-bar span {
  position: absolute;
  inset: 0;
  background-color: var(--text-on-dark);
  transform-origin: left;
  transform: scaleX(0);
}

.hero.is-playing .hero-bar span {
  animation: grow-x 6s linear forwards;
}

.hero-caption {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text-on-dark-muted);
  text-align: center;
}

.hero-controls {
  display: flex;
  gap: 0.6rem;
}

.scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(7.5rem, 15vh, 10rem);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.scroll-cue::after {
  content: '';
  width: 1px;
  height: 64px;
  background: linear-gradient(var(--text-on-dark), transparent);
  transform-origin: top;
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-cue::after {
    animation: cue 2.2s var(--ease-io) infinite;
  }

  @supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
    .hero-content,
    .scroll-cue {
      animation: hero-out linear both;
      animation-timeline: scroll(root);
      animation-range: 0px 85vh;
    }
  }
}

@keyframes cue {
  0% {
    transform: scaleY(0);
  }
  50% {
    transform: scaleY(1);
    transform-origin: top;
  }
  51% {
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

@keyframes hero-out {
  to {
    opacity: 0;
    translate: 0 -10vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide.is-active {
    transition: none;
  }

  .hero-slide img {
    transform: none;
    transition: none;
  }
}

@media (max-width: 760px) {
  .hero-content {
    bottom: 8.5rem;
  }

  .hero-ui {
    grid-template-columns: 1fr auto;
    bottom: 1.5rem;
  }

  .hero-caption {
    display: none;
  }

  .scroll-cue {
    display: none;
  }
}

/* ==========================================================================
   Marquee (editorial serif)
   ========================================================================== */

.marquee {
  overflow: hidden;
  padding: 1.6rem 0;
  background-color: var(--bg-dark);
  color: var(--text-on-dark);
  border-top: 1px solid var(--border-light);
}

.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 2.75rem;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-style: italic;
  white-space: nowrap;
}

.marquee-track .dot {
  font-style: normal;
  font-size: 0.6em;
  color: var(--accent-oak);
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes marquee-scroll {
    to {
      transform: translateX(-50%);
    }
  }

  .marquee-track {
    animation: marquee-scroll 40s linear infinite;
  }

  .marquee:hover .marquee-track {
    animation-play-state: paused;
  }
}

/* ==========================================================================
   Statement — words light up while scrolling
   ========================================================================== */

.statement {
  padding: clamp(6rem, 13vw, 11rem) 0;
}

.scrub-text {
  margin: 0;
  max-width: 24ch;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.4vw, 4rem);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.015em;
}

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .scrub-text {
      view-timeline: --scrub block;
    }

    .scrub-text .w {
      opacity: 0.14;
      animation: word-on linear both;
      animation-timeline: --scrub;
      animation-range: cover calc(18% + var(--p) * 40%) cover calc(22% + var(--p) * 40%);
    }
  }
}

@keyframes word-on {
  to {
    opacity: 1;
  }
}

.credentials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--border-hairline);
}

.credential strong {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 500;
  line-height: 1.15;
}

.credential span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

@media (max-width: 760px) {
  .credentials {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* ==========================================================================
   Horizontal pinned gallery (desktop) / swipe gallery (mobile)
   ========================================================================== */

.hscroll {
  position: relative;
  padding: clamp(4rem, 8vw, 6rem) 0;
  background-color: var(--bg-stone);
}

.hscroll-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.hscroll-track {
  display: flex;
  gap: 1.25rem;
  padding: 2.5rem var(--gutter) 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.hscroll-track::-webkit-scrollbar {
  display: none;
}

.hs-card {
  flex: 0 0 auto;
  width: 80vw;
  scroll-snap-align: center;
}

.hs-card button,
.proj-card button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.hs-media {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background-color: var(--bg-ivory);
}

.hs-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.75s var(--ease);
}

.hs-card:hover .hs-media img {
  transform: scale(1.05);
}

.hs-meta {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-top: 1.1rem;
}

.hs-num {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: var(--accent-oak);
}

.hs-meta h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 500;
  line-height: 1.15;
}

.hs-meta p {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hs-end {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 60vw;
  scroll-snap-align: center;
}

@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  .hscroll {
    height: 300vh;
    padding: 0;
    view-timeline: --hs block;
  }

  .hscroll-sticky {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100svh;
    overflow: hidden;
    container-type: inline-size;
  }

  .hscroll-track {
    width: max-content;
    overflow: visible;
    align-items: flex-start;
    gap: 2.5rem;
    padding-top: 3rem;
    will-change: transform;
  }

  .hs-card {
    width: auto;
  }

  .hs-media {
    height: 54svh;
  }

  .hs-card:nth-child(even) {
    margin-top: 7svh;
  }

  .hs-card:nth-child(even) .hs-media {
    height: 46svh;
    aspect-ratio: 4 / 3;
  }

  .hs-end {
    width: 32vw;
    height: 54svh;
  }

  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .hscroll-track {
      animation: hs-move linear both;
      animation-timeline: --hs;
      animation-range: contain 0% contain 100%;
    }
  }
}

@keyframes hs-move {
  to {
    transform: translateX(calc(-100% + 100cqw));
  }
}

/* ==========================================================================
   Services list with floating image preview
   ========================================================================== */

.svc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border-hairline);
}

.svc-row {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 4.5rem 1fr auto 3rem;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(1.5rem, 3vw, 2.4rem) 1rem;
  border-bottom: 1px solid var(--border-hairline);
  transition: color 0.5s var(--ease);
}

.svc-row::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--text-ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.65s var(--ease);
}

.svc-row:hover,
.svc-row:focus-visible {
  color: var(--text-on-dark);
}

.svc-row:hover::before,
.svc-row:focus-visible::before {
  transform: scaleY(1);
}

.svc-num {
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  color: var(--accent-oak);
}

.svc-name {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3.8vw, 3.2rem);
  line-height: 1.05;
  transition: translate 0.65s var(--ease);
}

.svc-row:hover .svc-name {
  translate: 1.25rem 0;
}

.svc-desc {
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  opacity: 0.7;
  text-align: right;
}

.svc-arrow {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  transition: rotate 0.6s var(--ease);
}

.svc-row:hover .svc-arrow {
  rotate: -45deg;
}

.hover-preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 300px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  pointer-events: none;
  opacity: 0;
  scale: 0.8;
  transition: opacity 0.35s ease, scale 0.6s var(--ease);
}

.hover-preview.is-visible {
  opacity: 1;
  scale: 1;
}

.hover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 760px) {
  .svc-row {
    grid-template-columns: 2.5rem 1fr 2.6rem;
    gap: 1rem;
    padding-inline: 0.5rem;
  }

  .svc-desc {
    display: none;
  }

  .svc-arrow {
    width: 2.4rem;
    height: 2.4rem;
  }
}

/* ==========================================================================
   Process — sticky media + steps
   ========================================================================== */

.process {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.process-media {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
}

.process-media .reveal-img {
  aspect-ratio: 4 / 5;
}

.steps {
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
}

.step {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-hairline);
}

.step-num {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  line-height: 1;
  color: var(--accent-oak);
}

.step h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
  font-weight: 500;
}

.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .process {
    grid-template-columns: 1fr;
  }

  .process-media {
    position: static;
  }

  .process-media .reveal-img {
    aspect-ratio: 4 / 3;
  }
}

/* ==========================================================================
   Image reveal & media
   ========================================================================== */

.reveal-img {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background-color: var(--bg-stone);
}

.reveal-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   Palette band — colours extracted from the photos
   ========================================================================== */

.palette-band {
  display: flex;
  height: clamp(340px, 62svh, 620px);
}

.pb-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.25rem;
  padding: 1.75rem 1.25rem;
  background-color: var(--c);
  color: var(--t);
  transition: flex-grow 0.8s var(--ease);
}

.pb-col:hover {
  flex-grow: 2.6;
}

.pb-name {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.2vw, 2rem);
  line-height: 1.1;
}

.pb-hex {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  opacity: 0.75;
}

@media (max-width: 760px) {
  .palette-band {
    flex-direction: column;
    height: auto;
  }

  .pb-col {
    min-height: 92px;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

/* ==========================================================================
   Accordion (<details> + ::details-content)
   ========================================================================== */

.accordion {
  max-width: 920px;
  border-top: 1px solid var(--border-hairline);
}

.accordion details {
  border-bottom: 1px solid var(--border-hairline);
}

.accordion summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.6rem 0;
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  line-height: 1.25;
  cursor: pointer;
  transition: color 0.3s ease;
}

.accordion summary:hover {
  color: var(--accent-olive);
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::before {
  content: '';
  flex-shrink: 0;
  inline-size: 0.8em;
  block-size: 0.8em;
  background-color: var(--accent-oak);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M12 4v16M4 12h16'/%3E%3C/svg%3E") no-repeat center / contain;
}

.accordion details[open] > summary::before {
  rotate: 45deg;
}

@media (prefers-reduced-motion: no-preference) {
  .accordion summary::before {
    transition: rotate 0.35s var(--ease);
  }
}

.accordion details::details-content {
  interpolate-size: allow-keywords;
  overflow: clip;
  contain: layout;
}

.accordion details:not([open])::details-content {
  block-size: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .accordion details::details-content {
    transition: block-size, content-visibility, display;
    transition-duration: 0.45s;
    transition-timing-function: var(--ease);
    transition-behavior: allow-discrete;
  }
}

.accordion-body {
  padding: 0 0 1.75rem 1.8em;
  color: var(--text-muted);
  max-width: 70ch;
}

.accordion-body p {
  margin: 0;
}

.accordion-body p + p {
  margin-top: 0.75rem;
}

/* ==========================================================================
   Sub-page hero
   ========================================================================== */

.page-hero {
  padding: clamp(4rem, 9vw, 8rem) 0 clamp(3rem, 6vw, 5rem);
}

.page-title {
  margin: 0 0 1.75rem;
  max-width: 15ch;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(3rem, 7.6vw, 7rem);
  line-height: 0.96;
  letter-spacing: -0.025em;
}

.page-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.page-hero-media {
  margin-top: clamp(3rem, 6vw, 5rem);
  aspect-ratio: 21 / 9;
}

@media (max-width: 760px) {
  .page-hero-media {
    aspect-ratio: 4 / 3;
  }
}

/* ==========================================================================
   Projects page — editorial offset grid
   ========================================================================== */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background-color: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, scale 150ms ease-out;
}

.filter-btn:hover {
  border-color: var(--text-ink);
  color: var(--text-ink);
}

.filter-btn:active {
  scale: 0.96;
}

.filter-btn.is-active {
  background-color: var(--text-ink);
  border-color: var(--text-ink);
  color: var(--text-on-dark);
}

.filter-btn sup {
  margin-left: 0.2rem;
  font-size: 0.65em;
  opacity: 0.7;
}

.proj-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3.5rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.proj-card[hidden] {
  display: none;
}

.proj-card:nth-child(even of :not([hidden])) {
  margin-top: clamp(4rem, 12vw, 10rem);
}

.proj-card a {
  display: block;
}

.proj-media {
  aspect-ratio: 4 / 3;
}

.proj-card:nth-child(3n + 1 of :not([hidden])) .proj-media {
  aspect-ratio: 4 / 5;
}

.proj-media img {
  transition: transform 1.1s var(--ease);
}

.proj-card a:hover .proj-media img {
  transform: scale(1.05);
}

.proj-meta {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding-top: 1.25rem;
}

.proj-num {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: var(--accent-oak);
}

.proj-meta h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: 500;
  line-height: 1.1;
}

.proj-cat {
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.proj-short {
  margin: 0.4rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .proj-grid {
    grid-template-columns: 1fr;
  }

  .proj-card:nth-child(even of :not([hidden])) {
    margin-top: 0;
  }

  .proj-meta {
    grid-template-columns: auto 1fr;
  }

  .proj-cat {
    grid-column: 2;
  }
}

/* ==========================================================================
   Services page — stacking sticky cards
   ========================================================================== */

.stack {
  display: grid;
  gap: 2rem;
}

.stack-card {
  position: sticky;
  top: calc(var(--header-h) + 1.25rem + var(--i) * 1.5rem);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  min-height: 68svh;
  padding: clamp(1.75rem, 4vw, 3.5rem);
  border: 1px solid var(--border-hairline);
  border-radius: 10px;
  background-color: var(--bg-card);
  box-shadow: 0 -18px 50px rgba(31, 29, 26, 0.06);
}

.stack-card:nth-child(even) {
  background-color: var(--bg-dark);
  border-color: var(--border-light);
  color: var(--text-on-dark);
}

.stack-card:nth-child(even) p,
.stack-card:nth-child(even) li {
  color: var(--text-on-dark-muted);
}

.stack-text {
  display: flex;
  flex-direction: column;
}

.stage-badge {
  align-self: flex-start;
  margin-bottom: 1.5rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-oak);
}

.stack-card h3 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  font-weight: 400;
  line-height: 1.02;
}

.stack-card p {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  max-width: 52ch;
}

.stage-list {
  margin: auto 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  list-style: none;
  font-size: 0.92rem;
}

.stage-list li {
  display: flex;
  gap: 0.75rem;
  padding: 0.3rem 0;
}

.stage-list li::before {
  content: '—';
  color: var(--accent-oak);
}

.stack-media {
  overflow: hidden;
  border-radius: var(--radius);
}

.stack-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 900px) {
  .stack-card {
    position: relative;
    top: auto;
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .stack-media {
    aspect-ratio: 4 / 3;
    order: -1;
  }
}

/* ==========================================================================
   About page
   ========================================================================== */

.about-split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.about-media {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
}

.about-media .reveal-img {
  aspect-ratio: 4 / 5;
}

.about-text p {
  color: var(--text-muted);
  max-width: 60ch;
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.principle {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-hairline);
}

.principle span {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: var(--accent-oak);
}

.principle h3 {
  margin: 0.5rem 0;
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 500;
}

.principle p {
  margin: 0;
  font-size: 0.9rem;
}

.quote {
  margin: 0;
  max-width: 22ch;
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.08;
}

.quote-cite {
  display: block;
  margin-top: 2rem;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-style: normal;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-oak);
}

@media (max-width: 900px) {
  .about-split {
    grid-template-columns: 1fr;
  }

  .about-media {
    position: static;
  }

  .about-media .reveal-img {
    aspect-ratio: 4 / 3;
  }

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

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.contact-phone {
  display: inline-block;
  margin: 0.5rem 0 2rem;
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  line-height: 1;
  border-bottom: 1px solid var(--border-strong);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.contact-phone:hover {
  color: var(--accent-olive);
  border-color: var(--accent-olive);
}

.contact-details {
  display: grid;
  gap: 1.5rem;
  margin: 0;
}

.contact-details dt {
  margin-bottom: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-oak);
}

.contact-details dd {
  margin: 0;
}

.contact-details a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.contact-form-wrap {
  padding: clamp(1.75rem, 4vw, 3rem);
  border: 1px solid var(--border-hairline);
  border-radius: 10px;
  background-color: var(--bg-card);
}

.contact-form {
  display: grid;
  gap: 1.5rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
}

.field label {
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.hint {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 0;
  border: 0;
  border-bottom: 1px solid var(--border-strong);
  border-radius: 0;
  background-color: transparent;
  transition: border-color 0.3s ease;
}

.field select {
  cursor: pointer;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--text-ink);
  box-shadow: 0 1px 0 0 var(--text-ink);
}

.error-msg {
  display: none;
  margin-top: 0.4rem;
  color: #b42318;
  font-size: 0.82rem;
}

:is(input, select, textarea):is(:user-invalid, .user-invalid-fallback) {
  border-bottom-color: #b42318;
}

:is(input, select, textarea):is(:user-invalid, .user-invalid-fallback) + .error-msg {
  display: block;
}

:is(input, select, textarea):is(:user-valid, .user-valid-fallback) {
  border-bottom-color: var(--accent-olive);
}

.form-success {
  padding: 1rem 1.25rem;
  border: 1px solid var(--accent-olive);
  border-radius: var(--radius);
  background-color: #eef2ea;
  color: #2f3827;
  font-size: 0.92rem;
}

.map-embed {
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--border-hairline);
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: clamp(320px, 50svh, 480px);
  border: 0;
  filter: grayscale(1) sepia(0.12) contrast(1.02);
}

@media (max-width: 860px) {
  .contact-grid,
  .field-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Project detail pages
   ========================================================================== */

.project-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 94svh;
  min-height: 560px;
  overflow: hidden;
  color: var(--text-on-dark);
  background-color: var(--bg-dark);
}

.project-hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  view-transition-name: proj-hero;
}

.project-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  scale: 1.08;
}

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
    .project-hero-media img {
      animation: hero-px linear both;
      animation-timeline: scroll(root);
      animation-range: 0px 100vh;
    }
  }
}

@keyframes hero-px {
  to {
    translate: 0 12%;
  }
}

.project-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 16, 13, 0.5) 0%, rgba(18, 16, 13, 0) 30%, rgba(18, 16, 13, 0.1) 55%, rgba(18, 16, 13, 0.8) 100%);
}

.project-hero-content {
  position: relative;
  padding-bottom: clamp(3rem, 7vh, 5rem);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  opacity: 0.85;
  transition: opacity 0.3s ease, translate 0.4s var(--ease);
}

.back-link:hover {
  opacity: 1;
  translate: -4px 0;
}

.project-title {
  margin: 0;
  max-width: 16ch;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.8rem, 7.2vw, 6.8rem);
  line-height: 0.96;
  letter-spacing: -0.025em;
}

.project-intro {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.project-meta {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--border-hairline);
}

.project-meta div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-hairline);
}

.project-meta dt {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-oak);
}

.project-meta dd {
  margin: 0;
  font-size: 0.92rem;
}

.project-body p {
  color: var(--text-muted);
  max-width: 62ch;
}

.materials {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border-hairline);
}

.materials li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-hairline);
  font-size: 0.95rem;
}

.materials li span {
  color: var(--accent-oak);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: end;
}

.crop {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: zoom-in;
}

.crop .reveal-img {
  aspect-ratio: 4 / 5;
}

.detail-grid .crop:first-child .reveal-img {
  aspect-ratio: 5 / 4;
}

.crop img {
  object-position: var(--pos, center);
  transform: scale(var(--z, 1));
  transform-origin: var(--pos, center);
  transition: transform 1s var(--ease);
}

.crop:hover img {
  transform: scale(calc(var(--z, 1) * 1.05));
}

.crop figcaption,
.crop-caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.swatch-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(0.5rem, 1.5vw, 1rem);
}

.chip {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 3 / 4;
  padding: 1rem;
  border-radius: var(--radius);
  background-color: var(--c);
  color: var(--t);
  transition: translate 0.5s var(--ease);
}

.chip:hover {
  translate: 0 -8px;
}

.chip strong {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  font-weight: 500;
  line-height: 1.1;
}

.chip span {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  opacity: 0.8;
}

.next-project {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 78svh;
  min-height: 460px;
  overflow: hidden;
  color: var(--text-on-dark);
  background-color: var(--bg-dark);
}

.next-media {
  position: absolute;
  inset: 0;
}

.next-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
  transition: transform 1.4s var(--ease), opacity 0.6s ease;
}

.next-project:hover .next-media img {
  transform: scale(1.05);
  opacity: 0.9;
}

.next-text {
  position: relative;
  padding-bottom: clamp(3rem, 7vh, 5rem);
}

.next-text h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 7vw, 6.4rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

@media (max-width: 860px) {
  .project-intro,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .swatch-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .chip {
    aspect-ratio: 1 / 2;
    padding: 0.6rem;
  }

  .chip strong {
    font-size: 0.85rem;
  }
}

/* ==========================================================================
   Footer — big CTA
   ========================================================================== */

.site-footer {
  padding: clamp(5rem, 10vw, 8rem) 0 2rem;
  background-color: var(--bg-dark);
  color: var(--text-on-dark);
}

.footer-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2.5rem;
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  border-bottom: 1px solid var(--border-light);
}

.footer-big {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(3rem, 9.5vw, 9rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.footer-big span {
  display: block;
  transition: translate 0.8s var(--ease);
}

.footer-big:hover span:last-child {
  translate: clamp(1rem, 3vw, 3rem) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  padding: 3rem 0;
}

.footer-col h3 {
  margin: 0 0 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-oak);
}

.footer-col p,
.footer-col a {
  display: block;
  margin: 0 0 0.4rem;
  color: var(--text-on-dark-muted);
  font-size: 0.92rem;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--text-on-dark);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.78rem;
  color: var(--text-on-dark-muted);
}

.footer-bottom a:hover {
  color: var(--text-on-dark);
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .round-cta {
    width: 8rem;
    height: 8rem;
  }
}

/* ==========================================================================
   Zoom dialog
   ========================================================================== */

.zoom {
  width: min(94vw, 1280px);
  max-height: 94vh;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background-color: var(--bg-dark);
  color: var(--text-on-dark);
}

.zoom::backdrop {
  background-color: rgba(14, 12, 10, 0.82);
  backdrop-filter: blur(6px);
}

.zoom img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.zoom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  font-size: 0.86rem;
  color: var(--text-on-dark-muted);
}

@media (prefers-reduced-motion: no-preference) {
  .zoom[open] {
    animation: zoom-in 0.5s var(--ease) both;
  }
}

@keyframes zoom-in {
  from {
    opacity: 0;
    scale: 0.94;
  }
}

/* ==========================================================================
   Scroll-driven reveals (fast GPU transform + opacity only)
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .reveal,
    .title-reveal {
      animation: reveal-up linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 32%;
    }
  }

  .sd-fallback .reveal,
  .sd-fallback .title-reveal {
    opacity: 0;
    translate: 0 20px;
    transition: opacity 0.45s ease, translate 0.5s var(--ease);
  }

  .sd-fallback .reveal.is-visible,
  .sd-fallback .title-reveal.is-visible {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes reveal-up {
  from {
    opacity: 0;
    translate: 0 22px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
