/* =============================================================
   Ca Aikido — Interior Proposal
   Mobile-first. Tokens, base, header, hero, intro, rooms, finale.
   ============================================================= */

:root {
  /* Colour: limewash ground, clay accent, olive secondary, warm neutrals */
  --bg:        #f4eee4;
  --bg-tint:   #ece3d4;
  --bg-mood:   #e6d9c3;   /* the Moodboard chapter: one step deeper than --bg-tint so it reads apart from the tinted Entryway below it */
  --bg-deep:   #2d2824;
  --ink:       #2b2622;
  --ink-soft:  #6e645a;
  --line:      rgba(43, 38, 34, 0.14);
  --clay:      #7d6552;   /* muted brown: the one interface accent */
  --accent:    #975634;   /* warm terracotta brown (reads as a colour, 4.9:1 on the page) for every secondary heading, index number, sub-line and bullet */
  --clay-soft: #c9b59e;   /* beige: secondary accent on dark grounds */
  --olive:     #6f7358;
  --oak:       #c9b59e;   /* beige dot for the materials label */
  --header-bg: #c5a17a;   /* warm sand: the solid fixed-header strip, sampled from the client's colour disc (1152_AIKIDO _PROPOSAL (29).png) */
  --white:     #fbf8f3;

  /* Type */
  --font-display: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --font-body:    "Outfit", "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --fs-body:    clamp(0.9rem, 0.86rem + 0.2vw, 1rem);
  --fs-small:   0.8125rem;
  --fs-eyebrow: 0.7rem;
  --fs-sub:     clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  --fs-h2:      clamp(2.3rem, 1.5rem + 3.4vw, 4.4rem);
  --fs-h1:      clamp(3.2rem, 1.8rem + 8vw, 8rem);

  /* Space */
  --gutter:   clamp(1.25rem, 4vw, 3rem);
  --space-s:  clamp(1rem, 2vw, 1.5rem);
  --space-m:  clamp(2rem, 4vw, 3.5rem);
  --space-l:  clamp(4rem, 8vw, 8rem);
  --space-xl: clamp(6rem, 12vw, 12rem);
  --measure:  40rem;
  --container: 84rem;
  --board-w:  64rem;

  --circle: clamp(4rem, 3.4rem + 1.6vw, 5rem);
  --radius: 0.5rem;
  --radius-lg: 0.9rem;
  --shadow-board: 0 30px 60px -42px rgba(43, 38, 34, 0.45);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.9s;
  --header-h: 4.75rem;    /* fixed header: 1rem padding + 44px control + 1rem padding */
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 300; line-height: 1.02; letter-spacing: -0.01em; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
strong { font-weight: 500; }

:focus-visible { outline: 2px solid var(--clay); outline-offset: 4px; }
.skip-link {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 100;
  padding: 0.6rem 1rem; background: var(--ink); color: var(--white); font-size: var(--fs-small);
}
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 50rem; }

/* ---------- Type helpers ---------- */
.eyebrow {
  margin: 0 0 0.9rem;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow--light { color: var(--white); opacity: 0.85; }
.wordmark { font-family: var(--font-display); font-size: 1.3rem; font-weight: 400; letter-spacing: 0.03em; margin: 0; white-space: nowrap; }
.label {
  font-family: var(--font-body); font-size: var(--fs-eyebrow); letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500;
}

/* ---------- Header: a fixed strip in a solid warm-sand tone (no picture) ----------
   --header-bg is the exact colour of the client's disc (#c5a17a). Ink text on it reads at 6.2:1. */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; isolation: isolate;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: calc(env(safe-area-inset-top, 0px) + 1rem) var(--gutter) 1rem;
  color: var(--ink);
  background: var(--header-bg);
  box-shadow: 0 1px 0 rgba(43, 38, 34, 0.12);
  transition: color 0.3s, background 0.3s;
}
.site-header__right { display: flex; align-items: center; gap: clamp(0.9rem, 3vw, 2.5rem); }
.header-chapter {
  margin: 0; display: none;
  font-size: var(--fs-eyebrow); letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500;
  opacity: 0.8;
}

/* Language switcher: EN · ES, the active language underlined */
.lang { display: inline-flex; align-items: center; gap: 0.35rem; }
.lang__btn {
  min-height: 44px; padding-inline: 0.2rem; display: inline-flex; align-items: center;
  font-size: var(--fs-eyebrow); letter-spacing: 0.18em; font-weight: 500; opacity: 0.6;
  border-bottom: 1px solid transparent; transition: opacity 0.3s, border-color 0.3s;
}
.lang__btn[aria-pressed="true"] { opacity: 1; border-bottom-color: currentColor; }
.lang__btn:hover { opacity: 1; }
.lang__sep { font-size: var(--fs-eyebrow); opacity: 0.55; }
.index-toggle { display: inline-flex; align-items: center; gap: 0.75rem; min-height: 44px; padding-inline: 0.25rem; }
.index-toggle__label { font-size: var(--fs-eyebrow); letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500; }
.index-toggle__icon { position: relative; width: 22px; height: 10px; }
.index-toggle__icon::before, .index-toggle__icon::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1px; background: currentColor;
  transition: transform 0.35s var(--ease-out), top 0.35s var(--ease-out);
}
.index-toggle__icon::before { top: 0; }
.index-toggle__icon::after { top: 9px; }
.index-toggle[aria-expanded="true"] .index-toggle__icon::before { top: 4.5px; transform: rotate(45deg); }
.index-toggle[aria-expanded="true"] .index-toggle__icon::after  { top: 4.5px; transform: rotate(-45deg); }

