/* ==========================================================================
   DARC — Advanced Company Ltd.
   Design System & Global Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Web Fonts — Mont & Mont Blanc (self-hosted)
   -------------------------------------------------------------------------- */

/* Mont — body / UI sans (Thin · ExtraLight · Regular · Bold · Heavy) */
@font-face {
  font-family: 'Mont';
  src: url('../fonts/fonnts.com-Mont_Thin.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mont';
  src: url('../fonts/fonnts.com-Mont_ExtraLight_DEMO.ttf') format('truetype');
  font-weight: 200 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mont';
  src: url('../fonts/fonnts.com-Mont_Regular.ttf') format('truetype');
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mont';
  src: url('../fonts/fonnts.com-Mont_Bold.ttf') format('truetype');
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mont';
  src: url('../fonts/fonnts.com-Mont_Heavy_DEMO.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* Mont Blanc — display headings (ExtraLight · ExtraBold + italic Thin/Regular/Bold) */
@font-face {
  font-family: 'Mont Blanc';
  src: url('../fonts/fonnts.com-Mont_Blanc_ExtraLight.ttf') format('truetype');
  font-weight: 100 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mont Blanc';
  src: url('../fonts/fonnts.com-Mont_Blanc_ExtraBold.ttf') format('truetype');
  font-weight: 600 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mont Blanc';
  src: url('../fonts/fonnts.com-Mont_Blanc_Thin_Italic.ttf') format('truetype');
  font-weight: 100 200;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Mont Blanc';
  src: url('../fonts/fonnts.com-Mont_Blanc_Regular_Italic.ttf') format('truetype');
  font-weight: 300 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Mont Blanc';
  src: url('../fonts/fonnts.com-Mont_Blanc_Bold_Italic.ttf') format('truetype');
  font-weight: 600 900;
  font-style: italic;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   1. Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette — sourced from D.Arc company profile (cream + warm brown + black) */
  --brand-cream:    #EFE6D5;  /* primary light bg — paper warm */
  --brand-cream-2:  #E5DAC5;  /* slightly deeper cream — alt sections */
  --brand-tan:      #C9B79A;  /* warm sand — feature blocks */
  --brand-brown:    #2A1F18;  /* deep warm brown — dark sections */
  --brand-brown-2:  #3A2D22;  /* lighter brown — surface on dark */
  --brand-black:    #1A1610;  /* near-black — text on light */
  --brand-white:    #FFFFFF;

  /* Legacy aliases (kept so existing rules keep working) */
  --ink: var(--brand-brown);
  --ink-2: var(--brand-brown-2);
  --ink-3: var(--brand-brown-2);
  --ink-4: var(--brand-brown-2);
  --bone: var(--brand-cream);
  --cream: var(--brand-cream-2);
  --sand: var(--brand-tan);
  --stone: rgba(26, 22, 16, 0.55);
  --smoke: rgba(26, 22, 16, 0.40);

  /* Emphasis — brand uses BOLD same-color, not a coloured accent.
     --accent intentionally redirects to brand-black so legacy rules
     stop producing gold while we sweep components. */
  --gold: var(--brand-black);
  --gold-bright: var(--brand-brown);
  --gold-deep: var(--brand-brown-2);
  --gold-whisper: rgba(26, 22, 16, 0.06);

  /* Semantic — light mode (default) */
  --bg: var(--brand-cream);
  --bg-alt: var(--brand-cream-2);
  --surface: var(--brand-tan);
  --text: var(--brand-black);
  --text-muted: rgba(26, 22, 16, 0.65);
  --text-dim: rgba(26, 22, 16, 0.42);
  --accent: var(--brand-black);
  --accent-hover: var(--brand-brown);
  --rule: rgba(26, 22, 16, 0.12);
  --rule-strong: rgba(26, 22, 16, 0.25);
  --rule-gold: rgba(26, 22, 16, 0.35);

  /* Typography */
  --font-display: 'Mont Blanc', 'Mont', sans-serif;
  --font-body: 'Mont', sans-serif;
  --font-mono: 'Mont', monospace;

  /* Type Scale (fluid) — tuned for sans-serif (Mont / Mont Blanc) */
  --fs-xs: clamp(0.66rem, 0.64rem + 0.08vw, 0.72rem);
  --fs-sm: clamp(0.76rem, 0.74rem + 0.08vw, 0.83rem);
  --fs-base: clamp(0.88rem, 0.86rem + 0.10vw, 0.94rem);
  --fs-md: clamp(0.98rem, 0.95rem + 0.14vw, 1.08rem);
  --fs-lg: clamp(1.15rem, 1.05rem + 0.45vw, 1.40rem);
  --fs-xl: clamp(1.40rem, 1.18rem + 0.95vw, 1.95rem);
  --fs-2xl: clamp(1.70rem, 1.35rem + 1.55vw, 2.55rem);
  --fs-3xl: clamp(2.10rem, 1.55rem + 2.40vw, 3.55rem);
  --fs-4xl: clamp(2.50rem, 1.85rem + 2.90vw, 4.40rem);

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --sp-10: 8rem;
  --sp-11: 10rem;
  --sp-12: 12rem;

  /* Layout */
  --container: 1440px;
  --container-narrow: 1080px;
  --container-reading: 780px;
  --gutter: clamp(1.25rem, 1rem + 2vw, 2.75rem);
  --nav-h: 84px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.30, 1);
  --ease-in: cubic-bezier(0.6, 0, 0.8, 0.2);
  --dur-fast: 220ms;
  --dur: 420ms;
  --dur-slow: 820ms;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.4);
  --shadow-lg: 0 30px 80px rgba(0,0,0,0.55);
  --shadow-gold: 0 20px 50px rgba(182, 142, 78, 0.18);
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* IMPORTANT: ligatures + contextual alternates are DISABLED because the
     Mont DEMO fonts ship with broken substitutions that drop letters from
     pairs like "ff", "fi", "rf" → "offer" became "oer", "surface" became
     "suace", etc.  Only kerning stays on. */
  font-feature-settings: "kern" 1;
  font-variant-ligatures: none;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1;
  font-variant-ligatures: none;
  letter-spacing: 0.005em;
}

img, svg, video, picture {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.005em;
  color: var(--text);
}

p { max-width: 68ch; }

::selection {
  background: var(--gold);
  color: var(--brand-cream);
}

/* --------------------------------------------------------------------------
   3. Layout Primitives
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

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

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

.section {
  padding-block: var(--sp-10);
}

.section-sm { padding-block: var(--sp-8); }
.section-lg { padding-block: var(--sp-12); }

.bg-alt { background: var(--bg-alt); }
.bg-surface { background: var(--surface); }
.bg-cream { background: var(--brand-cream); color: var(--brand-black); }

/* Dark sections — re-scope tokens so descendants use light text automatically */
.bg-dark {
  background: var(--brand-brown);
  color: var(--brand-cream);
  --text: var(--brand-cream);
  --text-muted: rgba(239, 230, 213, 0.72);
  --text-dim: rgba(239, 230, 213, 0.48);
  --accent: var(--brand-cream);
  --accent-hover: var(--brand-white);
  --rule: rgba(239, 230, 213, 0.10);
  --rule-strong: rgba(239, 230, 213, 0.22);
  --rule-gold: rgba(239, 230, 213, 0.32);
  --bg: var(--brand-brown);
  --bg-alt: var(--brand-brown-2);
  --surface: var(--brand-brown-2);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); }

