/* ==========================================================================
   Slogarie Estate design tokens
   Every colour, type step and spacing value used on the site is declared here.
   Nothing downstream should hard-code a hex value.
   ========================================================================== */

:root {
  /* Palette */
  --ink:          #2a231d;   /* near-black brown: text, dark sections */
  --ink-80:       rgba(42, 35, 29, .8);
  --ink-20:       rgba(42, 35, 29, .2);
  --ink-15:       rgba(42, 35, 29, .15);
  --paper:        #f4efe6;   /* page background, text on dark */
  --paper-warm:   #fbf8f2;   /* raised surfaces: booking bar, calendar */
  --paper-90:     rgba(244, 239, 230, .9);
  --paper-55:     rgba(244, 239, 230, .55);
  --sand:         #e8dfd0;   /* tinted band, selected date range */
  --bark:         #5e3f34;   /* primary action */
  --bark-dark:    #4a3128;
  --muted:        #7a6a5c;   /* labels, meta */
  --muted-light:  #c4b8aa;   /* disabled */
  --body:         #4a3f37;   /* body copy on light */
  --lichen:       #d9e08a;   /* eyebrow on photography */
  --lichen-deep:  #b7c26a;   /* eyebrow on --ink */

  /* Type */
  --font-display: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --font-body:    'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  /* Fluid display sizes, scaling between the mobile and desktop bounds */
  --step-hero: clamp(2.25rem, 1.30rem + 4.2vw, 4.75rem);
  --step-h2:   clamp(1.75rem, 1.35rem + 1.8vw, 2.75rem);
  --step-h3:   clamp(1.25rem, 1.10rem + 0.7vw, 1.625rem);
  --step-lead: clamp(1.125rem, 1.05rem + 0.4vw, 1.625rem);

  /* Spacing */
  /* The floor is in px, not rem, and that is the whole point of it. A page
     gutter is a layout margin, not a piece of type: it should track the width
     of the window, which is what the 2.8vw term does. When the floor was
     1.25rem it tracked the visitor's TEXT size instead, so a reader who had
     turned Chrome up to "Very large" spent 60px of a 280px screen on side
     margin -- less room for the words exactly when the words need more. It
     also put the availability panel over the edge: at 24px the calendar needs
     209px for seven legible dates and the gutter had taken the last of the
     240 it had. 1.25rem IS 20px at the default root size, so nothing moves on
     a 16px browser; measured across 21 widths from 240 to 1920, the computed
     gutter is identical before and after. */
  --gutter:      clamp(20px, 0.60rem + 2.8vw, 3.5rem);
  --section-y:   clamp(3.5rem, 2.20rem + 5.5vw, 7rem);
  --stack:       clamp(1.5rem, 1.10rem + 1.8vw, 2.5rem);

  --maxw: 1600px;
  --radius: 2px;
  --shadow-lift: 0 18px 40px rgba(42, 35, 29, .3);
  --shadow-pop:  0 24px 60px rgba(42, 35, 29, .35);
  --nav-h: 76px;
  --header-h: 116px;   /* the taller hero header, with the name under the logo */
}

/* ==========================================================================
   Reset / base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  /* Anchor targets clear the fixed nav instead of hiding under it. */
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video, svg, picture { display: block; max-width: 100%; }
img, video { height: auto; }
/* Photos ship as <picture>, so layout rules target the wrapper and the <img>
   inside it is always told to fill whatever box the wrapper was given. */
picture > img { width: 100%; }

a { color: inherit; text-decoration: none; }
a:hover { opacity: .75; }

h1, h2, h3, p, figure, blockquote { margin: 0; }

button, input, select { font: inherit; color: inherit; }

/* Visible keyboard focus everywhere, without a focus ring on mouse clicks. */
:focus-visible {
  outline: 2px solid var(--bark);
  outline-offset: 3px;
}
.on-dark :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--lichen);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Screen-reader-only, and the skip link that becomes visible on focus. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; top: 0; left: 0; z-index: 200;
  transform: translateY(-120%);
  background: var(--ink); color: var(--paper);
  padding: .75rem 1.25rem; font: 700 .8rem var(--font-body);
  letter-spacing: .14em; text-transform: uppercase;
}
.skip-link:focus { transform: translateY(0); opacity: 1; }

