/* =========================================================================
   MATRO — Architectural AC Covers
   Warm paper white · anthracite ink · restrained bronze
   Archivo (variable wdth/wght) + Space Mono
   Signature motif: the louver line
   ========================================================================= */

:root {
  /* palette */
  --paper:      #F3F1EB;   /* warm white ground */
  --paper-2:    #ECE8DF;   /* deeper warm, alternating */
  --canvas:     #FBFAF6;   /* image mat / studio white */
  --ink:        #17181A;   /* near-black anthracite (the product) */
  --ink-80:     #33342F;
  --ink-soft:   #56574F;   /* secondary text */
  --mute:       #9A968B;   /* tertiary / mono labels */
  --line:       #D8D3C7;   /* hairline on paper */
  --bronze:     #9A7B4F;   /* the single restrained accent */
  --bronze-deep:#7E6238;

  /* type */
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* rhythm */
  --gutter: clamp(20px, 5vw, 80px);
  --maxw: 1560px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: auto;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.55;
  font-variation-settings: "wght" 400, "wdth" 100;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--bronze); color: var(--paper); }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ------------------------------------------------------------- typography */
.eyebrow {
  font-family: var(--mono);
  font-size: clamp(10px, 0.78vw, 12px);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mute);
}
.eyebrow .idx { color: var(--bronze); }

.display {
  font-family: var(--sans);
  font-weight: 300;
  font-variation-settings: "wght" 300, "wdth" 118;
  line-height: 0.94;
  letter-spacing: -0.02em;
  margin: 0;
}

