/* ============================================================
   CB Integrated Design — Core styles
   ============================================================ */

:root {
  --bg:        #FFFFFF; /* white page background */
  --bg-soft:   #F2F0EB; /* slightly off-white panel (menu / preloader) */
  --fg:        #211D18; /* warm near-black text */
  --muted:     rgba(33, 29, 24, 0.68); /* secondary text */
  --line:      rgba(33, 29, 24, 0.20);
  --accent:    #C6BEB5; /* taupe accent (highlights, marquee dots) */
  --accent-2:  #C6BEB5;
  --hero-fg:   #F6F2EA; /* light text for the dark hero band + on-accent fills */
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);

  --pad: clamp(1.25rem, 5vw, 6rem);
  --maxw: 1680px; /* content column cap on large screens */
}

/* On large monitors, cap content to a centered column, then progressively
   widen that column AND scale the root font as the display grows. Almost all
   sizes here are rem/clamp based, so lifting the root font-size scales the
   whole design up together — this is what keeps a 27" QHD, a 4K panel, an
   ultrawide and a 57" super-ultrawide all looking filled instead of
   stranding a small strip of content in the middle. */
@media (min-width: 1800px) {
  :root { --pad: calc((100vw - var(--maxw)) / 2); }
}
@media (min-width: 2560px) { :root { --maxw: 2040px; font-size: 19px; } }
@media (min-width: 3200px) { :root { --maxw: 2480px; font-size: 23px; } }
@media (min-width: 4200px) { :root { --maxw: 2900px; font-size: 27px; } }
@media (min-width: 5600px) { :root { --maxw: 3400px; font-size: 33px; } }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Manrope', sans-serif;
  font-weight: 300;
  line-height: 1.5;
  overflow-x: hidden;
}

body.is-loading { overflow: hidden; height: 100vh; }

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
em { font-style: italic; }

::selection { background: var(--accent); color: var(--fg); }

h1, h2, h3 { font-family: 'Syne', sans-serif; font-weight: 700; line-height: 0.95; letter-spacing: -0.02em; overflow-wrap: break-word; }

/* ============================================================
   Preloader
   ============================================================ */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--pad);
}
.preloader__inner {
  display: flex; justify-content: space-between; align-items: flex-end;
  width: 100%;
}
.preloader__brand { font-family: 'Syne', sans-serif; font-weight: 600; font-size: clamp(1rem, 2vw, 1.5rem); }
.preloader__brand-img { height: clamp(2.5rem, 5vw, 4rem); width: auto; display: block; }
.preloader__count {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: clamp(4rem, 18vw, 16rem); line-height: 0.8; letter-spacing: -0.04em;
}
.preloader__pct { font-size: 0.35em; vertical-align: top; color: var(--accent); }
.preloader__bar {
  margin-top: 2rem; height: 2px; width: 100%; background: var(--line);
  position: relative; overflow: hidden;
}
.preloader__bar span {
  position: absolute; left: 0; top: 0; height: 100%; width: 0%;
  background: var(--accent);
}

/* ============================================================
   Custom cursor
   ============================================================ */
.cursor, .cursor-dot {
  position: fixed; top: 0; left: 0; z-index: 999;
  border-radius: 50%; pointer-events: none;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}
.cursor {
  width: 36px; height: 36px; border: 1px solid var(--fg);
  transition: width .35s var(--ease), height .35s var(--ease), background .35s var(--ease);
}
.cursor-dot { width: 5px; height: 5px; background: var(--fg); }
.cursor.is-hover { width: 70px; height: 70px; background: var(--fg); border-color: transparent; }
@media (hover: none) { .cursor, .cursor-dot { display: none; } }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem var(--pad);
  color: var(--hero-fg); /* light by default — sits over the dark hero band */
  transition: padding .5s var(--ease), color .4s var(--ease);
}
/* Legibility scrim: over a bright hero slide the light nav washes out, so lay
   a soft top-anchored gradient behind it. Only in the over-hero (light) state —
   the scrolled and menu-open states sit on solid light fills and need none. */
.nav::before {
  content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 200%;
  z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(14, 12, 9, .72) 0%, rgba(14, 12, 9, .48) 45%, rgba(14, 12, 9, 0) 100%);
  opacity: 1; transition: opacity .4s var(--ease);
}
.nav:not(.nav--scrolled) { text-shadow: 0 1px 14px rgba(0, 0, 0, .5); }
/* Once past the hero (and on hero-less interior pages, where main.js adds this
   class on load) the nav sits over the light taupe page, so flip it to dark. */
