/*
  Tonitza — design system (brand adoption, September 2026).

  Cream paper + olive ink is the identity; clay is a small, occasional accent
  (short rules, signature labels, one active state). Fraunces (display, 400,
  optical size 32) pairs with Inter for everything functional. This file holds
  tokens, base, header/footer and the shared components only — page-specific
  rules live in home.css, menu.css, gallery.css and bookings.css, each loaded
  from its page template's extra_head. See docs/brand/web-identity.md.
*/

:root {
  --paper: #f2ebdd;      /* main ground — the ordered cream, screen reference */
  --paper-2: #ebe3d2;    /* quiet band */
  --paper-3: #e3dac6;    /* deeper band, neutral artwork field */
  --white: #faf7ef;      /* form fields, popovers */
  --ink: #4f5944;        /* olive — text, rules, logos, footer (6.2:1 on paper) */
  --ink-soft: #626854;   /* secondary text (4.9:1 on paper) */
  --ink-deep: #3e4635;   /* pressed / deeper olive (the original brand olive) */
  --line: #c8c6b6;       /* hairlines */
  --clay: #9a573c;       /* accent (4.65:1 on paper — body-size text only) */
  --clay-deep: #7f4630;  /* clay for small caps / small text that must reach AA */
  --terracotta: #b5613b; /* the warm brown accent: display type, rules, underlines
                            only — 3.7:1, so never body-size text */
  --terracotta-deep: #8f4527; /* button hover / selection ground (paper on it 5.8:1) */
  --olive-soft: #808565; /* decorative only (3.2:1) — never as text on paper */
  --ochre: #b28a3a;      /* functional warning states only (reserved / pending) */

  --maxw: 1320px;
  --gutter: clamp(1.25rem, 3.5vw, 3.125rem);
  --header-h: 96px;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Fraunces is pinned to one optical cut ("opsz" 32, set on the heading
     rules) so the display face reads the same at 2rem and 6rem. Weight stays
     on font-weight — never list "wght" in font-variation-settings. */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1rem);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* RO-length gate: clip, not hidden, so a longer Romanian string can't turn
     <body> into a scroll container; horizontal overflow is still clipped. */
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
figure { margin: 0; }

/* ---------- Cross-document view transitions ---------- */
/* Same-origin navigations cross-fade instead of snapping (Chrome/Safari/Edge;
   unsupported browsers simply navigate as before). Opacity only — a moving
   snapshot would double-expose against the live page beneath it. The sticky
   header keeps its own name, so it holds still while the page fades under it.
   Scoped to no-preference so motion-sensitive visitors keep instant loads. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation-duration: 0.22s; animation-timing-function: ease-out; }
  ::view-transition-new(root) { animation-duration: 0.34s; animation-timing-function: ease-in; }
}
.site-header { view-transition-name: site-header; }

a { color: inherit; text-decoration: none; }

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 0.5em;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 32;
}
h1 { font-size: clamp(2.9rem, 1.6rem + 5.2vw, 6.6rem); }
h2 { font-size: clamp(2.2rem, 1.4rem + 3vw, 4.2rem); }
h3 { font-size: clamp(1.5rem, 1.3rem + 0.6vw, 1.9rem); }
h4 { font-family: var(--sans); font-size: 1rem; font-weight: 500; letter-spacing: 0; line-height: 1.4; font-variation-settings: normal; }

p { margin: 0 0 1rem; }
em, i { font-style: italic; }

::selection { background: var(--terracotta-deep); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}
/* On olive grounds the clay ring is invisible; paper reads at 6.2:1. */
.site-footer :focus-visible, .gallery-feature :focus-visible, .room-banner :focus-visible { outline-color: var(--paper); }

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}

