/* One stylesheet, four sites. Each tenant sets its own tokens on :root
 * in its own page, which is the same arrangement the platform uses for
 * its themes -- and for the same reason: a tenant changes colours and
 * words, never layout.
 *
 * EVERY COLOUR PAIR HERE IS MEASURED, not chosen by eye. The pairs are
 * checked by _work/contrast_live.py against the rendered page, which
 * reads what the browser actually paints rather than what a variable
 * says. Saying "meets AA" in a comment is how a theme in this codebase
 * ended up rendering black text on a black background.
 */

:root {
  --ink: #101913;
  --ink-soft: #3d4a41;
  --paper: #ffffff;
  --paper-warm: #f7f5f0;
  --line: #d9d5cc;
  --brand: #16513a;
  --brand-deep: #0d3324;
  --accent: #b4491f;
  --accent-soft: #fdf1ec;
  --ok: #1c6b45;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 25, 19, .06), 0 8px 24px rgba(16, 25, 19, .06);
  --font: "Inter var", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: var(--font);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
}

/* MOTION IS OPTIONAL. Everything that moves is behind this, because a
 * demo that cannot be watched by somebody with vestibular disorder is
 * a demo with an audience missing from the room. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- the skip link, first in the tab order ------------------------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: .75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0; font-weight: 700;
}
.skip:focus { left: 0; }

/* A VISIBLE FOCUS RING EVERYWHERE, set once. The default ring is
 * removed by half the resets on the internet and then never replaced. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: min(1120px, 100% - 3rem); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: min(1120px, 100% - 2rem); } }

/* --- masthead ------------------------------------------------------ */
.masthead {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: .95rem;
}
.brand-name { font-weight: 800; letter-spacing: -.015em; font-size: 1.05rem; }
.nav { display: flex; align-items: center; gap: .35rem; }
.nav a {
  color: var(--ink-soft); text-decoration: none; font-weight: 600;
  font-size: .93rem; padding: .6rem .7rem; border-radius: 9px;
  min-height: 44px; display: inline-flex; align-items: center;
}
.nav a:hover { background: var(--paper-warm); color: var(--ink); }
@media (max-width: 760px) { .nav .nav-wide { display: none; } }

/* --- buttons: one shape, three weights ----------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; min-height: 44px; padding: .7rem 1.15rem;
  border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: .94rem;
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-quiet {
  background: var(--paper); color: var(--ink); border-color: var(--line);
}
.btn-quiet:hover { background: var(--paper-warm); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* --- hero ---------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--brand-deep); color: #fff;
}

/* A PHOTOGRAPH UNDER THE WORDS, and a scrim that makes them legible.
 *
 * THE SCRIM IS NOT DECORATION. Text over an image has no measurable
 * contrast -- the background is different under every letter -- so the
 * only honest way to put words on a picture is to guarantee a floor.
 * This one is opaque at the left, where the text sits, and clears to
 * the right so the picture is still a picture.
 *
 * VERIFIED BY SAMPLING PIXELS, not by reading a CSS variable:
 * _work/audit_hero_pixels.py renders the page and measures the darkest
 * and lightest pixels actually behind the heading. A contrast checker
 * that reads background-color sees the colour UNDER the image and
 * reports a pass it has not earned. */
.hero-photo {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  /* HEAVY WHERE THE WORDS ARE, CLEAR WHERE THEY ARE NOT. The first
     version ran 94% to 40% and buried the photograph completely --
     measured as a background of exactly one colour behind the heading,
     worst 13.87:1 and best 13.87:1, which is the number a flat panel
     gives. A scrim with no variation under it is a scrim that has
     eaten the picture. */
  /* THE HAND-OFF IS AT 62%, NOT 38%. Measured: with the fade starting
     early the lead paragraph -- which runs wider than the heading --
     reached 4.04:1 against a 4.5 requirement, and the heading's
     background swung 5.9x across its own width. The text column ends
     around 60% of the viewport, so that is where the scrim may start
     letting go. */
  background: linear-gradient(100deg,
    color-mix(in srgb, var(--brand-deep) 93%, transparent) 0%,
    color-mix(in srgb, var(--brand-deep) 90%, transparent) 46%,
    color-mix(in srgb, var(--brand-deep) 84%, transparent) 62%,
    color-mix(in srgb, var(--brand-deep) 30%, transparent) 88%,
    color-mix(in srgb, var(--brand-deep) 10%, transparent) 100%);
}

