/* The Pass — site styles.
   One house, pinned behind the page (.stage), and the story told around it in
   steps (.beat). Each chapter carries data-theme, and the page colour, the text and
   the house's own palette follow whichever chapter is under the middle of the screen.

   Layouts:  ≥1181px  house in the centre, captions left and right
             901–1180 house on the right, captions on the left
             ≤900     house pinned in the top half, captions below it

   Every component has one rule. What a layout changes is in that layout's one block
   at the end of the file, in the same order as the components above it. The two
   widths (900, 1180) are also in site.js (mode); keep them the same. */

/* ------------------------------------------------------------------ fonts
   One family for the whole page: Jost, the geometric lettering of drawing sheets.
   IBM Plex Mono for the labels on the drawing. */
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 200 500; font-display: swap;
  src: url('../assets/jost-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: 'Jost'; font-style: normal; font-weight: 200 500; font-display: swap;
  src: url('../assets/jost-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: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../assets/plex-mono-400-latin.woff2') format('woff2'); }

/* ------------------------------------------------------------------ tokens */
:root {
  --green-950: #0f1814;
  --green-900: #13201a;
  --green-800: #182620;
  --cream: #f1ebdd;
  --ink: #23291f;
  --gold: #b48a49;
  --gold-hi: #c9a061;
  --gold-text-dark: #d0a865;
  --gold-text-light: #7a5823;
  --error: #9b3b2a;

  --sans: 'Jost', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --gutter: clamp(20px, 4.4vw, 72px);
  --top: 72px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  /* the house's footprint on screen; the words live either side of it */
  --house-w: min(44vw, calc((100svh - var(--top) - 56px) * 420 / 470));
  --side: calc((100vw - var(--house-w)) / 2 - var(--gutter) - 20px);
}
[data-theme="dark"] {
  --bg: var(--green-800);
  --fg: var(--cream);
  --muted: rgba(241, 235, 221, .76);
  --faint: rgba(241, 235, 221, .6);
  --line: rgba(241, 235, 221, .14);
  --line-strong: rgba(241, 235, 221, .34);
  --accent: var(--gold-text-dark);
  --card: rgba(19, 32, 26, .86);
}
[data-theme="light"] {
  --bg: var(--cream);
  --fg: var(--ink);
  --muted: rgba(35, 41, 31, .78);
  --faint: rgba(35, 41, 31, .68);
  --line: rgba(35, 41, 31, .14);
  --line-strong: rgba(35, 41, 31, .4);
  --accent: var(--gold-text-light);
  --card: rgba(241, 235, 221, .9);
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); color: var(--fg); }
/* the page colour eases; text takes its colour from its own chapter, so <html> has no colour
   to ease (easing an inherited one restyles every element on the page, every frame) */
html.js { transition: background-color .8s var(--ease); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis-scrolling iframe { pointer-events: none; }
body {
  margin: 0; font-family: var(--sans); font-weight: 400; font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background: transparent;
}
img, svg { display: block; }
a { color: inherit; }
p { margin: 0; }
/* headings are set light and large in the page's ink; hierarchy comes from size and
   weight alone, with no second typeface, no italics and no coloured words */
h1, h2, h3 { margin: 0; font-weight: 300; letter-spacing: -.022em; }
button { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--green-900); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
section[data-theme] { color: var(--fg); position: relative; }

.skip { position: fixed; left: 12px; top: 12px; z-index: 100; padding: 10px 16px; background: var(--gold); color: var(--green-900); font-weight: 500; text-decoration: none; transform: translateY(-160%); }
.skip:focus { transform: none; }

/* section labels: a numbered marker, as on a drawing (a section bubble), and the label
   in plain sentence case beside it */
.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 15px; letter-spacing: .01em; }
.eyebrow__n { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--gold); border-radius: 50%; font-size: 12.5px; line-height: 1; color: var(--accent); }
.eyebrow__of { margin-left: auto; font-size: 13px; color: var(--faint); }
.display { font-size: clamp(2.1rem, 3.6vw, 4rem); line-height: 1.02; }
.lede { font-size: clamp(1.05rem, 1.3vw, 1.22rem); line-height: 1.55; color: var(--muted); }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px;
  background: var(--gold); color: var(--green-900); border: 1px solid var(--gold); border-radius: 2px;
  font-family: var(--sans); font-size: 15px; font-weight: 500; letter-spacing: .04em; text-decoration: none; cursor: pointer;
  transition: background-color .25s, border-color .25s, color .25s, transform .25s var(--ease);
}
.btn:hover { background: var(--gold-hi); border-color: var(--gold-hi); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: var(--card); color: var(--fg); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--fg); }
.btn--small { min-height: 42px; padding: 0 18px; font-size: 14px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.link { display: inline-flex; gap: 8px; align-items: center; margin-top: 20px; color: var(--fg); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--gold); padding-bottom: 4px; }

