/* ==========================================
   YSLA — styles.css
   Architecture practice catalog aesthetic
   Restrained: warm dark ground + gold accent
   ========================================== */

/* ---- Tokens ---- */
:root {
  --bg:          oklch(20% 0.007 65);
  --surface:     oklch(24% 0.007 65);
  --surface-2:   oklch(27% 0.007 65);
  --mid:         oklch(71% 0.005 65);
  --muted:       oklch(80% 0.005 70);
  --muted-warm:  oklch(74% 0.007 68);
  --text:        oklch(94% 0.005 75);
  --text-dim:    oklch(82% 0.005 72);
  --accent:      oklch(92% 0.005 72);
  --gold:        oklch(71% 0.115 62);
  --gold-text:   oklch(82% 0.14 62);
  --border:      oklch(94% 0.005 75 / 0.07);
  --border-mid:  oklch(94% 0.005 75 / 0.13);
  --border-hi:   oklch(94% 0.005 75 / 0.22);

  --font-head: 'Alef', sans-serif;
  --font-body: 'Assistant', sans-serif;

  --nav-h:       76px;
  --gap:         clamp(18px, 2vw, 24px);
  --section-pad: clamp(72px, 9vw, 128px);
  --page-x:      clamp(24px, 5vw, 80px);
  --max-w:       1440px;
}

/* English display face — editorial serif for Latin headings */
html[lang="en"] {
  --font-head: 'Cormorant Garamond', 'Alef', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  cursor: default;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern" 1;
  overflow-x: hidden;
}

/* Grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
}

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

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; cursor: pointer; }
button { cursor: pointer; }

/* Keyboard focus: visible and on-brand. Pointer users see nothing (":focus-
   visible"); keyboard users get a clear gold ring. Form fields keep their
   own gold-border focus, so they're excluded to avoid a double indicator. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---- Scroll progress ---- */
.scroll-progress {
  position: fixed;
  top: 0; inset-inline: 0;
  height: 1px;
  z-index: 400;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: inline-start center;
  transition: transform 0.1s linear;
  pointer-events: none;
}