@media (max-width: 960px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* --------------------------------------------------------------------------
   4. Typography Utilities
   -------------------------------------------------------------------------- */
.display-1 {
  font-family: var(--font-display);
  font-size: var(--fs-4xl);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.display-2 {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.005em;
}

.display-3 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0;
}

/* Brand signature — short underline accent under display headings.
   Wrap the heading in a way that lets the line sit just below the text. */
.display-1, .display-2, .display-3 {
  position: relative;
  padding-bottom: 0.45em;
  display: inline-block;
}

.display-1::after,
.display-2::after,
.display-3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0.15em;
  width: 56px;
  height: 2px;
  background: currentColor;
}

.section-header.centered .display-1::after,
.section-header.centered .display-2::after,
.section-header.centered .display-3::after {
  left: 50%;
  transform: translateX(-50%);
}

.headline {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 400;
  line-height: 1.15;
}

.subhead {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 400;
  font-style: italic;
  color: var(--text-muted);
}

.lead {
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--text);
  font-weight: 400;
  max-width: 60ch;
  letter-spacing: 0.005em;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

.eyebrow-plain {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
/* Brand emphasis — bold weight, same colour as surrounding text (no gold). */
.accent { color: inherit; font-weight: 700; }
.italic { font-style: italic; }
.serif { font-family: var(--font-display); }
em { font-style: italic; color: inherit; }

/* Section header composition */
.section-header {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}

.section-header.centered {
  align-items: center;
  text-align: center;
}

.section-header__number {
  font-family: var(--font-mono, var(--font-body));
  font-size: var(--fs-xs);
  color: var(--text-dim);
  letter-spacing: 0.2em;
}

/* --------------------------------------------------------------------------
   5. Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: linear-gradient(to bottom, rgba(26,22,16,0.55), rgba(26,22,16,0));
  color: var(--brand-cream);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  backdrop-filter: blur(0);
}

.nav.is-scrolled {
  background: rgba(239, 230, 213, 0.92);
  color: var(--brand-black);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(26, 22, 16, 0.10);
}

/* Brand mark inherits currentColor — no filter required when scrolled */

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
  position: relative;
}

