/* ============================================================
   v4/site.css: Jordans Mirrors, "a window where there wasn't one".

   One palette taken from the hero room: limewash, oak, brass, charcoal.
   Motion is quiet: opacity/translate reveals, nothing tied to scroll
   position except the hero camera (which is real 3D, not scrubbed video).
   ============================================================ */

@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("../fonts/cormorant-latin.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; font-display: swap; src: url("../fonts/cormorant-latin-italic.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("../fonts/hanken-latin.woff2") format("woff2"); }

:root {
  --lime: #f3eee5;        /* limewash */
  --lime-deep: #e7dfd1;
  --paper: #faf7f1;
  --ink: #1d1a15;
  --ink-soft: #4b443a;
  --ink-faint: #8b8274;
  --oak: #a87d52;
  --brass: #a4844a;
  --brass-pale: #e4d6b4;
  --charcoal: #2c2b28;
  --line: rgba(29, 26, 21, 0.12);
  --sun: #f6dcae;

  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --ui: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1280px;
  --r: 2px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--lime); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ui); font-size: 16px; line-height: 1.6; color: var(--ink);
  background: var(--lime); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
/* any display rule beats the hidden attribute; this puts it back in charge everywhere */
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type ---------- */
.eyebrow { font-size: 11.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); font-weight: 500; }
.display { font-family: var(--display); font-weight: 300; line-height: 1.02; letter-spacing: -0.01em; }
.display em { font-style: italic; }
h1.display { font-size: clamp(44px, 7.4vw, 104px); }
h2.display { font-size: clamp(36px, 5vw, 68px); }
h3.display { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.1; }
.lede { font-size: clamp(17px, 1.5vw, 19px); color: var(--ink-soft); max-width: 36em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px;
  font-size: 14px; letter-spacing: 0.06em; font-weight: 500; text-decoration: none;
  border: 1px solid var(--ink); border-radius: var(--r); transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--charcoal); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--light { border-color: rgba(255, 255, 255, 0.85); color: #fff; }
.btn--light:hover { background: #fff; color: var(--ink); }
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.link { text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; font-size: 14px; letter-spacing: 0.04em; }

/* ---------- header ---------- */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 18px var(--gutter); transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), padding 0.35s var(--ease);
}
.site-head.is-solid { background: rgba(243, 238, 229, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); padding-block: 12px; }
.brand { font-family: var(--display); font-size: 25px; font-weight: 500; letter-spacing: 0.01em; text-decoration: none; white-space: nowrap; }
.brand small { display: block; font-family: var(--ui); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-faint); margin-top: -2px; }
.nav { display: flex; gap: 28px; align-items: center; }
.nav a { font-size: 13.5px; letter-spacing: 0.05em; text-decoration: none; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.nav a:hover::after { transform: scaleX(1); }
.head-cta { display: flex; gap: 10px; align-items: center; }
.shortlist-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 40px; background: rgba(250, 247, 241, 0.6); }
.shortlist-btn .count { min-width: 20px; height: 20px; border-radius: 10px; background: var(--ink); color: var(--paper); font-size: 11px; display: grid; place-items: center; padding: 0 6px; }
.shortlist-btn .count:empty, .shortlist-btn .count[data-n="0"] { background: var(--line); color: var(--ink-faint); }
@media (max-width: 860px) { .nav { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: #e4dccf; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s var(--ease); }
.hero canvas.is-live { opacity: 1; }
.hero-poster { position: absolute; inset: 0; background: radial-gradient(80% 70% at 60% 40%, #f2e6d2 0%, #e1d7c8 60%, #d8cebf 100%); }
.hero::after { /* soft vignette + grain, keeps the 3D from reading as "CG" */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 55% 45%, transparent 55%, rgba(40, 30, 18, 0.22) 100%),
              url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.07'/%3E%3C/svg%3E");
}
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(243, 238, 229, 0.78) 0%, rgba(243, 238, 229, 0.35) 34%, transparent 52%); }
.hero-copy {
  position: absolute; z-index: 2; left: var(--gutter); bottom: clamp(40px, 10vh, 110px); max-width: min(620px, 52vw);
}
.hero-copy .eyebrow { color: var(--ink-soft); margin-bottom: 18px; }
.hero-copy h1 { color: var(--ink); text-wrap: balance; }
.hero-copy .lede { margin: 22px 0 30px; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-caption {
  position: absolute; z-index: 2; right: var(--gutter); bottom: clamp(28px, 5vh, 48px); text-align: right;
  font-size: 12.5px; letter-spacing: 0.06em; color: var(--ink-soft);
}
.hero-caption b { font-family: var(--display); font-size: 19px; font-weight: 500; letter-spacing: 0; color: var(--ink); display: block; }
.hero-caption a { margin-top: 6px; display: inline-block; }
.hero-caption .wc-btn { text-align: left; }
@media (max-width: 760px) {
  .hero { height: 92svh; }
  .hero-copy { max-width: none; right: var(--gutter); bottom: 32px; }
  .hero-copy .lede { display: none; }
  .hero-caption { display: none; }
  .hero::before { inset: 52% 0 0 0; background: linear-gradient(transparent, rgba(243, 238, 229, 0.94) 42%); }
  .hero-copy .eyebrow { font-size: 10.5px; letter-spacing: 0.16em; }
}

/* ---------- sections ---------- */
.section { padding: clamp(80px, 12vw, 160px) var(--gutter); }
.wrap { max-width: var(--max); margin: 0 auto; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head .eyebrow { margin-bottom: 14px; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; gap: 18px; } }

.statement { background: var(--paper); }
.statement p.display { font-size: clamp(30px, 3.8vw, 52px); max-width: 22em; text-wrap: balance; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--line); padding-top: 28px; }
.facts b { font-family: var(--display); font-weight: 400; font-size: 24px; display: block; margin-bottom: 4px; }
.facts span { font-size: 14.5px; color: var(--ink-soft); }
@media (max-width: 860px) { .facts { grid-template-columns: 1fr 1fr; } }

/* family cards */
.collection-label { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin: 0 0 28px; }
.collection-label h3 { font-family: var(--display); font-weight: 400; font-size: 30px; white-space: nowrap; }
.collection-label p { color: var(--ink-soft); font-size: 15px; max-width: 34em; }
.families { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); margin-bottom: clamp(56px, 7vw, 96px); }
.families--line { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .families--line { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .families, .families--line { grid-template-columns: 1fr 1fr; gap: 14px; } }
.fam { text-decoration: none; display: block; }
.fam figure { position: relative; overflow: hidden; background: var(--lime-deep); aspect-ratio: 4 / 5; border-radius: var(--r); }
.fam img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter 0.6s var(--ease); }
.fam:hover img { transform: scale(1.035); }
.fam .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 14px; }
.fam .meta b { font-family: var(--display); font-size: 25px; font-weight: 500; }
.fam .meta span { font-size: 12px; letter-spacing: 0.08em; color: var(--ink-faint); text-transform: uppercase; }
.fam p { font-size: 14.5px; color: var(--ink-soft); margin-top: 4px; }
.fam .heart { position: absolute; top: 10px; right: 10px; }