.nav--scrolled { padding-top: 1rem; padding-bottom: 1rem; color: var(--fg); }
.nav--scrolled::before { opacity: 0; }
/* When the mobile menu is open the taupe overlay is behind the nav → dark. */
body.menu-open .nav { color: var(--fg); text-shadow: none; }
body.menu-open .nav::before { opacity: 0; }
.nav__logo { display: flex; align-items: center; gap: 0; }
.nav__logo-img { height: clamp(2.75rem, 5vw, 6rem); width: auto; display: block; }
.nav__logo-text {
  font-family: 'Syne', sans-serif; font-weight: 600; line-height: 1;
  font-size: clamp(.9rem, 1.2vw, 1.15rem); letter-spacing: .06em; text-transform: uppercase;
  color: currentColor; white-space: nowrap;
  /* the logo SVG has ~25% whitespace each side; pull the text back over it */
  margin-left: calc(clamp(2.75rem, 5vw, 6rem) * -0.2);
}
/* The logo art is dark (for the light body + footer). While the nav is light
   over the hero, invert it to read as white; cancel that once dark/menu-open. */
.nav:not(.nav--scrolled) .nav__logo-img { filter: invert(1) brightness(1.7); }
body.menu-open .nav:not(.nav--scrolled) .nav__logo-img { filter: none; }
.nav__links { display: flex; gap: 2.5rem; }
.nav__links a {
  font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; position: relative;
}
.nav__links a::after {
  content: ''; position: absolute; left: 0; bottom: -4px; height: 1px; width: 0;
  background: currentColor; transition: width .4s var(--ease);
}
.nav__links a:hover::after { width: 100%; }
.nav__links a[aria-current="page"]::after { width: 100%; }
.nav__cta {
  display: flex; align-items: center; gap: .6rem;
  font-size: .8rem; letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid currentColor; border-radius: 100px; padding: .7rem 1.2rem;
  transition: gap .35s var(--ease);
}
.nav__cta:hover { gap: 1.1rem; }
.nav__burger { display: none; background: none; border: 0; cursor: pointer; width: 34px; height: 20px; position: relative; }
.nav__burger span { position: absolute; left: 0; height: 1.5px; width: 100%; background: currentColor; transition: transform .4s var(--ease), opacity .3s; }
.nav__burger span:nth-child(1) { top: 4px; }
.nav__burger span:nth-child(2) { bottom: 4px; }
body.menu-open .nav__burger span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
body.menu-open .nav__burger span:nth-child(2) { transform: translateY(-5px) rotate(-45deg); }

/* Mobile menu */
.menu {
  position: fixed; inset: 0; z-index: 90; background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  clip-path: inset(0 0 100% 0); transition: clip-path .8s var(--ease);
}
body.menu-open .menu { clip-path: inset(0 0 0% 0); }
.menu__links { display: flex; flex-direction: column; gap: 1rem; text-align: center; padding: 0 var(--pad); max-width: 100%; }
.menu__link { font-family: 'Syne', sans-serif; font-weight: 700; font-size: clamp(1.8rem, 7vw, 5rem); letter-spacing: -0.03em; overflow-wrap: break-word; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--pad) + 5rem) var(--pad) var(--pad);
  overflow: hidden;
}
.hero__media { position: absolute; inset: -6% 0; z-index: -1; background: #16130e; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* This slide is a tall portrait shot — show the whole house (contained) instead
   of cropping it. The scale counters the hero__media -6% overshoot so nothing is
   clipped; the letterbox margins fall back to the dark hero background. */
.hero__media img.hero__slide--contain { object-fit: contain; transform: scale(0.89); }
/* Cross-dissolve slideshow. The incoming slide fades in ON TOP of the outgoing
   one, which is held opaque until the fade finishes — so the background never
   shows through mid-transition and there's no bright flash. */
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 2s ease-in-out; will-change: opacity; }
.hero__slide.is-active { opacity: 1; }
.hero__overlay {
  position: absolute; inset: 0;
  /* Must sit above the slides — setupHeroSlideshow gives the active/incoming
     slide inline z-index 1/2, so the overlay needs a higher one or it's hidden. */
  z-index: 3;
  /* Directional scrim: solid on the left where the copy sits, clearing to the
     right so the photograph reads through. */
  background: linear-gradient(to right,
    rgba(14, 12, 9, .92) 0%,
    rgba(14, 12, 9, .70) 30%,
    rgba(14, 12, 9, .32) 60%,
    rgba(14, 12, 9, 0) 88%);
}
.hero__eyebrow {
  font-size: .8rem; letter-spacing: .25em; text-transform: uppercase; color: var(--hero-fg);
  margin-bottom: 1.5rem;
}
.hero__title { font-family: 'EB Garamond', serif; font-size: clamp(1.9rem, 5.5vw, 5.5rem); font-weight: 800; color: var(--hero-fg); }
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span { display: block; }
.hero__title em { color: var(--accent); }
.hero__foot { margin-top: 2rem; max-width: 56ch; }
.hero__lead { font-size: clamp(.9rem, 1.15vw, 1.05rem); line-height: 1.5; color: rgba(246,242,234,.82); }
/* Soft shadow lifts the hero copy off the slideshow — no box, just a subtle glow. */
.hero__eyebrow, .hero__title, .hero__lead { text-shadow: 0 1px 18px rgba(0, 0, 0, 0.55); }
.hero__scroll {
  position: absolute; right: var(--pad); bottom: var(--pad);
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(246,242,234,.7);
}
.hero__scroll-line { width: 1px; height: 70px; background: rgba(246,242,234,.25); position: relative; overflow: hidden; }
.hero__scroll-line i { position: absolute; top: 0; left: 0; width: 100%; height: 40%; background: var(--accent); animation: scrolldrop 2s var(--ease) infinite; }
@keyframes scrolldrop { 0% { transform: translateY(-100%); } 100% { transform: translateY(250%); } }
.hero__year {
  position: absolute; top: 40%; right: var(--pad);
  writing-mode: vertical-rl; font-size: .7rem; letter-spacing: .3em; color: rgba(246,242,234,.6);
}