/* ======================
   NAVIGATION
====================== */
.site-nav {
  position: fixed;
  top: 0; inset-inline: 0;
  z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid var(--border-mid);
  backdrop-filter: blur(8px);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.site-nav.scrolled {
  background: var(--bg);
  border-color: var(--border-hi);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--page-x);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.nav-logo-svg {
  height: clamp(26px, 5vw, 44px);
  width: auto;
  max-width: min(460px, 66vw);
  display: block;
  flex-shrink: 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Horizontal-expand menu */
.nav-expandable {
  display: flex;
  align-items: center;
  gap: 32px;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transition: max-width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.25s ease;
  white-space: nowrap;
}
.nav-expandable.open {
  max-width: 800px;
  opacity: 1;
}

.nav-link {
  position: relative;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  transition: color 0.2s ease;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.nav-link:hover { color: var(--accent); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active {
  color: var(--gold-text);
  font-weight: 500;
}
.nav-link.active::after { transform: scaleX(1); }

.lang-toggle {
  background: none;
  border: 1px solid var(--border-mid);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 12px;
  transition: border-color 0.2s ease, color 0.2s ease;
  line-height: 1;
  flex-shrink: 0;
}
.lang-toggle:hover {
  color: var(--text);
  border-color: var(--border-hi);
}

/* Hamburger button */
.nav-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: none;
  border: none;
  padding: 8px;
  flex-shrink: 0;
}
.nav-menu-btn span {
  display: block;
  width: 34px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-menu-btn.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-menu-btn.open span:nth-child(2) { opacity: 0; }
.nav-menu-btn.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ======================
   MOBILE NAV OVERLAY
====================== */
@keyframes navLinkReveal {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hidden on desktop — JS may add .open but it never renders */
.nav-mobile-overlay { display: none; }

@media (max-width: 768px) {
  /* Suppress the horizontal-expand on mobile */
  .nav-expandable { display: none; }

  .nav-mobile-overlay {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    inset: 0;
    z-index: 190; /* below site-nav (200) so X button stays tappable */
    background: var(--bg);
    padding: var(--nav-h) var(--page-x)
             max(48px, env(safe-area-inset-bottom, 48px));
    min-height: 100dvh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }
  .nav-mobile-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-overlay-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
  }
  .nav-overlay-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 400px;
  }

  .nav-overlay-link {
    display: block;
    text-align: center;
    font-family: var(--font-head);
    font-size: clamp(26px, 8vw, 35px);
    font-weight: 300;
    letter-spacing: -0.01em;
    color: var(--text-dim); 
    text-decoration: none;
    padding: 25px 0;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s ease;
    opacity: 0;
    transform: translateY(10px);
  }
  .nav-overlay-link:first-child { border-top: 0px solid var(--border); }
  .nav-overlay-link:last-child { border-bottom: 0px solid var(--border); }
  .nav-overlay-link:hover { color: var(--text); }
  .nav-overlay-link.active {
    color: var(--gold-text);
    border-color: var(--gold);
  }

  /* button reset so lang toggle is visually identical to <a> links */
  button.nav-overlay-link {
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    width: 100%;
    cursor: pointer;
  }

  .nav-mobile-overlay.open .nav-overlay-link {
    animation: navLinkReveal 0.32s ease forwards;
  }
  .nav-mobile-overlay.open .nav-overlay-link:nth-child(1) { animation-delay: 0.07s; }
  .nav-mobile-overlay.open .nav-overlay-link:nth-child(2) { animation-delay: 0.13s; }
  .nav-mobile-overlay.open .nav-overlay-link:nth-child(3) { animation-delay: 0.19s; }
  .nav-mobile-overlay.open .nav-overlay-link:nth-child(4) { animation-delay: 0.25s; }
  .nav-mobile-overlay.open .nav-overlay-link:nth-child(5) { animation-delay: 0.31s; }

  .nav-overlay-socials {
    display: flex;
    gap: 36px;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    opacity: 0;
    transform: translateY(10px);
  }
  .nav-mobile-overlay.open .nav-overlay-socials {
    animation: navLinkReveal 0.32s ease forwards;
    animation-delay: 0.37s;
  }
  .nav-overlay-socials .social-icon-btn svg {
    width: 24px;
    height: 24px;
    min-height: 24px;
  }
}

/* ======================
   APP / PAGE TRANSITIONS
====================== */

.page {
  animation: pagein 0.35s ease both;
}
@keyframes pagein {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Shared section label */
.eyebrow {
  font-size: 15px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-text);
  font-family: var(--font-body);
}

/* ======================
   BUTTONS
====================== */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 28px;
  border: 1px solid var(--border-hi);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.btn-outline:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-arrow {
  display: inline-block;
  font-size: 1em;
  transition: transform 0.2s ease;
}
[dir="rtl"] .btn-outline:hover .btn-arrow { transform: translateX(-4px); }
[dir="ltr"] .btn-outline:hover .btn-arrow { transform: translateX(4px); }

/* ======================
   HOME PAGE
====================== */
.home-hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.home-hero-center {
  text-align: center;
  position: relative;
  z-index: 2;
}

.home-wordmark {
  font-family: var(--font-head);
  font-size: clamp(78px, 16vw, 238px);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: 0.12em;
  color: var(--text);
  text-transform: uppercase;
  user-select: none;
}

.home-descriptor {
  margin-top: 28px;
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mid);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.home-descriptor-line {
  width: 40px;
  height: 1px;
  background: var(--mid);
  display: inline-block;
}

.home-est {
  position: absolute;
  top: calc(var(--nav-h) + 32px);
  inset-inline-start: var(--page-x);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.home-est-label {
  font-size: 13px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.home-est-year {
  font-family: var(--font-head);
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.home-socials {
  position: absolute;
  bottom: clamp(32px, 5vh, 56px);
  inset-inline-end: var(--page-x);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}
.home-social-link {
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mid);
  transition: color 0.2s ease;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
[dir="ltr"] .home-social-link {
  transform: rotate(0deg);
  writing-mode: horizontal-tb;
}
.home-social-link:hover { color: var(--text); }

.home-scroll-hint {
  position: absolute;
  bottom: clamp(32px, 5vh, 56px);
  inset-inline-start: var(--page-x);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mid);
}
.home-scroll-line {
  width: 32px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

/* Carousel */
.home-carousel-section {
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
.carousel-track-wrap {
  overflow: hidden;
  direction: ltr; /* carousel always LTR regardless of page dir */
}
.carousel-track {
  display: flex;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.carousel-item {
  flex: 0 0 100%;
  height: clamp(300px, 55vw, 680px);
  position: relative;
  overflow: hidden;
}
/* Home carousel: fade transition — items stacked, track-wrap sets the height */
.home-carousel-section .carousel-track-wrap {
  position: relative;
  height: clamp(520px, 78svh, 960px);
}
.home-carousel-section .carousel-track {
  height: 100%;
}
.home-carousel-section .carousel-item {
  position: absolute;
  inset: 0;
  height: 100%;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}
.home-carousel-section .carousel-item.active {
  opacity: 1;
  pointer-events: auto;
}
.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.78) contrast(1.06);
}
.carousel-caption {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  padding: 48px var(--page-x) 20px;
  background: linear-gradient(to top, oklch(17% 0.007 65 / 0.96) 0%, oklch(17% 0.007 65 / 0.6) 50%, transparent 100%);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.carousel-caption-name {
  font-family: var(--font-head);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 400;
  color: var(--text);
  text-shadow: 0 1px 6px oklch(0% 0 0 / 0.6);
}
.carousel-caption-meta {
  font-size: 17px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-text);
  font-weight: 600;
  text-shadow: 0 1px 3px oklch(0% 0 0 / 0.9), 0 0 14px oklch(0% 0 0 / 0.55);
}
[dir="rtl"] .carousel-caption-meta { order: -1; }

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--page-x);
}
.carousel-dots {
  display: flex;
  gap: 8px;
}
.carousel-dot {
  width: 20px;
  height: 1px;
  background: var(--border-hi);
  transition: background 0.2s ease, width 0.2s ease;
  border: none;
  padding: 0;
}
.carousel-dot.active {
  background: var(--gold);
  width: 36px;
}
.carousel-arrows {
  display: flex;
  gap: 16px;
}
.carousel-arrow {
  background: none;
  border: 1px solid var(--border-mid);
  color: var(--muted);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.carousel-arrow:hover {
  border-color: var(--border-hi);
  color: var(--text);
}

/* Partners marquee (About page) */
.about-partners {
  --partners-gap: clamp(40px, 6vw, 88px);
  padding: clamp(56px, 6vw, 96px) 0 clamp(80px, 8vw, 128px);
  border-top: 1px solid var(--border);
  overflow: hidden;
}
.about-partners-header {
  max-width: var(--max-w);
  margin: 0 auto clamp(36px, 5vw, 64px);
  padding: 0 var(--page-x);
}
.about-partners-heading {
  font-family: var(--font-head);
  font-size: clamp(30px, 3.5vw, 52px);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--text);
}
.about-partners-row {
  position: relative;
  /* LTR regardless of page direction: the oversized track must align to the
     left edge and overflow rightward, or the RTL page shows an empty strip */
  direction: ltr;
  overflow: hidden;
  /* draggable slider: grab cursor, allow vertical page scroll on touch */
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.about-partners-row.dragging { cursor: grabbing; }
.about-partner-logo img { -webkit-user-drag: none; user-drag: none; }
.about-partners-marquee {
  direction: ltr; /* animation math stays sane; content is images only */
  display: flex;
  align-items: center;
  gap: var(--partners-gap);
  width: max-content;
  padding-inline-start: var(--partners-gap);
  will-change: transform;
  animation: partners-scroll 90s linear infinite;
}
@keyframes partners-scroll {
  to { transform: translateX(-50%); }
}
.about-partners-dup { display: contents; }
.about-partner-logo {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  height: 148px;
  padding: 0 28px;
}
/* White backing chip, fades in behind the color logo on hover — keeps
   flat-background source files (jpg/png without alpha) looking intentional */
.about-partner-logo::before {
  content: '';
  position: absolute;
  inset: 14px 4px;
  background: oklch(97% 0.004 90);
  border-radius: 8px;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 0;
}
.about-partner-logo:hover::before {
  opacity: 1;
  transform: scale(1);
}
.about-partner-logo img {
  grid-area: 1 / 1;
  display: block;
  height: 92px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  transition: opacity 0.3s ease;
}
/* white & color share identical geometry -> the crossfade is a clean dissolve */
.about-partner-logo-white {
  opacity: 0.62;
}
.about-partner-logo-color {
  opacity: 0;
}
.about-partner-logo:hover .about-partner-logo-white {
  opacity: 0;
}
.about-partner-logo:hover .about-partner-logo-color {
  opacity: 1;
}
/* Reduced motion: static wrapped grid */
@media (prefers-reduced-motion: reduce) {
  .about-partners-marquee {
    animation: none;
    width: auto;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 36px;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--page-x);
  }
  .about-partners-marquee > .about-partners-dup { display: none; }
  .about-partners-row { -webkit-mask-image: none; mask-image: none; }
}

/* ======================
   HOME VIDEO HERO
====================== */
.home-video-hero {
  position: relative;
  width: 100%;
  height: 90svh;
  min-height: 600px;
  overflow: hidden;
}
.home-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 1.5s ease;
}
.home-video-overlay {
  position: absolute;
  inset: 0;
  background: oklch(12% 0.007 65 / 0.12);
  pointer-events: none;
}

/* ======================
   ABOUT PAGE
====================== */
.about-page {
  padding-top: var(--nav-h);
  min-height: 80vh;
}

.about-hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(64px, 8vw, 120px) var(--page-x);
  display: grid;
  grid-template-columns: 45fr 55fr;
  gap: clamp(48px, 6vw, 96px);
  align-items: start;
}

.about-portrait-col {
  position: relative;
}
.about-portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface);
}
.about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85) contrast(1.05) grayscale(0.15);
}
.about-portrait-info {
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.about-us-heading {
  font-family: var(--font-head);
  font-size: clamp(43px, 6vw, 86px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
}
.about-name {
  font-family: var(--font-head);
  font-size: clamp(24px, 2.5vw, 35px);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text);
}
.about-titles {
  display: flex;
  flex-direction: column;
  margin-top: 4px;
}
.about-title-line {
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.about-title-primary {
  font-family: var(--font-head);
  font-size: 17px;
  color: var(--gold-text);
  letter-spacing: 0.14em;
  order: -1;
}
.about-divider {
  width: 40px;
  height: 1px;
  background: var(--gold);
}
.about-bio {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about-bio p {
  font-size: clamp(17px, 1.3vw, 18px);
  font-weight: 300;
  color: var(--text-dim);
  line-height: 1.65;
  max-width: 65ch;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 8px;
}
.about-stat {
  background: var(--bg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.about-stat-value {
  font-family: var(--font-head);
  font-size: clamp(26px, 2.5vw, 39px);
  font-weight: 300;
  color: var(--text);
  letter-spacing: -0.01em;
  font-feature-settings: "tnum" 1, "kern" 1;
}
.about-stat-label {
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ======================
   PROJECTS PAGE
====================== */
.projects-page {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

.projects-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(56px, 7vw, 100px) var(--page-x) clamp(40px, 5vw, 64px);
}
.projects-heading {
  font-family: var(--font-head);
  font-size: clamp(43px, 6vw, 86px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-top: 12px;
}

.filter-bar {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--page-x) clamp(40px, 5vw, 64px);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}
.filter-btn {
  background: none;
  border: none;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  line-height: 1;
}
.filter-btn:hover { color: var(--text); }
.filter-btn.active {
  color: var(--text);
  border-bottom-color: var(--gold);
}

.projects-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(32px, 4vw, 56px) var(--page-x);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: var(--gap);
}

.project-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  display: block;
  text-decoration: none;
}
.project-card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.project-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8) contrast(1.05);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}
.project-card:hover .project-card-img img {
  transform: scale(1.04);
  filter: brightness(0.9) contrast(1.04) blur(2px);
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  background: oklch(13% 0.007 65 / 0.75);
  opacity: 0;
  transition: opacity 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 24px;
}
.project-card:hover .project-card-overlay { opacity: 1; }
.project-card-overlay-name {
  font-family: var(--font-head);
  font-size: clamp(22px, 4vw, 35px);
  font-weight: 400;
  color: var(--text);
  text-align: center;
  line-height: 1;
}
.project-card-overlay-loc {
  font-size: 15px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-text);
}

.project-card-foot {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.project-card-name {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
}
.project-card-tag {
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-text);
  flex-shrink: 0;
}

/* Hidden by filter */
.project-card.hidden {
  display: none;
}

/* ======================
   PROJECT DETAIL PAGE
====================== */
.project-detail-page {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

.project-detail-hero {
  width: 100%;
  height: clamp(280px, 44vw, 580px);
  overflow: hidden;
  position: relative;
}
.project-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, oklch(13% 0.007 65 / 0.7) 0%, transparent 40%);
}