/* heart / shortlist toggle */
.heart {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(250, 247, 241, 0.88); color: var(--ink); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s var(--ease), background 0.2s;
}
.heart svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.heart[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.heart[aria-pressed="true"] svg { fill: currentColor; }
.heart:active { transform: scale(0.9); }

/* real homes strip */
.homes { background: var(--charcoal); color: var(--paper); }
.homes .eyebrow { color: rgba(250, 247, 241, 0.6); }
.homes .lede { color: rgba(250, 247, 241, 0.75); }
.strip { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 24px; margin: 0 calc(var(--gutter) * -1); scrollbar-width: thin; }
.strip a { flex: 0 0 auto; scroll-snap-align: start; text-decoration: none; }
.strip figure { height: clamp(300px, 46vh, 520px); border-radius: var(--r); overflow: hidden; background: #3a3833; }
.strip img { height: 100%; width: auto; }
.strip figcaption { font-size: 13px; color: rgba(250, 247, 241, 0.7); margin-top: 10px; letter-spacing: 0.03em; }
.strip figcaption b { color: var(--paper); font-weight: 500; }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: s; border-top: 1px solid var(--line); }
.steps li { list-style: none; padding: 28px 28px 0 0; counter-increment: s; }
.steps li::before { content: "0" counter(s); font-family: var(--display); font-size: 15px; color: var(--brass); display: block; margin-bottom: 18px; letter-spacing: 0.1em; }
.steps b { font-family: var(--display); font-size: 26px; font-weight: 500; display: block; margin-bottom: 8px; line-height: 1.15; }
.steps p { color: var(--ink-soft); font-size: 15px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; row-gap: 20px; } }

