/* ==========================================================================
   The look of the whole site: "light and architectural".

   The colours are taken from the house itself: the chalk white of the walls,
   the black of the window frames, the green of the shutters, the oak of the
   floors. Change them once, in ":root" below, and every page follows.
   ========================================================================== */

/* ---- Fonts (kept in design/fonts, served by the site itself) ------------ */

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 200 600;
  font-display: swap;
  src: url("../fonts/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 600;
  font-display: swap;
  src: url("../fonts/jost-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Headings use the serif (Noto Serif Display) for LETTERS ONLY. The digits
   0-9, the fractions and the small raised 2 and 3 are deliberately left out,
   so every number in a heading falls through to "Estate Figures" below,
   which is Jost. Numbers therefore always appear in the clear sans figures,
   and nothing has to be marked up by hand. */
@font-face {
  font-family: "Estate Serif";
  font-style: normal;
  font-weight: 200 500;
  font-display: swap;
  src: url("../fonts/noto-serif-display-latin.woff2") format("woff2");
  unicode-range: U+0000-002F, U+003A-00B1, U+00B4-00B8, U+00BA-00BB, U+00BF-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: "Estate Serif";
  font-style: normal;
  font-weight: 200 500;
  font-display: swap;
  src: url("../fonts/noto-serif-display-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Estate Serif";
  font-style: italic;
  font-weight: 200 500;
  font-display: swap;
  src: url("../fonts/noto-serif-display-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-002F, U+003A-00B1, U+00B4-00B8, U+00BA-00BB, U+00BF-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: "Estate Serif";
  font-style: italic;
  font-weight: 200 500;
  font-display: swap;
  src: url("../fonts/noto-serif-display-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Estate Figures";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/jost-latin.woff2") format("woff2");
  unicode-range: U+0030-0039, U+00B2-00B3, U+00B9, U+00BC-00BE;
  size-adjust: 94%;
}

/* ---- Colours and measures ------------------------------------------------ */

:root {
  --chalk: #FAF9F5;      /* the walls: page background */
  --white: #FFFFFF;
  --stone: #F0EDE5;      /* pale stone: quiet bands */
  --ink: #1A1D19;        /* the window frames: headings */
  --text: #474C47;       /* running text */
  --muted: #6A6F69;      /* notes and captions */
  --green: #33493A;      /* the shutters: the one accent */
  --oak: #C4A477;        /* the floors: thin decorative lines */
  --oak-deep: #86694A;   /* oak, dark enough for small lettering */
  --night: #151C19;      /* the closing part and the footer */
  --on-night: rgba(250, 249, 245, 0.78);

  --line: rgba(26, 29, 25, 0.14);
  --line-strong: rgba(26, 29, 25, 0.34);
  --line-dark: rgba(250, 249, 245, 0.18);

  --serif: "Estate Serif", "Estate Figures", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --pad: clamp(1.25rem, 4.6vw, 4.5rem);   /* space left and right of the page */
  --max: 92rem;                           /* widest the content ever gets */
  --gap: clamp(0.75rem, 1.6vw, 1.5rem);
  --section: clamp(5rem, 11vw, 11rem);
  /* distance from the edge of the screen to the content; used by pictures
     that run off the left-hand side */
  --edge: calc((100vw - min(100vw, var(--max) + 2 * var(--pad))) / 2 + var(--pad));
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---- Basics --------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100svh;   /* keeps the footer at the bottom of short pages */
  margin: 0;
  overflow-x: clip;
  background: var(--chalk);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main { flex: 1 0 auto; }
img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
a { color: inherit; }
p { margin: 0; }
table { border-collapse: collapse; width: 100%; }
figure { margin: 0; }
dialog { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.022em;
  color: var(--ink);
  text-wrap: balance;
}
h2 { font-size: clamp(2.5rem, 5.2vw, 4.75rem); }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: var(--oak); }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip {
  position: absolute; left: var(--pad); top: -5rem; z-index: 100;
  padding: 0.75rem 1rem; background: var(--ink); color: var(--chalk);
  font-size: 0.875rem; text-decoration: none;
}
.skip:focus { top: 0.75rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Small lettering -------------------------------------------------------- */

/* the line above a title: a short oak rule, then letter-spaced capitals */
.eyebrow, .chapter {
  display: flex; align-items: center; gap: 0.9rem;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--green);
}
.eyebrow::before, .chapter__line {
  content: ""; flex: none;
  width: 2.25rem; height: 1px;
  background: var(--oak);
}
.eyebrow--plain::before { display: none; }
.chapter { margin-bottom: clamp(1.25rem, 2.4vw, 2rem); }
.chapter__no { font-weight: 400; letter-spacing: 0.14em; color: var(--oak-deep); }
.on-dark .eyebrow, .on-dark .chapter { color: var(--oak); }

.statement {
  max-width: 31em;
  font-size: clamp(1.2rem, 1.6vw, 1.5rem);
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink);
}
.note { font-size: 0.95rem; line-height: 1.5; color: var(--muted); }
.caption {
  margin-top: 0.7rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* very large words: "Living", "Rest", page titles */
.display {
  font-size: clamp(3.75rem, 10.5vw, 10rem);
  font-weight: 250;
  line-height: 0.92;
  letter-spacing: -0.035em;
}
.display--italic { font-style: italic; letter-spacing: -0.03em; }
.display--long { font-size: clamp(3rem, 7.4vw, 7rem); }

/* ---- Buttons and links ------------------------------------------------------- */

/* a line that lengthens on hover stands in for an arrow */
.button, .textlink {
  display: inline-flex; align-items: center; gap: 1rem;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.button::after, .textlink::after {
  content: ""; flex: none;
  width: 1.6rem; height: 1px;
  background: currentColor;
  transition: width 0.4s var(--ease);
}
.button:hover::after, .textlink:hover::after { width: 2.6rem; }

.button {
  min-height: 3.25rem;
  padding: 0.9rem 1.4rem 0.9rem 1.7rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
.button:hover { background: var(--ink); color: var(--chalk); }
.button--solid { background: var(--green); border-color: var(--green); color: var(--chalk); }
.button--solid:hover { background: var(--ink); border-color: var(--ink); }
.button[disabled] { opacity: 0.5; cursor: default; }
.on-dark .button { border-color: rgba(250, 249, 245, 0.5); color: var(--chalk); }
.on-dark .button:hover { background: var(--chalk); border-color: var(--chalk); color: var(--ink); }

.textlink { color: var(--green); padding-block: 0.4rem; white-space: nowrap; }
.on-dark .textlink { color: var(--oak); }

/* round buttons with a small chevron drawn from two lines */
.arrow {
  position: relative; flex: none;
  width: 3rem; height: 3rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}
.arrow::before {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 0.55rem; height: 0.55rem;
  border-top: 1px solid currentColor; border-right: 1px solid currentColor;
  transform: translateX(-18%) rotate(45deg);
}
.arrow--back::before { transform: translateX(18%) rotate(-135deg); }
.arrow:hover { background: var(--ink); border-color: var(--ink); color: var(--chalk); }
.arrow[disabled] { opacity: 0.3; pointer-events: none; }

/* ---- Pictures ------------------------------------------------------------------ */

/* Never wider than the picture really is. The small allowance covers the
   moment a picture is unveiled, when it is shown 7% larger and settles back. */
.pic { max-width: calc(var(--nw) / 1.07); }
.frame { display: block; position: relative; overflow: hidden; background: var(--stone); }
.frame img { width: 100%; }
.frame--fill { height: 100%; }
.frame--fill picture, .frame--fill img { width: 100%; height: 100%; }
.frame--fill img { object-fit: cover; object-position: var(--focus, 50% 50%); }
a.frame { cursor: zoom-in; }

/* a picture that runs off the left edge of the screen */
.bleed-left { margin-left: calc(-1 * var(--edge)); }

/* ---- Movement (only when scripts run, and never for visitors who prefer none) ---- */

/* pictures are unveiled from the bottom edge upwards as they scroll into view */
.js .unveil { clip-path: inset(0 0 100% 0); transition: clip-path 1.25s var(--ease); }
.js .unveil img { transform: scale(1.07); transition: transform 1.9s var(--ease); }
.js .unveil.is-in { clip-path: inset(0 0 0 0); }
.js .unveil.is-in img { transform: none; }

/* text rises a little and fades in */
.js [data-reveal] { opacity: 0; translate: 0 1rem; transition: opacity 1s ease, translate 1s var(--ease); }
.js [data-reveal].is-in { opacity: 1; translate: 0 0; }

/* pictures that glide slightly against the page; the script sets --glide */
[data-glide] { translate: 0 var(--glide, 0px); }

/* the opening picture settles slowly */
.js .drift img { animation: drift 16s var(--ease) both; }
@keyframes drift { from { transform: scale(1.09); } to { transform: scale(1); } }

/* ---- Header -------------------------------------------------------------------- */

.top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 249, 245, 0.9);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: transform 0.45s var(--ease), border-color 0.3s ease;
}
.top.is-stuck { border-bottom-color: var(--line); }
.top.is-away { transform: translateY(-101%); }
.top__in { display: flex; align-items: center; gap: 1.5rem; min-height: 4.75rem; }
.wordmark {
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
}
.top__nav { display: flex; gap: clamp(1.25rem, 2.6vw, 2.5rem); margin-left: auto; }
.top__nav a {
  position: relative;
  padding: 0.7rem 0;
  font-size: 0.74rem;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
}
.top__nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0.3rem;
  height: 1px; background: currentColor;
  transition: right 0.4s var(--ease);
}
.top__nav a:hover::after, .top__nav a[aria-current="page"]::after { right: 0; }
.top__end { display: flex; align-items: center; gap: 1.25rem; margin-left: clamp(0.5rem, 1.5vw, 1.5rem); }
.top__cta {
  padding: 0.85rem 1.3rem;
  background: var(--green);
  color: var(--chalk);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}
.top__cta:hover { background: var(--ink); }
.top__menu {
  display: none;
  padding: 0.85rem 0;
  border: 0; background: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
}

/* the full-screen menu on phones */
.menu {
  width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--chalk);
  color: var(--ink);
}
.menu::backdrop { background: var(--chalk); }
.menu[open] { display: flex; flex-direction: column; }
.menu__top { display: flex; align-items: center; justify-content: space-between; min-height: 4.75rem; }
.menu .top__menu { display: block; }
.menu__links { display: flex; flex-direction: column; gap: 0.4rem; margin-block: auto; padding-block: 2rem; }
.menu__links a {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 11vw, 4rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.menu__foot { display: flex; flex-direction: column; gap: 0.2rem; padding-bottom: 2.25rem; font-size: 1.05rem; }
.menu__foot a { text-decoration: none; width: fit-content; }

/* ---- Opening: the name set large, two pictures beneath ------------------------ */

.cover { padding-top: clamp(1.75rem, 4.2vw, 4rem); }
.cover__title {
  /* sized so that the whole name fits on one line, whatever its length */
  margin: clamp(1rem, 1.8vw, 1.6rem) 0 0 -0.045em;
  font-size: min(calc(186vw / var(--chars)), 12rem);
  font-weight: 250;
  line-height: 0.9;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.cover__sub {
  margin-top: 0.5rem;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.6vw, 3.4rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.cover__meta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.5rem 3rem;
  margin-top: clamp(1.5rem, 2.6vw, 2.5rem);
}
.cover__tagline {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.3vw, 2.1rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.cover__line { max-width: 36em; font-size: 1.05rem; }

.cover__stage {
  position: relative;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap); align-items: start;
  margin-top: clamp(2rem, 3.6vw, 3.25rem);
  padding-bottom: clamp(5.5rem, 9vw, 8.5rem);
}
/* --iw / --ih are the picture's own width and height in pixels; the picture
   area never grows beyond them, so the picture is never enlarged */
.cover__main {
  grid-column: 1 / 10; grid-row: 1;
  margin-left: calc(-1 * var(--edge));
  height: clamp(22rem, 62vh, calc(var(--ih) * 1px / 1.09));
  max-width: calc(var(--iw) * 1px / 1.09);   /* leaves room for the slow settling movement */
}
.cover__main .frame { height: 100%; }
.cover__main .caption { position: absolute; margin-left: var(--edge); }
.cover__side {
  grid-column: 10 / 13; grid-row: 1; align-self: end;
  position: relative; z-index: 2;
  margin-bottom: calc(-1 * clamp(3.5rem, 7vw, 6.5rem));
}
.cover--event .cover__side { align-self: start; margin: clamp(3rem, 8vw, 8rem) 0 0; }

/* the announcement, laid over the corner of the opening picture */
.notice {
  grid-column: 1 / 6; grid-row: 1; align-self: end;
  position: relative; z-index: 3;
  margin-bottom: calc(-1 * clamp(3rem, 5vw, 4.5rem));
  padding: clamp(1.25rem, 2vw, 1.75rem) clamp(1.25rem, 2.2vw, 2rem);
  border: 1px solid var(--line);
  background: var(--white);
}
.notice__title {
  margin-top: 0.7rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 1.9vw, 1.7rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.notice__text { margin: 0.6rem 0 0.9rem; font-size: 0.95rem; line-height: 1.5; }

/* ---- Parts of a page ------------------------------------------------------------- */

.section { padding-block: var(--section); }
.section--stone { background: var(--stone); }
.section--strip { padding-bottom: calc(var(--section) * 0.4); }
.cover + .section { padding-top: clamp(3rem, 6vw, 6.5rem); }

/* ---- 01 The estate at a glance ---------------------------------------------------- */

.glance__top, .glance__main, .rest__grid, .floors__grid, .location__grid,
.services__grid, .closing__grid, .enquiry, .event-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}
.glance__top { align-items: end; row-gap: 1.5rem; }
.glance__top h2 { grid-column: 1 / 8; }
.glance__top .statement { grid-column: 8 / 13; }
.glance__main { align-items: center; margin-top: clamp(2.5rem, 5vw, 5rem); }
.glance__picture { grid-column: 1 / 8; }
.schedule { grid-column: 9 / 13; }

/* the key figures, set like a schedule */
.schedule { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.schedule__row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 1rem 0 0.9rem;
  border-bottom: 1px solid var(--line);
}
.schedule__value {
  font-size: clamp(2.4rem, 3.7vw, 3.6rem);
  font-weight: 250;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ink);
  white-space: nowrap;
}
.schedule__label { max-width: 11em; font-size: 0.95rem; line-height: 1.3; text-align: right; }

/* ---- 02 Living: the row that slides sideways ---------------------------------------- */

.strip-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem;
  margin-bottom: clamp(1.75rem, 3.2vw, 3rem);
}
.strip-head__end { display: flex; align-items: center; gap: clamp(1.25rem, 3vw, 3rem); }
.strip-controls { display: flex; align-items: center; gap: 0.75rem; padding-bottom: 0.9rem; }
.strip-head__end .strip-controls { padding-bottom: 0; }
.strip-head__end { padding-bottom: 0.9rem; }
.strip-controls__count {
  margin-right: 0.75rem;
  white-space: nowrap;
  font-size: 1rem; font-weight: 300; letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
html:not(.js) .strip-controls { display: none; }

.strip {
  --strip-h: clamp(19rem, 64vh, 40rem);
  display: flex; gap: var(--gap);
  padding: 0 var(--edge) 2rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  cursor: grab;
  outline-offset: -3px;
}
.strip::-webkit-scrollbar { display: none; }
.strip.is-dragging { cursor: grabbing; }
.strip.is-dragging a { pointer-events: none; }
.strip__item {
  flex: none;
  height: min(var(--strip-h), var(--nh));   /* never taller than the picture really is */
  aspect-ratio: var(--ar);
}
.strip__item .frame { height: 100%; }
.strip__item picture, .strip__item img { width: 100%; height: 100%; }
.strip__item img { object-fit: cover; }
.strip__item a.frame { cursor: inherit; }

/* ---- 03 Rest: four pictures, arranged ------------------------------------------------- */

.rest__grid { align-items: start; }
.rest__left { grid-column: 1 / 9; display: flex; flex-direction: column; gap: clamp(2rem, 5vw, 5rem); }
.rest__right {
  grid-column: 9 / 13;
  display: flex; flex-direction: column; gap: clamp(1.75rem, 3.4vw, 3.5rem);
  padding-top: clamp(0.5rem, 2vw, 2rem);
}
.rest__a { margin-left: calc(-1 * var(--edge)); }
.rest__c { width: 62%; margin-left: 24%; }
.rest__d { position: relative; z-index: 2; width: 132%; margin-left: -32%; outline: 0.6rem solid var(--chalk); }

/* ---- 04 Floor by floor ------------------------------------------------------------------ */

.floors__grid { align-items: center; }
.floors__picture { grid-column: 1 / 6; }
.floors__text { grid-column: 7 / 13; }
/* the staircase from above, shown as a circle that turns a little as the page moves */
.roundel {
  width: 100%; max-width: min(var(--nw), 34rem);
  margin-inline: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  rotate: var(--turn, 0deg);
  background: var(--chalk);
}
.roundel picture, .roundel img { width: 100%; height: 100%; }
.roundel img { object-fit: cover; }

/* the floors as a stack, top floor first, with the lift drawn as a line */
.stack { margin-top: clamp(1.75rem, 3vw, 2.75rem); }
.stack th, .stack td {
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
  font-weight: 400;
  text-align: left; vertical-align: baseline;
}
.stack thead th {
  padding: 0 0 0.8rem;
  border-top: 0;
  font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--oak-deep);
}
.stack tbody th {
  width: 7.25rem; padding-right: 1rem;
  font-family: var(--serif);
  font-size: 1.75rem; font-weight: 300;
  line-height: 1.1; letter-spacing: -0.012em;
  color: var(--ink);
}
.stack td { font-size: 1rem; line-height: 1.5; }
.stack tbody tr:last-child th, .stack tbody tr:last-child td { border-bottom: 1px solid var(--line); }
.stack .stack__beds {
  width: 5.5rem; padding-left: 1rem;
  font-size: 1.75rem; font-weight: 250; line-height: 1.1;
  text-align: right;
  color: var(--ink);
}
.stack thead .stack__beds { font-size: 0.68rem; font-weight: 500; color: var(--oak-deep); }

.stack .stack__shaft { position: relative; width: 2.25rem; padding: 0; border-color: transparent !important; }
.is-served .stack__shaft::before {
  content: ""; position: absolute; left: 0.55rem; top: -1px; bottom: 0;
  width: 1px; background: var(--green);
}
.is-served-top .stack__shaft::before { top: 50%; }
.is-served-top .stack__shaft::after, .stack__basement .stack__shaft::after {
  content: ""; position: absolute; left: calc(0.55rem - 3px); top: calc(50% - 3px);
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
}
.stack__basement .stack__shaft::before { bottom: 50%; }
.stack .stack__basement th, .stack__liftname {
  font-family: var(--sans);
  font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
}
.stack .stack__basement th { color: var(--muted); }
.stack__liftname { color: var(--green); }
.stack .stack__basement th, .stack .stack__basement td { padding-block: 0.9rem; }
.stack + .note { margin-top: 1.5rem; }

/* ---- 05 Location: journeys drawn as lines ------------------------------------------------- */

.location__heading {
  max-width: 13em;
  font-size: clamp(2.6rem, 6.4vw, 6.25rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.location__grid { align-items: start; margin-top: clamp(2.5rem, 5vw, 5rem); }
.location__journeys { grid-column: 1 / 7; }
.location__picture { grid-column: 8 / 13; justify-self: end; width: 100%; }
.location__journeys .note { margin-top: 1.5rem; }

.journeys { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.journey {
  display: grid; grid-template-columns: 1fr auto; gap: 0 1rem;
  padding: 1.1rem 0 1.2rem;
  border-top: 1px solid var(--line);
}
.journey__to { font-size: 1.08rem; color: var(--ink); }
.journey__time { white-space: nowrap; text-align: right; }
/* a faint full-length track, and on it a line as long as the journey */
.journey__track { grid-column: 1 / -1; position: relative; height: 0.75rem; margin-top: 0.55rem; }
.journey__track::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: var(--line);
}
.journey__line {
  position: absolute; left: 0; top: 50%;
  width: var(--len); height: 1px;
  background: var(--ink);
  transform-origin: left center;
  transition: transform 1.7s var(--ease) 0.25s;
}
.journey__line::after {
  content: ""; position: absolute; right: -3px; top: -3px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink);
}
.js .journey:not(.is-in) .journey__line { transform: scaleX(0); }

/* ---- 06 Services on request ------------------------------------------------------------------ */

.services__grid { align-items: center; }
.services__picture { grid-column: 1 / 9; grid-row: 1; }
.services__picture .caption { margin-left: var(--edge); }
.services__card { grid-column: 8 / 13; grid-row: 1; position: relative; z-index: 2; }
.card {
  padding: clamp(1.75rem, 3.2vw, 3.25rem);
  border: 1px solid var(--line);
  background: var(--white);
}
.card h2 { font-size: clamp(2rem, 3.4vw, 3.25rem); }

.arrangements {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem clamp(1.25rem, 2.4vw, 2.25rem);
  margin-top: clamp(1.5rem, 2.6vw, 2.25rem);
}
.arrangements h3 {
  margin-bottom: 0.8rem; padding-top: 1rem;
  border-top: 1px solid var(--line-strong);
  font-family: var(--sans);
  font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--oak-deep);
}
.arrangements ul { margin: 0; padding: 0; list-style: none; }
.arrangements li { padding: 0.2rem 0; }
.arrangements li, .arrangements p { font-size: 1.05rem; line-height: 1.45; color: var(--ink); }
.price {
  margin-top: clamp(1.5rem, 2.6vw, 2.25rem);
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-style: italic; font-weight: 300;
  line-height: 1.2;
  color: var(--ink);
}
.price + .note { margin-top: 0.6rem; }

/* ---- Closing part and footer -------------------------------------------------------------------- */

.closing { padding-block: var(--section) clamp(3.5rem, 7vw, 6rem); background: var(--night); color: var(--on-night); }
.closing__grid { align-items: center; }
.closing__text { grid-column: 1 / 8; }
.closing__picture { grid-column: 9 / 13; justify-self: end; width: 100%; }
.closing .frame { background: #0E1412; }
.closing h2 { color: var(--chalk); }
.closing .statement { margin-top: clamp(1.25rem, 2.2vw, 2rem); color: var(--on-night); }
.closing .chapter__line { background: var(--oak); }

.contact { display: flex; flex-direction: column; gap: 0.15rem; font-style: normal; }
.contact__name { font-weight: 500; color: var(--ink); }
.contact a { width: fit-content; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.3s ease; }
.contact a:hover { border-bottom-color: currentColor; }
.closing .contact { margin: clamp(1.75rem, 3vw, 2.75rem) 0; gap: 0.3rem; }
.closing .contact__name { margin-bottom: 0.35rem; color: var(--chalk); letter-spacing: 0.02em; }
.closing .contact a { font-size: clamp(1.3rem, 2.1vw, 1.8rem); font-weight: 300; line-height: 1.3; color: var(--chalk); }
.fine-print { margin-top: clamp(2rem, 4vw, 3rem); font-size: 0.82rem; color: rgba(250, 249, 245, 0.55); }

.foot { background: var(--night); color: var(--on-night); font-size: 0.9rem; }
.foot__in {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 1.25rem 2.5rem;
  padding-bottom: 2.5rem;
}
.foot__in::before { content: ""; width: 100%; margin-bottom: 1rem; border-top: 1px solid var(--line-dark); }
.foot--alone .foot__in::before { border-top: 0; margin-bottom: 1.25rem; }
.foot .wordmark { color: var(--chalk); }
.foot__tagline { margin-top: 0.5rem; }
.foot__links { display: flex; flex-wrap: wrap; gap: 0.6rem 1.75rem; margin: 0; padding: 0; list-style: none; }
.foot a { text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.3s ease; }
.foot a:hover { border-bottom-color: currentColor; }
.foot__small { width: 100%; font-size: 0.8rem; color: rgba(250, 249, 245, 0.5); }

/* ---- Event page: years, journeys beside services ----------------------------------------------- */

.years {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem var(--gap);
  margin: clamp(2rem, 4vw, 3.5rem) 0 0; padding: 0;
  list-style: none;
}
.year { display: flex; flex-direction: column; align-items: flex-start; padding-top: 1.25rem; border-top: 1px solid var(--line-strong); }
.year .textlink { margin-top: auto; }
.year__value {
  display: block;
  font-size: clamp(3rem, 8vw, 7.5rem);
  font-weight: 200;
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: var(--ink);
}
.year__note { display: block; margin: 1rem 0 0.9rem; }
.years__after { margin-top: clamp(2rem, 4vw, 3.5rem); }
.event-grid { align-items: start; margin-top: clamp(2rem, 4vw, 3.5rem); }
.event-grid > :last-child { grid-column: 8 / 13; }
.event-grid .arrangements { margin-top: 0; }
.event-picture { margin-top: clamp(3rem, 6vw, 6rem); }
.event-picture .pic { width: calc(75% + var(--edge)); }
.event-picture .caption { margin-left: var(--edge); }

/* ---- Enquiries page --------------------------------------------------------------------------------- */

.page-head { padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(2rem, 4vw, 3.5rem); }
.page-head .display { margin-top: 1.1rem; font-size: clamp(3.25rem, 9vw, 8.5rem); }
.page-head .statement { margin-top: clamp(1.25rem, 2.4vw, 2rem); }
.page-head--message { padding-bottom: var(--section); }
.page-head--message .display { margin-top: 0; }
.page-head--message .button { margin-top: 2.25rem; }

.enquiry { align-items: start; padding-bottom: var(--section); }
.form {
  grid-column: 1 / 8;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.1rem clamp(1.25rem, 2.6vw, 2.75rem);
}
.aside { grid-column: 9 / 13; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field--wide { grid-column: 1 / -1; }
.field label {
  font-size: 0.68rem; font-weight: 500; line-height: 1.4;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink);
}
.field label span { letter-spacing: 0.06em; text-transform: none; font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%;
  padding: 0.65rem 0 0.75rem;
  border: 0; border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.25rem; font-weight: 300; line-height: 1.4;
  -webkit-appearance: none; appearance: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.field textarea { min-height: 7.5rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: rgba(71, 76, 71, 0.5); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-bottom-color: var(--green);
  box-shadow: 0 1px 0 var(--green);
}
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; margin-top: 0.5rem; }
.form__privacy { font-size: 0.9rem; line-height: 1.5; color: var(--muted); }
.form__privacy a { color: var(--green); }
.form__status {
  grid-column: 1 / -1;
  padding: 1.1rem 1.25rem;
  border-left: 2px solid var(--green);
  background: var(--stone);
  color: var(--ink);
}
.form__status[hidden] { display: none; }

.aside h2 {
  margin-bottom: 0.9rem; padding-top: 1rem;
  border-top: 1px solid var(--line-strong);
  font-family: var(--sans);
  font-size: 0.68rem; font-weight: 500;
  line-height: 1.4; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--oak-deep);
}
.aside > * + h2 { margin-top: 2.5rem; }
.aside p, .aside .contact a { color: var(--ink); }
.aside .contact a { font-size: 1.2rem; font-weight: 300; }

/* ---- Text pages (legal, thank you, not found) -------------------------------------------------------- */

.prose { max-width: 44rem; padding-bottom: var(--section); }
.prose h2 { margin: 2.75rem 0 0.9rem; font-size: clamp(1.7rem, 2.6vw, 2.15rem); line-height: 1.15; letter-spacing: -0.012em; }
.prose p { margin: 0 0 1rem; }
.prose a { color: var(--green); }
.prose mark, .todo {
  padding: 0.08em 0.35em;
  background: #EBDDBF;
  color: var(--ink);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.draft-note {
  max-width: 44rem;
  margin-bottom: 2.5rem;
  padding: 1.1rem 1.25rem;
  border-left: 2px solid var(--oak);
  background: var(--stone);
  color: var(--ink);
  font-size: 1rem;
}

/* ---- Full-screen picture viewer ------------------------------------------------------------------------ */

html:has(.viewer[open]), html:has(.menu[open]) { overflow: hidden; }
.viewer {
  width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--chalk);
  color: var(--ink);
  overflow: hidden;
}
.viewer::backdrop { background: var(--chalk); }
.viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.viewer__bar, .viewer__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 4rem;
  padding-inline: var(--pad);
}
.viewer__foot { justify-content: center; min-height: 3.25rem; }
.viewer__count { font-size: 1rem; font-weight: 300; letter-spacing: 0.1em; font-variant-numeric: tabular-nums; }
.viewer__caption { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.viewer__close {
  padding: 0.8rem 0; border: 0; background: none;
  color: inherit;
  font-family: var(--sans);
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
  cursor: pointer;
}
.viewer__stage {
  position: relative;
  display: grid; place-items: center;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);   /* one cell of a known size, so tall pictures are fitted to it */
  min-height: 0;
  padding-inline: clamp(0rem, 7vw, 7rem);
  touch-action: pan-y;
}
.viewer__stage picture { display: contents; }
.viewer__stage source { display: none; }   /* otherwise it takes a row of its own and pushes the picture down */
.viewer__stage img {
  /* never larger than the picture itself */
  max-width: min(100%, var(--nw, 100%));
  max-height: min(100%, var(--nh, 100%));
  width: auto; height: auto;
  object-fit: contain;
}
.viewer__nav { position: absolute; top: 50%; z-index: 2; margin-top: -1.5rem; background: rgba(250, 249, 245, 0.7); }
.viewer__nav--prev { left: clamp(0.75rem, 2vw, 2rem); }
.viewer__nav--next { right: clamp(0.75rem, 2vw, 2rem); }

/* ---- Smaller screens ------------------------------------------------------------------------------------ */

@media (max-width: 1100px) {
  .cover__main { grid-column: 1 / 10; }
  .notice { grid-column: 1 / 8; }
  .schedule { grid-column: 8 / 13; }
  .glance__picture { grid-column: 1 / 7; }
}

@media (max-width: 860px) {
  .top__nav { display: none; }
  .top__menu { display: block; }
  html:not(.js) .top__menu { display: none; }
  .top__end { margin-left: auto; }

  .glance__top h2, .glance__top .statement, .glance__picture, .schedule,
  .rest__left, .rest__right, .floors__picture, .floors__text,
  .location__journeys, .location__picture, .services__picture, .services__card,
  .closing__text, .closing__picture, .form, .aside, .event-grid > * { grid-column: 1 / -1; }
  .event-grid > :last-child { grid-column: 1 / -1; margin-top: 2.5rem; }

  .glance__main { row-gap: 2.5rem; }
  .glance__picture { margin-right: calc(-1 * var(--pad)); max-width: none; }

  .rest__grid { row-gap: 1.75rem; }
  .rest__right { order: -1; padding-top: 0; display: contents; }
  .rest__head { grid-column: 1 / -1; order: -2; }
  .rest__left { display: contents; }
  .rest__a { grid-column: 1 / -1; order: -1; margin-right: calc(-1 * var(--pad)); max-width: none; }
  .rest__b { grid-column: 7 / 13; order: 0; margin-top: -4rem; position: relative; z-index: 2; outline: 0.5rem solid var(--chalk); }
  .rest__c { grid-column: 1 / -1; order: 1; width: auto; margin-left: 0; }
  .rest__d { grid-column: 1 / 10; order: 2; width: auto; margin-left: 0; outline: 0; }

  .floors__grid { row-gap: 3rem; }
  .roundel { max-width: min(var(--nw), 22rem); }
  .location__grid { row-gap: 2.5rem; }
  .location__picture { justify-self: start; }
  .services__grid { row-gap: 0; }
  .services__picture { grid-row: 1; margin-right: calc(-1 * var(--pad)); max-width: none; }
  .services__card { grid-row: 2; margin-top: -2.5rem; }
  /* the card covers the foot of the picture here, so its caption moves onto the picture */
  .services__picture { position: relative; }
  .services__picture .caption {
    position: absolute; left: var(--pad); top: 0.9rem; z-index: 1;
    margin: 0; padding: 0.35rem 0.6rem;
    background: rgba(250, 249, 245, 0.88);
    color: var(--ink);
  }
  .closing__grid { row-gap: 3rem; }
  .closing__picture { justify-self: start; max-width: min(var(--nw), 24rem); }
  .enquiry { row-gap: 3.5rem; }
  .event-picture .pic { width: auto; margin-right: calc(-1 * var(--pad)); max-width: none; }
  .strip-head__end .textlink { display: none; }
}

@media (max-width: 700px) {
  body { font-size: 1.0625rem; }
  .top__in { min-height: 4.25rem; gap: 0.75rem; }
  .eyebrow, .chapter { gap: 0.7rem; font-size: 0.64rem; letter-spacing: 0.17em; }
  .eyebrow::before, .chapter__line { width: 1.5rem; }
  .wordmark { font-size: 0.68rem; letter-spacing: 0.22em; }
  .top__cta { padding: 0.75rem 0.95rem; letter-spacing: 0.18em; }
  .top__end { gap: 0.9rem; }

  /* the name over two lines, the pictures laid one on the other */
  .cover__title { font-size: min(calc(262vw / var(--chars)), 6rem); white-space: normal; line-height: 0.92; }
  .cover__meta { align-items: flex-start; flex-direction: column; }
  .cover__stage { display: block; padding-bottom: 0; }
  .cover__main { margin-inline: calc(-1 * var(--pad)); height: auto; aspect-ratio: 4 / 5; max-width: none; }
  .cover__main .caption { position: static; margin-left: var(--pad); }
  .cover__side, .cover--event .cover__side { width: 42%; margin: -24% 0 0 auto; outline: 0.5rem solid var(--chalk); }
  .notice { margin: 2rem 0 0; }

  /* the sliding row becomes a column; two upright pictures sit side by side */
  .strip {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
    padding: 0 var(--pad);
    overflow: visible;
    cursor: auto;
  }
  .strip__item { grid-column: 1 / -1; height: auto; }
  .strip__item--upright { grid-column: auto; }
  .strip__item a.frame { cursor: zoom-in; }
  .strip-controls { display: none; }
  .section--strip { padding-bottom: 0; }

  .schedule__label { max-width: 9.5em; }
  .stack tbody th { width: 4.9rem; padding-right: 0.6rem; font-size: 1.35rem; }
  .stack .stack__beds { width: 3rem; padding-left: 0.5rem; font-size: 1.35rem; }
  .stack thead .stack__beds { font-size: 0; }
  .stack td { font-size: 0.95rem; }
  .stack .stack__shaft { width: 1.5rem; }
  .is-served .stack__shaft::before { left: 0.3rem; }
  .is-served-top .stack__shaft::after, .stack__basement .stack__shaft::after { left: calc(0.3rem - 3px); }

  .card { padding: 1.6rem 1.35rem 1.75rem; }
  .form { grid-template-columns: minmax(0, 1fr); }
  .years { gap: 1.5rem 0.75rem; }
  .year__value { font-size: clamp(2.1rem, 11vw, 3rem); }
  .year__note { font-size: 0.9rem; }
  .year .textlink { gap: 0; letter-spacing: 0.16em; }
  .year .textlink::after { display: none; }
  .foot__in { flex-direction: column; }
  .viewer__nav { display: none; }   /* swipe on phones */
  .viewer__stage { padding-inline: 0; }
}

@media (max-width: 480px) {
  .arrangements { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Visitors who prefer no motion; printing ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .unveil, .js .unveil.is-in { clip-path: none; transition: none; }
  .js .unveil img { transform: none; transition: none; }
  .js [data-reveal] { opacity: 1; translate: 0 0; transition: none; }
  .js .drift img { animation: none; }
  .js .journey:not(.is-in) .journey__line { transform: none; }
  [data-glide] { translate: none; }
  .roundel { rotate: none; }
  * { transition-duration: 0.01ms !important; }
}

@media print {
  .js .unveil { clip-path: none !important; }
  .js [data-reveal] { opacity: 1 !important; translate: 0 0 !important; }
  .top, .viewer, .menu, .strip-controls { display: none !important; }
}