h2.section-title {
  font-family: var(--sans);
  font-weight: 350;
  font-variation-settings: "wght" 360, "wdth" 112;
  font-size: clamp(30px, 5.2vw, 78px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin: 0;
}

.lede {
  font-weight: 300;
  font-variation-settings: "wght" 320, "wdth" 104;
  font-size: clamp(21px, 2.9vw, 40px);
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.lede em { font-style: normal; color: var(--bronze); }

p.body { max-width: 46ch; color: var(--ink-soft); }

/* --------------------------------------------------------- louver motif */
/* a hairline with rounded caps — drawn from the product's slats */
.louver {
  height: 3px;
  border-radius: 3px;
  background: var(--line);
  width: 100%;
}
.louver--ink { background: var(--ink); }
.louver--bronze { background: var(--bronze); }

/* ----------------------------------------------------------- structure */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

section { position: relative; }
.section-pad { padding-block: clamp(90px, 14vh, 200px); }

.reveal { will-change: transform, opacity; }

/* ============================================================ preloader */
#loader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--paper);
  display: grid; place-items: center;
}
.loader-inner { width: min(360px, 62vw); }
.loader-mark {
  font-family: var(--sans);
  font-weight: 300;
  font-variation-settings: "wght" 300, "wdth" 120;
  font-size: clamp(34px, 8vw, 64px);
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
  overflow: hidden;
}
.loader-mark span { display: inline-block; transform: translateY(110%); }
.loader-slats { margin-top: 22px; display: grid; gap: 6px; }
.loader-slats .louver { transform: scaleX(0); transform-origin: left; }
.loader-pct {
  margin-top: 16px; text-align: right;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  color: var(--mute);
}

/* =============================================================== header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(16px, 2.2vw, 26px) var(--gutter);
  color: #FFFFFF;
  /* top scrim keeps the nav legible over the hero photo */
  background: linear-gradient(180deg, rgba(12,13,15,0.8) 0%, rgba(12,13,15,0.45) 45%, rgba(12,13,15,0) 100%);
  padding-bottom: clamp(24px, 3.4vw, 40px);
  text-shadow: 0 1px 14px rgba(0,0,0,0.55);
  transition: background 0.5s var(--ease), color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
/* once past the hero, become a solid paper bar with dark text */
.site-header.scrolled {
  color: var(--ink);
  background: rgba(243,241,235,0.92);
  backdrop-filter: saturate(1.1) blur(10px);
  box-shadow: 0 1px 0 var(--line);
  text-shadow: none;
  padding-bottom: clamp(16px, 2.2vw, 26px);
}
.site-header.scrolled .nav-enquire { border-color: rgba(23,24,26,0.35); }
.brand {
  font-family: var(--sans);
  font-weight: 400;
  font-variation-settings: "wght" 500, "wdth" 118;
  font-size: clamp(17px, 1.5vw, 21px);
  letter-spacing: 0.14em;
  display: flex; align-items: baseline; gap: 9px;
}
.brand small {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em;
  opacity: 0.7; font-weight: 400;
}
.nav { display: flex; gap: clamp(18px, 2.4vw, 40px); align-items: center; }
.nav a {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  position: relative; padding-bottom: 2px;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: currentColor; transition: width 0.5s var(--ease);
}
.nav a:hover::after { width: 100%; }
.nav-enquire { border: 1px solid rgba(255,255,255,0.5); padding: 8px 16px; border-radius: 100px; }
.nav-enquire::after { display: none; }
@media (max-width: 720px) { .nav a:not(.nav-enquire) { display: none; } }

/* scroll progress — a growing louver */
.progress {
  position: fixed; left: var(--gutter); right: var(--gutter); bottom: 0; z-index: 91;
  height: 2px; background: transparent; pointer-events: none;
}
.progress i {
  display: block; height: 100%; width: 0%;
  background: var(--bronze); border-radius: 2px;
}

/* ================================================================ hero */
.hero { height: 100svh; min-height: 640px; position: relative; overflow: hidden; background: #101113; }
.hero-backdrop { display: none; }
.hero-media { position: absolute; inset: -6% 0; z-index: 1; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 52% 40%;
  transform: scale(1.02); will-change: transform;
  filter: saturate(0.98) contrast(1.02);
}
.hero-veil {
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(180deg, rgba(15,16,18,0.34) 0%, rgba(15,16,18,0) 26%),
    linear-gradient(0deg, rgba(15,16,18,0.5) 0%, rgba(15,16,18,0) 42%);
}
.hero-content {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--gutter);
  padding-bottom: clamp(48px, 8vh, 96px);
  color: #F4F2EC;
}
.hero-eyebrow { color: rgba(244,242,236,0.8); margin-bottom: clamp(18px, 3vh, 30px); }
.hero h1 {
  font-family: var(--sans);
  font-weight: 200;
  font-variation-settings: "wght" 230, "wdth" 122;
  font-size: clamp(48px, 12.5vw, 200px);
  line-height: 0.86; letter-spacing: -0.03em; margin: 0;
  max-width: 15ch;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: inline-block; transform: translateY(105%); }
.hero h1 .accent {
  font-variation-settings: "wght" 300, "wdth" 122;
  font-style: italic; color: var(--bronze);
  /* bronze is bright enough on the dark hero base */
  color: #C8A26A;
}
.hero-foot {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px; margin-top: clamp(24px, 4vh, 44px);
}
.hero-foot p {
  font-family: var(--mono); font-size: clamp(11px, 1vw, 13px);
  letter-spacing: 0.04em; max-width: 34ch; margin: 0;
  color: rgba(244,242,236,0.82);
}
.scroll-cue {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; display: flex; align-items: center; gap: 10px;
  color: rgba(244,242,236,0.7); white-space: nowrap;
}
.scroll-cue .rule { width: 46px; height: 1px; background: currentColor; position: relative; overflow: hidden; }
.scroll-cue .rule::after {
  content: ""; position: absolute; inset: 0; width: 40%; background: var(--bronze);
  animation: cue 2.4s var(--ease-io) infinite;
}
@keyframes cue { 0% { transform: translateX(-120%);} 60%,100% { transform: translateX(340%);} }

/* ============================================================ thesis */
.thesis { background: var(--paper); }
.thesis .wrap { display: grid; grid-template-columns: 1fr; gap: clamp(30px, 6vw, 80px); }
.thesis-head { display: flex; align-items: baseline; gap: 16px; }
.thesis .lede { max-width: 20ch; }
.thesis-grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: clamp(24px, 4vw, 60px); align-items: end;
}
.thesis-statement { grid-column: 1 / span 8; }
.thesis-note { grid-column: 10 / span 3; }
@media (max-width: 860px) {
  .thesis-statement { grid-column: 1 / -1; }
  .thesis-note { grid-column: 1 / -1; }
}
.word { display: inline-block; overflow: hidden; }
.word > span { display: inline-block; transform: translateY(102%); }

/* ======================================================= before / after */
.ba { background: var(--paper-2); }
.ba-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px; flex-wrap: wrap; margin-bottom: clamp(30px, 5vw, 56px);
}
.ba-figure {
  position: relative; width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden; border-radius: 2px;
  background: var(--ink);
  cursor: ew-resize; user-select: none; touch-action: none;
}
@media (max-width: 720px) { .ba-figure { aspect-ratio: 3 / 4; } }
.ba-layer { position: absolute; inset: 0; }
.ba-layer img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 46%; }
.ba-after { clip-path: inset(0 0 0 50%); }         /* revealed from the right */
.ba-tag {
  position: absolute; top: 16px; z-index: 4;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: #fff;
  background: rgba(20,21,23,0.55); backdrop-filter: blur(4px);
  padding: 6px 12px; border-radius: 100px;
}
.ba-tag.before { left: 16px; }
.ba-tag.after  { right: 16px; }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; z-index: 5;
  width: 1px; background: rgba(255,255,255,0.85);
  transform: translateX(-0.5px); pointer-events: none;
}
.ba-handle::before {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 54px; height: 54px; transform: translate(-50%, -50%);
  border-radius: 50%; background: rgba(255,255,255,0.9);
  box-shadow: 0 8px 30px rgba(0,0,0,0.28);
}
.ba-handle::after {
  content: "‹ ›"; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); letter-spacing: 3px;
  font-family: var(--sans); font-weight: 600; font-size: 18px; color: var(--ink);
}
.ba-caption {
  margin-top: 22px; display: flex; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; color: var(--mute); letter-spacing: 0.04em;
}