/* ============================================================
   Marquee
   ============================================================ */
.marquee { position: relative; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1.5rem 0; overflow: hidden; }
.marquee__track { display: flex; align-items: center; gap: 2.5rem; white-space: nowrap; will-change: transform; }
.marquee__track span { font-family: 'Syne', sans-serif; font-weight: 600; font-size: clamp(1.1rem, 2.6vw, 2rem); letter-spacing: -0.02em; }
.marquee__track .dot {
  flex: 0 0 auto; align-self: center;
  width: .5em; height: .5em; border-radius: 50%;
  background: var(--accent);
}

/* Architect's scale bar: a ruler tick strip flush to the band's bottom border,
   built from two layered repeating gradients (no per-tick DOM) — muted minor
   ticks every 28px, taller accent major ticks every 5th (140px). The pattern
   scrolls left at ~55px/s to match the text marquee; because it shifts by
   exactly one major period (140px = 5 minors) the loop has no visible seam.
   Frozen automatically by the global reduced-motion rule. */
.marquee__rule {
  position: absolute; left: 0; right: 0; bottom: 0; height: 14px;
  pointer-events: none;
  /* One tick per tile; the tile IS the spacing, tiled with repeat-x — so tiles
     are always in phase and shifting reveals identical neighbours (no seam, no
     right-edge gap). Layer 1 (major, accent, 14px) paints over layer 2 (minor,
     muted, 8px). Majors land every 140px = every 5th minor. */
  background-image:
    linear-gradient(to right, var(--accent) 0, var(--accent) 1px, transparent 1px),
    linear-gradient(to right, rgba(33, 29, 24, 0.22) 0, rgba(33, 29, 24, 0.22) 1px, transparent 1px);
  background-size: 140px 14px, 28px 8px;
  background-position: 0 100%, 0 100%;
  background-repeat: repeat-x, repeat-x;
  animation: rule-scroll 2.545s linear infinite;
}
/* Both layers shift the SAME 140px (= 1 major period = 5 minor periods) over
   one cycle, so they scroll in lockstep at ~55px/s to match the text marquee. */
@keyframes rule-scroll {
  from { background-position: 0 100%, 0 100%; }
  to   { background-position: -140px 100%, -140px 100%; }
}

/* ============================================================
   Sections / shared
   ============================================================ */
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 0 var(--pad); margin-bottom: clamp(3.5rem, 8vw, 7.5rem);
}
.section-head__title { font-size: clamp(2.2rem, 6vw, 5rem); }
.section-head__title span, .section-head__meta span { display: inline-block; }
.section-head__meta { font-size: .8rem; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }

.reveal span, .reveal-line span { display: inline-block; }