/* ==========================================================================
   Typography helpers
   ========================================================================== */

.eyebrow {
  font: 600 .72rem var(--font-body);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.on-dark .eyebrow { color: var(--lichen-deep); }
.on-photo .eyebrow { color: var(--lichen); }

.display    { font-family: var(--font-display); font-weight: 400; text-wrap: pretty; }
.display-xl { font-size: var(--step-hero); line-height: 1.02; letter-spacing: -.01em; }
/* The home page's heading sits over the video, and at full size three lines of it
   hid too much. Scaled from the same step so it keeps growing with the screen, with
   a floor so it stays punchy on a phone. Every other page keeps .display-xl as it is. */
.display-home {
  font-size: calc(var(--step-hero) * .8);
  font-size: max(2rem, calc(var(--step-hero) * .8));
  text-wrap: balance;         /* no word left alone on the last line */
}
/* Wider than the text block under it on a desktop, which is what gets it onto two
   lines: three took the height that the smaller type had just given back. */
@media (min-width: 1000px) { .display-home { width: 15em; } }
.display-l  { font-size: var(--step-h2);   line-height: 1.08; }
.display-m  { font-size: var(--step-h3);   line-height: 1.2; }

.lead  { font-size: var(--step-lead); line-height: 1.5; }
.prose { color: var(--body); line-height: 1.7; }
.prose p + p { margin-top: 1.125rem; }
.on-dark .prose { color: rgba(244, 239, 230, .86); }
/* A link inside running prose needs to look like one: the global `a` rule
   strips underlines. Scoped to <p> on purpose -- a .button-row full of .btn
   links often sits inside a .prose block, and those must not be underlined. */
.prose p a { border-bottom: 1px solid var(--ink-20); }
.on-dark .prose p a { border-bottom-color: rgba(244, 239, 230, .4); }

/* ==========================================================================
   Layout
   ========================================================================== */

.section { padding: var(--section-y) var(--gutter); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--sand { background: var(--sand); }
.container { max-width: var(--maxw); margin-inline: auto; }

/* Heading on the left, running copy on the right; stacks under 900px. */
.split-intro {
  display: grid;
  gap: var(--stack);
  align-items: start;
}
@media (min-width: 900px) {
  /* Half heading, half copy, and the copy runs as one column, not two. */
  .split-intro { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 4rem); }
}

/* Half photography, half copy. */
.feature-split { display: grid; }
.feature-split > picture { min-height: 320px; }
.feature-split > picture > img { width: 100%; height: 100%; object-fit: cover; }
.feature-split__body {
  padding: clamp(2.5rem, 5vw, 5rem) var(--gutter);
  display: flex; flex-direction: column; justify-content: center;
}
@media (min-width: 900px) {
  .feature-split { grid-template-columns: 1fr 1fr; }
  .feature-split > picture { min-height: 560px; }
  .feature-split--reverse > picture { order: 2; }
}

/* Same full-bleed band, but the body decides how tall it is and the photograph
   fills whatever that comes to. Left in flow, this page's portrait original
   stood 1080px tall beside a 565px form and dragged the whole band with it.
   Out of flow it spans the band edge to edge instead. Only the contact form
   uses this; the property pages are deliberately photo-led. */
.feature-split--fill > picture { position: relative; aspect-ratio: 3 / 4; }
/* Stacked on a tablet, 3/4 of 900px is a 1200px wall of photograph before the
   first field, so it flattens once there is width to spare. */
@media (min-width: 600px) { .feature-split--fill > picture { aspect-ratio: 3 / 2; } }
.feature-split--fill > picture > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
@media (min-width: 900px) {
  .feature-split--fill > picture { aspect-ratio: auto; min-height: 100%; }
}

.section-head {
  display: flex; flex-wrap: wrap; gap: 1rem 1.5rem;
  justify-content: space-between; align-items: flex-end;
  margin-bottom: var(--stack);
}

.link-underline {
  font: 700 .72rem var(--font-body);
  letter-spacing: .14em; text-transform: uppercase;
  border-bottom: 1px solid currentColor; padding-bottom: 4px; white-space: nowrap;
}

/* Auto-fitting photo grids. --min sets the smallest comfortable column.

   min(--min, 100%) rather than --min alone, because auto-fit cannot make a
   track narrower than the minimum it is given -- it drops to one column and
   then that one column is still --min wide. The wide grids on the property
   pages and things-to-do ask for 260px; at a 20px browser font on a 280px
   screen the gutter leaves 230, and the grid laid itself out 260 wide and
   took the page sideways with it. 100% is the container, so the column now
   gives up its preferred width before the page does. */
.photo-grid {
  display: grid;
  gap: clamp(.75rem, 1.5vw, 1rem);
  grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 220px), 100%), 1fr));
}
.photo-grid img { width: 100%; height: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.photo-grid--wide img { aspect-ratio: 3 / 2; }

/* ==========================================================================
   Header / navigation
   ========================================================================== */

.brand { display: flex; align-items: center; gap: .75rem; }
.brand:hover { opacity: 1; }
/* The mark is a pre-tinted SVG served through <img>, not a CSS mask: a mask
   image is fetched under CORS rules, which fails on a file:// origin and left
   the logo blank whenever a page was opened from disk. See tools/build_images.py. */
.brand__mark {
  display: block; flex: none;
  width: 40px; height: 40px;
  object-fit: contain;
}
/* No nowrap. "Slogarie Estate" is uppercase at .16em, so at a 24px browser font
   it is 391px of brand name in a 320px window -- clipped by .hero's
   overflow:hidden rather than scrolling the page, which is why no geometry test
   ever caught it and a visitor with a large font setting just saw the estate's
   name cut in half. Letting a two-word name take a second line is the right
   answer; at the default 16px the box is byte-for-byte where it was, measured. */
.brand__name {
  font: 600 .82rem var(--font-display);
  letter-spacing: .16em; text-transform: uppercase;
}
/* Scaled with the screen, because the room is not there at every width. Property
   pages also carry a button in this row, which leaves about 35px spare at 1280 and
   100 at 1440, so a fixed size that suits a wide screen pushes into the menu. */
.brand--lg { flex-direction: column; gap: .125rem; text-align: center; }
.brand--lg .brand__mark {
  width: clamp(54px, 4.6vw, 66px); height: clamp(54px, 4.6vw, 66px);
}
.brand--lg .brand__name { font-size: clamp(.8125rem, 1vw, .9375rem); }

.nav-links {
  display: flex; gap: clamp(1rem, 2vw, 1.875rem);
  font: 600 .72rem var(--font-body);
  letter-spacing: .14em; text-transform: uppercase;
}
/* A nav item must never break in half ("ABOUT / US"). If the row cannot fit,
   the breakpoint below hands over to the menu button instead. */
.nav-links a { white-space: nowrap; border-bottom: 1px solid transparent; padding-bottom: 2px; }
.nav-half { display: flex; gap: inherit; }
.nav-links a[aria-current='page'] { border-bottom-color: currentColor; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--radius); cursor: pointer;
  padding: .75rem 1.375rem;
  font: 700 .72rem var(--font-body);
  letter-spacing: .14em; text-transform: uppercase;
  transition: background-color .2s ease, opacity .2s ease;
}
.btn--light { background: var(--paper); color: var(--ink); }
.btn--dark  { background: var(--ink);   color: var(--paper); }
.btn--bark  { background: var(--bark);  color: var(--paper); }
.btn--bark:hover { background: var(--bark-dark); opacity: 1; }
.btn:disabled { opacity: .4; cursor: default; }