/* Full-screen room index */
.room-index {
  position: fixed; inset: 0; z-index: 40;
  display: grid; place-items: center;
  background: rgba(45, 40, 36, 0.97);
  color: var(--white);
  padding: calc(env(safe-area-inset-top, 0px) + 5rem) var(--gutter) 3rem;
  overflow-y: auto;
  opacity: 0; transition: opacity 0.4s;
}
.room-index[hidden] { display: none; }
.room-index.is-open { opacity: 1; }
.room-index__list { display: grid; gap: 0.1rem 2.5rem; width: 100%; max-width: 60rem; }
.room-index__list a {
  display: flex; align-items: baseline; gap: 1rem;
  padding: 0.4rem 0;
  font-family: var(--font-display); font-size: clamp(1.3rem, 1rem + 1.6vw, 2rem); font-weight: 300;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  transition: color 0.3s, padding-left 0.3s var(--ease-out);
}
.room-index__list a span { font-family: var(--font-body); font-size: var(--fs-eyebrow); letter-spacing: 0.2em; color: var(--clay-soft); min-width: 2rem; }
.room-index__list a:hover { color: #fff; padding-left: 0.5rem; }
body.index-open { overflow: hidden; }
body.index-open .site-header { color: var(--white); background: transparent; box-shadow: none; }

/* ---------- Hero: the Casa Salvia opening, reproduced one to one ----------
   A full-bleed picture (cover-fitted, anchored towards its top) at 85 % of the viewport height, the eyebrow,
   name and subtitle sitting on its lower edge inside the container gutter, a gradient for legibility and
   the scroll cue bottom right. The fixed header overlays the top of the picture, as on the reference. */
.hero {
  position: relative; min-height: 85vh; min-height: 85svh; display: grid; align-items: end;
  color: var(--white); overflow: hidden; isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -1; background: #6b5a48 center / cover no-repeat; }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(30, 24, 18, 0.62) 0%, rgba(30, 24, 18, 0.15) 45%, rgba(30, 24, 18, 0) 70%);
}
.hero__content { position: relative; padding: 0 var(--gutter) clamp(5rem, 12vh, 8rem); max-width: var(--container); margin-inline: auto; width: 100%; }
.hero__title { font-size: clamp(3.4rem, 2rem + 8vw, 8.5rem); font-weight: 300; letter-spacing: 0.02em; }
.hero__sub { margin: 1rem 0 0; font-family: var(--font-display); font-style: italic; font-size: var(--fs-sub); font-weight: 300; opacity: 0.9; }
.hero__scroll {
  position: absolute; right: var(--gutter); bottom: calc(env(safe-area-inset-bottom, 0px) + 2rem);
  width: 44px; height: 44px; display: grid; place-items: center;
}
.hero__scroll span { width: 1px; height: 44px; background: var(--white); opacity: 0.7; animation: drip 2.4s var(--ease-out) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); opacity: 0; } 30% { opacity: 0.7; } 100% { transform: scaleY(1); opacity: 0; } }
@media (min-width: 1024px) { .hero__content { padding-bottom: clamp(5rem, 14vh, 9rem); } }

/* ---------- Intro ---------- */
.intro { padding: var(--space-xl) 0 var(--space-l); }
.intro__note {
  position: relative; margin: 0 0 var(--space-m); padding-left: 1.5rem;
  font-family: var(--font-display); font-style: italic; font-weight: 300; line-height: 1.3;
  font-size: clamp(1.3rem, 1rem + 1.2vw, 1.9rem); text-wrap: balance;
}
.intro__note::before { content: ""; position: absolute; left: 0; top: 0.35em; bottom: 0.35em; width: 1px; background: var(--clay); }
.intro__body { color: var(--ink-soft); max-width: var(--measure); }

/* ---------- Chapters ---------- */
.chapter { padding: var(--space-l) 0; scroll-margin-top: 4rem; }
.chapter--tint { background: var(--bg-tint); }
/* Moodboard: its own shade, one step deeper than the tint (the Entryway below is tinted). The small accent texts
   (index number, sub-line, "The palette", keywords, swatch captions) take a slightly deeper tone of the same colours
   so they keep ≥ 4.5:1 on the darker ground; the large headings and body text are unchanged. */
.chapter--moodboard { background: var(--bg-mood); --accent: #8e4f2e; --clay: #705a48; --ink-soft: #655b51; }
.chapter__head { margin-bottom: var(--space-m); }
.chapter__title { font-size: var(--fs-h2); }
.chapter__sub { margin: 0.6rem 0 0; font-family: var(--font-display); font-style: italic; font-size: var(--fs-sub); font-weight: 300; color: var(--accent); }

/* Moodboard: the client's board leads the chapter, as on Casa Salvia, then the language of the house */
.moodboard { width: 100%; max-width: 72rem; margin: 0 auto var(--space-m); padding-inline: var(--gutter); }
.moodboard .zoom { display: block; border-radius: clamp(1rem, 2.5vw, 1.75rem); overflow: hidden; box-shadow: var(--shadow-board); background: var(--bg-mood); } /* the gaps between the tiles are transparent and show this colour, so it must equal the chapter background */
.moodboard img { width: 100%; height: auto; }
.chapter--moodboard .atmosphere { margin-top: var(--space-s); }

/* Atmosphere: palette + language of the house */
.atmosphere__text { max-width: 44rem; }
.atmosphere__text p + p { margin-top: 1.2em; }
.keywords { margin-top: var(--space-s); font-size: var(--fs-eyebrow); letter-spacing: 0.2em; text-transform: uppercase; color: var(--clay); font-weight: 500; line-height: 2; }
.aside__title { font-family: var(--font-body); font-size: var(--fs-eyebrow); letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500; color: var(--accent); margin: var(--space-m) 0 1rem; }
.atmosphere__note { margin-top: var(--space-m); font-size: var(--fs-small); color: var(--ink-soft); max-width: var(--measure); }

/* ---------- Room sections ---------- */
.chapter.room { position: relative; padding: var(--space-l) 0; }
.room__inner { width: min(var(--board-w), 100% - 2 * var(--gutter)); margin-inline: auto; }
.room__head { position: relative; display: grid; gap: var(--space-s); margin-bottom: var(--space-m); }
.room__head::before {
  content: attr(data-num); position: absolute; right: -0.05em; top: -0.35em; z-index: 0;
  font-family: var(--font-display); font-weight: 300; font-size: clamp(6rem, 14vw, 13rem); line-height: 1;
  color: var(--clay); opacity: 0.07; pointer-events: none; user-select: none;
}
.room__title, .room__story, .room__aside { position: relative; z-index: 1; }
.room__aside { display: grid; gap: var(--space-s); align-content: start; }

/* Where the room sits on the plan: a small locator that leads to the floor plans */
.room__plan { display: grid; gap: 0.6rem; justify-items: start; width: min(100%, 20rem); margin-top: 0.5rem; }
.room__plan-map {
  position: relative; display: block; width: 100%; overflow: hidden; border-radius: 1rem;
  box-shadow: 0 14px 28px -20px rgba(43, 38, 34, 0.6);
}
.room__plan-map img { width: 100%; display: block; transition: transform 0.9s var(--ease-out); }
.room__plan:hover .room__plan-map img { transform: scale(1.03); }
.room__plan-mark {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  border: 1.5px solid var(--clay); background: rgba(125, 101, 82, 0.22);
  box-shadow: 0 0 0 2px rgba(251, 248, 243, 0.9), 0 0 0 7px rgba(125, 101, 82, 0.16), 0 4px 12px -4px rgba(43, 38, 34, 0.35);
  animation: plan-pulse 3.2s var(--ease-out) 3;
}
.room__plan-mark::after {
  content: ""; position: absolute; inset: 50%; width: 6px; height: 6px; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--clay); box-shadow: 0 0 0 1.5px rgba(251, 248, 243, 0.95);
}
@keyframes plan-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(251, 248, 243, 0.9), 0 0 0 7px rgba(125, 101, 82, 0.16), 0 4px 12px -4px rgba(43, 38, 34, 0.35); }
  50% { box-shadow: 0 0 0 2px rgba(251, 248, 243, 0.9), 0 0 0 13px rgba(125, 101, 82, 0.08), 0 4px 12px -4px rgba(43, 38, 34, 0.35); }
}
.room__title .eyebrow::after { content: ""; display: block; width: 2.25rem; height: 1px; background: var(--clay); margin-top: 0.7rem; }
.room__story p { max-width: var(--measure); }
.room__features { margin-top: 1.5rem; }
.room__aside .room__features { margin-top: 0; }
.features__title {
  font-family: var(--font-body); font-size: var(--fs-eyebrow); letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500;
  color: var(--accent); margin: 0 0 0.8em;
}
.features { display: grid; gap: 0.45em; font-size: 0.95em; line-height: 1.5; max-width: 26rem; }
.features li { position: relative; padding-left: 1.1rem; }
.features li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }

/* Tags that tell the three image types apart */
.tag {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-body); font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500;
  color: var(--ink-soft); white-space: nowrap;
}
.tag::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; flex: none; }
.tag--render::before { background: var(--clay); }
.tag--material::before { background: var(--oak); }
.tag--ref::before { background: transparent; border: 1px solid var(--ink-soft); }

/* ---------- Room moodboard: the render leads, the references sit around it ----------
   The render keeps its own proportions and sets the board height; the reference tiles fill the
   remaining column (one tall, two stacked, or a 2×2 for four) and are cropped to their tiles.
   Every image opens full-size in the lightbox. */
.board { display: grid; gap: 0.5rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-board); }
.board figure { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--bg-tint); min-height: 0; }
.board .zoom { display: block; height: 100%; }
.board__render img { width: 100%; height: auto; }
.board__refs { display: grid; gap: 0.5rem; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(0, 1fr); min-height: 0; }
.board__ref { aspect-ratio: 1; }
.board__ref--tall { grid-row: 1 / 3; aspect-ratio: auto; }
.board__ref img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.board__refs--4 .board__ref { aspect-ratio: 1; }

@media (min-width: 640px) {
  .board { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: stretch; }
  .board__refs { height: 100%; grid-template-rows: 1fr 1fr; grid-auto-rows: auto; }
  .board__ref, .board__refs--4 .board__ref { aspect-ratio: auto; }
}

/* Zoom links: a subtle hint, the picture itself stays untouched */
.zoom { position: relative; cursor: zoom-in; outline-offset: -3px; }
.zoom::after {
  content: ""; position: absolute; right: 0.75rem; bottom: 0.75rem; width: 2rem; height: 2rem; border-radius: 50%;
  background: rgba(251, 248, 243, 0.85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b2622' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='M15.5 15.5 20 20M11 8v6M8 11h6'/%3E%3C/svg%3E") center / 1.1rem no-repeat;
  opacity: 0; transition: opacity 0.3s;
}
.zoom:hover::after, .zoom:focus-visible::after { opacity: 1; }

/* Sub-blocks under the render */
.block { margin-top: var(--space-m); }
.block__title {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem; margin: 0 0 1rem;
  font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 1.15rem; color: var(--ink);
}
.block__title small { font-family: var(--font-body); font-style: normal; font-weight: 300; font-size: var(--fs-small); color: var(--ink-soft); }

/* Circles: material swatches and the palette share one look and one pop-up */
.swatches { display: flex; flex-wrap: wrap; gap: 1.25rem 1.5rem; }
.swatch { display: grid; justify-items: center; align-content: start; gap: 0.55rem; width: calc(var(--circle) + 1rem); text-align: center; }
.swatch__btn {
  display: block; width: var(--circle); height: var(--circle); border-radius: 50%; position: relative; z-index: 1;
  box-shadow: inset 0 0 0 1px rgba(43, 38, 34, 0.08), 0 6px 16px -8px rgba(43, 38, 34, 0.35);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease; cursor: pointer;
}
.swatch__btn img, .swatch__btn .swatch__solid { display: block; width: 100%; height: 100%; max-width: none; border-radius: 50%; object-fit: cover; }
.swatch__solid { background: var(--c); }
.swatch__btn:hover, .swatch__btn:focus-visible { transform: scale(2.4); box-shadow: 0 10px 30px -6px rgba(43, 38, 34, 0.5); z-index: 10; }
.swatch.is-active .swatch__btn { transform: none; z-index: 1; }
.swatch figcaption { font-size: 0.72rem; line-height: 1.3; color: var(--ink-soft); }

/* Materials and furniture selection: two matching panels (same title, padding and top edge). Phones stack
   them; from 768px they sit side by side, the furniture panel slightly wider (5 : 7). */
.room__bottom { margin-top: var(--space-m); display: grid; gap: var(--space-s); }
.panel {
  padding: 1rem 1.1rem 1.1rem; border-radius: var(--radius-lg);
  background: rgba(43, 38, 34, 0.035); border: 1px solid var(--line);
}
.chapter--tint .panel { background: rgba(251, 248, 243, 0.4); }
.panel__title {
  display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin: 0 0 0.85rem;
  font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 1.1rem; color: var(--accent); text-align: center;
}
.panel__title::before, .panel__title::after { content: ""; flex: none; width: 1.75rem; height: 1px; background: var(--line); }
.materials { --circle: 3.5rem; }
.materials .swatches { justify-content: center; gap: 0.85rem 0.9rem; }
.materials .swatch { width: calc(var(--circle) + 0.5rem); gap: 0.4rem; } /* four circles fit one phone row */
.materials .swatch figcaption { font-size: 0.66rem; }
/* Palette: six tones in two rows of three at every width, the grid's left edge on the heading's left edge */
.swatches--palette { gap: 1rem 0.9rem; justify-content: flex-start; max-width: calc(3 * var(--circle) + 1.8rem + 2px); margin-inline: 0; }
.swatches--palette .swatch { width: var(--circle); }
.furniture__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.45rem; }
.product {
  position: relative; margin: 0; padding: 0.5rem 0.75rem 0.55rem 1.6rem;
  background: rgba(251, 248, 243, 0.7); border: 1px solid rgba(43, 38, 34, 0.08); border-radius: var(--radius);
  font-size: 0.72rem; line-height: 1.35; color: var(--ink-soft);
}
.chapter--tint .product { background: rgba(251, 248, 243, 0.85); }
.product::before { content: ""; position: absolute; left: 0.65rem; top: 0.85rem; width: 5px; height: 5px; border-radius: 50%; background: var(--clay-soft); }
.product strong { display: block; margin-bottom: 0.1rem; font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 0.95rem; line-height: 1.2; color: var(--clay); }
@media (min-width: 560px) { .furniture__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) {
  /* Materials as one vertical column of circles beside the furniture panel, both aligned at the top */
  .room__bottom { grid-template-columns: auto minmax(0, 1fr); gap: 1.25rem; align-items: start; }
  .materials, .chapter--tint .materials { --circle: 3.25rem; width: 10.5rem; border-color: transparent; background: transparent; } /* no outline: the circles simply stand beside the furniture panel */
  .materials .swatches { flex-direction: column; flex-wrap: nowrap; align-items: center; gap: 0.8rem; padding-top: 0.2rem; }
  .materials .panel__title { font-size: 1rem; line-height: 1.25; min-height: 2.5rem; align-items: center; }
  .materials .panel__title::before, .materials .panel__title::after { display: none; } /* no room for the rules beside a two-line title */
  .materials .panel__title span { display: block; }
}