/* Primary nav (Home / Projects / About) sits absolutely centered between
   the brand mark and the Contact CTA. */
.nav__inner > nav[aria-label="Primary"] {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: currentColor;
  text-decoration: none;
}

/* Logo image — transparent PNG with dark strokes.
   Default (over dark hero): invert so strokes render as cream.
   Scrolled (over cream nav): render as-is (dark on cream). */
.brand-logo {
  display: block;
  height: 38px;
  width: auto;
  filter: invert(1);
  transition: filter var(--dur) var(--ease);
}
.nav.is-scrolled .brand-logo { filter: none; }
.footer__brand .brand-logo { height: 52px; filter: invert(1); }
@media (max-width: 520px) {
  .brand-logo { height: 32px; }
}

/* ================================================================
   D.Arc brand logo — image variant
   The actual brand mark from the company profile is now used as a PNG
   (assets/brand/darc-logo.png). Default treatment inverts to white for
   dark contexts (over hero, in footer); leaves natural black on cream.
   ================================================================ */
.brand-logo {
  height: 48px;
  width: auto;
  display: block;
  /* Default: white silhouette (for dark contexts: hero, footer) */
  filter: brightness(0) invert(1);
  transition: filter var(--dur) var(--ease);
}
.nav.is-scrolled .brand-logo {
  /* Over cream body — keep the natural black */
  filter: none;
}
.footer__brand .brand-logo {
  height: 60px;
  filter: brightness(0) invert(1);
}
@media (max-width: 520px) {
  .brand-logo { height: 38px; }
}

/* ================================================================
   D.Arc brand mark (LEGACY HTML/CSS lockup — kept for compatibility)
   ================================================================ */
.brand-mark {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.32em;
  font-family: var(--font-body);
  line-height: 1;
  color: currentColor;
}

.brand-mark__row {
  display: inline-flex;
  align-items: center;
  gap: 0.30em;
}

.brand-mark__row--main {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  align-items: stretch;
}

.brand-mark__row--sub {
  font-size: 0.50rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* The slanted bar — represents the left stroke of an "A".
   In the main row it sits between D and Arc, extending above the cap height.
   In the sub row it replaces the "A" of "Architecture". */
.brand-mark__bar {
  display: inline-block;
  width: 1.4px;
  flex-shrink: 0;
  background: currentColor;
  transform-origin: bottom center;
  align-self: stretch;
}

.brand-mark__row--main .brand-mark__bar {
  /* Bar is perfectly vertical and protrudes above the wordmark. */
  margin-top: -0.85em;
}

.brand-mark__row--sub .brand-mark__bar {
  /* Bar is the slanted left leg of the missing "A" — 21° slant from vertical, top-right to bottom-left. */
  width: 1.2px;
  height: 1.15em;
  align-self: center;
  transform: skewX(-21deg);
}

@media (max-width: 520px) {
  .brand-mark__row--main { font-size: 1.35rem; }
  .brand-mark__row--sub { display: none; }
}

.footer__brand .brand-mark__row--main { font-size: 1.85rem; }
.footer__brand .brand-mark__row--sub { font-size: 0.55rem; }

.nav__links {
  display: flex;
  gap: var(--sp-6);
  list-style: none;
  align-items: center;
}

.nav__links a {
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: currentColor;
  position: relative;
  padding-block: 0.3rem;
}

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

.nav__links a:hover::after,
.nav__links a.is-active::after {
  transform: scaleX(1);
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border: 1px solid currentColor;
  border-radius: 0;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: currentColor;
  transition: border-color var(--dur-fast), background var(--dur-fast), color var(--dur-fast);
}

.nav__cta:hover {
  background: currentColor;
}

/* Hover-state colour flip — the bg becomes the same colour as the current
   text, and the text becomes the page bg (so it reads as inverse) */
.nav:not(.is-scrolled) .nav__cta:hover {
  color: var(--brand-brown);
}
.nav.is-scrolled .nav__cta:hover {
  color: var(--brand-cream);
}

.nav__toggle {
  display: none;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

.nav__toggle span {
  display: block;
  height: 1px;
  background: var(--text);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav__toggle span:nth-child(1) { width: 100%; }
.nav__toggle span:nth-child(2) { width: 70%; margin-left: auto; }

@media (max-width: 960px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); width: 100%; }
}

/* Mobile menu overlay — always renders as a dark zone, so re-scope the
   colour tokens here.  Without this, descendants inherit the page's dark
   text on dark brown bg = invisible. */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--brand-brown);
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--gutter);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  /* Re-scope tokens for light-on-dark descendants */
  --text: var(--brand-cream);
  --text-muted: rgba(239, 230, 213, 0.72);
  --accent: var(--brand-white);
  color: var(--text);
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--brand-cream);
  transition: color var(--dur-fast) var(--ease);
}