/* ------------------------------------------------------------------ header */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--top);
  display: flex; align-items: center; gap: 32px; padding: 0 var(--gutter); color: var(--fg);
  transition: background-color .5s var(--ease), border-color .5s, color .8s; border-bottom: 1px solid transparent;
}
/* solid paper with a hairline under it: nothing shows through, so nothing needs blurring */
.top.is-scrolled { background: var(--bg); border-bottom-color: var(--line); }
.logo { display: inline-flex; align-items: baseline; font-family: var(--sans); font-size: 26px; line-height: 1; text-decoration: none; color: var(--fg); }
.logo__the { font-weight: 300; }
.logo__pass { font-weight: 500; margin-left: .22em; }
.logo i { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); margin-left: 6px; transform: translateY(-2px); }
.top__nav { margin-left: auto; display: flex; gap: 6px; }
.top__nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 15px; letter-spacing: .02em; text-decoration: none; color: var(--muted); transition: color .2s; }
.top__nav a:hover, .top__nav a[aria-current="true"] { color: var(--fg); }
.top__nav a[aria-current="true"] { box-shadow: inset 0 -1px 0 var(--gold); }
/* phones fold the sections into a menu (≤900, below): its button, the tour's stops and the
   enquiry by name are for that layout only */
.top__menu, .top__rooms, .top__nav .top__enquiry { display: none; }

/* ------------------------------------------------------------------ the stage: the house, pinned */
.stage {
  position: fixed; left: 0; right: 0; top: var(--top); bottom: 0; z-index: 1;
  display: grid; place-items: center; overflow: hidden; pointer-events: none;
  transition: opacity .6s var(--ease);
}
.js .stage:not(.is-ready) { opacity: 0; }   /* not shown half read or unplaced; it fades in once site.js has set it out */
.stage__cam { position: relative; width: var(--house-w); transform-origin: 0 0; }
/* Only while the camera moves: a layer that "will change transform" is drawn once and then
   stretched, which is smooth but soft when zoomed in. Once the camera settles the hint goes,
   and the house is drawn again, sharp, at the size it is shown (site.js, paintHouse). */
.stage__cam.is-moving { will-change: transform; }
.house { width: 100%; }
.house .house__svg { width: 100%; height: auto; }
.house .hs-hits { pointer-events: auto; }
/* The rooms are links only while the finished house is the picture on screen (site.js,
   paintHouse): otherwise they cannot be clicked, tabbed to or read out. */
.js .house:not(.is-live) .hs-hits { visibility: hidden; }
.house__tags { position: absolute; inset: 0; pointer-events: none; }
.htag {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none;
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; line-height: 1.25; text-align: center;
  color: var(--fg); opacity: 0; transition: opacity .5s var(--ease);
}
.htag.is-on { opacity: 1; }
.htag--chip { background: var(--card); padding: 5px 9px; border: 1px solid var(--line); }
.htag--room { color: var(--accent); background: var(--card); padding: 4px 8px 5px; border: 1px solid var(--line); }
/* the gap: each case's name sits on its top edge */
.htag--case { transform: translate(0, -100%); font-size: 9.5px; color: var(--muted); background: var(--card); padding: 2px 6px 3px; border: 1px solid var(--line); }
.htag--side { transform: translate(0, -100%); text-align: left; }

/* ------------------------------------------------------------------ steps */
main { position: relative; z-index: 2; pointer-events: none; }
.caption, .hero__a, .hero__b, .split__a, .split__b, .terms__a, .terms__b, .contact__a, .contact__b, .foot { pointer-events: auto; }
.beat { position: relative; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--top) + 6svh) var(--gutter) 6svh; }
.beat[data-side="right"] { justify-content: flex-end; }

/* The text boxes. One box, the same everywhere: solid paper so the drawing behind never
   fights the words, a gold rule along the top like a drawing's title block, and a leader
   line reaching towards the house it describes. Body text at near full ink for contrast. */