/* The pop-up card: one shared element, placed next to whichever circle was clicked */
.pop {
  position: absolute; z-index: 60; width: 15rem; padding: 1rem 1rem 1.1rem; text-align: center;
  background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 24px 50px -24px rgba(43, 38, 34, 0.5);
  animation: pop-in 0.25s var(--ease-out);
}
.pop[hidden] { display: none; }
.pop::after {
  content: ""; position: absolute; left: 50%; width: 0.8rem; height: 0.8rem; background: var(--white);
  border: 1px solid var(--line); border-top: 0; border-left: 0; transform: translateX(-50%) rotate(45deg);
  bottom: -0.45rem;
}
.pop--below::after { bottom: auto; top: -0.45rem; transform: translateX(-50%) rotate(-135deg); }
.pop__circle {
  display: block; width: 6.5rem; height: 6.5rem; margin: 0 auto 0.8rem; border-radius: 50%;
  background: var(--c, var(--bg-tint)) center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(43, 38, 34, 0.08), 0 8px 20px -10px rgba(43, 38, 34, 0.45);
}
.pop__title { margin: 0 0 0.3rem; font-family: var(--font-display); font-size: 1.15rem; font-weight: 400; line-height: 1.2; }
.pop__sub { margin: 0; font-size: 0.72rem; line-height: 1.45; color: var(--ink-soft); }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Finale ---------- */
.chapter--finale { background: var(--bg-deep); color: var(--white); }
.chapter--finale .chapter__sub { color: rgba(251, 248, 243, 0.75); }
.chapter--finale .eyebrow { color: var(--clay-soft); }
/* One Home: an editorial board of the twelve renders. Varied tile sizes, a few tiles inset inside their
   cells so the rhythm staggers, no labels on the pictures. Phones: two columns, tall and wide tiles alternate. */
.mosaic {
  display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 30vw; grid-auto-flow: dense;
  gap: 0.75rem; padding-inline: var(--gutter); max-width: var(--container); margin-inline: auto;
}
.mosaic__item { display: block; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--bg-tint); }
.mosaic__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.mosaic__item:hover img, .mosaic__item:focus-visible img { transform: scale(1.04); }
.mosaic__item:focus-visible { outline-offset: -3px; }
/* Room name with its index number, revealed on hover / keyboard focus; always shown where there is no hover */
.mosaic__label {
  position: absolute; inset: auto 0 0 0; z-index: 1; padding: 2.2rem 0.85rem 0.7rem; pointer-events: none;
  display: flex; align-items: baseline; gap: 0.45rem; color: var(--white);
  font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: clamp(0.85rem, 0.7rem + 0.5vw, 1.1rem); line-height: 1.2;
  background: linear-gradient(to top, rgba(43, 38, 34, 0.62), rgba(43, 38, 34, 0));
  opacity: 0; transform: translateY(6px); transition: opacity 0.45s var(--ease-out), transform 0.55s var(--ease-out);
}
.mosaic__num { font-family: var(--font-body); font-style: normal; font-size: 0.6rem; letter-spacing: 0.18em; font-weight: 500; }
.mosaic__num::after { content: "\2014"; margin-left: 0.45rem; }
.mosaic__item:hover .mosaic__label, .mosaic__item:focus .mosaic__label, .mosaic__item:focus-visible .mosaic__label { opacity: 1; transform: none; }
@media (hover: none) { .mosaic__label { opacity: 1; transform: none; } }
.mosaic__item--living { grid-column: span 2; grid-row: span 2; }
.mosaic__item--entry { grid-row: span 2; }
.mosaic__item--kitchen { grid-row: span 2; }
.mosaic__item--office-2 { margin: 1rem 0.75rem 0 0; }
.mosaic__item--bedroom-2 { grid-column: span 2; }
.mosaic__item--bedroom-3 { grid-row: span 2; }
.mosaic__item--office-1 { margin: 0 0 0.75rem 1rem; }
.mosaic__item--master { grid-row: span 2; }
.mosaic__item--naya { margin: 0.75rem 0 0 0.5rem; }
.mosaic__item--outdoor-dining { grid-column: span 2; }
.mosaic__item--pool { grid-column: span 2; grid-row: span 2; margin: 0 1.25rem 0 1.25rem; }
/* Framing of two tiles whose subject sits off-centre: the pool render has the loungers and parasol at the left
   (x ≈ 5–33 %), the naya render has the sofa at the left (x ≈ 20–44 %) and the armchairs from x ≈ 48 %. The crop
   window is anchored there instead of the centre; nothing is scaled or edited, and the hover zoom still applies. */
.mosaic__item--pool img { object-position: 33% 50%; }
.mosaic__item--naya img { object-position: 44% 50%; }
.together { margin-top: var(--space-m); text-align: center; max-width: 44rem; }
.together__statement {
  margin: 0 auto; max-width: 30rem; font-family: var(--font-display); font-weight: 300; line-height: 1.25;
  font-size: clamp(1.4rem, 1rem + 1.4vw, 2.2rem); text-wrap: balance;
}
.together__body { margin: var(--space-s) auto 0; max-width: 32rem; font-size: var(--fs-small); line-height: 1.7; color: rgba(251, 248, 243, 0.7); }
.disclaimer {
  margin: var(--space-m) auto 0; max-width: 40rem; text-align: center; padding: 1rem 2rem;
  border: 1px solid rgba(208, 152, 122, 0.3); border-radius: 4px;
}
.disclaimer p { font-family: var(--font-display); font-size: 0.9rem; font-style: italic; color: rgba(251, 248, 243, 0.65); margin: 0; }