.mobile-menu a:hover,
.mobile-menu a:focus { color: var(--brand-white); }

/* The "Contact" item often has class="accent" — keep it readable + subtly distinct */
.mobile-menu a.accent {
  color: var(--brand-white);
  opacity: 0.95;
}

/* Dropdown menu (e.g. Projects → Architecture/Interior/Construction) */
.nav__item--has-menu {
  position: relative;
}

.nav__submenu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translate(-50%, -6px);
  min-width: 200px;
  margin: 0;
  padding: var(--sp-3) 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  background: rgba(14, 14, 14, 0.94);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border: 1px solid var(--rule);
  border-top: 1px solid var(--rule-gold);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), visibility 0s linear var(--dur-fast);
  z-index: 200;
}

/* Invisible bridge so the cursor can travel from link to submenu without flicker */
.nav__item--has-menu::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 14px;
  pointer-events: none;
}

.nav__item--has-menu:hover::after,
.nav__item--has-menu:focus-within::after {
  pointer-events: auto;
}

.nav__item--has-menu:hover .nav__submenu,
.nav__item--has-menu:focus-within .nav__submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), visibility 0s;
}

.nav__submenu li { list-style: none; }

.nav__submenu a {
  display: block;
  padding: 0.7rem var(--sp-5);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(239, 230, 213, 0.72);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

/* Override the inherited underline animation from .nav__links a */
.nav__submenu a::after { display: none !important; }

.nav__submenu a:hover,
.nav__submenu a:focus,
.nav__submenu a.is-active {
  color: var(--brand-cream);
  background: rgba(239, 230, 213, 0.08);
}

/* Hide the submenu on mobile — rely on the flat mobile menu instead */
@media (max-width: 960px) {
  .nav__submenu { display: none; }
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.95rem 1.9rem;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--dur-fast) var(--ease);
  white-space: nowrap;
}

.btn--primary {
  background: var(--brand-black);
  color: var(--brand-cream);
  border-color: var(--brand-black);
}

.btn--primary:hover {
  background: var(--brand-brown);
  border-color: var(--brand-brown);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(26, 22, 16, 0.22);
}

/* On dark sections, primary button inverts (cream pill on brown) */
.bg-dark .btn--primary {
  background: var(--brand-cream);
  color: var(--brand-black);
  border-color: var(--brand-cream);
}

.bg-dark .btn--primary:hover {
  background: var(--brand-white);
  border-color: var(--brand-white);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--rule-strong);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--bare {
  padding: 0.5rem 0;
  border: 0;
  color: var(--text);
  gap: 1rem;
  background: transparent;
  position: relative;
}

.btn--bare::after {
  content: '';
  position: absolute;
  left: 0;
  right: 3rem;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transition: right var(--dur) var(--ease);
}

.btn--bare:hover::after { right: 0; }
.btn--bare:hover { color: var(--accent); }

.btn .arrow { transition: transform var(--dur-fast) var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   7. Hero (Landing)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding-block: var(--sp-10) var(--sp-9);
  /* Hero always reads as dark zone (image + scrim) — rescope tokens. */
  --text: var(--brand-cream);
  --text-muted: rgba(239, 230, 213, 0.72);
  --text-dim: rgba(239, 230, 213, 0.48);
  --accent: var(--brand-cream);
  --accent-hover: var(--brand-white);
  --rule-strong: rgba(239, 230, 213, 0.25);
  --rule: rgba(239, 230, 213, 0.10);
  color: var(--text);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: heroZoom 24s var(--ease-out) forwards;
}

@keyframes heroZoom {
  from { transform: scale(1.10); }
  to   { transform: scale(1.00); }
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14,14,14,0.72) 0%, rgba(14,14,14,0.35) 30%, rgba(14,14,14,0.85) 100%),
    linear-gradient(90deg, rgba(14,14,14,0.60) 0%, rgba(14,14,14,0.00) 55%);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-7);
  align-items: end;
}

.hero__eyebrow {
  margin-bottom: var(--sp-4);
}

.hero h1 {
  font-size: var(--fs-4xl);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-5);
  max-width: 16ch;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 300;
}