.project-detail-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(56px, 7vw, 96px) var(--page-x);
}

.project-detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
}

.project-detail-back,
.project-detail-next {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s ease;
}
.project-detail-back:hover,
.project-detail-next:hover { color: var(--text); }

.project-detail-title {
  font-family: var(--font-head);
  font-size: clamp(43px, 7vw, 112px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
  max-width: 900px;
}
.project-detail-location {
  font-size: 15px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: 64px;
}

.project-quick-id {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: oklch(80% 0.09 65 / 0.18);
  margin-bottom: clamp(20px, 7vw, 96px);
}
.quick-id-item {
  background: var(--bg);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quick-id-label {
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.quick-id-value {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.3vw, 18px);
  font-weight: 300;
  color: var(--text);
  line-height: 1.4;
}

.project-detail-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.project-detail-images .img-full {
  grid-column: 1 / -1;
}
.project-detail-img {
  width: 100%;
  overflow: hidden;
}
.project-detail-img.tall {
  aspect-ratio: 3 / 4;
}
.project-detail-img.wide {
  aspect-ratio: 16 / 9;
}
.project-detail-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.82) contrast(1.04);
}
/* Plan/sketch drawings: show the full drawing, letterboxed on the surface tone */
.project-detail-img.plan {
  background: var(--surface);
}
.project-detail-img.plan img {
  object-fit: contain;
  filter: none;
}