.caption {
  position: relative; width: min(var(--side), 400px); padding: 28px 30px 30px;
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  border: 1px solid var(--line-strong); border-top: 2px solid var(--gold);
  box-shadow: 0 22px 44px -28px rgba(35, 41, 31, .32);
}
.caption::after { content: ''; position: absolute; top: 50%; left: 100%; width: 48px; height: 1px; background: var(--gold); }
.caption::before { content: ''; position: absolute; top: 50%; left: calc(100% + 48px); width: 5px; height: 5px; margin: -2px 0 0 -2px; border-radius: 50%; background: var(--gold); }
.caption h2, .caption h3 { font-weight: 400; letter-spacing: -.015em; line-height: 1.12; text-wrap: balance; }
.caption h2 { font-size: clamp(1.6rem, 2.2vw, 2.4rem); margin-bottom: 16px; }
.caption h3 { font-size: clamp(1.5rem, 2vw, 2.15rem); margin-bottom: 14px; }
.caption .eyebrow { margin-bottom: 12px; }
.caption > p { text-wrap: pretty; }
.caption > p:not(.eyebrow):not(.outcome__result) { color: color-mix(in srgb, var(--fg) 86%, transparent); }
.caption p + p { margin-top: 12px; }
.caption .note { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; }
/* a stage of the method: its number, its name (a heading) and what it costs */
.caption .stagehead { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; font-size: clamp(1.7rem, 2.3vw, 2.4rem); line-height: 1.1; letter-spacing: -.01em; text-wrap: pretty; }
.stagehead span { font-family: var(--mono); font-size: 13px; letter-spacing: .1em; color: var(--accent); }
.stagehead b { margin-left: auto; font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg); border: 1px solid var(--line-strong); padding: 5px 9px; white-space: nowrap; align-self: center; }

/* A step split either side of the house: a heading on the left, words on the right. */
.beat--split { justify-content: space-between; align-items: stretch; }
.split__a, .split__b { width: min(var(--side), 430px); }
.split__a { align-self: flex-start; padding-top: 8svh; }
.split__b { align-self: flex-end; padding-bottom: 10svh; }

/* ------------------------------------------------------------------ hero */
.beat--hero { justify-content: space-between; align-items: stretch; padding-bottom: 9svh; margin-bottom: 70svh; /* room for the street to turn */ }
/* the street opens straight on across the screen under the words, so the title runs wide */
.hero__a { width: min(calc(100% - 380px - 48px), 860px); align-self: flex-start; padding-top: 3svh; }
.hero__b { width: 380px; align-self: flex-start; padding-top: 5svh; }
.hero__title { font-size: clamp(2.4rem, 4.1vw, 4.6rem); line-height: 1; letter-spacing: -.03em; }
.hero__title > span { display: block; }
.hero__title-b { margin-top: .15em; }
.hero__sub { font-size: clamp(1rem, 1.2vw, 1.15rem); line-height: 1.6; color: var(--muted); }
.hero__ctas { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
/* The hero comes in by itself, as soon as it is read: it does not wait for the drawings
   further down the file or for the script after them (its words are split in the markup).
   The same rise as every other reveal (below). */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes rise-word { from { transform: translateY(105%); } }
.js .hero [data-reveal] { opacity: 1; transform: none; animation: rise 1s var(--ease) var(--d, 0s) backwards; }
.js .hero [data-split] .wi { transform: none; animation: rise-word 1.1s var(--ease) var(--d, 0s) backwards; }

/* ------------------------------------------------------------------ the rooms (chapter 01)
   After the gap the story goes room by room: each step holds while the camera is in one
   part of the house, its words pinned, and a small drawing plays in the room
   (site.js, paintActs): the work carried between systems by hand, then joined up. What a
   room gains arrives as its drawing resolves. */
.beat--room { display: block; height: 160svh; padding: 0; }
.room__pin { position: sticky; top: 0; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--top) + 6svh) var(--gutter) 6svh; }
.beat--room[data-side="right"] .room__pin { justify-content: flex-end; }
.gains { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); }
.gains li { position: relative; padding: 9px 0 9px 22px; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.45; }
.gains li::before { content: ''; position: absolute; left: 0; top: 19px; width: 12px; height: 1.5px; background: var(--gold); }
.beat--room .gains { opacity: var(--res, 1); transform: translateY(calc((1 - var(--res, 1)) * 8px)); }

