/* Chapter scrub reveal: the layout of one full-screen chapter (photo, scrim, numbered plate, two-line serif headline,
   one sentence, figures on a hairline). The motion lives in part.js; this file is the rest state, so a chapter reads
   correctly with no JS, under reduced motion and before the build runs.
   Measured from the source's .cine chapter (styles.css 483-541, plate 16-27). Knobs are the custom properties on .csr. */
.csr, .csr * { box-sizing: border-box; }
.csr {
  --csr-serif: "Cormorant Garamond", Georgia, serif;
  --csr-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --csr-gutter: 6vw;                         /* side gutter of the copy, plate and figures row */
  --csr-h-size: clamp(50px, 7vw, 112px);     /* chapter headline (100.8px at 1440) */
  --csr-h1-size: clamp(76px, 8.5vw, 138px);  /* hero headline */
  --csr-plate-top: 110px;                    /* plate distance from the chapter top (clears an 82px header) */
  --csr-copy-bottom: 7vh;                    /* copy distance from the chapter bottom (centred: 9vh) */
  --csr-ink-rgb: 22 24 19;                   /* scrim colour, as "r g b" */
  --csr-scrim: 1;                            /* scrim strength: 0 = none, 1 = source, 1.3 = for bright MLS rooms */
  --csr-scrim-side: 1;                       /* the side wash behind the copy column (centred chapters: 0) */
  --csr-scrim-dir: 90deg;                    /* side wash direction: 90deg = dark at the left (right-set copy: 270deg) */
  --csr-scrim-mid: 40%;                      /* bottom wash: .82 at the bottom, .30 at this height, 0 at --csr-scrim-top */
  --csr-scrim-top: 67%;
  --csr-hair: rgb(255 255 255 / .32);        /* eyebrow rule and the figures hairline */
  --csr-accent: inherit;                     /* hero headline italic colour */
  --csr-mob-pos: center;                     /* phone object-position of the photo: aim it at the part a portrait screen keeps */
  position: relative; min-height: 100svh; overflow: hidden;
  display: flex; align-items: flex-end;
  background: #1e211d; color: #fff;
  font-family: var(--csr-sans); font-weight: 300;
}

/* the photo: any <img>, <picture>, <video> or full-bleed <div>/<svg> with class csr-media */
.csr-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.csr-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* the scrim: a bottom wash (.82 -> .30 at 40% -> 0 at 67%) + a side wash (.52 -> 0 at 50%) */
.csr-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(0deg, rgb(var(--csr-ink-rgb) / calc(.82 * var(--csr-scrim))), rgb(var(--csr-ink-rgb) / calc(.30 * var(--csr-scrim))) var(--csr-scrim-mid), rgb(var(--csr-ink-rgb) / 0) var(--csr-scrim-top)),
    linear-gradient(var(--csr-scrim-dir), rgb(var(--csr-ink-rgb) / calc(.52 * var(--csr-scrim) * var(--csr-scrim-side))), rgb(var(--csr-ink-rgb) / 0) 50%);
}

/* the copy column, bottom-left by default */
.csr-copy { position: relative; z-index: 2; width: 100%; padding: 0 0 var(--csr-copy-bottom); }
.csr-inner { padding: 0 var(--csr-gutter); max-width: 760px; }   /* the cap includes the gutter: it is what stacks the headline */