/* Studio */
.studio { padding: clamp(5rem, 12vw, 11rem) 0; }
.studio__grid { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; padding: 0 var(--pad); }
.studio__label { font-size: .8rem; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.studio__text { font-family: 'Syne', sans-serif; font-weight: 500; font-size: clamp(1.6rem, 3.4vw, 3rem); line-height: 1.15; letter-spacing: -0.02em; }
.studio__text span.word { display: inline-block; opacity: .12; }
.studio__sub { margin-top: 2.5rem; max-width: 46ch; color: var(--muted); font-size: 1.05rem; }

.stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem;
  padding: clamp(3rem, 7vw, 6rem) var(--pad) 0;
}
.stat { display: flex; flex-direction: column; }
.stat__num { font-family: 'Syne', sans-serif; font-weight: 700; font-size: clamp(2.5rem, 6vw, 5rem); letter-spacing: -0.03em; line-height: 1; display: inline; }
.stat__plus { font-family: 'Syne', sans-serif; font-weight: 700; font-size: clamp(2.5rem, 6vw, 5rem); color: var(--accent); }
.stat__label { margin-top: .8rem; font-size: .85rem; color: var(--muted); letter-spacing: .03em; }

/* ============================================================
   Work / projects
   ============================================================ */
.work { padding: clamp(3rem, 8vw, 7rem) 0; }
.projects {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem);
  padding: 0 var(--pad);
}
.project { cursor: pointer; }
.project--offset { transform: translateY(clamp(2rem, 8vw, 7rem)); }
.project__media { overflow: hidden; aspect-ratio: 4/5; position: relative; }
.project__media img { transform: scale(1.05); transition: transform 1s var(--ease); }
.project:hover .project__media img { transform: scale(1.12); }
.project__info { display: flex; align-items: baseline; gap: 1rem; margin-top: 1.2rem; position: relative; }
.project__title { font-size: clamp(1.5rem, 2.6vw, 2.4rem); }
.project__cat { color: var(--muted); font-size: .85rem; letter-spacing: .05em; text-transform: uppercase; }
.project__index { margin-left: auto; font-family: 'Syne', sans-serif; color: var(--muted); font-size: .9rem; }
/* Crawlable project copy surfaced from the modal onto the gallery cards — the
   richest keyword content on the site. Muted so it sits quietly under each card. */