/* =========================================================== product pin */
.product { background: var(--paper); }
.product .wrap { display: grid; grid-template-columns: 1fr; }
.product-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(30px, 6vw, 90px);
  align-items: start;
}
@media (max-width: 900px) { .product-grid { grid-template-columns: 1fr; } }
.product-visual { position: relative; }
.product-sticky {
  position: sticky; top: 12vh; height: 82vh;
  display: grid; place-items: center;
  background: transparent;   /* product floats on the page */
  overflow: visible;
}
.product-sticky img {
  position: relative; z-index: 2;
  max-height: 82%; width: auto; object-fit: contain;
  filter: drop-shadow(0 40px 60px rgba(23,24,26,0.18));
  will-change: transform; transition: opacity 0.7s var(--ease);
}
/* Gaussian-splat canvas injected by the viewer */
.product-sticky canvas {
  position: absolute !important; inset: 0 !important;
  width: 100% !important; height: 100% !important;
  z-index: 1; opacity: 0; transition: opacity 0.9s var(--ease);
  border-radius: inherit;
}
/* the 3D capture floats on the page's paper background */
.product-sticky.is-3d { background: transparent; }
.product-sticky.is-3d canvas { opacity: 1; }
.product-sticky.is-3d img { opacity: 0; }
.product-plate {
  position: absolute; left: 22px; bottom: 20px; z-index: 3; pointer-events: none;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--mute);
}
.product-plate b { color: var(--ink); font-weight: 700; }
.product-hint {
  position: absolute; right: 22px; bottom: 20px; z-index: 3; pointer-events: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--mute); display: flex; align-items: center; gap: 8px;
  opacity: 0; transition: opacity 0.6s var(--ease);
}
.product-hint.show { opacity: 0.9; }
.product-hint .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bronze); }
.product-copy { padding-top: clamp(0px, 6vh, 60px); }
.product-copy h2 { margin-bottom: clamp(24px, 4vw, 40px); }

.spec-list { margin-top: clamp(30px, 5vw, 50px); border-top: 1px solid var(--line); }
.spec {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: baseline;
  gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line);
}
.spec .n { font-family: var(--mono); font-size: 11px; color: var(--bronze); letter-spacing: 0.1em; }
.spec .k {
  font-family: var(--sans); font-weight: 450;
  font-variation-settings: "wght" 500, "wdth" 108;
  font-size: clamp(16px, 1.5vw, 20px); letter-spacing: -0.01em;
}
.spec .v { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); text-align: right; letter-spacing: 0.02em; }
@media (max-width: 520px) {
  .spec { grid-template-columns: 26px 1fr; }
  .spec .v { grid-column: 2; text-align: left; color: var(--mute); }
}

/* ============================================================== gallery */
.gallery { background: var(--paper); }
.gallery-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: clamp(30px, 5vw, 56px); flex-wrap: wrap; }
.gallery-grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 2.4vw, 34px);
}
.g-item { position: relative; overflow: hidden; border-radius: 2px; background: var(--ink); }
.g-item .img-holder { position: relative; width: 100%; height: 100%; overflow: hidden; }
.g-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease), filter 0.9s var(--ease);
  filter: saturate(0.9);
}
.g-item[data-webgl="on"] img { opacity: 0; }   /* replaced by canvas plane */
.g-item:hover img { transform: scale(1.05); filter: saturate(1.05); }
.g-1 { grid-column: 1 / span 7; aspect-ratio: 4 / 3; }
.g-2 { grid-column: 8 / span 5; aspect-ratio: 3 / 4; align-self: end; }
.g-3 { grid-column: 3 / span 8; aspect-ratio: 16 / 9; margin-top: clamp(16px,2vw,34px); }
@media (max-width: 760px) {
  .g-1, .g-2, .g-3 { grid-column: 1 / -1; margin-top: 0; }
  .g-2 { aspect-ratio: 4 / 3; }
}
.g-meta {
  position: absolute; left: 16px; bottom: 14px; z-index: 3; color: #fff;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-shadow: 0 1px 12px rgba(0,0,0,0.4);
  display: flex; gap: 12px; align-items: baseline;
}
.g-meta .loc { opacity: 0.75; }