/* ---------- Floor plans: the technical reference at the very end ----------
   The drawings are rendered as warm presentation plans (walls, furniture, textures and shadows coloured
   from the original line work) and sit on the sand ground like boards. */
.chapter--plans { background: var(--bg-tint); --plan-h: calc(100svh - var(--header-h) - 11rem); }
.chapter__note { margin: 1.2rem 0 0; max-width: var(--measure); color: var(--ink-soft); }
.plans { display: grid; gap: var(--space-m); align-items: start; justify-items: center; }
.plans__head { justify-self: stretch; margin-bottom: 0.5rem; }
.plan { width: 100%; max-width: 34rem; }
.plan__map { position: relative; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.plan__zoom { display: block; width: 100%; margin-bottom: 0.8rem; border-radius: clamp(1.25rem, 3vw, 2rem); overflow: hidden; box-shadow: var(--shadow-board); }
.plan img { width: 100%; height: auto; }
.plan figcaption { margin-top: 1rem; font-size: var(--fs-eyebrow); letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500; color: var(--ink-soft); text-align: center; }
/* Room tags: beneath the drawing on phones, on the drawing itself from tablet up */
.plan__tag {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.35rem 0.65rem; min-height: 1.6rem;
  background: var(--bg); color: var(--ink); border: 1px solid rgba(43, 38, 34, 0.3); border-radius: 999px;
  font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; white-space: nowrap; line-height: 1;
  box-shadow: 0 3px 8px -6px rgba(43, 38, 34, 0.4);
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.plan__tag::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--clay); flex: none; transition: background 0.3s; }
.plan__tag:hover, .plan__tag:focus-visible { background: var(--ink); color: var(--white); border-color: var(--ink); transform: translateY(-1px); box-shadow: 0 10px 20px -10px rgba(43, 38, 34, 0.6); }
.plan__tag:hover::before, .plan__tag:focus-visible::before { background: var(--clay-soft); }
@media (min-width: 768px) {
  .plans { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; }
  .plans__head { grid-column: 1 / -1; }
  .plan { max-width: none; }
  .plan__map { display: block; }
  .plan__zoom { margin-bottom: 0; }
  .plan__tag { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); padding: 0.3rem 0.55rem; min-height: 0; }
  .plan__tag:hover, .plan__tag:focus-visible { transform: translate(-50%, calc(-50% - 1px)); }
}
/* Desktop: the heading and both plans side by side, the plans sized from the viewport height so the whole
   section is seen at a glance; the lightbox gives the full-size drawings. */
@media (min-width: 1024px) {
  .chapter.chapter--plans { padding: clamp(2rem, 5vh, 4rem) 0; }
  .plans { display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 3rem); }
  .plans__head { flex: 1 1 14rem; min-width: 12rem; margin: 0; }
  .plans__head .chapter__note { font-size: var(--fs-small); }
  .plan { flex: 0 1 auto; width: calc(var(--plan-h) * var(--ar)); max-width: 44%; }
  .plan__tag { font-size: 0.55rem; padding: 0.25rem 0.5rem; }
}
.lightbox__img--plan { background: transparent; border-radius: clamp(1rem, 2.5vw, 1.75rem); }

/* ---------- Footer ---------- */
.site-footer { padding: var(--space-m) 0 calc(var(--space-m) + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem; }
.site-footer__meta { margin: 0; font-size: var(--fs-small); color: var(--ink-soft); }
.site-footer__top { font-size: var(--fs-eyebrow); letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- Lightbox ---------- */
.lightbox {
  border: 0; padding: 0; margin: 0; max-width: none; max-height: none; width: 100vw; height: 100dvh;
  background: rgba(30, 26, 22, 0.94); color: var(--white);
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; }
.lightbox__stage { display: grid; place-items: center; min-height: 0; padding: clamp(3.5rem, 8vh, 5rem) calc(var(--gutter) + 3rem) 1rem; }
.lightbox__img {
  max-width: 100%; max-height: calc(100dvh - clamp(3.5rem, 8vh, 5rem) - 6.5rem); width: auto; height: auto; object-fit: contain;
  border-radius: var(--radius); box-shadow: 0 30px 80px -30px rgba(0,0,0,0.7);
}
@media (max-width: 639px) { .lightbox__stage { padding-inline: var(--gutter); } }
.lightbox__caption {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem 1rem;
  padding: 0 var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 1.5rem); text-align: center;
  font-family: var(--font-display); font-style: italic; font-size: 1rem; color: rgba(251, 248, 243, 0.85);
}
.lightbox__caption .tag { color: rgba(251, 248, 243, 0.7); }
.lightbox__caption .tag--ref::before { border-color: rgba(251, 248, 243, 0.7); }
.lightbox__btn {
  position: absolute; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(251, 248, 243, 0.1); color: var(--white); transition: background 0.3s;
}
.lightbox__btn:hover { background: rgba(251, 248, 243, 0.22); }
.lightbox__btn svg { width: 20px; height: 20px; }
.lightbox__close { top: calc(env(safe-area-inset-top, 0px) + 1rem); right: var(--gutter); }
.lightbox__prev, .lightbox__next { top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: var(--gutter); }
.lightbox__next { right: var(--gutter); }
.lightbox__counter { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 1.6rem); left: var(--gutter); font-size: var(--fs-eyebrow); letter-spacing: 0.2em; opacity: 0.7; }
body.lightbox-open { overflow: hidden; }

/* ---------- Reveal on scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal="image"] { transform: none; clip-path: inset(6% 0 6% 0); transition: opacity 1.2s var(--ease-out), clip-path 1.4s var(--ease-out); }
[data-reveal="image"].is-visible { clip-path: inset(0 0 0 0); }
[data-reveal="image"] img { transform: scale(1.04); transition: transform 1.8s var(--ease-out); }
[data-reveal="image"].is-visible img { transform: none; }
.mosaic[data-reveal="image"] img { transform: none; }
/* One Home: the picture gently enlarges on hover / focus, like the plan locators (transform only, no layout shift) */
.mosaic__item img { transition: transform 0.9s var(--ease-out); }
.mosaic[data-reveal="image"] .mosaic__item:hover img, .mosaic[data-reveal="image"] .mosaic__item:focus-visible img, .mosaic[data-reveal="image"] .mosaic__item:focus img { transform: scale(1.04); }

