/* ==========================================================================
   Studio Habitat.ch SA — studiohabitat.ch
   Modern editorial architecture & urban planning
   ========================================================================== */

/* --- Fonts ---------------------------------------------------------------- */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/syne-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/syne-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Tokens --------------------------------------------------------------- */
:root {
  --ink: #101010;
  --ink-soft: #2a2a2a;
  --paper: #f7f6f3;
  --white: #ffffff;
  --accent: #fc5b13;
  --accent-dark: #d94a08;
  --steel: #9eb9c6;
  --muted: #6f6f6f;
  --line: rgba(16, 16, 16, 0.14);
  --line-light: rgba(255, 255, 255, 0.18);

  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --header-h: 76px;
  --gutter: clamp(20px, 4.2vw, 64px);
  --container: 1560px;
  --measure: 62ch;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.9s;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  transform: translateY(-300%);
  transition: transform 0.3s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* --- Typography ----------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

.h-display {
  font-size: clamp(2.9rem, 7.6vw, 7.2rem);
  font-weight: 800;
  line-height: 0.98;
}

.h-page {
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  font-weight: 800;
}

.h-section {
  font-size: clamp(1.9rem, 3.4vw, 3.1rem);
  font-weight: 700;
}

.h-card {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

p { margin: 0 0 1.25em; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: clamp(1.05rem, 1.45vw, 1.3rem);
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 22px;
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  background: currentColor;
  flex: none;
}
.eyebrow--muted { color: var(--muted); }

.accent { color: var(--accent); }
.muted { color: var(--muted); }

/* --- Layout helpers ------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(72px, 9vw, 148px); }
.section--paper { background: var(--paper); }
.section--ink { background: var(--ink); color: #fff; }

.hairline { border: 0; border-top: 1px solid var(--line); margin: 0; }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: end;
  margin-bottom: clamp(40px, 5.5vw, 84px);
}

/* --- Buttons & links ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 17px 30px;
  border: 2px solid var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  background: transparent;
  color: var(--ink);
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.btn .btn-arrow { transition: transform 0.35s var(--ease); }
.btn:hover { background: var(--ink); color: #fff; }
.btn:hover .btn-arrow { transform: translateX(5px); }

.btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn--light { border-color: rgba(255, 255, 255, 0.85); color: #fff; }
.btn--light:hover { background: #fff; border-color: #fff; color: var(--ink); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.link-arrow svg { transition: transform 0.35s var(--ease); }
.link-arrow:hover svg { transform: translateX(5px); }

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.is-scrolled,
body.menu-open .site-header {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 40px rgba(16, 16, 16, 0.06);
}

body.lb-open .site-header {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

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

.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 46px; width: auto; }

.main-nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); }

.main-nav a {
  position: relative;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 6px 0;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.main-nav a:hover::after,
.main-nav a[aria-current='page']::after { transform: scaleX(1); }

.header-cta {
  display: flex;
  align-items: center;
  gap: 26px;
  flex: none;
}
.header-phone {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
  white-space: nowrap;
}
.header-phone:hover { color: var(--accent); }

.header-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.header-social:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.header-social svg { width: 15px; height: 15px; }

.nav-toggle {
  display: none;
  position: relative;
  z-index: 130;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transform: translateX(-50%);
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease), top 0.4s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 25px; }
body.menu-open .nav-toggle span:nth-child(1) { top: 21px; transform: translateX(-50%) rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { top: 21px; transform: translateX(-50%) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: var(--white);
  padding: calc(var(--header-h) + 40px) var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0s linear 0.45s;
}
body.menu-open .mobile-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.mobile-menu nav { display: flex; flex-direction: column; gap: 6px; }
.mobile-menu nav a {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 9vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  padding: 6px 0;
}
.mobile-menu nav a:hover { color: var(--accent); }
.mobile-menu nav a[aria-current='page'] { color: var(--accent); }
.mobile-menu .menu-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.mobile-menu .menu-meta a { color: var(--ink); font-weight: 500; }

/* --- Hero (home) ---------------------------------------------------------- */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  margin-top: var(--header-h);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
}
.hero video,
.hero .hero-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 10, 10, 0.62) 0%, rgba(10, 10, 10, 0.16) 42%, rgba(10, 10, 10, 0.78) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: clamp(48px, 7vw, 96px);
  padding-top: calc(var(--header-h) + 40px);
  color: #fff;
}
.hero-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 26px;
}
.hero-kicker .dot { color: var(--accent); }
.hero h1 { color: #fff; margin-bottom: 30px; }
.hero h1 .accent { color: var(--accent); }
.hero .hero-lead {
  max-width: 720px;
  font-size: clamp(1.02rem, 1.4vw, 1.25rem);
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 42px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }

.hero-scroll {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: 1px;
  height: 56px;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
}
.hero-scroll::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  transform: translateY(-100%);
  animation: scrollLine 2.4s var(--ease) infinite;
}
@keyframes scrollLine {
  0% { transform: translateY(-100%); }
  55% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* --- Marquee -------------------------------------------------------------- */
.marquee {
  border-block: 1px solid var(--line);
  background: var(--paper);
  overflow: hidden;
  padding-block: 26px;
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  animation: marquee 46s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span {
  display: inline-flex;
  align-items: center;
  gap: clamp(24px, 3vw, 48px);
  padding-right: clamp(24px, 3vw, 48px);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee span::after {
  content: '';
  width: 9px;
  height: 9px;
  background: var(--accent);
  flex: none;
  transform: rotate(45deg);
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* --- Project cards / grids ------------------------------------------------ */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(20px, 3vw, 44px) clamp(20px, 2.6vw, 40px);
}

.card {
  display: block;
  grid-column: span 6;
}
.card--w7 { grid-column: span 7; }
.card--w5 { grid-column: span 5; }

.card-media {
  position: relative;
  overflow: hidden;
  background: var(--paper);
}
.card-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 1.2s var(--ease), filter 0.6s var(--ease);
}
.card:hover .card-media img { transform: scale(1.045); }

.card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(10, 10, 10, 0.34));
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.card:hover .card-media::after { opacity: 1; }

.card-info {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 2px 0;
  border-top: 1px solid var(--line);
  margin-top: 18px;
}
.card-info h3 { margin: 0; }
.card-info .card-meta {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.card-info .card-arrow {
  flex: none;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.card:hover .card-arrow { opacity: 1; transform: none; }

.card-title-row { display: flex; align-items: baseline; gap: 14px; min-width: 0; }

/* --- Home: about / team --------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(28px, 5vw, 90px);
}
.about-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: clamp(36px, 4vw, 64px);
}
.fact {
  background: var(--white);
  padding: clamp(22px, 2.6vw, 38px);
}
.fact .fact-num {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 10px;
}
.fact .fact-num span { color: var(--accent); }
.fact p { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.55; }

.office-figure { margin-top: clamp(44px, 5vw, 80px); }
.office-figure img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.office-figure figcaption {
  margin-top: 14px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 40px);
}
.person {
  border: 1px solid var(--line);
  padding: clamp(26px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--white);
  transition: border-color 0.4s var(--ease), transform 0.5s var(--ease);
}
.person:hover { border-color: var(--ink); transform: translateY(-3px); }
.person h3 { margin: 0 0 8px; }
.person .quals { font-size: 14px; color: var(--muted); line-height: 1.6; }
.person .person-link { margin-top: 22px; }

.collab {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: clamp(20px, 2.6vw, 40px);
}
.collab .fact { background: var(--paper); }
.collab .fact .fact-num { font-size: clamp(2.2rem, 3.6vw, 3.4rem); }

/* --- CTA band ------------------------------------------------------------- */
.cta-band .container {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: center;
  padding-block: clamp(64px, 8vw, 120px);
}
.cta-band h2 { color: #fff; }
.cta-band .cta-lines { display: flex; flex-direction: column; gap: 4px; }
.cta-line {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  font-weight: 600;
  color: #fff;
}
.cta-line .lab {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  width: 74px;
  flex: none;
}
.cta-line a:hover { color: var(--accent); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* --- Page hero (interior) ------------------------------------------------- */
.page-hero {
  padding-top: calc(var(--header-h) + clamp(56px, 8vw, 120px));
  padding-bottom: clamp(44px, 6vw, 90px);
}
.page-hero .lead { margin-top: 28px; }
.page-hero--paper { background: var(--paper); border-bottom: 1px solid var(--line); }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--accent); }

/* --- Architettura grid ---------------------------------------------------- */
.arch-grid { padding-bottom: clamp(72px, 9vw, 140px); }
.arch-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 26px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(36px, 4.5vw, 64px);
}
.arch-count strong { color: var(--ink); font-weight: 600; }

/* --- Urbanistica WIP ------------------------------------------------------ */
.wip-wrap {
  max-width: 860px;
  margin-inline: auto;
  text-align: center;
}
.wip-card {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: clamp(36px, 6vw, 84px);
}
.wip-card img { max-width: 520px; margin-inline: auto; }
.wip-note { margin-top: clamp(24px, 3vw, 40px); font-size: 15px; color: var(--muted); }
.wip-actions { margin-top: 34px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* --- Contatti ------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(36px, 5vw, 90px);
  align-items: start;
}
.contact-list { display: flex; flex-direction: column; }
.contact-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  padding-block: clamp(22px, 2.6vw, 34px);
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.contact-item:last-child { border-bottom: 1px solid var(--line); }
.contact-item .ci-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-item .ci-value {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.9vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.contact-item .ci-value a:hover { color: var(--accent); }
.contact-item .ci-sub { font-family: var(--font-body); font-size: 14px; color: var(--muted); font-weight: 400; }

.map-figure { border: 1px solid var(--line); }
.map-figure img { width: 100%; }
.map-figure figcaption {
  padding: 16px 20px;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* --- Project detail ------------------------------------------------------- */
.proj-head { padding-top: calc(var(--header-h) + clamp(40px, 6vw, 90px)); }
.proj-head .h-page { max-width: 18ch; }
.proj-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  padding: 9px 16px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.chip--accent { border-color: var(--accent); color: var(--accent); }

.proj-cover { margin-top: clamp(36px, 5vw, 72px); }
.proj-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.proj-body {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 96px);
  padding-block: clamp(56px, 7vw, 110px);
}
.proj-facts { position: sticky; top: calc(var(--header-h) + 34px); align-self: start; }
.proj-facts dl { margin: 0; }
.proj-facts dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 18px;
}
.proj-facts dd {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.proj-text p { font-size: 17.5px; line-height: 1.85; }
.proj-text p:first-child { font-size: 19.5px; }

.proj-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: dense;
  align-items: start;
  gap: clamp(14px, 2vw, 28px);
  padding-bottom: clamp(64px, 8vw, 120px);
}
.proj-gallery figure {
  margin: 0;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--paper);
}
.proj-gallery figure:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.proj-gallery figure.wide { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.proj-gallery figure.tall { aspect-ratio: 2 / 3; }
.proj-gallery img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.proj-gallery figure:hover img { transform: scale(1.03); }

.proj-nav {
  border-top: 1px solid var(--line);
  padding-block: clamp(40px, 5vw, 72px);
}
.proj-nav-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(18px, 3vw, 40px);
  align-items: center;
}
.pn-item {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.pn-item--next { justify-content: flex-end; text-align: right; }
.pn-thumb { width: 96px; aspect-ratio: 4/3; object-fit: cover; flex: none; }
.pn-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.pn-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
}
.pn-item:hover .pn-title { color: var(--accent); }
.pn-all { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.pn-all:hover { color: var(--accent); }

/* --- Lightbox ------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(10, 10, 10, 0.975);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s;
}
.lightbox.is-open { opacity: 1; visibility: visible; transition: opacity 0.4s var(--ease); }
.lightbox img {
  max-width: min(94vw, 1600px);
  max-height: 84svh;
  width: auto;
  height: auto;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.lightbox.is-loaded img { opacity: 1; transform: none; }

.lb-btn {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #fff;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.lb-btn:hover { background: #fff; color: var(--ink); border-color: #fff; }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 22px; top: 50%; transform: translateY(-50%); }
.lb-counter {
  position: absolute;
  top: 34px;
  left: 30px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.75);
}
.lb-caption {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

/* --- Footer --------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.82);
  padding-top: clamp(56px, 7vw, 96px);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(28px, 3.5vw, 64px);
  padding-bottom: clamp(44px, 5vw, 72px);
}
.footer-logo-chip {
  display: inline-block;
  background: #fff;
  padding: 14px 18px;
  border-radius: 4px;
}
.footer-logo-chip img { height: 40px; width: auto; }
.footer-tag { margin-top: 20px; font-size: 14px; color: rgba(255, 255, 255, 0.55); max-width: 30ch; }

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 15px; color: rgba(255, 255, 255, 0.85); }
.footer-col a:hover { color: var(--accent); }
.footer-col address { font-style: normal; font-size: 15px; line-height: 1.7; }

.footer-bottom {
  border-top: 1px solid var(--line-light);
  padding-block: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.5);
}
.footer-bottom .footer-social { display: inline-flex; gap: 14px; align-items: center; }
.footer-bottom .footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-light);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.8);
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.footer-bottom .footer-social a:hover { background: #fff; color: var(--ink); }

/* --- Reveal on scroll ----------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 1120px) {
  .card--w7, .card--w5 { grid-column: span 6; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 920px) {
  .main-nav, .header-phone { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-social { display: none; }

  .hero h1 { margin-bottom: 24px; }

  .grid-12 { gap: 18px; }
  .card, .card--w7, .card--w5 { grid-column: span 12; }

  .team-grid { grid-template-columns: 1fr; }
  .collab { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-facts { grid-template-columns: 1fr; }

  .cta-band .container { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .proj-body { grid-template-columns: 1fr; }
  .proj-facts { position: static; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 8px; }
  .proj-facts dd { border-bottom: 0; padding-bottom: 6px; }

  .proj-gallery { gap: 12px; }
  .pn-thumb { display: none; }
  .proj-nav-grid { grid-template-columns: 1fr 1fr; }
  .pn-all { grid-column: 1 / -1; order: 3; text-align: center; margin-top: 8px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand img { height: 38px; }

  .hero .h-display { font-size: clamp(2.2rem, 10.2vw, 3rem); }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .arch-count { flex-direction: column; align-items: flex-start; gap: 8px; }

  .contact-item { grid-template-columns: 1fr; gap: 8px; }
  .proj-gallery figure, .proj-gallery figure.wide { grid-column: 1 / -1; }

  .lb-prev { left: 10px; }
  .lb-next { right: 10px; }
  .lb-btn { width: 44px; height: 44px; }
}

/* --- Motion preferences --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