/* shared webgl canvas overlaying the gallery */
#gl-canvas {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  opacity: 0; transition: opacity 0.6s var(--ease);
}
#gl-canvas.active { opacity: 1; }

/* ============================================================= approach */
.approach { background: var(--ink); color: var(--paper); }
.approach .eyebrow { color: rgba(243,241,235,0.55); }
.approach h2 { color: var(--paper); }
.approach-grid {
  display: grid; grid-template-columns: repeat(12,1fr); gap: clamp(24px,4vw,60px);
  margin-top: clamp(40px,6vw,80px);
}
.approach-lede { grid-column: 1 / span 6; }
.approach-lede .lede { color: var(--paper); }
.approach-lede .lede em { color: #C8A26A; }
.approach-list { grid-column: 8 / span 5; }
@media (max-width: 860px) { .approach-lede, .approach-list { grid-column: 1 / -1; } }
.value {
  display: grid; grid-template-columns: 40px 1fr; gap: 18px;
  padding: 26px 0; border-top: 1px solid rgba(243,241,235,0.16);
}
.value:last-child { border-bottom: 1px solid rgba(243,241,235,0.16); }
.value .n { font-family: var(--mono); font-size: 11px; color: #C8A26A; letter-spacing: 0.1em; }
.value h3 {
  margin: 0 0 8px; font-family: var(--sans); font-weight: 450;
  font-variation-settings: "wght" 500, "wdth" 108;
  font-size: clamp(18px, 1.8vw, 23px); letter-spacing: -0.01em;
}
.value p { margin: 0; color: rgba(243,241,235,0.62); font-size: 15px; max-width: 40ch; }
/* thin louver band decorating the dark section */
.slat-band { display: grid; gap: 7px; margin-top: clamp(50px, 8vw, 90px); }
.slat-band .louver { background: rgba(243,241,235,0.14); transform-origin: left; }

/* ================================================================= CTA */
.cta { position: relative; height: 100svh; min-height: 620px; overflow: hidden; color: #F4F2EC; }
.cta-media { position: absolute; inset: -8% 0; }
.cta-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transform: scale(1.1); will-change: transform; }
.cta-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,16,18,0.35), rgba(15,16,18,0.72)); }
.cta-content {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column;
  justify-content: center; align-items: center; text-align: center; padding: var(--gutter);
}
.cta-content h2 {
  font-family: var(--sans); font-weight: 200;
  font-variation-settings: "wght" 230, "wdth" 120;
  font-size: clamp(42px, 10vw, 148px); line-height: 0.9; letter-spacing: -0.03em; margin: 0;
}
.cta-content h2 em { font-style: italic; color: #C8A26A; font-variation-settings: "wght" 300, "wdth" 120; }
.cta-btn {
  margin-top: clamp(30px, 5vh, 54px);
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase;
  border: 1px solid rgba(244,242,236,0.5); border-radius: 100px;
  padding: 16px 30px; overflow: hidden; position: relative; isolation: isolate;
  transition: color 0.5s var(--ease);
}
.cta-btn span { position: relative; z-index: 2; }
.cta-btn::before {
  content: ""; position: absolute; inset: 0; z-index: 1; background: var(--bronze);
  transform: translateY(101%); transition: transform 0.55s var(--ease);
}
.cta-btn:hover { color: #17181A; border-color: var(--bronze); }
.cta-btn:hover::before { transform: translateY(0); }

/* ============================================================== footer */
.footer { background: var(--ink); color: rgba(243,241,235,0.7); padding: clamp(50px,7vw,90px) 0 34px; }
.footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
@media (max-width: 720px) { .footer .wrap { grid-template-columns: 1fr 1fr; } }
.footer-brand {
  font-family: var(--sans); font-weight: 300;
  font-variation-settings: "wght" 400, "wdth" 122;
  font-size: clamp(40px, 8vw, 96px); letter-spacing: 0.01em; line-height: 0.9; color: var(--paper);
  grid-column: 1 / -1; margin-bottom: clamp(30px,5vw,60px);
}
.footer h4 { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(243,241,235,0.4); margin: 0 0 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a { font-size: 14px; transition: color 0.4s var(--ease); }
.footer a:hover { color: #C8A26A; }
.footer-bottom {
  grid-column: 1 / -1; margin-top: clamp(40px,6vw,70px); padding-top: 24px;
  border-top: 1px solid rgba(243,241,235,0.14);
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: rgba(243,241,235,0.4);
}

/* =========================================================== reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.05ms !important; }
  .hero-media img, .cta-media img { transform: none; }
  .hero h1 .line > span, .word > span, .loader-mark span { transform: none !important; }
  .loader-slats .louver { transform: scaleX(1) !important; }
}