.project-detail-desc {
  margin-bottom: var(--gap);
}
.project-detail-desc.has-img {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: start;
}
.project-desc-text {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.75;
  color: var(--body);
  max-width: 65ch;
}
.project-desc-img {
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.project-desc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.84) contrast(1.04);
}

/* ======================
   STUDIO PAGE
====================== */
.studio-page {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

.studio-carousel {
  position: relative;
  overflow: hidden;
}
.studio-carousel .carousel-item {
  height: clamp(280px, 44vw, 580px);
}

.studio-about {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(48px, 2vw, 120px) var(--page-x);
  display: grid;
  grid-template-columns: 40fr 60fr;
  gap: clamp(48px, 6vw, 96px);
  align-items: start;
}
.studio-about-label { margin-bottom: 16px; }
.studio-about-heading {
  font-family: var(--font-head);
  font-size: clamp(39px, 5vw, 78px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
}
.studio-about-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.studio-about-body p {
  font-size: clamp(17px, 1.3vw, 18px);
  font-weight: 300;
  color: var(--text-dim);
  line-height: 1.85;
}

/* Team tree */
.team-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--page-x) clamp(80px, 10vw, 140px);
  border-top: 1px solid var(--border);
  padding-top: clamp(48px, 2vw, 120px);
}
.team-section-heading {
  font-family: var(--font-head);
  font-size: clamp(30px, 3.5vw, 52px);
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-top: 12px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: clamp(40px, 5vw, 64px) clamp(28px, 3.5vw, 48px);
}
.team-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.team-card-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface);
  position: relative;
  margin-bottom: 12px;
}
.team-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85) grayscale(0.2);
  transition: filter 0.3s ease;
}
.team-card:hover .team-card-photo img { filter: brightness(0.95) grayscale(0); }
.team-card-photo.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-card-photo-initials {
  font-family: var(--font-head);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 300;
  color: var(--mid);
  letter-spacing: 0.05em;
}
.team-card-name {
  font-family: var(--font-head);
  font-size: clamp(19px, 1.6vw, 23px);
  font-weight: 400;
  color: var(--text);
  line-height: 1.2;
}
.team-card-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 2px;
}
.team-card-title {
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.3;
}
.team-card-email {
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--gold-text);
  line-height: 1.3;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.team-card-email:hover {
  color: var(--text);
  text-decoration-color: oklch(94% 0.005 75 / 0.5);
}