.hero__sub {
  font-size: var(--fs-md);
  font-weight: 400;
  color: var(--bone);
  max-width: 46ch;
  margin-bottom: var(--sp-6);
  opacity: 0.85;
  line-height: 1.55;
  letter-spacing: 0.005em;
}

.hero__actions {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.hero__side {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  text-align: right;
  padding-left: var(--sp-6);
  border-left: 1px solid var(--rule-strong);
  min-width: 260px;
}

.hero__stat .n {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.005em;
}

.hero__stat .l {
  display: block;
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.hero__scroll {
  position: absolute;
  left: var(--gutter);
  bottom: var(--sp-5);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero__scroll::after {
  content: '';
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollHint 2.2s var(--ease-out) infinite;
}

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

@media (max-width: 900px) {
  .hero__content { grid-template-columns: 1fr; }
  .hero__side { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule-strong); padding-top: var(--sp-5); text-align: left; }
  .hero__scroll { display: none; }
}

/* Page hero (inner pages) */
.page-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  padding: var(--sp-11) 0 var(--sp-8);
  overflow: hidden;
  /* Always a dark zone (image + scrim) — rescope tokens. */
  --text: var(--brand-cream);
  --text-muted: rgba(239, 230, 213, 0.72);
  --text-dim: rgba(239, 230, 213, 0.48);
  --accent: var(--brand-cream);
  --rule-strong: rgba(239, 230, 213, 0.25);
  color: var(--text);
}

.page-hero__media {
  position: absolute; inset: 0; z-index: 0;
}

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

.page-hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(14,14,14,0.55) 0%, rgba(14,14,14,0.35) 40%, rgba(14,14,14,0.90) 100%);
}

.page-hero__content {
  position: relative; z-index: 2;
  width: 100%;
}

.page-hero h1 {
  font-size: var(--fs-3xl);
  font-weight: 300;
  margin-top: var(--sp-4);
  max-width: 20ch;
}

.breadcrumb {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-5);
}

.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--text-dim); }

/* --------------------------------------------------------------------------
   8. Cards & Projects
   -------------------------------------------------------------------------- */
.project-card {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--bg-alt);
  isolation: isolate;
  /* Cards always sit over a dark image + scrim — re-scope tokens so
     all descendant text renders against the dark backdrop. */
  --text: var(--brand-cream);
  --text-muted: rgba(239, 230, 213, 0.78);
  --accent: var(--brand-cream);
  color: var(--brand-cream);
}

.project-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease-out), filter 900ms var(--ease-out);
}

.project-card:hover .project-card__media img {
  transform: scale(1.06);
  filter: brightness(0.9);
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14,14,14,0.88) 0%, rgba(14,14,14,0.2) 45%, transparent 70%);
  z-index: 1;
}

.project-card__body {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: var(--sp-5) var(--sp-5) var(--sp-5);
  color: var(--text);
}

.project-card__kicker {
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
  display: block;
}

.project-card__title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.project-card__meta {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.project-card__arrow {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-5);
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14,14,14,0.4);
  transition: all var(--dur) var(--ease);
}

/* Typography-only card — used for projects without a clean photo cover
   (e.g., construction projects in active build).  Treats the listing as
   editorial type rather than imagery. */
.project-card--typo {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--brand-brown);
  color: var(--brand-cream);
  padding: var(--sp-7) var(--sp-6);
  min-height: 360px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: background var(--dur) var(--ease);
}

.project-card--typo::before {
  content: '';
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-5);
  width: 28px;
  height: 1px;
  background: var(--brand-cream);
  opacity: 0.6;
}

.project-card--typo:hover { background: var(--brand-brown-2); }

.project-card--typo .project-card__kicker {
  color: var(--brand-cream);
  opacity: 0.62;
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: block;
  margin-bottom: var(--sp-3);
}

.project-card--typo .project-card__title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.005em;
  color: var(--brand-cream);
  margin-bottom: var(--sp-4);
}

.project-card--typo .project-card__meta {
  color: var(--brand-cream);
  opacity: 0.72;
  font-size: var(--fs-sm);
  max-width: 36ch;
  line-height: 1.5;
  letter-spacing: 0.005em;
}

.project-card--typo .project-card__cta {
  margin-top: var(--sp-6);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-cream);
  border-bottom: 1px solid rgba(239, 230, 213, 0.4);
  padding-bottom: 0.5rem;
  align-self: flex-start;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.project-card--typo:hover .project-card__cta {
  border-color: var(--brand-cream);
}

.project-card:hover .project-card__arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--brand-cream);
}

/* Wide/featured card */
.project-card--wide .project-card__media { aspect-ratio: 16 / 9; }
.project-card--tall .project-card__media { aspect-ratio: 3 / 4; }