.project__place { margin-top: .9rem; color: var(--muted); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.project__desc { margin-top: .5rem; max-width: 46rem; color: var(--muted); font-size: clamp(.9rem, 1.1vw, 1rem); line-height: 1.65; }
/* Visually hidden, but present for crawlers and screen readers — for section
   headings that keep the heading outline correct without changing the design. */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.work__all {
  display: inline-block; margin: clamp(4rem, 9vw, 8rem) var(--pad) 0;
  font-family: 'Syne', sans-serif; font-weight: 600; font-size: clamp(1.2rem, 2vw, 1.8rem);
  border-bottom: 1px solid var(--fg); padding-bottom: .3rem;
}

/* ============================================================
   Horizontal gallery
   ============================================================ */
.gallery { position: relative; }
.gallery__sticky { height: 100vh; position: sticky; top: 0; display: flex; align-items: center; overflow: hidden; }
.gallery__track { display: flex; gap: clamp(1.5rem, 3vw, 3rem); align-items: center; padding: 0 var(--pad); will-change: transform; }
.gallery__intro { flex: 0 0 auto; width: min(80vw, 30rem); padding-right: 2rem; }
.gallery__intro h2 { font-size: clamp(2.5rem, 6vw, 5rem); margin-bottom: 1.5rem; }
.gallery__intro p { color: var(--muted); max-width: 32ch; }
.gcard { flex: 0 0 auto; width: clamp(16rem, 26vw, 24rem); }
.gcard img { aspect-ratio: 3/4; border-radius: 2px; }
.gcard figcaption { margin-top: 1rem; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ============================================================
   Services
   ============================================================ */
.services { padding: clamp(4rem, 9vw, 8rem) 0; }
.svc {
  display: grid; grid-template-columns: 80px 1fr 1.4fr 60px; gap: 2rem; align-items: center;
  padding: clamp(1.8rem, 3.5vw, 2.8rem) var(--pad);
  border-top: 1px solid var(--line); position: relative; overflow: hidden;
  transition: color .4s var(--ease);
}
.svc:last-child { border-bottom: 1px solid var(--line); }
.svc::before {
  content: ''; position: absolute; inset: 0; background: var(--accent);
  transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease); z-index: -1;
}
.svc:hover { color: var(--fg); }
.svc:hover::before { transform: scaleY(1); transform-origin: top; }
.svc__num { font-family: 'Syne', sans-serif; font-size: .9rem; color: var(--muted); transition: color .4s; }
.svc:hover .svc__num { color: var(--fg); }
.svc__title { font-size: clamp(1.6rem, 3.2vw, 2.8rem); }
.svc__desc { color: var(--muted); max-width: 44ch; transition: color .4s; }
.svc:hover .svc__desc { color: rgba(33,29,24,.8); }
.svc__arrow { font-size: 1.6rem; text-align: right; transform: translateX(-10px); opacity: 0; transition: all .4s var(--ease); }
.svc:hover .svc__arrow { transform: translateX(0); opacity: 1; }

/* ============================================================
   Process
   ============================================================ */
.process { padding: clamp(4rem, 9vw, 8rem) 0; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.5rem, 3vw, 3rem); padding: 0 var(--pad); }
.step { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.step__num { font-family: 'Syne', sans-serif; font-weight: 600; color: var(--muted); font-size: .9rem; letter-spacing: .05em; }
.step h3 { font-size: clamp(1.4rem, 2.6vw, 2.2rem); margin: 1.2rem 0 1rem; }
.step p { color: var(--muted); font-size: .95rem; }

/* ============================================================
   Contact
   ============================================================ */
.contact { padding: clamp(6rem, 16vw, 14rem) var(--pad); text-align: center; }
.contact__eyebrow { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 2rem; }
.contact__title { font-size: clamp(2.5rem, 11vw, 9rem); margin-bottom: 3rem; }
.contact__title .line { display: block; overflow: hidden; }
.contact__title .line > span { display: block; }
.contact__title em { color: var(--accent); }
.contact__mail {
  display: inline-block; font-family: 'Syne', sans-serif; font-weight: 600;
  font-size: clamp(1.1rem, 3vw, 2.2rem); border-bottom: 1px solid var(--fg); padding-bottom: .4rem;
  transition: color .4s var(--ease);
}
.contact__mail:hover { color: var(--accent); border-color: var(--accent); }
.contact__note { margin-top: 2.5rem; color: var(--muted); font-size: .95rem; }

/* ============================================================
   Footer
   ============================================================ */
.footer { border-top: 1px solid var(--line); padding: clamp(3rem, 6vw, 5rem) var(--pad) 2rem; }
.footer__top { display: grid; grid-template-columns: auto 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.footer__brand { display: flex; align-items: center; gap: 0; }
.footer__brand-img { height: clamp(3rem, 10vw, 7rem); width: auto; display: block; }
.footer__brand-text {
  font-family: 'Syne', sans-serif; font-weight: 600; line-height: 1;
  font-size: clamp(1.1rem, 3vw, 2.2rem); letter-spacing: .02em; text-transform: uppercase;
  margin-left: calc(clamp(3rem, 10vw, 7rem) * -0.2);
}
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer__col { display: flex; flex-direction: column; gap: .6rem; }
.footer__col a, .footer__col span { font-size: .9rem; color: var(--muted); }
.footer__col a:hover { color: var(--fg); }
.footer__h { font-family: 'Syne', sans-serif; color: var(--fg) !important; font-size: .8rem !important; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .5rem; }
.footer__social { display: inline-flex; align-items: center; gap: .5rem; }
.footer__social svg { flex: 0 0 auto; }
.footer__bottom { display: flex; justify-content: space-between; margin-top: clamp(3rem, 8vw, 6rem); padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.footer__top-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; }
.footer__top-btn:hover { color: var(--fg); }
.footer__credit { color: var(--muted); }
.footer__credit a { color: var(--fg); border-bottom: 1px solid transparent; transition: border-color .3s var(--ease); }
.footer__credit a:hover { border-color: var(--fg); }

/* ============================================================
   Interior pages (Residential, Hospitality, Before/After, Services, Contact)
   ============================================================ */
.page { padding: clamp(8rem, 14vw, 12rem) 0 clamp(4rem, 9vw, 8rem); }

.page-hero { padding: 0 var(--pad); margin-bottom: clamp(3rem, 7vw, 6rem); max-width: 68rem; }
.page-hero__eyebrow {
  font-size: .8rem; letter-spacing: .25em; text-transform: uppercase; font-weight: 500;
  color: var(--muted); margin-bottom: 1.5rem; overflow: hidden;
}
.page-hero__title { font-size: clamp(2.6rem, 8vw, 6rem); margin-bottom: 1.5rem; }
.page-hero__title .line { display: block; overflow: hidden; }
.page-hero__title .line > span { display: inline-block; }
.page-hero__lead {
  font-size: clamp(1rem, 1.6vw, 1.3rem); color: var(--muted);
  max-width: 48ch; overflow: hidden;
}

/* Legal pages (Privacy Policy, Terms & Conditions) — long-form prose */
.legal { padding: 0 var(--pad); max-width: 72ch; }
.legal > * + * { margin-top: 1.15rem; }
.legal p, .legal li { color: var(--muted); font-size: 1rem; line-height: 1.75; }
.legal h2 {
  font-size: clamp(1.15rem, 2.4vw, 1.55rem); line-height: 1.2;
  color: var(--fg); margin-top: 2.75rem;
}
.legal h2 + p, .legal h2 + ul { margin-top: 1rem; }
.legal ul { margin-left: 1.2rem; }
.legal li + li { margin-top: .5rem; }
.legal a { color: var(--fg); border-bottom: 1px solid var(--line); transition: border-color .3s var(--ease); }
.legal a:hover { border-color: var(--fg); }
.legal strong { color: var(--fg); font-weight: 500; }

/* About page — spacing between the reused studio / stats / values blocks */
.about__statement { margin-top: clamp(1rem, 3vw, 2.5rem); }
.about__overview { margin-top: clamp(3rem, 7vw, 6rem); }
.about__prose { display: flex; flex-direction: column; gap: 1.35rem; max-width: 62ch; }
.about__prose p { color: var(--muted); font-size: clamp(1rem, 1.35vw, 1.15rem); line-height: 1.75; }
.about__values { padding-top: clamp(4rem, 9vw, 8rem); }

/* Before & After */
.ba-intro { padding: 0 var(--pad); max-width: 62rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.7; }
.ba-list { display: flex; flex-direction: column; gap: clamp(3rem, 7vw, 6rem); padding: 0 var(--pad); }
.ba__pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2vw, 1.5rem); }
/* Mixed-orientation source photos (many are portrait), so contain them on a
   soft mount instead of cropping to a fixed landscape box — every shot shows in
   full, with small symmetric margins, in a tidy aligned grid. */