/* ---------- Explore the furniture: discreet hotspots on the render, one floating detail panel ---------- */
.dx-bar { display: flex; align-items: baseline; justify-content: flex-end; gap: 1rem; margin-bottom: 0.7rem; }
.dx-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 40px; padding: 0.2rem 0.1rem;
  font-size: var(--fs-eyebrow); letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500; color: var(--accent);
  border-bottom: 1px solid transparent; transition: color 0.3s, border-color 0.3s;
}
.dx-toggle:hover { color: var(--ink); }
.dx-toggle__icon { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--clay-soft); box-shadow: 0 0 0 1px rgba(43, 38, 34, 0.12) inset; transition: transform 0.4s var(--ease-out), background 0.3s; }
.dx-toggle__icon svg { width: 10px; height: 10px; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; fill: none; }
.dx-toggle__off { display: none; }
.dx-toggle[aria-pressed="true"] { border-bottom-color: currentColor; }
.dx-toggle[aria-pressed="true"] .dx-toggle__on { display: none; }
.dx-toggle[aria-pressed="true"] .dx-toggle__off { display: inline; }
.dx-toggle[aria-pressed="true"] .dx-toggle__icon { transform: rotate(45deg); background: var(--clay); }
.dx-bar__hint { font-family: var(--font-display); font-style: italic; font-size: 0.92rem; color: var(--ink-soft); opacity: 0; transition: opacity 0.4s; }
.dx-bar:has(.dx-toggle[aria-pressed="true"]) .dx-bar__hint { opacity: 1; }
@media (max-width: 640px) { .dx-bar { justify-content: space-between; } .dx-bar__hint { display: none; } }

.board__render.is-exploring .zoom { cursor: default; }
.board__render.is-exploring img { transform: none; transition: none; } /* the hotspot layer must match the picture exactly */
.board__render.is-exploring .zoom::after { display: none; }
.dx-layer { position: absolute; inset: 0; z-index: 2; }
.dx-layer[hidden] { display: none; }
.dx-spot {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  opacity: 0; transition: opacity 0.4s;
}
.is-shown .dx-spot { opacity: 1; transition-delay: calc(var(--i) * 90ms); }
.dx-spot__dot {
  position: relative; width: 18px; height: 18px; border-radius: 50%;
  background: var(--clay-soft); border: 1.5px solid rgba(251, 248, 243, 0.95);
  box-shadow: 0 0 0 4px rgba(201, 181, 158, 0.35), 0 3px 10px -3px rgba(43, 38, 34, 0.55);
  transition: transform 0.35s var(--ease-out), background 0.3s, box-shadow 0.3s;
}
.dx-spot__dot::before, .dx-spot__dot::after { content: ""; position: absolute; left: 50%; top: 50%; background: var(--ink); transform: translate(-50%, -50%); border-radius: 1px; }
.dx-spot__dot::before { width: 8px; height: 1.2px; }
.dx-spot__dot::after { width: 1.2px; height: 8px; }
.is-shown .dx-spot__dot { animation: dx-pulse 1.8s var(--ease-out) 2; animation-delay: calc(var(--i) * 90ms + 0.3s); }
@keyframes dx-pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(201, 181, 158, 0.35), 0 3px 10px -3px rgba(43, 38, 34, 0.55); } 50% { box-shadow: 0 0 0 11px rgba(201, 181, 158, 0.14), 0 3px 10px -3px rgba(43, 38, 34, 0.55); } }
.dx-spot:hover .dx-spot__dot, .dx-spot:focus-visible .dx-spot__dot { transform: scale(1.18); background: var(--white); }
.dx-spot.is-active .dx-spot__dot { background: var(--clay); transform: scale(1.18); box-shadow: 0 0 0 5px rgba(125, 101, 82, 0.28), 0 3px 10px -3px rgba(43, 38, 34, 0.55); }
.dx-spot.is-active .dx-spot__dot::before, .dx-spot.is-active .dx-spot__dot::after { background: var(--white); }
.dx-spot.is-active .dx-spot__dot::after { transform: translate(-50%, -50%) rotate(90deg); }
.dx-spot:focus-visible { outline: 2px solid var(--white); outline-offset: -4px; }
.dx-spot__label {
  position: absolute; left: calc(100% - 4px); top: 50%; transform: translate(-4px, -50%); white-space: nowrap;
  padding: 0.3rem 0.6rem; border-radius: 999px;
  background: rgba(45, 40, 36, 0.82); color: var(--white); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s var(--ease-out);
}
.dx-spot:hover .dx-spot__label, .dx-spot:focus-visible .dx-spot__label { opacity: 1; transform: translate(0, -50%); }
.dx-spot.is-active .dx-spot__label { opacity: 0; }
@media (hover: none) { .dx-spot__label { display: none; } }

.dx-panel {
  position: fixed; z-index: 60; width: min(330px, calc(100vw - 2rem));
  padding: 1rem 1.1rem 1.1rem; border-radius: var(--radius-lg);
  background: rgba(251, 248, 243, 0.97); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 24px 50px -24px rgba(43, 38, 34, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; transform: translateY(6px); transition: opacity 0.25s, transform 0.3s var(--ease-out);
}
.dx-panel[hidden] { display: none; }
.dx-panel.is-open { opacity: 1; transform: none; }
.dx-panel__close { position: absolute; top: 0.4rem; right: 0.4rem; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-soft); transition: background 0.3s, color 0.3s; }
.dx-panel__close:hover { background: var(--bg-tint); color: var(--ink); }
.dx-panel__close svg { width: 14px; height: 14px; }
.dx-panel__eyebrow { margin: 0 2rem 0.6rem 0; font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500; color: var(--clay); display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.dx-panel__eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--clay-soft); box-shadow: 0 0 0 1px rgba(43, 38, 34, 0.12) inset; flex: none; }
.dx-panel__room:not(:empty)::before { content: "· "; }
.dx-panel__body { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start; }
.dx-panel__thumb { width: 5rem; }
.dx-panel__thumb img { width: 5rem; height: 5rem; border-radius: 0.8rem; object-fit: cover; background: var(--white); box-shadow: inset 0 0 0 1px rgba(43, 38, 34, 0.08), 0 6px 14px -8px rgba(43, 38, 34, 0.4); }
.dx-panel__title { font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; line-height: 1.1; margin: 0 0 0.3rem; }
.dx-panel__brand { margin: 0 0 0.45rem; font-size: 0.64rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500; line-height: 1.45; color: var(--clay); }
.dx-panel__desc { margin: 0; font-size: 0.78rem; line-height: 1.55; color: var(--ink-soft); }
/* Phones: the detail rises as a sheet from the bottom edge */
.dx-panel--sheet {
  left: 0.75rem !important; right: 0.75rem; top: auto !important; bottom: calc(env(safe-area-inset-bottom, 0px) + 0.75rem);
  width: auto; padding-top: 1.1rem; transform: translateY(16px);
}
.dx-panel--sheet::before { content: ""; position: absolute; top: 0.45rem; left: 50%; width: 2.25rem; height: 3px; border-radius: 2px; background: rgba(43, 38, 34, 0.18); transform: translateX(-50%); }
.dx-panel--sheet.is-open { transform: none; }
.dx-panel--sheet .dx-panel__close { width: 44px; height: 44px; top: 0.3rem; right: 0.3rem; background: var(--bg-tint); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal], [data-reveal="image"], [data-reveal="image"] img { opacity: 1; transform: none; clip-path: none; transition: none; }
  .hero__scroll span, .room__plan-mark, .dx-spot__dot { animation: none; }
  .dx-spot, .dx-panel { transition: none; }
}