/* Grid layouts for projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--sp-5);
}

.projects-grid > * { grid-column: span 4; }
.projects-grid .is-wide { grid-column: span 6; }
.projects-grid .is-full { grid-column: span 12; }
.projects-grid .is-half { grid-column: span 6; }

@media (max-width: 960px) {
  .projects-grid > *,
  .projects-grid .is-wide,
  .projects-grid .is-half,
  .projects-grid .is-full { grid-column: span 12; }
}

/* --------------------------------------------------------------------------
   9. Division Cards
   -------------------------------------------------------------------------- */
.divisions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
}

.division {
  position: relative;
  padding: var(--sp-7) var(--sp-6);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  transition: background var(--dur) var(--ease);
  min-height: 520px;
  overflow: hidden;
}

.division::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease);
}

.division:hover::after { opacity: 0.18; }
.division:hover { background: var(--bg-alt); }

.division > * { position: relative; z-index: 1; }

.division__number {
  font-family: var(--font-mono, var(--font-body));
  font-size: var(--fs-xs);
  color: var(--accent);
  letter-spacing: 0.2em;
}

.division__title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.005em;
}

.division__body {
  color: var(--text-muted);
  font-size: var(--fs-base);
  line-height: 1.6;
  flex-grow: 1;
}

.division__link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--rule);
}

.division:hover .division__link { color: var(--accent); }

@media (max-width: 960px) {
  .divisions { grid-template-columns: 1fr; }
  .division { min-height: auto; }
}

/* --------------------------------------------------------------------------
   10. Chairman / Leader Spotlight
   -------------------------------------------------------------------------- */
.chairman {
  position: relative;
  overflow: hidden;
}

.chairman__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--sp-8);
  align-items: center;
}

.chairman__portrait {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-alt);
}

.chairman__portrait::before {
  content: '';
  position: absolute;
  inset: -1px;
  border: 1px solid var(--rule-gold);
  z-index: 2;
  pointer-events: none;
}

.chairman__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: contrast(1.04) saturate(0.92);
  transition: filter var(--dur-slow) var(--ease);
}

.chairman__portrait:hover img { filter: contrast(1.08) saturate(1); }

.chairman__portrait::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 35%;
  background: linear-gradient(to top, rgba(14,14,14,0.75), transparent);
  z-index: 1;
  pointer-events: none;
}

.chairman__badge {
  position: absolute;
  top: var(--sp-5);
  left: var(--sp-5);
  z-index: 3;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent);
  font-size: var(--fs-md);
}

.chairman__sig {
  position: absolute;
  bottom: var(--sp-5);
  right: var(--sp-5);
  z-index: 3;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--bone);
  font-size: var(--fs-md);
  text-align: right;
  line-height: 1.1;
  padding: var(--sp-3) var(--sp-4);
  background: rgba(14,14,14,0.6);
  backdrop-filter: blur(8px);
  border: 1px solid var(--rule-gold);
}

.chairman__quote {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--text);
  margin-block: var(--sp-5);
  position: relative;
  padding-left: var(--sp-5);
}

.chairman__quote::before {
  content: '';
  position: absolute;
  left: 0; top: 0.4em;
  width: 2px;
  height: 2.3em;
  background: var(--accent);
}

.chairman__quote em {
  color: var(--accent);
  font-style: italic;
}

.chairman__body {
  color: var(--text-muted);
  font-size: var(--fs-md);
  line-height: 1.65;
  max-width: 56ch;
  margin-bottom: var(--sp-5);
  font-weight: 400;
  letter-spacing: 0.005em;
}

.chairman__name {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 400;
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--rule-gold);
}

.chairman__title {
  font-size: var(--fs-xs);
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 0.4rem;
  display: block;
}

@media (max-width: 900px) {
  .chairman__grid { grid-template-columns: 1fr; gap: var(--sp-6); }
}

/* --------------------------------------------------------------------------
   11. Stats Strip
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
}

.stats__item {
  background: var(--bg);
  padding: var(--sp-7) var(--sp-5);
  text-align: center;
}

.stats__n {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.005em;
  display: block;
}

.stats__l {
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: var(--sp-3);
  display: block;
}

@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* --------------------------------------------------------------------------
   12. Philosophy / Values
   -------------------------------------------------------------------------- */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
}

.value {
  background: var(--bg);
  padding: var(--sp-6) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-height: 280px;
  transition: background var(--dur-fast);
}

.value:hover { background: var(--bg-alt); }

.value__n {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-style: italic;
  color: var(--accent);
  opacity: 0.5;
}

.value__title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 400;
}