/* THE DECORATIVE WASH IS FOR HEROES WITH NO PHOTOGRAPH. Left on, it
   sat above the picture at 85% opacity in solid brand colours and
   finished whatever the scrim had started. */
.hero:has(.hero-photo)::after { display: none; }
@media (max-width: 760px) {
  /* NARROWER SCREENS PUT TEXT OVER THE WHOLE IMAGE, so the scrim has
     to cover the whole image rather than fading across it. */
  .hero-photo::after {
    /* A phone puts the words across the whole image, so the scrim is
       flat rather than graded -- but lighter at the foot, where there
       is no text, so the photograph is still visible. */
    background: linear-gradient(180deg,
      color-mix(in srgb, var(--brand-deep) 88%, transparent) 0%,
      color-mix(in srgb, var(--brand-deep) 86%, transparent) 62%,
      color-mix(in srgb, var(--brand-deep) 55%, transparent) 100%);
  }
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(900px 400px at 15% -10%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 60%),
    radial-gradient(700px 500px at 95% 110%, color-mix(in srgb, var(--brand) 80%, transparent), transparent 60%);
  opacity: .85;
}
.hero .wrap { position: relative; z-index: 2; padding: clamp(3rem, 9vw, 6.5rem) 0; }
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.04;
  letter-spacing: -.03em; margin: 0 0 1rem; max-width: 18ch; font-weight: 800;
}
.hero p { font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 52ch; margin: 0 0 2rem; opacity: .95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 800;
  letter-spacing: .13em; text-transform: uppercase;
  padding: .35rem .8rem; border-radius: 999px; margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
}

/* --- sections ------------------------------------------------------ */
section { padding: clamp(2.5rem, 7vw, 5rem) 0; }
.section-alt { background: var(--paper-warm); }
h2 {
  font-family: var(--display); font-size: clamp(1.6rem, 3.6vw, 2.35rem);
  letter-spacing: -.022em; margin: 0 0 .5rem; font-weight: 800;
}
.lede { color: var(--ink-soft); max-width: 60ch; margin: 0 0 2rem; font-size: 1.05rem; }

.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 .5rem; font-size: 1.15rem; letter-spacing: -.012em; }
.card p { margin: 0; color: var(--ink-soft); }
.card-link { text-decoration: none; color: inherit; display: block; }
.card-link:hover { border-color: var(--brand); }

/* --- booking ------------------------------------------------------- */
.booker {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.booker-head {
  padding: 1.35rem 1.5rem; border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: end;
}
.field { display: grid; gap: .35rem; }
.field label { font-size: .8rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.field input, .field select {
  font: inherit; min-height: 44px; padding: .55rem .7rem;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper); color: var(--ink);
}
.booker-body { padding: 1.5rem; }

.slots { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.slot {
  min-height: 48px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--paper); font: inherit; font-weight: 700; cursor: pointer;
  display: grid; place-items: center; line-height: 1.2; padding: .4rem;
}
.slot:hover { border-color: var(--brand); background: var(--paper-warm); }
.slot[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.slot small { display: block; font-weight: 600; opacity: .85; font-size: .78rem; }

.note { color: var(--ink-soft); font-size: .95rem; }
.ok {
  border: 1px solid var(--ok); background: #eef7f2; color: #145033;
  border-radius: var(--radius); padding: 1rem 1.15rem; font-weight: 600;
}
.bad {
  border: 1px solid #a3301a; background: #fdf1ec; color: #7d2412;
  border-radius: var(--radius); padding: 1rem 1.15rem; font-weight: 600;
}

/* A SPINNER THAT SAYS SOMETHING. A bare animation tells a screen
 * reader nothing, so the live region carries the words and this is
 * decorative. */
.spinner {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  border: 2px solid var(--line); border-top-color: var(--brand);
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- footer -------------------------------------------------------- */
footer { background: var(--brand-deep); color: #fff; padding: 3rem 0 2.5rem; }
footer a { color: #fff; }
.foot-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.foot-grid h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 .75rem; opacity: .85; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.foot-grid a { min-height: 32px; display: inline-flex; align-items: center; }
.colophon {
  margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .22);
  font-size: .86rem; opacity: .92;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