/* ---------- Breakpoints ---------- */
@media (min-width: 768px) and (max-width: 1023px) {
  .mosaic { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 17vw; gap: 1rem; }
  .mosaic__item--living { grid-column: span 2; grid-row: span 2; }
  .mosaic__item--entry { grid-row: span 2; }
  .mosaic__item--dining { grid-column: span 1; }
  .mosaic__item--kitchen { grid-row: span 2; }
  .mosaic__item--office-2 { grid-row: span 1; margin: 0.75rem 0 0 0.75rem; }
  .mosaic__item--bedroom-2 { grid-column: span 2; }
  .mosaic__item--bedroom-3 { grid-row: span 2; margin: 0; }
  .mosaic__item--office-1 { margin: 0 0.75rem 0.75rem 0; }
  .mosaic__item--master { grid-column: span 2; grid-row: span 2; }
  .mosaic__item--naya { margin: 0.5rem 0 0 0.5rem; }
  .mosaic__item--outdoor-dining { grid-column: span 2; }
  .mosaic__item--pool { grid-column: span 2; grid-row: span 1; margin: 0; }
}

@media (min-width: 768px) {
  .header-chapter { display: block; }
  .room-index__list { grid-template-columns: 1fr 1fr; }
  .room__head { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "title title" "story aside"; column-gap: var(--space-l); row-gap: var(--space-s); align-items: start; }
  .room__title { grid-area: title; }
  .room__story { grid-area: story; }
  .room__aside { grid-area: aside; padding-top: 0.35rem; }
  .room__head--split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--space-m); } /* no plan: story and Key Features as two equal columns */
  .room__head::before { top: -0.2em; }
  .atmosphere { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-l); align-items: start; }
  .atmosphere .aside__title { margin-top: 0; }
}

@media (min-width: 1024px) {
  .chapter { padding: var(--space-xl) 0; }
  /* Six columns, four rows; a handful of tiles sit inset in their cells to break the alignment */
  .mosaic { grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(0, 11.5vw); gap: 1.1rem; grid-auto-flow: row; }
  .mosaic__item { margin: 0; }
  .mosaic__item--living         { grid-area: 1 / 1 / 3 / 3; }
  .mosaic__item--entry          { grid-area: 1 / 3 / 2 / 4; margin: 1.25rem 0.5rem 0 0; }
  .mosaic__item--dining         { grid-area: 1 / 4 / 2 / 6; margin: 0 0.75rem 0 0.75rem; }
  .mosaic__item--kitchen        { grid-area: 1 / 6 / 3 / 7; }
  .mosaic__item--office-2       { grid-area: 2 / 3 / 4 / 4; margin: 0 0.5rem 1.25rem 0; }
  .mosaic__item--bedroom-2      { grid-area: 2 / 4 / 3 / 6; margin: 0.75rem 0 0 0; }
  .mosaic__item--bedroom-3      { grid-area: 3 / 1 / 4 / 2; margin: 0.75rem 0 0 1rem; }
  .mosaic__item--office-1       { grid-area: 3 / 2 / 4 / 3; margin: 0 0.5rem 0.75rem 0; }
  .mosaic__item--master         { grid-area: 3 / 4 / 5 / 6; }
  .mosaic__item--naya           { grid-area: 3 / 6 / 5 / 7; margin: 1rem 0 0 0.5rem; }
  .mosaic__item--outdoor-dining { grid-area: 4 / 1 / 5 / 3; margin: 0 1rem 0 0; }
  .mosaic__item--pool           { grid-area: 4 / 3 / 5 / 4; margin: 0.5rem 0 0 0; }
  /* Features and the plan locator side by side in the wider aside */
  .room__aside { grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: var(--space-m); }
  .room__plan { margin-top: 0.35rem; width: 18rem; }
}

@media (min-width: 1536px) {
  :root { --board-w: min(74rem, 62vw); }
}