.ba__frame { position: relative; overflow: hidden; cursor: zoom-in; aspect-ratio: 1 / 1; background: var(--bg-soft); }
.ba__frame img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .6s var(--ease); }
.ba__frame:hover img { transform: scale(1.03); }
.ba__frame figcaption {
  position: absolute; top: 1rem; left: 1rem; font-size: .7rem; letter-spacing: .15em;
  text-transform: uppercase; background: var(--bg); color: var(--fg);
  padding: .4rem .8rem; border: 1px solid var(--line);
}
.ba__title { font-family: 'Syne', sans-serif; font-weight: 600; font-size: clamp(1.1rem, 2vw, 1.6rem); margin-top: 1.5rem; }

/* Contact page */
.contact-grid {
  display: grid; grid-template-columns: 2fr 1fr; gap: clamp(2rem, 5vw, 5rem);
  padding: 0 var(--pad); align-items: start;
}
.contact-form {
  display: flex; flex-direction: column; gap: 1.4rem;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
.field { display: flex; flex-direction: column; gap: .55rem; }
.field > span { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg); }
.field input, .field textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  color: var(--fg); font: inherit; padding: .85rem 1rem; resize: vertical;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--fg); box-shadow: 0 0 0 3px rgba(33, 29, 24, .08);
}
.contact-form__submit {
  align-self: flex-start; display: inline-flex; align-items: center; gap: .6rem;
  border: 1px solid var(--fg); border-radius: 100px; background: var(--fg); color: var(--bg);
  font: inherit; padding: .95rem 1.8rem; cursor: pointer; margin-top: .5rem;
  transition: background .4s var(--ease), color .4s var(--ease);
}
.contact-form__submit:hover:not(:disabled) { background: transparent; color: var(--fg); }
.contact-form__submit:disabled { opacity: .6; cursor: default; }
/* Honeypot — hidden from humans, present for bots. Kept out of the flow and
   off the accessibility tree; visually gone but not display:none (some bots
   skip display:none fields). */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.contact-form__status { font-size: .9rem; color: var(--muted); margin-top: -.4rem; }