.csr h1, .csr h2, .csr h3 { font-family: var(--csr-serif); font-weight: 400; color: #fff; text-wrap: balance; text-shadow: 0 .022em 0 rgba(20, 22, 18, .4); }
.csr h2 { font-size: var(--csr-h-size); line-height: .85; letter-spacing: -.03em; margin: 0 0 24px; }
.csr h1 { font-size: var(--csr-h1-size); line-height: .74; letter-spacing: -.045em; font-weight: 300; margin: 0 0 30px; }
.csr h1 em, .csr h2 em { font-weight: inherit; }
.csr h1 em { color: var(--csr-accent); }
.csr-line { display: block; padding-bottom: .12em; white-space: nowrap; }   /* one measured line (part.js splits them) */

.csr-eyebrow {
  display: inline-block; margin: 0 0 26px; padding: 0 0 14px; border-bottom: 1px solid var(--csr-hair);
  font-size: 10px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: rgb(255 255 255 / .82);
}
.csr-lede { margin: 0; max-width: 48ch; font-size: clamp(14px, 1.15vw, 17px); line-height: 1.6; font-weight: 300; color: rgb(255 255 255 / .9); text-wrap: pretty; }

/* figures: a full-width row along the bottom (a direct child of .csr-copy) or inside the copy column (in .csr-inner) */
.csr-figs { display: flex; border-top: 1px solid var(--csr-hair); }
.csr-copy > .csr-figs { justify-content: space-between; gap: 16px; margin: 34px var(--csr-gutter) 0; padding-top: 24px; }
.csr-inner .csr-figs { flex-wrap: wrap; gap: 14px 56px; margin-top: 34px; padding-top: 10px; }
.csr-figs-label { flex: 0 0 100%; overflow: hidden; }              /* the mask the label drops through */
.csr-figs-label > * { display: block; margin: 0; font-size: 10px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: rgb(255 255 255 / .82); }
.csr-fig strong { display: block; font: 400 clamp(42px, 4.8vw, 72px)/1 var(--csr-serif); }
.csr-fig span { display: block; margin-top: 8px; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: rgb(255 255 255 / .66); }

.csr-tags { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 26px 0 0; padding: 0; list-style: none; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: rgb(255 255 255 / .72); }
.csr-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.csr-btn { display: inline-block; padding: 16px 23px; border: 1px solid rgb(255 255 255 / .6); border-radius: 999px; color: #fff; text-decoration: none; font: 600 9px/1 var(--csr-sans); letter-spacing: .15em; text-transform: uppercase; }
.csr-btn--solid { background: #f1eee7; border-color: #f1eee7; color: #1e211d; }

/* the numbered plate: "01 / The kitchen" becomes a serif numeral over a caps title, each in its own mask */
.csr-plate {
  position: absolute; z-index: 3; top: var(--csr-plate-top); left: var(--csr-gutter); width: calc(100% - 2 * var(--csr-gutter));
  font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: rgb(255 255 255 / .8);
  text-shadow: 0 .022em 0 rgba(20, 22, 18, .4); user-select: none; -webkit-user-select: none;
}
.csr-plate-mask { display: block; overflow: hidden; }
.csr-plate-mask + .csr-plate-mask { margin-top: -4px; }
.csr-plate-num { display: block; font: 400 clamp(52px, 4.8vw, 76px)/1 var(--csr-serif); letter-spacing: 0; }
.csr-plate-title { display: block; }

/* centred chapter: narrower column, no side wash, copy 9vh off the bottom */
.csr[data-csr-align="center"] { --csr-scrim-side: 0; --csr-ink-rgb: 24 26 21; --csr-scrim-mid: 42%; --csr-scrim-top: 68%; --csr-copy-bottom: 9vh; }
.csr[data-csr-align="center"] .csr-copy { display: flex; flex-direction: column; align-items: center; padding: 0 var(--csr-gutter) var(--csr-copy-bottom); }
.csr[data-csr-align="center"] .csr-inner { max-width: 680px; padding: 0; text-align: center; }
.csr[data-csr-align="center"] .csr-lede { margin: 0 auto; max-width: 46ch; }
.csr[data-csr-align="center"] .csr-tags, .csr[data-csr-align="center"] .csr-actions, .csr[data-csr-align="center"] .csr-inner .csr-figs { justify-content: center; }
.csr[data-csr-align="center"] .csr-copy > .csr-figs { align-self: stretch; }
/* right-set chapter (the source's mirrored frame, breaking a run of left-set ones) */
.csr[data-csr-align="right"] { --csr-scrim-dir: 270deg; }
.csr[data-csr-align="right"] .csr-copy { display: flex; flex-direction: column; align-items: flex-end; }
.csr[data-csr-align="right"] .csr-inner { text-align: right; }
.csr[data-csr-align="right"] .csr-lede { margin-left: auto; }
.csr[data-csr-align="right"] .csr-tags, .csr[data-csr-align="right"] .csr-actions, .csr[data-csr-align="right"] .csr-inner .csr-figs { justify-content: flex-end; }
.csr[data-csr-align="right"] .csr-copy > .csr-figs { align-self: stretch; }

/* a short window: the copy can never ride up under the plate; the chapter grows instead (no change at normal heights) */
.csr:has(> .csr-plate) .csr-copy, .csr[data-csr-align]:has(> .csr-plate) .csr-copy { padding-top: calc(var(--csr-plate-top) + 110px); }

/* the hero: nothing shows until part.js has split the lines and set the entrance's first frame */
html.csr-on .csr[data-csr="hero"]:not(.csr-is-built) .csr-copy,
html.csr-on .csr[data-csr="hero"]:not(.csr-is-built) .csr-plate { visibility: hidden; }

@media (max-width: 800px) {
  .csr { --csr-gutter: 26px; --csr-plate-top: 124px; }
  .csr-media { object-position: var(--csr-mob-pos); }
  .csr h2 { font-size: 16vw; line-height: .88; }
  .csr h1 { font-size: 19vw; }
  .csr-lede { max-width: 100%; font-size: 15px; }
  .csr-copy > .csr-figs { gap: 10px; margin: 26px var(--csr-gutter) 0; padding-top: 20px; }
  .csr-inner .csr-figs { gap: 30px; }
  .csr-fig strong { font-size: 31px; }
  .csr-fig span { margin-top: 6px; font-size: 7.5px; letter-spacing: .07em; white-space: nowrap; }
  .csr-tags { gap: 8px 18px; font-size: 9px; }
  .csr[data-csr-align="center"] { --csr-copy-bottom: 8vh; }
}