.value__body {
  color: var(--text-muted);
  font-size: var(--fs-base);
  line-height: 1.6;
}

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

/* --------------------------------------------------------------------------
   13. Process steps
   -------------------------------------------------------------------------- */
.process {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  counter-reset: step;
}

.step {
  border-top: 1px solid var(--rule-gold);
  padding-top: var(--sp-4);
}

.step__num {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 300;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
  display: block;
  margin-bottom: var(--sp-3);
}

.step__title {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 400;
  margin-bottom: 0.6rem;
}

.step__body {
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--text-muted);
}

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

/* --------------------------------------------------------------------------
   14. Project Detail Page
   -------------------------------------------------------------------------- */
.project-intro {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--sp-8);
  padding-block: var(--sp-10);
  border-bottom: 1px solid var(--rule);
}

.project-intro__meta {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.project-intro__meta dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.project-intro__meta dt {
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.2rem;
}

.project-intro__meta dd {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  color: var(--text);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--rule);
}

.project-intro__copy h2 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 300;
  line-height: 1.08;
  margin-bottom: var(--sp-5);
}

.project-intro__copy p {
  color: var(--text-muted);
  font-size: var(--fs-md);
  line-height: 1.7;
  margin-bottom: var(--sp-4);
  max-width: 58ch;
  font-weight: 300;
}

@media (max-width: 900px) {
  .project-intro { grid-template-columns: 1fr; gap: var(--sp-6); }
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--sp-4);
}

.gallery figure {
  overflow: hidden;
  background: var(--bg-alt);
  position: relative;
}

.gallery figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease-out);
}

.gallery figure:hover img { transform: scale(1.03); }

.gallery .g-full { grid-column: span 12; aspect-ratio: 16/8; }
.gallery .g-wide { grid-column: span 8; aspect-ratio: 4/3; }
.gallery .g-third { grid-column: span 4; aspect-ratio: 4/3; }
.gallery .g-half { grid-column: span 6; aspect-ratio: 3/2; }
.gallery .g-tall { grid-column: span 6; aspect-ratio: 3/4; }

@media (max-width: 900px) {
  .gallery .g-full,
  .gallery .g-wide,
  .gallery .g-third,
  .gallery .g-half,
  .gallery .g-tall { grid-column: span 12; aspect-ratio: 4/3; }
}

/* Prev / next project nav */
.project-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--rule);
}

.project-nav a {
  padding: var(--sp-6) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background var(--dur-fast);
}

.project-nav a:hover { background: var(--bg-alt); color: var(--accent); }
.project-nav a:first-child { border-right: 1px solid var(--rule); text-align: left; }
.project-nav a:last-child { text-align: right; align-items: flex-end; }