.contact-form__status.is-success { color: var(--fg); }
.contact-form__status.is-error { color: #b23b2e; }
.contact-aside { display: flex; flex-direction: column; gap: 2rem; }
.contact-aside__block { display: flex; flex-direction: column; gap: .4rem; }

/* ============================================================
   Project viewer (slide-in panel)
   ============================================================ */
.pmodal {
  position: fixed; inset: 0; z-index: 200; visibility: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
}
.pmodal.is-open { visibility: visible; }
.pmodal__backdrop {
  position: absolute; inset: 0; background: rgba(20, 18, 14, .55);
  opacity: 0; transition: opacity .4s var(--ease);
}
.pmodal.is-open .pmodal__backdrop { opacity: 1; }
.pmodal__panel {
  position: relative; width: min(1200px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--bg); color: var(--fg);
  padding: clamp(2rem, 4vw, 4rem);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .35); border-radius: 4px;
  opacity: 0; transform: translateY(16px) scale(.98);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.pmodal.is-open .pmodal__panel { opacity: 1; transform: none; }
.pmodal__close {
  position: sticky; top: 0; margin-left: auto; display: block;
  background: none; border: 0; color: var(--fg); font-size: 2rem; line-height: 1;
  cursor: pointer; opacity: .6; transition: opacity .3s; z-index: 1;
}
.pmodal__close:hover { opacity: 1; }
.pmodal__cat { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.pmodal__title { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 1.8rem; }
.pmodal__meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem;
  padding: 1.5rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.pmodal__metaitem dt { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .25rem; }
.pmodal__metaitem dd { font-family: 'Syne', sans-serif; font-size: 1.05rem; }
.pmodal__desc { margin-top: 1.8rem; color: var(--muted); font-size: 1rem; line-height: 1.6; max-width: 52ch; }
/* Until real copy is added, empty meta/description shouldn't render (the meta dl
   has borders + padding, so an empty one would show as a hollow strip). */
.pmodal__meta:empty { display: none; }
.pmodal__desc:empty { display: none; }
.pmodal__gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 1rem; margin-top: 2.2rem; }
/* Each shot is a button that opens the lightbox. */
.pmodal__shot {
  position: relative; display: block; width: 100%; padding: 0; margin: 0;
  border: 0; background: none; overflow: hidden; border-radius: 2px;
  aspect-ratio: 3/2; cursor: zoom-in;
}
.pmodal__shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease), filter .4s var(--ease); }
.pmodal__shot:hover img, .pmodal__shot:focus-visible img { transform: scale(1.05); filter: brightness(.82); }
.pmodal__shot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pmodal__zoom {
  position: absolute; top: .6rem; right: .6rem; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
  color: var(--hero-fg); background: rgba(20, 18, 14, .5); border-radius: 2px;
  opacity: 0; transform: scale(.85); pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.pmodal__shot:hover .pmodal__zoom, .pmodal__shot:focus-visible .pmodal__zoom { opacity: 1; transform: none; }
body.pmodal-open { overflow: hidden; }

/* ============================================================
   Image lightbox (opened from a project gallery shot)
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 300; visibility: hidden; opacity: 0;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1.5rem, 5vw, 4rem); background: rgba(12, 10, 8, .92);
  transition: opacity .35s var(--ease), visibility .35s var(--ease);
}
.lightbox.is-open { visibility: visible; opacity: 1; }
.lightbox__img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 3px; box-shadow: 0 30px 90px rgba(0, 0, 0, .5);
  transform: scale(.96); transition: transform .35s var(--ease);
}
.lightbox.is-open .lightbox__img { transform: none; }
.lightbox__close, .lightbox__nav {
  position: absolute; background: none; border: 0; color: var(--hero-fg); cursor: pointer;
  opacity: .7; line-height: 1; z-index: 1; transition: opacity .3s var(--ease);
}
.lightbox__close:hover, .lightbox__nav:hover { opacity: 1; }
.lightbox__close { top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); font-size: 2.2rem; }
.lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 3rem; padding: .5rem; }
.lightbox__nav--prev { left: clamp(.5rem, 2vw, 2rem); }
.lightbox__nav--next { right: clamp(.5rem, 2vw, 2rem); }
.lightbox__count {
  position: absolute; bottom: clamp(1rem, 3vw, 2rem); left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 11px; letter-spacing: .25em; color: rgba(246, 242, 234, .7);
}
/* Single-image projects: no arrows / counter. */
.lightbox--single .lightbox__nav, .lightbox--single .lightbox__count { display: none; }

/* ============================================================
   Responsive
   ============================================================ */
/* Collapse the nav to a burger early — the long link labels (e.g.
   "Hospitality/Commercial") plus six links, the logo and the CTA run out of
   room before this. */
@media (max-width: 1240px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }
}