/* ===== 15 · AMBLE ONE (early bird 2028) — same mechanics as surfhouse.casatosalet.com ===== */
.chapter--amble{position:relative;overflow:hidden;background:var(--bg-mood)}
.amble__mark{position:absolute;right:clamp(-60px,-3vw,-20px);top:clamp(30px,6vw,80px);width:clamp(180px,26vw,360px);opacity:.12;pointer-events:none;animation:ambleFloat 9s ease-in-out infinite}
.amble__mark.off{animation-play-state:paused}
.amble{position:relative;padding-top:var(--space-l);padding-bottom:var(--space-l)}
.amble__head{max-width:var(--measure);margin-bottom:var(--space-m)}
.amble__badge{display:inline-block;background:var(--accent);color:var(--white);font:500 var(--fs-eyebrow)/1 var(--font-body);letter-spacing:.14em;text-transform:uppercase;padding:.6rem 1rem;border-radius:999px;transform:rotate(-2deg);margin:.25rem 0 1rem}
.amble__brand{display:flex;align-items:flex-end;gap:.9rem;margin:0 0 1.1rem}
.amble__word{width:clamp(170px,26vw,320px);height:auto;display:block}
.amble__one{font:300 italic clamp(2rem,4.5vw,3.6rem)/.8 var(--font-display);color:var(--accent);transform:translateY(-.06em)}
.amble__lead{max-width:var(--measure)}
.amble__lead>p{font-size:var(--fs-sub);line-height:1.5;color:var(--ink);margin:0 0 1.25rem}
.amble__how{background:var(--white);border:2px dashed var(--accent);border-radius:1rem;padding:1rem 1.15rem;max-width:44rem}
.amble__how b{display:block;font:500 var(--fs-eyebrow)/1 var(--font-body);letter-spacing:.14em;text-transform:uppercase;color:var(--accent)}
.amble__how p{margin:.45rem 0 0;font-size:var(--fs-small);color:var(--ink-soft);line-height:1.55}
.amble__road{position:relative;overflow:hidden;border-radius:var(--radius);background:#e9e2d8;aspect-ratio:1680/1000;max-width:60rem;margin:var(--space-m) auto .5rem;cursor:pointer}
.amble__car{position:absolute;top:0;left:0;width:108%;height:100%;will-change:transform}
.amble__car img{width:100%;height:100%;object-fit:cover;display:block;transform-origin:50% 90%}
.amble__car .lt{position:absolute;transform:translate(-50%,-50%);border-radius:50%;pointer-events:none;mix-blend-mode:screen;opacity:0;transition:opacity .35s ease}
.amble__car .brake{left:16.4%;top:53.9%;width:14%;aspect-ratio:1.5;background:radial-gradient(ellipse at center,#fff4ec 0,#ff3b1c 10%,rgba(255,30,10,.7) 24%,rgba(255,20,0,.25) 46%,transparent 70%)}
.amble__car .halo{left:16.4%;top:55%;width:36%;aspect-ratio:1.5;background:radial-gradient(ellipse at center,rgba(255,40,10,.38) 0,rgba(255,40,10,.14) 38%,transparent 70%)}
.amble__car .head{left:77.9%;top:54.2%;width:8%;aspect-ratio:1.3;background:radial-gradient(ellipse at center,#fff 0,rgba(255,250,225,.9) 14%,rgba(255,240,200,.35) 40%,transparent 70%)}
.amble__car .beam{left:78.5%;top:55%;width:30%;aspect-ratio:3.4;transform:translate(0,-50%);border-radius:0;background:radial-gradient(ellipse 100% 50% at 0% 50%,rgba(255,246,215,.55) 0,rgba(255,246,215,.2) 40%,transparent 100%)}
.amble__car .wink{left:16.4%;top:53.9%;width:10%;aspect-ratio:1.5;background:radial-gradient(ellipse at center,#fff6d0 0,rgba(255,170,20,.95) 12%,rgba(255,150,0,.4) 34%,transparent 70%)}
.amble__car .wink.f{left:77.9%;top:54.2%}
.amble__road--go .head,.amble__road--go .beam{opacity:1}
.amble__road--stop .brake,.amble__road--stop .halo{opacity:1;transition-duration:.08s}
.amble__road--stop .amble__car img{animation:ambleDip .5s ease}
.amble__road--haz .wink{animation:ambleWink .7s steps(1) 4}
.amble__tip{text-align:center;font:500 var(--fs-eyebrow)/1.4 var(--font-body);letter-spacing:.12em;text-transform:uppercase;color:var(--ink-soft);margin:0 0 var(--space-m)}
.amble__tip img{width:13px;height:auto;vertical-align:-1px;margin-right:6px}
.amble__grid{display:grid;grid-template-columns:1fr 1fr;gap:clamp(1.25rem,4vw,3rem);align-items:start}
.amble__stats{display:grid;grid-template-columns:repeat(2,1fr);gap:.75rem}
.amble__stats div{background:var(--white);border-radius:1rem;padding:1.1rem}
.amble__stats b{display:block;font:300 clamp(2.1rem,4vw,3rem)/1 var(--font-display);color:var(--accent);font-variant-numeric:tabular-nums}
.amble__stats span{display:block;margin-top:.35rem;font-size:var(--fs-small);color:var(--ink-soft);line-height:1.4}
.amble__fine{font-size:.78rem;color:var(--ink-soft);margin:.9rem 0 0;line-height:1.5}
.amble__mosaic{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}
.amble__mosaic img{width:100%;height:100%;object-fit:cover;display:block;aspect-ratio:4/3;border-radius:var(--radius)}
.amble__mosaic img:first-child,.amble__mosaic img:last-child{grid-column:1/-1;aspect-ratio:16/8}
.amble__day{margin-top:var(--space-l)}
.amble__day h3{font:300 clamp(1.7rem,3.2vw,2.6rem)/1.05 var(--font-display);margin:0 0 1.25rem;color:var(--ink)}
.amble__day h3 small{font:400 .95rem var(--font-body);color:var(--ink-soft);letter-spacing:0}
.amble__stops{display:grid;grid-template-columns:repeat(5,1fr);gap:.75rem}
.amble-stop{background:var(--white);border-radius:1.1rem;padding:1.1rem;transform:rotate(var(--rot,0deg));transition:transform .4s ease,opacity .6s ease}
.amble-stop:hover{transform:rotate(0) translateY(-4px)}
.amble-stop time{display:inline-block;font:500 .78rem/1 var(--font-body);background:var(--ink);color:var(--white);border-radius:999px;padding:.35rem .7rem;margin-bottom:.6rem}
.amble-stop h4{font:400 1.25rem/1.1 var(--font-display);margin:0 0 .35rem;color:var(--ink)}
.amble-stop p{margin:0;font-size:var(--fs-small);color:var(--ink-soft);line-height:1.45}
.amble__credit{display:flex;align-items:center;justify-content:center;gap:.6rem;margin-top:var(--space-m);font:500 var(--fs-eyebrow)/1 var(--font-body);letter-spacing:.14em;text-transform:uppercase;color:var(--accent)}
.amble__credit img{width:90px;height:auto}
@keyframes ambleDip{0%{transform:none}35%{transform:translateY(.6%) rotate(.45deg)}100%{transform:none}}
@keyframes ambleWink{0%{opacity:1}50%{opacity:0}100%{opacity:1}}
@keyframes ambleFloat{50%{transform:translateY(14px) rotate(-3deg)}}
@media (max-width:900px){
  .amble__grid,.amble__stops{grid-template-columns:1fr}
  .amble__mark{width:170px;right:-40px;top:20px;opacity:.1}
  .amble-stop{--rot:0deg!important;display:grid;grid-template-columns:auto 1fr;gap:.25rem .9rem;align-items:start}
  .amble-stop time{grid-row:1/3;margin:2px 0 0}
  .amble__mosaic img:first-child,.amble__mosaic img:last-child{aspect-ratio:4/3}
}
@media (prefers-reduced-motion:reduce){.amble__mark{animation:none}.amble__car{transform:translate3d(-4%,0,0)!important}.amble__road--stop .amble__car img{animation:none}}