.site-header {
  position: absolute; inset: 0 0 auto; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem var(--gutter);
  color: var(--paper);
}

/* The dark bar that slides in once the hero has scrolled past. */
.sticky-nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: .75rem var(--gutter);
  background: rgba(42, 35, 29, .96);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  color: var(--paper);
  box-shadow: 0 8px 30px rgba(42, 35, 29, .25);
  transform: translateY(-100%);
  transition: transform .35s ease;
}
.sticky-nav[data-visible='true'] { transform: none; }
.sticky-nav .brand__mark { width: 36px; height: 36px; }

/* Mobile navigation ------------------------------------------------------- */

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  padding: .5rem; margin: -.5rem;
  color: inherit;
}
.nav-toggle__bar {
  display: block; width: 24px; height: 2px; background: currentColor;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle__bar + .nav-toggle__bar { margin-top: 6px; }
[aria-expanded='true'] .nav-toggle__bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
[aria-expanded='true'] .nav-toggle__bar:nth-child(2) { opacity: 0; }
[aria-expanded='true'] .nav-toggle__bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Seven nav items plus the brand and the button need 1150px to sit on one row;
   below that the header overflowed and the button was clipped by the hero. The
   menu button takes over instead, and it carries the same links. */
@media (max-width: 1199px) {
  .nav-toggle { display: block; order: 3; }

  /* An open menu gets a solid ground so it never reads over the hero. */
  .site-header[data-nav-open='true'] {
    background: rgba(42, 35, 29, .97);
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
  }

  .sticky-nav { flex-wrap: wrap; }

  /* The logo stays in the middle, with the menu button to its right. The outer
     columns are fixed and the name may wrap, so a wider font (a large browser
     setting, or the fallback before the web font lands) squeezes the name and
     can never push the button off the screen. */
  .site-header {
    display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem;
    padding-block: .625rem;
  }
  .site-header .brand { grid-column: 2; grid-row: 1; }
  .site-header .nav-toggle { grid-column: 3; grid-row: 1; justify-self: end; }
  .site-header .nav-panel { grid-column: 1 / -1; grid-row: 2; }
  .nav-half { display: contents; }

  /* Collapsed by default; the toggle sets [data-open]. */
  .nav-panel {
    order: 4; flex-basis: 100%;
    display: none;
    flex-direction: column; gap: 1.25rem;
    padding: 1.5rem 0 .75rem;
  }
  .nav-panel[data-open='true'] { display: flex; }
  /* align-items keeps each link the width of its own text, so the
     current-page underline hugs the word instead of ruling the panel. */
  .nav-links { flex-direction: column; align-items: flex-start;
               gap: 1.125rem; font-size: .82rem; }
  .site-header .btn, .sticky-nav .btn { align-self: flex-start; }
  .site-header > .btn, .sticky-nav > .btn { display: none; }
  .nav-panel .btn { display: inline-flex; }
}
@media (min-width: 1200px) {
  .nav-panel {
    display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem);
  }
  .nav-panel .btn { display: none; }

  /* The menu either side of the logo. Both wrappers step aside so the two halves
     become grid items of the header itself, one each side of the middle column,
     and the 1fr columns keep the logo in the true centre of the page. */
  .site-header {
    display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    column-gap: clamp(1.75rem, 3.5vw, 3.5rem);
    padding-block: .75rem;
  }
  .site-header .nav-panel, .site-header .nav-links { display: contents; }
  .site-header .brand { grid-column: 2; grid-row: 1; }
  .site-header .nav-half { grid-row: 1; gap: clamp(1.25rem, 2.2vw, 2.25rem); }
  .site-header .nav-half--left { grid-column: 1; justify-self: end; }
  .site-header .nav-half--right { grid-column: 3; justify-self: start; }
  /* Shares the right-hand column with the menu, so it waits until both fit. The
     same button is in the sticky bar, and in the menu below 1200px. */
  .site-header > .btn { display: none; grid-column: 3; grid-row: 1; justify-self: end; }
}
@media (min-width: 1500px) {
  .site-header > .btn { display: inline-flex; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 640px;
  height: 100svh;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  display: flex;
}
.hero__media {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.hero__media > img { width: 100%; height: 100%; object-fit: cover; }

/* The home hero stacks a still and a video in the same box. The still is what
   every visitor sees first and what a visitor on a slow connection keeps: the
   video is only fetched, and only fades in over it, once assets/js/site.js has
   decided the link can carry it (see the hero video block there). Stacking
   rather than swapping means nothing moves when it arrives. */
.hero__still { z-index: 0; }
.hero__video {
  z-index: 1;
  opacity: 0;
  transition: opacity .8s ease;
}
.hero__video[data-playing] { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero__video { display: none; }
}

/* Sound toggle. The clip carries a soundtrack but starts muted, so this control
   reads first as an invitation ("Sound off" -> press to hear it) and then as a
   way out ("Sound on" -> press to silence it). It is hidden in the markup and
   revealed by assets/js/site.js only once a video is actually playing: with no
   JS, a slow connection or reduced motion there is no video and so nothing to
   toggle.

   Top right, under the navigation: the hero copy and the booking bar both run
   along the bottom, so that corner is the only part of the hero that is free
   at every viewport. */
.hero__sound {
  position: absolute;
  /* Above .site-header (40) as well as .hero__body (10). Both are full-width
     blocks that reach across this corner and swallow the click at a lower
     level -- the header does it below 360px, where the brand wraps to two
     lines and the header box grows down past the toggle. Below .sticky-nav
     (50), which replaces the header once the hero has gone. */
  z-index: 45;
  right: var(--gutter);
  top: calc(var(--header-h) + .5rem);
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem .875rem .5rem .75rem;
  border: 1px solid var(--paper-55);
  border-radius: 999px;
  background: rgba(42, 35, 29, .38);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--paper);
  font: 600 .69rem var(--font-body);
  letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, opacity .3s ease;
}
.hero__sound:hover {
  background: rgba(42, 35, 29, .62);
  border-color: var(--paper);
}
.hero__sound:focus-visible {
  outline: 2px solid var(--lichen);
  outline-offset: 3px;
}
.hero__sound[hidden] { display: none; }

/* An open menu owns the screen. The toggle sits above the header so that it
   stays clickable, which would otherwise leave it floating over the open
   panel; it is not wanted there anyway. Relies on the button following
   .site-header in the markup. */
.site-header[data-nav-open='true'] ~ .hero__sound { display: none; }
.hero__sound-icon { display: inline-flex; }
.hero__sound-icon svg { width: 18px; height: 18px; display: block; }

/* One icon, two states, driven by aria-pressed so the control cannot show a
   state the accessibility tree disagrees with. */
.hero__sound .hero__sound-on  { display: none; }
.hero__sound .hero__sound-off { display: inline; }
.hero__sound[aria-pressed="true"] .hero__sound-on  { display: inline; }
.hero__sound[aria-pressed="true"] .hero__sound-off { display: none; }

/* .hero__body is anchored to the bottom of the hero and grows upward, so on a
   short or narrow screen its first line -- the eyebrow -- rises into the fixed
   top offset above and runs under the toggle. Measured overlapping at 320x568,
   360x640, 390x844 and 750x340. Reserving the corner on the eyebrow alone is
   what fixes it: the headline below it never reaches that high, and the toggle
   cannot move into the header row instead because .site-header is z-index 40
   and would swallow the click.
   Wide enough for the pill, and for the icon-only version below 600px. */
@media (max-width: 1199px) {
  .hero__copy .eyebrow { padding-right: 10rem; }
}
@media (max-width: 599px) {
  .hero__copy .eyebrow { padding-right: 3.5rem; }
}

@media (max-width: 599px) {
  /* On a phone the label is the first thing to go: the icon plus the pressed
     state carries it, and the accessible name still says which. */
  .hero__sound { padding: .5rem; gap: 0; }
  .hero__sound-label {
    position: absolute; width: 1px; height: 1px;
    margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
}

/* The hero copy sits in the lower half, so the scrim has to carry it over a
   bright photograph (The Lodge's sunlit interior) as well as a dark one.
   Weighted to darken from just above the headline downwards. */
.hero__scrim {
  position: absolute; inset: 0;
  z-index: 2;                 /* over both hero layers, under .hero__body */
  background: linear-gradient(180deg,
    rgba(42, 35, 29, .55) 0%,
    rgba(42, 35, 29, .10) 28%,
    rgba(42, 35, 29, .45) 58%,
    rgba(42, 35, 29, .80) 100%);
}
.hero__body {
  position: relative; z-index: 10;
  margin-top: auto;
  width: 100%;
  padding: var(--gutter);
  padding-top: calc(var(--header-h) + 1rem);
  display: flex; flex-direction: column; gap: clamp(1.75rem, 4vw, 2.75rem);
}
.hero__copy { max-width: 46rem; }
.hero__copy .eyebrow { margin-bottom: 1.25rem; }
.hero__copy .lead { max-width: 34rem; color: var(--paper-90); margin-top: 1.25rem; }

.hero__meta {
  display: flex; flex-wrap: wrap; gap: .5rem 1.25rem;
  font: 600 .72rem var(--font-body);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--lichen);
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   Property cards
   ========================================================================== */

.property-cards { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
@media (min-width: 640px)  { .property-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .property-cards { grid-template-columns: repeat(4, 1fr); } }

.property-card { display: flex; flex-direction: column; gap: .875rem; }
.property-card:hover { opacity: 1; }
.property-card img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  transition: transform .5s ease;
}
.property-card__frame { display: block; }
.property-card__frame { overflow: hidden; }
.property-card:hover img { transform: scale(1.03); }
.property-card__head {
  display: flex; justify-content: space-between; align-items: baseline; gap: .5rem;
}
.property-card__name { font: 400 1.375rem var(--font-display); }
.property-card__sleeps {
  font: 600 .69rem var(--font-body);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
/* The nowrap belongs to the badge only. "Sleeps 10" sits beside the house name
   in a two-item flex row and breaking it across lines there reads as a fault,
   but the same class also dresses standalone notes -- "Superking or twin ·
   Master en suite", "Loch · Woodland · Fire pits · Hot tubs", a pull-quote's
   <cite> -- and on those nowrap was not a typographic nicety, it was a
   page-wide sideways scroll. .section-head is a flex container, a flex item's
   min-width defaults to min-content, and a nowrap element's min-content is the
   whole string: the note could neither wrap nor shrink, so flex-wrap put it on
   its own line and it still stuck out of the column. Measured with the date
   picker CLOSED, which is what says this is the page's bug and not the booking
   component's: 264px of text in a 240px column on a 280px phone, and 395px in
   a 260px column once a visitor picks Chrome's "Very large" 24px font, leaving
   the document 425px wide in a 320px window. Uppercase at .14em letter-spacing
   makes every one of these strings about a third longer than it reads, and a
   browser font setting scales all of it while the window does not move. */
.property-card__head .property-card__sleeps { white-space: nowrap; }
.property-card p { font-size: .875rem; line-height: 1.6; color: var(--body); }

/* ==========================================================================
   Amenities
   ========================================================================== */

.amenities {
  display: flex; flex-wrap: wrap; gap: .625rem;
  margin-top: var(--stack); padding: 0; list-style: none;
}
.amenities li {
  border: 1px solid var(--ink-20);
  border-radius: 999px;
  padding: .5rem 1rem;
  font: 600 .72rem var(--font-body);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--body);
}
.on-dark .amenities li { border-color: rgba(244, 239, 230, .3); color: var(--paper-90); }

/* ==========================================================================
   Quotes
   ========================================================================== */

.quote-row { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
@media (min-width: 800px) { .quote-row { grid-template-columns: repeat(3, 1fr); } }

.quote {
  border-top: 1px solid currentColor;
  padding-top: 1.5rem;
  font: 400 1.125rem/1.55 var(--font-display);
  text-wrap: pretty;
}
.quote cite {
  display: block; margin-top: 1rem;
  font: 600 .69rem var(--font-body);
  letter-spacing: .16em; text-transform: uppercase;
  font-style: normal; color: var(--muted);
}
.on-dark .quote cite { color: var(--lichen-deep); }

.pull-quote {
  display: grid; align-items: stretch;
}
@media (min-width: 900px) { .pull-quote { grid-template-columns: 1.25fr 1fr; } }
/* The photo must not set the height of this band. Left in flow, a portrait
   original (Keeper's, The Kennels) forced an 800px column 1200px tall and
   stretched a one-line quote down beside it. Out of flow, the row is as tall as
   the quote needs or the floor below, whichever is greater, and the photo
   crops to fill it, so landscape and portrait sources behave the same. */
.pull-quote > picture {
  position: relative;
  min-height: clamp(300px, 42vw, 480px);
}
.pull-quote > picture > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.pull-quote blockquote {
  background: var(--ink); color: var(--paper);
  padding: clamp(2.5rem, 5vw, 4.5rem) var(--gutter);
  display: flex; flex-direction: column; justify-content: center; gap: 1.25rem;
  font: 400 var(--step-lead)/1.5 var(--font-display);
  text-wrap: pretty;
}

/* ==========================================================================
   Directory (Local attractions)
   ========================================================================== */

/* A full-width photograph between directory sections. Short, so a page of
   seven sections still scrolls like a list rather than a slideshow. */
.band img { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; }
@media (max-width: 700px) { .band img { aspect-ratio: 2 / 1; } }

/* Groups of links, in as many columns as the width allows. The groups are
   uneven (one entry or fourteen), so they flow rather than align to a row. */
.directory { display: grid; gap: var(--stack) clamp(2rem, 4vw, 4rem); }
@media (min-width: 700px)  { .directory { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .directory { grid-template-columns: repeat(3, 1fr); } }

.directory__title {
  font: 600 .72rem var(--font-body);
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted);
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--ink-15);
  margin: 0 0 1.125rem;
}
.directory ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.125rem; }
.directory__name { font: 400 1.0625rem/1.35 var(--font-display); }
a.directory__name { border-bottom: 1px solid var(--ink-20); }
.directory__note {
  display: block; margin-top: .25rem;
  font-size: .8125rem; line-height: 1.5; color: var(--muted);
}

/* A group with a lot of entries (Eating out has fourteen) takes two columns and
   splits its own list in two, so it does not tower over its neighbours. */
.directory__group--wide ul { column-gap: clamp(2rem, 4vw, 4rem); }
.directory__group--wide li { break-inside: avoid; }
@media (min-width: 700px) {
  .directory__group--wide { grid-column: span 2; }
  /* columns has no effect on a grid container, so this list goes back to block
     flow and spaces itself with margins instead of the grid gap. */
  .directory__group--wide ul { display: block; columns: 2; }
  .directory__group--wide li + li { margin-top: 1.125rem; }
}

/* ==========================================================================
   Map
   ========================================================================== */

/* The one third-party embed on the site. Lazy, so it only loads if a visitor
   scrolls to it, and boxed by aspect-ratio so it never shifts the page: an
   iframe with no box falls back to 300x150. */
.map { position: relative; aspect-ratio: 16 / 9; background: var(--sand); }
@media (max-width: 700px) { .map { aspect-ratio: 4 / 3; } }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ==========================================================================
   Forms
   ========================================================================== */

.form { display: grid; gap: 1.25rem; }
.form__pair { display: grid; gap: 1.25rem; }
@media (min-width: 560px) { .form__pair { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: .4rem; }
.field label {
  font: 600 .72rem var(--font-body);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
}
.field input, .field textarea {
  width: 100%;
  background: var(--paper-warm);
  border: 1px solid var(--ink-20);
  border-radius: var(--radius);
  padding: .75rem .875rem;
  font-size: .9375rem;
  color: var(--ink);
}
.field textarea { min-height: 9rem; resize: vertical; }
.form__note { font-size: .8125rem; line-height: 1.5; color: var(--muted); }
/* Only shown once the form has handed off to the mail client. */
.form__status:empty { display: none; }
.form__status { font-size: .875rem; color: var(--body); }

/* ==========================================================================
   Contact details
   ========================================================================== */

/* A row of actions. No margin of its own: the caller spaces it, because it
   sits both inside the hero's own gap and after a block of copy. */
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.contact-list { display: grid; gap: 1.5rem; margin: 0; }
.contact-list dt {
  font: 600 .72rem var(--font-body);
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .375rem;
}
/* `anywhere`, not `break-word`, and the difference is the entire fix. Both
   break a word that will not fit a line; only `anywhere` also tells the
   layout that the word CAN be broken, which is the number a grid track is
   sized from. .split-intro is one auto column here, so it takes the widest
   thing inside it as its minimum -- and the widest thing is what3words,
   ///crows.surfaces.behind, one unbreakable token 337px wide at a 24px
   browser font. The column went to 337 in a 300px window and dragged the
   heading, the eyebrow and the button row out with it, on contact.html at
   360px wide: a mainstream phone with a mainstream accessibility setting.
   The email address, enquiries@slogarie-estate.co.uk at 293px, is the same
   fault and is what does it on weddings.html, which has no what3words on it.
   Measured against the failing matrix one rule at a time: `break-word` here
   clears none of these cells, `anywhere` clears all five. */
.contact-list dd {
  margin: 0;
  font: 400 var(--step-h3)/1.35 var(--font-display);
  overflow-wrap: anywhere;
}
.contact-list a { border-bottom: 1px solid var(--ink-20); }
.on-dark .contact-list dt { color: var(--lichen-deep); }
.on-dark .contact-list a { border-bottom-color: rgba(244, 239, 230, .35); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--ink); color: var(--paper);
  padding: clamp(2.5rem, 5vw, 3.5rem) var(--gutter);
  display: grid; gap: var(--stack);
}
@media (min-width: 800px) { .site-footer { grid-template-columns: repeat(3, 1fr); align-items: start; } }
.site-footer .brand__mark { width: 80px; height: 80px; }
.site-footer .brand { flex-direction: column; align-items: flex-start; gap: .75rem; }

/* Grid items default to min-width:auto -- min-content -- so the one child that
   cannot shrink sizes the track and stretches every sibling column to match.
   Here that child is .subscribe__field: an <input> and a Subscribe button in a
   flex row whose min-content reaches 332px once the browser font is 24px, 12px
   more than a 320px phone has. All three footer columns then measured 332px
   inside a 320px footer and the whole page scrolled sideways. It stayed hidden
   until the .property-card__sleeps overflow above was fixed, because that one
   was wider and the overflow check names a single culprit -- the worst. The
   input already carried min-width:0; the grid item above it did not. Measured
   after: at 24px on a 320px phone the field is 260px wide with a 189px input,
   so nothing is squashed out of use. */
.site-footer > * { min-width: 0; }

/* Column one: the mark, then the estate's social accounts. */
.footer-brand { display: grid; gap: var(--stack); justify-items: start; }

.social { display: flex; gap: .75rem; padding: 0; margin: 0; list-style: none; }
.social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--paper-55); color: var(--paper);
  transition: background-color .2s ease, color .2s ease;
}
.social a:hover, .social a:focus-visible { background: var(--paper); color: var(--ink); }
.social svg { fill: currentColor; display: block; }