/* Tablet / small laptop */
@media (max-width: 900px) {
  .studio__grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .stats { grid-template-columns: 1fr 1fr; gap: 2.5rem 1.5rem; }
  .projects { grid-template-columns: 1fr; gap: 3rem; }
  .project--offset { transform: none; }
  .svc { grid-template-columns: 50px 1fr; grid-template-areas: "num title" "desc desc"; gap: .5rem 1.5rem; }
  .svc__desc { grid-area: desc; margin-top: .5rem; }
  .svc__arrow { display: none; }
  .steps { grid-template-columns: 1fr 1fr; gap: 2.5rem 1.5rem; }
  .footer__top { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 540px) {
  .stats, .steps { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr; }
  /* The absolutely-positioned hero corner accents crowd the text on a narrow
     phone screen — hide both there (they're decorative). */
  .hero__year, .hero__scroll { display: none; }
  .ba__pair { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 1rem; }
  /* Stack the section head so a long meta label can't fight the title for width. */
  .section-head { flex-direction: column; align-items: flex-start; gap: .6rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============================================================
   Blueprint overlays + level indicator
   ------------------------------------------------------------
   Purely decorative layers built + injected by main.js. Every
   piece is pointer-events:none so nothing here can block a click.
   The fixed left-edge level indicator uses mix-blend-mode:difference
   so the accent stays legible over BOTH the dark hero band and the
   white body. Hero-only marks sit on the dark band and use the
   palette colours directly. Labels use a system mono stack
   (JetBrains Mono if the visitor happens to have it, else ui-mono),
   so nothing extra is downloaded.
   ============================================================ */
:root {
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --bp-line:       rgba(198, 190, 181, 0.5);   /* accent taupe — hero crop marks */
  --bp-ink:        rgba(246, 242, 234, 0.55);  /* light muted mono on dark hero  */
  --bp-ink-strong: rgba(246, 242, 234, 0.88);  /* brighter sheet number          */
}

/* ---------- Vertical level / elevation indicator (left edge) ---------- */
.lvl {
  position: fixed; top: 0; left: clamp(.5rem, 1.4vw, 1.15rem); z-index: 60;
  height: 100vh; padding: 6.5rem 0 2.5rem;
  display: flex; flex-direction: column; align-items: center; gap: .9rem;
  pointer-events: none; font-family: var(--mono); color: var(--accent);
}
.lvl__id, .lvl__line, .lvl__marker, .lvl__section { mix-blend-mode: difference; }
.lvl__id { font-size: 10px; letter-spacing: .32em; text-transform: uppercase; }
.lvl__line { position: relative; flex: 1 1 auto; width: 1px; background: var(--accent); opacity: .55; }
.lvl__marker {
  position: absolute; left: 50%; top: 0; width: 6px; height: 6px;
  background: var(--accent); transform: translate(-50%, -50%); will-change: top;
}
.lvl__section {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 10px; letter-spacing: .28em; text-transform: uppercase; white-space: nowrap;
}

/* ---------- Corner crop marks + drawing title block (hero) ---------- */
.bp { position: absolute; inset: 0; pointer-events: none; z-index: 2; font-family: var(--mono); }
.bp-crop { position: absolute; width: 30px; height: 30px; }
.bp-crop::before, .bp-crop::after { content: ''; position: absolute; background: var(--bp-line); }
.bp-crop::before { width: 100%; height: 1px; }   /* horizontal arm */
.bp-crop::after  { width: 1px; height: 100%; }    /* vertical arm   */
.bp-crop--tl { top: 18px; left: 18px; }
.bp-crop--tl::before { top: 0; left: 0; }
.bp-crop--tl::after  { top: 0; left: 0; }
.bp-crop--tr { top: 18px; right: 18px; }
.bp-crop--tr::before { top: 0; right: 0; }
.bp-crop--tr::after  { top: 0; right: 0; }
.bp-title {
  /* floor of 13rem keeps it clear of the hero scroll cue (~bottom-right)
     on short desktops; grows with tall viewports up to 18rem. */
  position: absolute; right: var(--pad); bottom: clamp(13rem, 20vh, 18rem);
  display: flex; flex-direction: column; align-items: flex-end; gap: .35rem;
  text-align: right; font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--bp-ink); line-height: 1.4;
}
.bp-title__sheet { color: var(--bp-ink-strong); }

@media (max-width: 768px) {
  .bp-title, .lvl { display: none; }
}
/* Level indicator is hidden on touch. */
@media (hover: none) {
  .lvl { display: none; }
}