.act { margin: 14px 0 0; }
.act svg { display: block; width: 100%; height: auto; overflow: visible; }
.act__frame { display: none; }
.act__title { display: none; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; fill: var(--accent); }
.act__state { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.act__line { font-family: var(--sans); font-size: 12.5px; }
.act .act__bad { fill: var(--error); }
.act .act__good { fill: var(--accent); opacity: 0; }
.act__rule { stroke: var(--line); stroke-width: 1; }
.act__node rect { fill: var(--bg); stroke: var(--line-strong); stroke-width: 1.2; transition: stroke .5s var(--ease); }
.act__node text { font-family: var(--sans); font-size: 12.5px; fill: var(--fg); text-anchor: middle; }
.act .is-done .act__node rect { stroke: var(--gold); stroke-width: 1.8; }
.act__link { fill: none; stroke: var(--faint); stroke-width: 1.2; stroke-dasharray: 3 4; }
.act__breaks path { fill: none; stroke: var(--error); stroke-width: 1.4; }
.act__run { fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.act__dot { fill: var(--gold); opacity: 0; }
.act__token { opacity: 0; }
.act__token rect, .act__token path, .act__token circle { fill: var(--bg); stroke: var(--fg); stroke-width: 1.1; }
.act__token .l { fill: none; }
.act__rekey { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; fill: var(--error); text-anchor: middle; opacity: 0; }
.act__mark { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; text-anchor: middle; }
.act__bar { opacity: 0; }
.act__bar rect { fill: var(--gold); fill-opacity: .14; stroke: var(--gold); stroke-width: 1.2; }
.act__bar text { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; fill: var(--accent); }

/* ------------------------------------------------------------------ the tour bar
   While chapter 01 goes room by room, a bar along the bottom names every stop: click one
   and the page travels there (the rooms in the house itself are links to the same stops). */
.tour { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40; transform: translate(-50%, 12px); display: flex; gap: 2px; padding: 4px; background: var(--card); border: 1px solid var(--line-strong); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), transform .4s var(--ease), visibility 0s .4s; max-width: calc(100vw - 24px); overflow-x: auto; scrollbar-width: none; }
.tour.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.tour a { flex: none; padding: 9px 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; white-space: nowrap; color: var(--muted); border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.tour a:hover { color: var(--fg); }
.tour a.is-active { color: var(--accent); border-bottom-color: var(--gold); }

/* ------------------------------------------------------------------ outcomes, round the house
   One view, no steps: the heading and the first outcome to the left of the house, the other
   two to the right, each with its leader line to the drawing. */
.beat--around { justify-content: space-between; align-items: center; }
.around__a, .around__b { width: min(var(--side), 400px); display: flex; flex-direction: column; gap: 22px; }
.around__head { margin-bottom: 10px; }
.around__a .caption, .around__b .caption { width: auto; padding: 22px 24px 24px; }
.beat--around .caption h3 { font-size: clamp(1.35rem, 1.7vw, 1.8rem); margin-bottom: 10px; }
.outcome__result { font-size: clamp(1.05rem, 1.2vw, 1.2rem); line-height: 1.18; letter-spacing: -.01em; }

/* ------------------------------------------------------------------ terms and contact: either side of the house */
.beat--wide { align-items: flex-start; justify-content: space-between; padding-top: calc(var(--top) + 8svh); padding-bottom: 10svh; }
.terms__a, .terms__b, .contact__a, .contact__b { width: min(var(--side), 430px); }
.terms__b { padding-top: 20svh; }
.terms__b .lede { margin-bottom: 4px; }
.faq { border-top: 1px solid var(--line); margin-top: 22px; }
.faq details { border-bottom: 1px solid var(--line); background: var(--card); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 62px; padding: 14px 12px; font-size: clamp(1.08rem, 1.3vw, 1.3rem); line-height: 1.25; letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 14px; height: 14px; background: linear-gradient(var(--gold), var(--gold)) center / 14px 1.5px no-repeat, linear-gradient(var(--gold), var(--gold)) center / 1.5px 14px no-repeat; transition: transform .35s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 12px 18px; color: var(--muted); font-size: 16px; }

.contact__a .lede { margin-top: 22px; }
.contact__b { padding-top: 12svh; }
.form__fields { display: grid; gap: 24px; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }   /* off the page: see index.html */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); transition: color .2s; }
.field input, .field textarea { width: 100%; padding: 10px 0 12px; background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; font: 400 18px/1.5 var(--sans); color: var(--fg); outline: none; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 104px; }
.field input:focus, .field textarea:focus { border-bottom-color: var(--gold); box-shadow: inset 0 -2px 0 var(--gold); }
.field:focus-within > span { color: var(--accent); }
.field input[aria-invalid="true"] { border-bottom-color: var(--error); box-shadow: inset 0 -2px 0 var(--error); }
.field__err { color: var(--error); font-size: 14px; }
.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 4px; }
.form__alt { color: var(--muted); font-size: 15px; }
.form__alt a { color: var(--fg); text-decoration-color: var(--gold); text-underline-offset: 4px; }
.form__done { padding: 30px 0; border-top: 1px solid var(--gold); outline: none; }
.form__donetitle { font-size: clamp(1.8rem, 2.6vw, 2.6rem); line-height: 1.1; margin-bottom: 10px; }
.form__done p:last-child { color: var(--muted); font-size: 17px; }
.form__status { margin-top: 14px; font-size: 15px; color: var(--muted); min-height: 1.5em; }
.form__status.is-error { color: var(--error); }
.contact .beat--wide { min-height: calc(100svh - 80px); }