.project-nav .dir {
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.project-nav .title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   15. Logo Wall (Clients & Partners)
   -------------------------------------------------------------------------- */
.logo-wall {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.logo-wall.is-5 { grid-template-columns: repeat(5, 1fr); }
.logo-wall.is-4 { grid-template-columns: repeat(4, 1fr); }

.logo-cell {
  background: var(--bg);
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4) var(--sp-3);
  transition: background var(--dur-fast);
  position: relative;
  overflow: hidden;
}

.logo-cell:hover { background: var(--bg-alt); }

.logo-cell img {
  max-width: 78%;
  max-height: 66%;
  width: auto;
  height: auto;
  /* Black silhouette on cream pages by default */
  filter: brightness(0) opacity(0.65);
  transition: filter var(--dur-fast), transform var(--dur-fast);
  object-fit: contain;
}

.logo-cell:hover img {
  filter: brightness(0) opacity(1);
  transform: scale(1.03);
}

/* Opt-out for logos with solid colored backgrounds or icon-only marks that
   collapse to an unreadable silhouette under brightness(0).
   Apply to .logo-cell to keep the original artwork. */
.logo-cell--keep-color img,
.logo-cell--keep-color:hover img {
  filter: none;
  opacity: 0.85;
}
.logo-cell--keep-color:hover img { opacity: 1; }
.bg-dark .logo-cell--keep-color img,
.footer .logo-cell--keep-color img { filter: brightness(0) invert(1); }

/* Inside dark sections / footer, flip back to white silhouette */
.bg-dark .logo-cell img,
.footer .logo-cell img {
  filter: brightness(0) invert(1) opacity(0.7);
}

.bg-dark .logo-cell:hover img,
.footer .logo-cell:hover img {
  filter: brightness(0) invert(1) opacity(1);
}

.logo-cell .name {
  position: absolute;
  bottom: 8px;
  left: 0; right: 0;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0;
  transition: opacity var(--dur-fast);
  pointer-events: none;
}

.logo-cell:hover .name { opacity: 1; }

@media (max-width: 900px) {
  .logo-wall, .logo-wall.is-5, .logo-wall.is-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .logo-wall, .logo-wall.is-5, .logo-wall.is-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Legacy aliases kept in sync with .logo-wall */
.clients {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.client-cell {
  background: var(--bg);
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  transition: background var(--dur-fast);
}
.client-cell img {
  max-width: 72%;
  max-height: 62%;
  filter: brightness(0) opacity(0.65);
  object-fit: contain;
}
.client-cell:hover img { filter: brightness(0) opacity(1); }
.bg-dark .client-cell img { filter: brightness(0) invert(1) opacity(0.7); }
.bg-dark .client-cell:hover img { filter: brightness(0) invert(1) opacity(1); }
@media (max-width: 900px) { .clients { grid-template-columns: repeat(3, 1fr); } }

/* --------------------------------------------------------------------------
   16. Contact Section
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--sp-8);
}

.contact-info > * + * { margin-top: var(--sp-6); }

.contact-info dt {
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.contact-info dd {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 400;
  color: var(--text);
  line-height: 1.4;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
}

.field { display: flex; flex-direction: column; gap: 0.6rem; }
.field--full { grid-column: span 2; }

.field label {
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field input,
.field select,
.field textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-strong);
  padding: 0.9rem 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  transition: border-color var(--dur-fast);
  outline: none;
  border-radius: 0;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-bottom-color: var(--accent);
}

.field textarea { min-height: 140px; resize: vertical; }

.field select option { background: var(--bg); color: var(--text); }

@media (max-width: 700px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .field--full { grid-column: span 1; }
}

/* --------------------------------------------------------------------------
   17. Footer
   -------------------------------------------------------------------------- */
.footer {
  padding: var(--sp-9) 0 var(--sp-5);
  background: var(--brand-brown);
  /* Footer is always dark — rescope tokens for light descendants. */
  --text: var(--brand-cream);
  --text-muted: rgba(239, 230, 213, 0.70);
  --text-dim: rgba(239, 230, 213, 0.45);
  --accent: var(--brand-cream);
  --rule: rgba(239, 230, 213, 0.10);
  --rule-strong: rgba(239, 230, 213, 0.22);
  color: var(--text);
  border-top: 1px solid var(--rule);
}



.footer__top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: var(--sp-6);
  padding-bottom: var(--sp-7);
  border-bottom: 1px solid var(--rule);
}

.footer__brand {
  display: flex;
  align-items: center;
  margin-bottom: var(--sp-4);
}

.footer__tagline {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  max-width: 36ch;
  line-height: 1.6;
}

.footer__col h4 {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}

.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer__col a { color: var(--text-muted); font-size: var(--fs-sm); }
.footer__col a:hover { color: var(--text); }

.footer__bottom {
  padding-top: var(--sp-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  font-size: var(--fs-xs);
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

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

/* --------------------------------------------------------------------------
   18. Scroll Animations
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 120ms; }
.reveal-delay-2 { transition-delay: 240ms; }
.reveal-delay-3 { transition-delay: 360ms; }
.reveal-delay-4 { transition-delay: 480ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   19. Utilities
   -------------------------------------------------------------------------- */
.hairline { height: 1px; background: var(--rule); border: 0; margin: 0; }
.hairline-gold { height: 1px; background: var(--rule-gold); border: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.arrow-svg { width: 14px; height: 14px; }
.icon { width: 22px; height: 22px; flex-shrink: 0; }

/* Decorative marker */
.mark {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* Section index (top-right of each section) */
.section-index {
  font-family: var(--font-mono, var(--font-body));
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.section-index::before {
  content: ''; width: 24px; height: 1px; background: var(--accent);
}

/* Fullwidth banner image */
.banner {
  aspect-ratio: 21 / 9;
  overflow: hidden;
  position: relative;
}

.banner img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.02);
  transition: transform 12s var(--ease-out);
}

.banner:hover img { transform: scale(1.06); }

/* Quote block */
.pullquote {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--text);
  text-align: center;
  max-width: 24ch;
  margin: 0 auto;
  position: relative;
}

.pullquote::before,
.pullquote::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin: var(--sp-4) auto;
}

/* About page: principles list */
.principle-list { list-style: none; display: flex; flex-direction: column; gap: 0; }
.principle-list li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--sp-5);
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.principle-list li span {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  color: var(--accent);
  font-style: italic;
  font-weight: 300;
}
.principle-list li strong {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 400;
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.principle-list li p { color: var(--text-muted); margin: 0; }

/* Image with caption */
.figure-captioned {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.figure-captioned figcaption {
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}