/* try-on teaser */
.wall-teaser { background: var(--paper); }
.wall-teaser .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.wall-teaser figure { aspect-ratio: 4 / 3; background: var(--lime-deep); border-radius: var(--r); overflow: hidden; position: relative; }
@media (max-width: 860px) { .wall-teaser .wrap { grid-template-columns: 1fr; } }

/* contact */
.contact .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); }
@media (max-width: 860px) { .contact .wrap { grid-template-columns: 1fr; } }
.wa { display: inline-flex; align-items: center; gap: 12px; }
.wa svg { width: 22px; height: 22px; }

.site-foot { padding: 48px var(--gutter); border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-faint); display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; }

/* reveal */
.rv { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* the 3D room grades itself (vignette + grain in the last pass); the CSS veil is only for the poster */
.hero:has(canvas.is-live)::after { display: none; }
.fam .styled-tag { position: absolute; left: 10px; bottom: 10px; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; background: rgba(250, 247, 241, 0.86); padding: 3px 8px; border-radius: 20px; color: var(--ink-soft); }

/* real homes: two drifting rows (cf. sid-labs.com road maps), light, edge-faded, pause on hover */
.homes2 { padding: clamp(80px, 11vw, 140px) 0; background: var(--paper); overflow: hidden; }
.homes2-head { padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: end; margin-bottom: clamp(32px, 4vw, 52px); }
@media (max-width: 860px) { .homes2-head { grid-template-columns: 1fr; gap: 16px; } }
.drift { overflow: hidden; padding: 8px 0;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.drift + .drift { margin-top: 14px; }
.drift-track { display: flex; gap: 14px; width: max-content; animation: drift var(--d, 100s) linear infinite; }
.drift--rev .drift-track { animation-direction: reverse; }
.drift:hover .drift-track, .drift:focus-within .drift-track { animation-play-state: paused; }
@keyframes drift { to { transform: translateX(-50%); } }
.drift-card { position: relative; flex: 0 0 auto; height: clamp(220px, 30vh, 320px); border-radius: 6px; overflow: hidden; text-decoration: none; background: var(--lime-deep); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.drift-card img { height: 100%; width: auto; transition: transform 0.8s var(--ease); }
.drift-card:hover img { transform: scale(1.04); }
.drift-card span { position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 14px 12px; color: #fff; font-size: 12.5px; letter-spacing: 0.03em;
  background: linear-gradient(transparent, rgba(20, 16, 10, 0.72)); opacity: 0; transform: translateY(6px); transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); }
.drift-card span b { display: block; font-family: var(--display); font-weight: 500; font-size: 20px; letter-spacing: 0; }
.drift-card:hover span, .drift-card:focus-visible span { opacity: 1; transform: none; }
@media (hover: none) { .drift-card span { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .drift-track { animation: none; } .drift { overflow-x: auto; } }

/* wall colour control (wallcolor.js) */
.wc { position: relative; display: inline-block; z-index: 6; }
.wc-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px 0 8px; border-radius: 40px; font-size: 13px; letter-spacing: 0.03em;
  background: rgba(250, 247, 241, 0.9); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); color: var(--ink); }
.wc-dot { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18); }
.wc-pop { position: absolute; bottom: calc(100% + 10px); width: 250px; padding: 14px; border-radius: 10px; background: var(--paper); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18); display: grid; gap: 10px; }
.wc--left .wc-pop { left: 0; } .wc--right .wc-pop { right: 0; }
.wc-pop[hidden] { display: none; }
.wc-t { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.wc-sw { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wc-sw button { aspect-ratio: 1; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14); position: relative; }
.wc-sw button.on::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--ink); }
.wc-custom { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; }
.wc-custom input { width: 54px; height: 32px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 2px; cursor: pointer; }
.wc-reset { justify-self: start; font-size: 13px; }
.hero-wc { margin-top: 10px; }