/* break-word, and here it really is only about the line break: the tracks are
   already minmax(0, 1fr) so the grid itself shrinks happily. It is the single
   word inside that does not -- "attractions" is 145px at a 24px browser font
   and the column at 280px wide is 103px, so the link hung 13px off the right
   of every page on the site. `hyphens: auto` was the first thing tried and
   cleared nothing, which is what text-transform: uppercase does to a
   hyphenation dictionary; an outright break is the only opportunity this text
   offers. */
.footer-nav {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .625rem;
  overflow-wrap: break-word;
  padding: 0; margin: 0; list-style: none;
  font: 500 .75rem var(--font-body);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-80);
  color: rgba(244, 239, 230, .8);
}

.subscribe__label { font: 400 1.25rem var(--font-display); margin-bottom: .875rem; }
.subscribe__field {
  display: flex; border: 1px solid rgba(244, 239, 230, .4);
}
.subscribe__field input {
  flex: 1; min-width: 0;
  background: none; border: 0; padding: .75rem .875rem;
  font-size: .82rem; color: var(--paper);
}
.subscribe__field input::placeholder { color: var(--paper-55); }
.subscribe__field button {
  border: 0; cursor: pointer;
  background: var(--paper); color: var(--ink);
  padding: .75rem 1.125rem; font-weight: 700;
}
.subscribe__note { font-size: .75rem; margin-top: .5rem; color: var(--paper-55); }