.foot { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; margin: 0 var(--gutter); padding: 22px 0 calc(22px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); background: var(--bg); }

/* ------------------------------------------------------------------ reveals */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .02em .14em; margin-bottom: -.14em; }
.js [data-split] .wi { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.js [data-split].is-in .wi { transform: none; }

/* ------------------------------------------------------------------ ≥1181: house in the centre
   A box to the right of the house points its leader line back at it. */
@media (min-width: 1181px) {
  .beat[data-side="right"] .caption::after, .around__b .caption::after { left: auto; right: 100%; }
  .beat[data-side="right"] .caption::before, .around__b .caption::before { left: auto; right: calc(100% + 48px); margin: -2px -2px 0 0; }
}

/* ------------------------------------------------------------------ 901–1180: house right, words left */
@media (max-width: 1180px) and (min-width: 901px) {
  :root { --house-w: min(50vw, calc((100svh - var(--top) - 56px) * 420 / 470)); --side: calc(100vw - var(--house-w) - var(--gutter) * 2 - 28px); }
  .stage { justify-items: end; padding-right: var(--gutter); }
  .beat[data-side="right"] { justify-content: flex-start; }
  .beat--split, .beat--hero, .beat--wide { flex-direction: column; justify-content: center; gap: 28px; }
  .split__a, .split__b, .hero__a, .hero__b, .terms__a, .terms__b, .contact__a, .contact__b { align-self: flex-start; padding: 0; width: min(var(--side), 420px); }
  .beat--wide { justify-content: flex-start; }
  .beat--hero { justify-content: flex-start; padding-top: calc(var(--top) + 4svh); }
  .hero__a { width: 100%; }
  .beat--room[data-side="right"] .room__pin { justify-content: flex-start; }
  .beat--around { flex-direction: column; justify-content: center; align-items: flex-start; gap: 22px; }
  .around__a, .around__b { width: min(var(--side), 420px); }
}

/* ------------------------------------------------------------------ ≤900: phones
   The house stays in its panel at the top, a solid band with a hairline under it, and the
   words run beneath it as one column: no screen-high gaps between boxes, nothing pinned
   (each room's drawing plays as its step crosses the screen), no bar over the text, smaller
   labels on the small house. */
@media (max-width: 900px) {
  :root { --top: 64px; --panel: 42svh; --house-w: min(calc(100vw - 40px), calc((var(--panel) - 10px) * 420 / 470)); --side: 100%; }
  .eyebrow { font-size: 14px; }
  .display { font-size: clamp(1.9rem, 8vw, 2.5rem); }
  .btn { min-height: 48px; }

  /* the header: logo, Menu, Enquire; the sections drop down from it as a sheet of paper */
  .top { gap: 12px; }
  .top.is-open { background: var(--bg); }
  .logo { font-size: 23px; }
  .top__cta { margin-left: auto; padding: 0 16px; }
  .js .top__cta { margin-left: 0; }
  .js .top__menu { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; margin-left: auto; padding: 0 4px; background: none; border: 0; font-size: 15px; letter-spacing: .02em; cursor: pointer; }
  .top__menu::after { content: ''; flex: none; width: 12px; height: 12px; background: linear-gradient(var(--gold), var(--gold)) center / 12px 1.5px no-repeat, linear-gradient(var(--gold), var(--gold)) center / 1.5px 12px no-repeat; transition: transform .35s var(--ease); }
  .top.is-open .top__menu::after { transform: rotate(45deg); }
  .top__nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; margin: 0; padding: 0 var(--gutter) 14px; max-height: calc(100svh - var(--top)); overflow-y: auto; background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-strong); box-shadow: 0 22px 44px -28px rgba(35, 41, 31, .32); }
  .top.is-open .top__nav { display: flex; }
  .top__nav a, .top__nav .top__enquiry { display: flex; min-height: 52px; padding: 0; font-size: 17px; color: var(--fg); border-bottom: 1px solid var(--line); }
  .top__nav > a:last-child { border-bottom: 0; }
  .top__nav a[aria-current="true"] { box-shadow: none; }
  .top__nav a[aria-current="true"]::before { content: ''; flex: none; width: 12px; height: 1.5px; margin-right: 10px; background: var(--gold); }
  .top.has-rooms .top__rooms { display: flex; flex-direction: column; padding-left: 22px; }
  .top__rooms a { min-height: 44px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .top__rooms a[aria-current="true"] { color: var(--accent); }

  .stage { bottom: auto; height: var(--panel); z-index: 3; background: var(--bg); border-bottom: 1px solid var(--line); transition: opacity .5s var(--ease), background-color .8s; }
  html[data-panel="off"] .stage { opacity: 0; }
  .htag--chip { white-space: normal; width: max-content; max-width: 10.5em; }  /* labels wrap rather than run off the panel */
  .htag--room { font-size: 8.5px; letter-spacing: .06em; padding: 2px 5px 3px; }
  .htag--case { font-size: 8px; }
  .htag--side { white-space: nowrap; max-width: none; font-size: 9.5px; padding: 4px 7px; }

  .beat, .beat[data-side="right"] { align-items: flex-start; justify-content: flex-start; padding: calc(var(--top) + var(--panel) + 2svh) var(--gutter) 6svh; }
  /* a link to a step lands its box just below the house panel, not under it; a room's a little
     higher, where the house has turned to that room (it turns as the box reaches the panel) */
  .beat[id] { scroll-margin-top: calc(var(--top) + var(--panel) + 2svh); }
  .beat--room[id] { scroll-margin-top: calc(var(--top) + var(--panel) - 16px); }
  .beat:has(> .caption) { min-height: 0; padding-top: 0; padding-bottom: 30svh; }
  .chapter > .beat:has(> .caption):first-child { padding-top: calc(var(--top) + var(--panel) + 2svh); }
  .beat:has(> .caption):last-child { padding-bottom: 12svh; }
  .caption, .split__a, .split__b, .hero__a, .hero__b { width: 100%; }
  .caption { padding: 20px 20px 22px; box-shadow: none; }
  .caption::before, .caption::after { display: none; }
  .caption h2, .caption h3 { font-size: clamp(1.4rem, 5.6vw, 1.75rem); }
  .beat--split, .beat--hero { flex-direction: column; gap: 18px; }
  .split__a, .split__b, .hero__a, .hero__b { padding: 0; align-self: auto; }
  .hero__title { font-size: clamp(2.2rem, 9.6vw, 3.1rem); }

  .beat--room { height: auto; min-height: 0; padding: 0 var(--gutter) 26svh; }
  .room__pin { position: static; min-height: 0; display: block; padding: 0; }
  .tour { display: none; }

  .beat--around { flex-direction: column; gap: 18px; padding-bottom: 10svh; }
  .around__a, .around__b { width: 100%; gap: 18px; }

  .beat--wide { flex-direction: column; gap: 28px; padding: calc(var(--top) + 6svh) var(--gutter) 8svh; }
  .terms__a, .terms__b, .contact__a, .contact__b { width: 100%; padding: 0; }
  .form__actions .btn { width: 100%; }
  .foot { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html.js { transition: none; }
  .js [data-reveal], .js [data-split] .wi { opacity: 1; transform: none; transition: none; }
  .js .hero [data-reveal], .js .hero [data-split] .wi { animation: none; }
  .top, .top__menu::after, .btn, .htag, .tour { transition: none; }
}