/* ======================
   CONTACT PAGE
====================== */
.contact-page {
  padding-top: var(--nav-h);
  min-height: 90vh;
}

.contact-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(64px, 8vw, 120px) var(--page-x);
  display: grid;
  grid-template-columns: 38fr 62fr;
  gap: clamp(48px, 7vw, 120px);
  align-items: start;
}

.contact-info-heading {
  font-family: var(--font-head);
  font-size: clamp(43px, 6vw, 86px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-top: 12px;
  margin-bottom: 48px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.contact-detail-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-detail-label {
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.contact-detail-value {
  font-family: var(--font-head);
  font-size: clamp(17px, 1.4vw, 18px);
  font-weight: 400;
  color: var(--text-dim);
  line-height: 1.5;
}
.contact-detail-value a {
  transition: color 0.2s ease;
}
.contact-detail-value a:hover { color: var(--text); }

.contact-form-wrap {
  padding-top: 4px;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-bottom: 1px solid var(--border-mid);
  transition: border-color 0.2s ease;
}
.form-field:focus-within { border-color: var(--gold); }
.form-label {
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 16px 0 6px;
  transition: color 0.2s ease;
}
.form-field:focus-within .form-label { color: var(--gold-text); }
.form-input,
.form-textarea {
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 300;
  color: var(--text);
  padding-bottom: 14px;
  width: 100%;
  resize: none;
  line-height: 1.6;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--mid); }
.form-textarea { min-height: 100px; }

.form-submit {
  margin-top: 28px;
  align-self: flex-start;
}
.form-submit .btn-outline {
  background: var(--bg);
  border-color: var(--gold);
  color: var(--gold-text);
}
.form-submit .btn-outline:hover {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}

/* ======================
   FOOTER
====================== */
.site-footer {
  background: var(--bg);
}
.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 22px var(--page-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copy {
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--mid);
  white-space: nowrap;
}
.footer-copy a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-copy a:hover { color: var(--text); }
.footer-end {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-nav-link {
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.2s ease;
}
.footer-nav-link:hover { color: var(--text); }
.footer-socials,
.contact-social-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}
.social-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  height: fit-content;
  color: var(--muted);
  transition: color 0.2s ease;
  flex-shrink: 0;
}
.social-icon-btn:hover { color: var(--text); }
.social-icon-btn svg {
  min-height: 16px;
  display: block;
  fill: currentColor;
}

/* ======================
   ACCESSIBILITY WIDGET
====================== */
.a11y-trigger {
  position: fixed;
  inset-inline-end: 20px;
  bottom: 20px;
  z-index: 300;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.a11y-trigger:hover,
.a11y-trigger.open {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-hi);
}
.a11y-trigger svg { width: 20px; height: 20px; flex-shrink: 0; }

.a11y-panel {
  position: fixed;
  inset-inline-end: 20px;
  bottom: 72px;
  z-index: 300;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  width: 220px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.a11y-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.a11y-panel-title {
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 10px;
}
.a11y-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 16px;
  cursor: pointer;
  text-align: start;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.a11y-btn:hover { background: var(--surface-2); color: var(--text); }
.a11y-btn.on {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-mid);
}
.a11y-check {
  width: 14px;
  height: 14px;
  border: 1px solid var(--border-hi);
  border-radius: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.a11y-btn.on .a11y-check::after {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 1px;
}

/* A11y state classes applied to <html> */
/* zoom scales all px/clamp text in content; nav and a11y widget (outside #app) are unaffected */
html.a11y-large-text #app,
html.a11y-large-text .site-footer { zoom: 1.2; }
html.a11y-high-contrast {
  --text:      oklch(99% 0 0);
  --text-dim:  oklch(95% 0 0);
  --muted:     oklch(80% 0 0);
  --gold:      oklch(85% 0.12 80);
  --gold-text: oklch(90% 0.14 80);
  --bg:        oklch(5% 0 0);
  --surface:   oklch(10% 0 0);
  --surface-2: oklch(14% 0 0);
}
html.a11y-reduce-motion *,
html.a11y-reduce-motion *::before,
html.a11y-reduce-motion *::after {
  animation: none !important;
  transition: none !important;
}
html.a11y-focus-ring *:focus {
  outline: 3px solid var(--gold) !important;
  outline-offset: 2px !important;
}
html.a11y-grayscale { filter: grayscale(1); }
html.a11y-highlight-links a {
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  text-decoration-color: var(--gold) !important;
}

/* ======================
   SCROLL REVEAL
====================== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.06s; }
.reveal-delay-2 { transition-delay: 0.12s; }
.reveal-delay-3 { transition-delay: 0.18s; }

/* ======================
   RESPONSIVE
====================== */
@media (max-width: 960px) {
  .about-hero { grid-template-columns: 1fr; }
  .about-portrait { aspect-ratio: 4 / 3; }
  .about-content { padding-top: 32px; }

  .studio-about { grid-template-columns: 1fr; }

  .contact-layout { grid-template-columns: 1fr; }
  .contact-info-heading { font-size: clamp(39px, 10vw, 60px); }

  .project-detail-images { grid-template-columns: 1fr; }
  .project-detail-images .img-full { grid-column: 1; }
  .project-detail-desc.has-img { grid-template-columns: 1fr; }
  .project-detail-desc.has-img .project-desc-text { padding-bottom: 10px; }
}

@media (max-width: 640px) {
  :root { --page-x: clamp(20px, 5vw, 40px); }

  .projects-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

  .team-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-end { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-nav { gap: 14px; }

  .carousel-caption-meta { display: none; }

  .about-partners { --partners-gap: 34px; }
  .about-partner-logo { height: 112px; padding: 0 16px; }
  .about-partner-logo img { height: 70px; max-width: 190px; }
}

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

/* ======================
   REDUCED MOTION
====================== */
@media (prefers-reduced-motion: reduce) {
  .page { animation: none; }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .carousel-track { transition: none; }
}

/* Give every orange sub-text the same punch as the carousel caption
   (brighter --gold-text + heavier weight + shadow for legibility). */
.eyebrow,
.home-est-label,
.about-title-primary,
.project-card-overlay-loc,
.project-card-tag,
.project-detail-location,
.quick-id-label,
.team-card-email,
.contact-detail-label {
  font-weight: 600;
  text-shadow: 0 1px 3px oklch(0% 0 0 / 0.7);
}

/* Language toggle is active: Hebrew (prerendered + CMS) ↔ English (built-in
   professional translations, rendered client-side from source). */

/* ── Touch devices: comfortable 44px tap targets (adapt/mobile) ──────── */
@media (hover: none) and (pointer: coarse) {
  .carousel-arrow { width: 44px; height: 44px; }
  .filter-btn { padding: 12px 18px; }
  .nav-menu-btn { padding: 10px; margin-inline-end: -4px; }
  .social-icon-btn { min-width: 44px; min-height: 44px; }
  /* Keep the footer's social row from over-spreading on wider touch screens */
  .footer-socials { gap: 2px; }
}

/* Legal links in the footer's right-side block (next to the copyright) */
.footer-legal { display: inline-flex; align-items: center; gap: 14px; }
.footer-legal-link {
  font-size: 14px; color: var(--muted); letter-spacing: 0.03em; transition: color 0.2s ease;
}
.footer-legal-link:hover { color: var(--text); }

/* Contact form: honeypot (hidden) + status message */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.form-status { margin-top: 14px; font-size: 14px; min-height: 1.2em; color: var(--muted); line-height: 1.5; }
.form-status-ok { color: var(--gold-text); }
.form-status-err { color: oklch(72% 0.15 25); }

/* Studio team grouped by category */
.team-groups { display: flex; flex-direction: column; gap: clamp(48px, 7vw, 88px); }
.team-category-heading {
  font-family: var(--font-head);
  font-size: clamp(19px, 1.8vw, 24px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--gold-text);
  margin-bottom: clamp(18px, 2.5vw, 28px);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