.section { padding-block: clamp(3.6rem, 6.5vw, 5.9rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--paper-2 { background: var(--paper-2); }

main { position: relative; z-index: 1; }

.eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.6;
  color: var(--clay-deep); /* small warm-brown labels over olive headings (6.3:1) */
  margin: 0 0 1rem;
}
/* A signature / selection label (menu categories, the "on now" show). */
.eyebrow--clay { color: var(--clay-deep); }
/* On an ink ground (private-hire band, gallery feature). */
.eyebrow--light { color: var(--paper); }
.eyebrow--center { text-align: center; }
/* Links inside an eyebrow (catalogue breadcrumb). */
.eyebrow__link { color: inherit; }
.eyebrow__link:hover { color: var(--clay-deep); }
/* An eyebrow led by a standalone brand symbol (bean = café, eye = gallery).
   The symbol is a compact marker only — the full names carry identification. */
.eyebrow--mark { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem 0.6rem; }
.brand-mark { width: auto; height: 1.6rem; flex: none; }

.lead {
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 56ch;
}

.section-head { max-width: 60ch; margin-bottom: clamp(2rem, 4vw, 2.8rem); }
.section-head h2 { margin-bottom: 0; }
.section-head h2 + .lead, .section-head h2 + p { margin-top: 1.2rem; }
.section-head .eyebrow { margin-bottom: 1.1rem; }
/* Eyebrow labels promoted to <h2> for the document outline keep the eyebrow
   size — .section-head h2 outranks .eyebrow on specificity. */
.section-head h2.eyebrow { font-size: 0.68rem; margin-bottom: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 2rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding: 0.95rem 1.4rem;
  border-radius: 0;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:hover { background: var(--terracotta-deep); border-color: var(--terracotta-deep); color: var(--paper); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
/* The old accent button modifier is retired: it renders exactly as .btn. */
.btn .arr { flex: none; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* Quiet text link: a 1px ink rule that turns clay on hover. */
.link-underline {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  transition: border-color 0.2s var(--ease);
}
.link-underline:hover { border-bottom-color: var(--terracotta); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; flex: none; }
/* Tonitza Cafe or Galeria Tonitza (both 440 units wide with 10 units of clear
   space, so sizing by width keeps "Tonitza" identical when the logo swaps).
   200px keeps "Cafe"/"Galeria" and the bean/eye legible inside the 96px
   header; never set both width and height, so the ratio can't be distorted. */
.brand__logo { width: 200px; height: auto; }

.nav { display: flex; align-items: center; gap: clamp(1.1rem, 2.4vw, 2.2rem); }
.nav a {
  font-size: 0.8rem;
  line-height: 1.2;
  padding: 0.4rem 0 0.3rem;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}
.nav a:hover { border-bottom-color: var(--line); }
/* "You're somewhere in this section": a hairline; the exact page gets clay. */
.nav a.is-section { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--terracotta); }

/* Language switch — two tracked text options. The inactive one reads dimmed
   (the brief's 55% opacity is held at --ink-soft so it still measures AA). */
.lang-switch { display: inline-flex; align-items: center; gap: 0.9rem; margin-left: 0.4rem; }
.lang-switch__opt {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1;
  padding: 0.45rem 0 0.3rem;
  border-bottom: 1px solid transparent;
  color: var(--ink-soft);
}
a.lang-switch__opt:hover { color: var(--ink); border-bottom-color: var(--line); }
.lang-switch__opt.is-active { color: var(--ink); border-bottom-color: var(--ink); cursor: default; }
/* The small painted flag beside each code (decorative; the code is the label). */
.lang-switch__opt { display: inline-flex; align-items: center; gap: 0.4rem; }
.flag { width: 16px; height: 16px; flex: none; }
.lang-switch__opt:not(.is-active) .flag { opacity: 0.75; }
/* This page has no translation in the other language yet — dimmed, not a link. */
.lang-switch__opt.is-unavailable { opacity: 0.5; cursor: not-allowed; }

.nav-toggle { display: none; }

/* ---------- Cards / grids / entries ---------- */
.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
/* min() keeps a track from ever exceeding a narrow container (320px phones). */
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }

/* An entry: rule-topped, never boxed. Media (if any) → eyebrow/meta → title → one line. */
.entry { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.entry h3 { margin: 0.3rem 0 0.4rem; }

.card {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
}
.card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
  background: var(--paper-3);
  margin-bottom: 1.1rem;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.card__body h3 { font-size: 1.5rem; margin: 0; }
.card__meta {
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0;
}

/* Placeholder ground when a page has no photograph: a flat field with the
   boy emblem resting at its centre (the one place the signature repeats). */
.field {
  position: relative;
  isolation: isolate;
  width: 100%; height: 100%;
  background: var(--paper-3);
}
.field::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: url("../images/brand/emblem.9ebee235871b.svg") center / 88px auto no-repeat;
  opacity: 0.4;
  pointer-events: none;
}

/* Neutral artwork field: the work is shown complete on a quiet ground, never
   cropped, never tinted, no shadow. Give it a height or aspect-ratio in use. */
.art-field {
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-3);
  padding: clamp(1rem, 3vw, 2.2rem);
  overflow: hidden;
}
.art-field img, .art-field picture { width: 100%; height: 100%; object-fit: contain; }
.art-field picture img { object-fit: contain; }

/* ---------- Status tags ---------- */
.status-tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  padding: 0.38rem 0.55rem 0.32rem;
  border: 1px solid transparent;
  border-radius: 0;
  color: var(--ink);
}
.status-tag--current { background: var(--clay); border-color: var(--clay); color: var(--paper); }
.status-tag--upcoming { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.status-tag--past, .status-tag--nfs { background: var(--paper-3); border-color: var(--paper-3); color: var(--ink); }
.status-tag--available, .status-tag--confirmed { background: transparent; border-color: var(--ink); color: var(--ink); }
/* Warning states: an ochre tint + ochre border, ink text. Solid ochre under
   ink only reaches ~3.1:1; the 28% tint keeps the text at ~6.5:1. */
.status-tag--reserved, .status-tag--pending { background: color-mix(in srgb, var(--ochre) 28%, var(--paper)); border-color: var(--ochre); color: var(--ink); }
.status-tag--sold { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.status-tag--declined, .status-tag--cancelled { background: var(--paper-3); border-color: var(--paper-3); color: var(--ink); }


/* ---------- Split (about / story / contact) ---------- */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.split__art { aspect-ratio: 4/5; overflow: hidden; background: var(--paper-3); }
.split__art img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Story page (About): a touch narrower art column so the heading leads. */
.split--story { grid-template-columns: 1.2fr 0.8fr; align-items: center; }

/* ---------- Visit / hours ---------- */
/* Live "Open now / opens at" reading above the hours list (see
   SiteSettings.opening_status). Open = ink; closed = the functional ochre dot,
   so the state never rides on hue alone (the text says it too). */
.open-status {
  display: flex; align-items: center; gap: 0.55rem;
  margin: 0 0 0.9rem;
  font-size: 0.9rem; font-weight: 500;
}
.open-status__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.open-status--open { color: var(--ink); }
.open-status--open .open-status__dot { background: var(--ink); }
.open-status--closed { color: var(--ink-soft); }
.open-status--closed .open-status__dot { background: var(--ochre); }
/* On the footer's olive ground: paper for open, paper at 70% for closed. */
.site-footer .open-status--open { color: var(--paper); }
.site-footer .open-status--open .open-status__dot { background: var(--paper); }
.site-footer .open-status--closed { color: color-mix(in srgb, var(--paper) 82%, var(--ink)); }
.site-footer .open-status--closed .open-status__dot { background: var(--ochre); }

/* "Add to calendar" links in an event's details aside. */
.cal-links__row { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; margin: 0; }

.hours { list-style: none; margin: 0; padding: 0; }
.hours li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.55rem 0; border-bottom: 1px solid var(--line);
}
.hours li:last-child { border-bottom: 0; }
.hours .day { font-weight: 500; }
.hours .time { color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* Rule-separated definition rows (visit details: dt eyebrow, dd 1rem). */
.detail-rows { margin: 0; }
.detail-rows > div { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.detail-rows dt { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; line-height: 1.6; }
.detail-rows dd { margin: 0.4rem 0 0; font-size: 1rem; }

/* ---------- Map click-to-load (privacy) ---------- */
.map-consent {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
}
.map-consent__inner {
  max-width: 30ch;
  text-align: center;
  padding: 1.5rem;
}
.map-consent__inner p { color: var(--ink); font-size: 0.92rem; }
.map-consent__alt { margin-top: 0.8rem; }
.map-consent__alt a { font-size: 0.85rem; }
.map-consent iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Prose (streamfield / rich text) ---------- */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem); margin-top: 2.4rem; }
.prose h3 { font-size: 1.4rem; margin-top: 1.8rem; }
.prose img { margin-block: 1.6rem; }
.prose figure { margin: 1.8rem 0; }
.prose figcaption { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.5rem; }
.prose blockquote {
  margin: 1.8rem 0;
  padding-left: 1.4rem;
  border-left: 1px solid var(--terracotta);
  font-family: var(--serif);
  font-size: 1.3rem;
  font-style: italic;
  font-variation-settings: "opsz" 32;
}
.prose blockquote cite { display: block; font-size: 0.85rem; font-style: normal; font-family: var(--sans); color: var(--ink-soft); margin-top: 0.6rem; }
.prose a { color: var(--clay-deep); text-decoration: underline; text-underline-offset: 3px; }
/* The CTA block renders as a .btn inside .prose: keep it a button, not a clay link. */
.prose a.btn { color: var(--paper); text-decoration: none; }

/* ---------- Display pull-quote (the `quote` StreamField block) ---------- */
/* Large italic Fraunces after a short clay rule. The .prose .pullquote (0,2,0)
   pair out-specifies .prose blockquote (0,1,1). */
.prose .pullquote {
  margin: clamp(2rem, 4vw, 3rem) 0;
  padding: 0;
  border-left: 0;
  max-width: 36ch;
}
.prose .pullquote::before {
  content: "";
  display: block;
  width: 2.6rem;
  height: 1px;
  margin-bottom: 1.2rem;
  background: var(--terracotta);
}
.prose .pullquote p {
  font-family: var(--serif);
  font-optical-sizing: none;
  font-variation-settings: "opsz" 32;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.7rem, 1.1rem + 2.4vw, 2.8rem);
  line-height: 1.14;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.prose .pullquote cite {
  display: block;
  margin-top: 0.9rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Story page (About): drop cap ---------- */
/* Fraunces clay initial on the opening paragraph. Scoped to .page-story so it
   never leaks into the home About teaser / contact prose. Covers both a
   paragraph-led body and a heading-then-paragraph body. */
.page-story .prose > .block-paragraph:first-child p:first-of-type::first-letter,
.page-story .prose > .block-heading:first-child + .block-paragraph p:first-of-type::first-letter {
  float: left;
  font-family: var(--serif);
  font-optical-sizing: none;
  font-variation-settings: "opsz" 32;
  font-weight: 400;
  color: var(--terracotta);
  font-size: 3.8em;
  line-height: 0.78;
  padding-right: 0.08em;
  margin-top: 0.04em;
}

/* Image gallery StreamField block. */
.gallery { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gallery figcaption { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.5rem; }

/* Small tracked subheading used in asides (lot page, event details). */
.lot__subhead {
  font-family: var(--sans); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; line-height: 1.6; color: var(--ink);
  margin: 0 0 0.8rem;
}

/* ---------- Forms (booking, enquiry) ---------- */
.booking-form { max-width: 760px; }
.hp-wrap { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.bk-banner { padding: 1rem 1.2rem; margin-bottom: 1.6rem; background: var(--paper-2); border: 1px solid var(--ink); }
.bk-banner p { margin: 0; }
.bk-banner--error { border-color: var(--clay-deep); color: var(--clay-deep); }
.bk-banner--ok { border-color: var(--ink); color: var(--ink); }

/* The artwork enquiry folds away behind the "Enquire to purchase" button — a
   native <details>, so it needs no JS and reopens itself (template adds [open])
   when a failed POST returns errors. Field styling rides on .booking-form. */
.enquiry__summary { cursor: pointer; list-style: none; }
.enquiry__summary::-webkit-details-marker { display: none; }
.enquiry[open] .enquiry__summary .arr { transform: rotate(90deg); }
.enquiry__form { margin-top: 1.1rem; display: grid; gap: 1rem; }
.enquiry__form .bk-field { margin: 0; }

.bk-group { border: 0; margin: 0 0 1.7rem; padding: 0; }
.bk-group legend {
  font-family: var(--sans); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; line-height: 1.6; color: var(--ink);
  padding: 0; margin-bottom: 0.9rem;
}
.bk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem 1.2rem; }

.bk-field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.bk-field--wide { margin-top: 1rem; }
.bk-field label { font-size: 0.86rem; font-weight: 500; color: var(--ink); }
.bk-req { color: var(--clay-deep); }

.booking-form input,
.booking-form select,
.booking-form textarea {
  width: 100%;
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0.7rem 0.85rem;
  transition: border-color 0.2s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.booking-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234f5944' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.8rem center; padding-right: 2.2rem;
}
.booking-form textarea { resize: vertical; line-height: 1.6; }
.booking-form input:focus,
.booking-form select:focus,
.booking-form textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: none;
}
.booking-form option.is-taken { color: var(--ink-soft); text-decoration: line-through; }
.bk-field.has-error input,
.bk-field.has-error select,
.bk-field.has-error textarea { border-color: var(--clay-deep); }
.bk-hint { font-size: 0.82rem; color: var(--ink-soft); margin: 0; }
.bk-error { font-size: 0.84rem; color: var(--clay-deep); margin: 0; font-weight: 500; }

/* ---------- Page header band ---------- */
.page-head { padding-block: clamp(2.8rem, 5.5vw, 4.6rem) clamp(1.8rem, 3.5vw, 3rem); }
.page-head .eyebrow { margin-bottom: 1.5rem; }
.page-head h1 { margin-bottom: 0; }
.page-head .lead { margin-top: 1.4rem; max-width: 540px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(3rem, 6vw, 4.5rem) 1.6rem;
  position: relative; z-index: 1;
}
.site-footer a { color: var(--paper); }
.site-footer .link-underline { color: var(--paper); border-bottom-color: color-mix(in srgb, var(--paper) 45%, transparent); }
.site-footer .link-underline:hover { border-bottom-color: var(--paper); }
.footer-brand { margin-bottom: clamp(2.2rem, 5vw, 3.4rem); }
.footer-brand__link { display: block; }
/* The pair: both logos in cream (the -light files) straight on the olive,
   divided by a hairline. The two files share one width, so equal widths give
   the shared "Tonitza" one size. */
.footer-brand__pair {
  display: inline-flex; align-items: center; flex-wrap: wrap;
  gap: 1.4rem clamp(1.6rem, 4vw, 3rem);
  max-width: 100%;
  margin-left: -0.6rem; /* the artwork's built-in clear space; aligns the ink with the column */
}
.footer-brand__pair > * + * { padding-left: clamp(1.6rem, 4vw, 3rem); border-left: 1px solid color-mix(in srgb, var(--paper) 25%, transparent); }
.footer-brand__logo { width: 232px; max-width: 100%; height: auto; }
.footer-brand__sub {
  margin: 0.9rem 0 0;
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 1.6;
  opacity: 0.82;
}
.footer-tagline { max-width: 34ch; margin: 1.2rem 0 0; font-size: 0.92rem; opacity: 0.85; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-top: 2.2rem;
  border-top: 1px solid color-mix(in srgb, var(--paper) 18%, transparent);
}
.footer-grid h2 {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.6;
  opacity: 0.82; /* on the #4f5944 olive, paper at 72% is 4.1:1; 82% clears AA (~4.8:1) */
  margin: 0 0 1rem;
}
.site-footer address { font-style: normal; font-size: 0.92rem; line-height: 1.8; }
.site-footer address a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-hours { font-size: 0.88rem; }
.footer-hours li { border-bottom-color: color-mix(in srgb, var(--paper) 18%, transparent); }
.footer-hours .day { color: var(--paper); }
.footer-hours .time { color: color-mix(in srgb, var(--paper) 82%, var(--ink)); }
.footer-nav a { display: inline-block; font-size: 0.92rem; line-height: 1.9; }
.footer-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-social { display: flex; gap: 1.2rem; margin: 0.9rem 0 0; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.4rem;
  border-top: 1px solid color-mix(in srgb, var(--paper) 18%, transparent);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: 0.78rem;
  color: color-mix(in srgb, var(--paper) 82%, var(--ink)); /* ~4.8:1 on the #4f5944 olive; 70% was 4.0:1 */
}

/* ---------- Lazy image settle ---------- */
/* Below-the-fold images fade onto their paper ground instead of popping in.
   Hidden only under .js (main.js marks them .is-loaded on load/error, or
   .img-instant when already cached, which skips the fade so back/forward
   visits don't shimmer). */
.js img[loading="lazy"]:not(.is-loaded) { opacity: 0; }
img[loading="lazy"].is-loaded { animation: img-settle 0.6s var(--ease); }
img[loading="lazy"].img-instant { animation: none; }
@keyframes img-settle { from { opacity: 0; } }

/* ---------- Scroll reveal ---------- */
/* Only hide reveal elements when JS can bring them back (see base.html). With
   JS off, .reveal stays at its natural, fully-visible state. */
.js .reveal {
  opacity: 0;
  transform: translateY(var(--reveal-rise, 12px));
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Above-the-fold content is never JS-gated: the first screenful (the home hero
   and any interior .page-head) — plus any explicit .reveal--instant opt-out —
   paints immediately, so the LCP heading is present at first paint instead of
   waiting on the deferred IntersectionObserver. */
.js .page-head .reveal,
.js .reveal.reveal--instant {
  opacity: 1;
  transform: none;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; z-index: 100;
  font-size: 0.8rem;
}
.skip-link:focus { top: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* The drawer toggle: the word "Menu" plus a hairline icon that crosses when open. */
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 0.65rem;
    min-height: 44px;
    background: none; border: 0; cursor: pointer;
    padding: 0.5rem 0 0.5rem 0.75rem;
    font-family: var(--sans); font-size: 0.72rem; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
  }
  .nav-toggle__icon { position: relative; width: 22px; height: 11px; flex: none; }
  .nav-toggle__icon::before,
  .nav-toggle__icon::after {
    content: ""; position: absolute; left: 0; right: 0; height: 1px;
    background: currentColor;
    transition: transform 0.3s var(--ease);
  }
  .nav-toggle__icon::before { top: 0; }
  .nav-toggle__icon::after { bottom: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { transform: translateY(5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__icon::after { transform: translateY(-5px) rotate(-45deg); }

  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    /* Cap to the visible viewport and scroll, so on a short/landscape phone the
       links + search + language switcher can't run off-bottom unreachable. */
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto; overscroll-behavior: contain;
    flex-direction: column; align-items: flex-start;
    gap: 0.4rem;
    background: var(--paper);
    padding: 1.4rem var(--gutter) 2rem;
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    /* visibility (not just transform) so the closed drawer's links, search and
       language switcher leave the keyboard tab order; its 0.4s delay hides it
       only after the slide-out finishes. */
    visibility: hidden;
    transition: transform 0.4s var(--ease), visibility 0s 0.4s;
  }
  .nav.is-open { transform: translateY(0); visibility: visible; transition-delay: 0s; }
  .nav a {
    display: flex; align-items: center; min-height: 44px;
    font-size: 1.125rem; padding: 0.4rem 0;
    border-bottom-color: transparent;
  }
  .nav a[aria-current="page"] { border-bottom-color: var(--terracotta); }
  .nav a.is-section { border-bottom-color: var(--line); }
  /* Language first in the drawer, above the links, so it's found without scrolling. */
  .nav .lang-switch { order: -1; margin: 0 0 0.6rem; padding-bottom: 0.6rem; gap: 0.6rem; border-bottom: 1px solid var(--line); align-self: stretch; }
  .lang-switch__opt { min-height: 44px; display: inline-flex; align-items: center; padding: 0.5rem 0.6rem; font-size: 0.8rem; }
}

@media (max-width: 650px) {
  :root { --header-h: 76px; }
  .brand__logo { width: 164px; }
  .footer-brand__logo { width: 190px; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  /* Phones: stack the pair, the hairline turning horizontal. */
  .footer-brand__pair { display: flex; flex-direction: column; align-items: flex-start; }
  .footer-brand__pair > * + * { padding: 1.2rem 0 0; border-left: 0; border-top: 1px solid color-mix(in srgb, var(--paper) 25%, transparent); align-self: stretch; }
  /* A serif title beside its meta squeezes at phone width: stack the pair. */
  .search-result__link { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
  .search-result__arrow { display: none; }
}

/* ---------- Utilities / helpers ----------
   Small, reusable classes that replace what used to be inline `style="…"`
   attributes scattered through the templates. Keeping them here keeps the
   markup clean and lets a strict Content-Security-Policy drop `style-src
   'unsafe-inline'` if desired. */

/* Reveal stagger: children of a .stagger animate in 0.1s steps, replacing
   per-element inline --delay values in card grids. */
.stagger > *:nth-child(2) { --delay: 0.1s; }
.stagger > *:nth-child(3) { --delay: 0.2s; }
.stagger > *:nth-child(4) { --delay: 0.3s; }
.stagger > *:nth-child(5) { --delay: 0.4s; }
.stagger > *:nth-child(6) { --delay: 0.5s; }
.stagger > *:nth-child(7) { --delay: 0.6s; }
.stagger > *:nth-child(8) { --delay: 0.7s; }
.stagger > *:nth-child(9) { --delay: 0.8s; }

/* Fixed reveal delays for stacked page headers (eyebrow → h1 → lead → meta). */
.d1 { --delay: 0.05s; }
.d2 { --delay: 0.1s; }
.d3 { --delay: 0.15s; }
.d4 { --delay: 0.2s; }
.d5 { --delay: 0.3s; }

/* Small sans-serif uppercase subheading used in asides and contact blocks. */
.subhead {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.6;
  font-variation-settings: normal;
  margin: 0 0 1rem;
}

/* Plain-cased card meta (e.g. subtitles), overriding the default uppercase. */
.card__meta--plain { text-transform: none; letter-spacing: 0; font-size: 0.9rem; }

/* Fixed-ratio media frames. */
.media { overflow: hidden; background: var(--paper-3); }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--3x4 { aspect-ratio: 3 / 4; }
.media--4x5 { aspect-ratio: 4 / 5; }
.media--4x3 { aspect-ratio: 4 / 3; }

/* An image (or element) that fills its frame. */
.cover-img { width: 100%; height: 100%; object-fit: cover; }
.u-h-full { height: 100%; }

/* A slim section, used for the "← back" links under articles. */
.section--backlink { padding-block: 2.5rem; }

/* Address rendered as plain (non-italic) body text. */
.address-plain { font-style: normal; font-size: 1.05rem; line-height: 1.7; }

/* Spacing helpers. */
.mt-xs { margin-top: 0.6rem; }
.mt-sm { margin-top: 1rem; }
.mt-md { margin-top: 1.2rem; }
.mt-lg { margin-top: 2rem; }
.mb-lg { margin-bottom: 2rem; }

/* Centered, narrow column (error pages). */
.u-center { text-align: center; }
.u-center-x { margin-inline: auto; }
.u-measure { max-width: 50ch; margin-inline: auto; }

/* ---------- Search ---------- */
/* Accessible label/status that's hidden visually but read by screen readers. */
.nav-search__label,
.search-form__label,
.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* Compact header search — a plain magnifier glyph; the field opens on focus
   (pure CSS :focus-within, so it works with JS off — the magnifier is a
   <label> that focuses the input). The glyph sits on the right, next to the
   language switch, so the field grows leftward and the glyph stays put. */
.nav-search { position: relative; display: inline-flex; align-items: center; }
.nav-search__toggle {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem;
  margin-right: -0.55rem;
  border: 0; background: none;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.2s var(--ease);
}
.nav-search__toggle svg { width: 1.15rem; height: 1.15rem; }
.nav-search__toggle:hover,
.nav-search:focus-within .nav-search__toggle { color: var(--clay); }
.nav-search__input {
  width: 0; padding: 0; margin: 0;
  font-family: var(--sans); font-size: 0.85rem; color: var(--ink);
  background: var(--white);
  border: 1px solid transparent; border-radius: 0;
  opacity: 0; pointer-events: none;
  -webkit-appearance: none; appearance: none;
  transition: width 0.3s var(--ease), opacity 0.2s var(--ease),
    padding 0.3s var(--ease), margin 0.3s var(--ease);
}
.nav-search__input::-webkit-search-cancel-button,
.nav-search__input::-webkit-search-decoration { -webkit-appearance: none; }
.nav-search__input::placeholder { color: var(--ink-soft); }
.nav-search:focus-within .nav-search__input {
  width: 12rem; opacity: 1; pointer-events: auto;
  padding: 0.45rem 0.75rem; margin-right: 0.35rem;
  border-color: var(--ink);
}

/* Search-as-you-type dropdown under the header field (filled by main.js from
   the suggest endpoint; [hidden] and empty until there's something to show).
   Anchored to the form on desktop; the mobile drawer lays it out in flow. */
.nav-search__suggest {
  position: absolute;
  top: calc(100% + 0.6rem); right: 0;
  width: min(22rem, 82vw);
  max-height: min(28rem, 70vh);
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.35rem;
  z-index: 60;
}
.suggest-list { list-style: none; margin: 0; padding: 0; }
.suggest-list__link {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 0.55rem 0.75rem;
  transition: background 0.15s var(--ease);
}
.suggest-list__link:hover,
.suggest-list__link:focus-visible { background: var(--paper-2); }
.suggest-list__title { font-size: 0.92rem; min-width: 0; }
.suggest-list__label {
  flex: none;
  font-size: 0.62rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft);
}
.suggest-list__all {
  border-top: 1px solid var(--line);
  margin-top: 0.35rem; padding-top: 0.35rem;
}
.suggest-list__all .suggest-list__title { color: var(--clay-deep); font-weight: 500; }

/* Full search page form — one square white field: leading magnifier glyph, a
   borderless input that fills the bar, and an ink submit button. */
.search-form { position: relative; margin-top: 1.5rem; max-width: 36rem; }
.search-field {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.35rem 0.4rem 0.35rem 1rem;
  transition: border-color 0.2s var(--ease);
}
.search-field:focus-within { border-color: var(--ink); }
.search-field__icon { flex: none; width: 1.15rem; height: 1.15rem; color: var(--ink-soft); }
.search-field:focus-within .search-field__icon { color: var(--ink); }

/* Search-as-you-type spinner text. Hidden by default — HTMX injects the rules
   that fade it in during a request and out after — and it stays hidden with JS
   off. Positioned below the field so it never shifts the layout. */
.search-indicator {
  position: absolute; top: 100%; inset-inline-start: 1rem; margin-top: 0.55rem;
  font-size: 0.82rem; color: var(--ink-soft);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s var(--ease);
}
.search-form__input {
  flex: 1; min-width: 0;
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: transparent; border: 0;
  padding: 0.6rem 0;
  -webkit-appearance: none; appearance: none;
}
.search-form__input:focus { outline: none; }
.search-form__input::placeholder { color: var(--ink-soft); }
/* Drop the native clear "×" so the field stays clean. */
.search-form__input::-webkit-search-cancel-button,
.search-form__input::-webkit-search-decoration { -webkit-appearance: none; }
.search-form__submit {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.7rem; height: 2.7rem;
  border: 0; border-radius: 0;
  background: var(--ink); color: var(--paper);
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.search-form__submit:hover { background: var(--terracotta-deep); }
.search-form__submit svg { width: 1.1rem; height: 1.1rem; }

/* Results: rule-separated entries. */
.search-empty { padding: 1.5rem 0 0.5rem; }
.search-summary { margin: 0 0 1.8rem; }
.search-group { margin-bottom: 2.6rem; }
.search-group .eyebrow { margin-bottom: 0.4rem; }
.search-list { list-style: none; margin: 0; padding: 0; }
.search-result { border-top: 1px solid var(--line); }
.search-result:last-child { border-bottom: 1px solid var(--line); }
.search-result__link {
  display: flex; align-items: baseline; gap: 0.9rem;
  padding: 0.95rem 0;
}
.search-result__title { font-family: var(--serif); font-variation-settings: "opsz" 32; font-size: 1.25rem; letter-spacing: -0.015em; color: var(--ink); }
.search-result__link:hover .search-result__title { color: var(--clay-deep); }
.search-result__meta { font-size: 0.85rem; color: var(--ink-soft); }
.search-result__arrow {
  margin-inline-start: auto; align-self: center;
  font-size: 1rem; color: var(--clay);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.search-result__link:hover .search-result__arrow { opacity: 1; }
.search-result > .search-result__title { display: block; padding: 0.85rem 0 0.1rem; }
.search-result > .search-result__meta { display: block; padding-bottom: 0.85rem; }

@media (max-width: 820px) {
  /* In the mobile drawer there's room, so the field is always open and
     full-width with the magnifier as a static leading icon — no reveal. */
  .nav-search { width: 100%; gap: 0.5rem; margin-top: 0.6rem; }
  .nav-search__toggle { order: -1; width: auto; height: auto; margin: 0; color: var(--ink-soft); }
  .nav-search__input,
  .nav-search:focus-within .nav-search__input {
    flex: 1; width: auto; min-width: 0; margin: 0; opacity: 1; pointer-events: auto;
    min-height: 44px;
    padding: 0.55rem 0.9rem; border-color: var(--line);
  }
  .nav-search:focus-within .nav-search__input { border-color: var(--ink); }

  /* In the drawer the dropdown joins the flow full-width under the field. */
  .nav-search { flex-wrap: wrap; }
  .nav-search__suggest {
    position: static;
    flex: 1 1 100%;
    width: 100%;
    max-height: 45vh;
    margin-top: 0.5rem;
  }
}

/* ---------- Print ---------- */
/* Aimed first at the menu ("can I have a printable menu?") but sane on every
   page: drop the chrome and interactive machinery, flatten the grounds to plain
   paper, and never let the JS-gated reveal state hide content on a printout. */
@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .btn,
  .enquiry,
  .cal-links,
  .map-consent,
  .nav-search__suggest,
  .search-form,
  aside[data-wagtail-userbar],
  #djDebug { display: none !important; }

  body { background: #fff; color: #000; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .section, .section--tight { padding-block: 0.8rem; }
  .section--paper-2 { background: transparent; }
  .page-head { padding-block: 0 0.8rem; }
}

/* ---------- Notice banner (templates/includes/notices.html) ---------- */
/* A slim line above the header: olive on the paper band for information,
   inverted (paper on olive) for closures so it can't be missed. */
.notice { background: var(--paper-2); border-bottom: 1px solid var(--line); color: var(--ink); }
.notice__text { margin: 0 auto; padding-top: 0.55rem; padding-bottom: 0.55rem; font-size: 0.85rem; line-height: 1.45; text-align: center; }
.notice--closed { background: var(--ink); border-bottom-color: var(--ink-deep); color: var(--paper); }
.notice__label { font-weight: 600; }
