/* July Hair Salon: the one shared stylesheet (T04).
   Brand values come from the julyhair skill and the brand manual v2.0 (Core, section 9)
   and are mirrored in src/brand.json; tests/brand.test.mjs checks this file against it.

   Rules the tests enforce, so please keep them:
   1. Colour codes appear ONLY in the first :root block below. Everywhere else use the names.
   2. Flat colour only: no colour fades, no drop effects behind boxes or text, no glows, no soft-focus.
   3. Text colours are set per "surface" (a block that defines --bg). A component never picks a
      palette colour itself: it uses color: var(--ink...) or a matched pair such as
      background-color: var(--btn-bg) with color: var(--btn-ink) in the same rule.
      Every text/background pair a surface defines must be on the manual's passing list.
   4. Soft pink lives only in .surface-bcnv (the BCNV page). Copper only on dark surfaces.
   5. Fonts load only from /assets/fonts/. Chinese text uses the device's own font. */

/* ---------- 1. Brand palette (the only place with colour codes) ---------- */
:root {
  --brown: #290B06;
  --cream: #FFF9F1;
  --copper: #EDA276;
  --bronze: #82532E;
  --plum: #532737;
  --pink: #F1A8C5;
}

/* ---------- 2. Fonts stored with the site ----------
   Files are copied unchanged from the brand manual folder (see OFL.txt and
   CormorantGaramond-OFL.txt next to them). One file per script subset; the browser
   fetches only the subsets a page needs. */

/* Order matters: for a letter that two files cover, the browser takes the file declared
   LAST. The Vietnamese file comes after the "latin-ext" file, so the letters both hold
   (a-breve, d-stroke, o-horn, u-horn and the like) come from the small Vietnamese file and
   a Vietnamese page does not download the large "latin-ext" file at all. */

/* Body: Montserrat (one variable file per subset covers weights 400 and 500) */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/montserrat-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/montserrat-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;
}

/* Tagline: Cormorant Garamond Italic 400 */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-latin-ext-400-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-vietnamese-400-italic.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-latin-400-italic.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;
}

/* Headlines: Josefin Sans 600 (the manual's headline font). Files from the open-font
   package @fontsource/josefin-sans 5.3.0, downloaded with Ben's approval on 27/11/2026;
   license in JosefinSans-OFL.txt. */
@font-face {
  font-family: "Josefin Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/josefin-sans-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Josefin Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/josefin-sans-vietnamese-600-normal.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Josefin Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/josefin-sans-latin-600-normal.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;
}

/* ---------- 3. Sizes, spacing, lines ---------- */
:root {
  --font-latin-head: "Josefin Sans", Arial, sans-serif;
  --font-latin-body: "Montserrat", Arial, sans-serif;
  --font-latin-tagline: "Cormorant Garamond", Georgia, serif;
  /* Chinese: the device's own font, no font file of ours */
  --font-zh: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;

  /* Type sizes in rem so the reader's larger-text setting is respected.
     Manual: body 15-17 px with line height 1.6, caption 12-13 px, never under 11 px. */
  --text-body: 1rem;
  --text-lead: 1.125rem;
  --text-small: 0.8125rem;
  --text-label: 0.75rem;
  --text-h1: clamp(2rem, 1.2rem + 3.6vw, 3.5rem);
  --text-h2: clamp(1.5rem, 1.25rem + 1.2vw, 2rem);
  --text-h3: clamp(1.125rem, 1.05rem + 0.4vw, 1.25rem);
  --text-tagline: clamp(1.375rem, 1.2rem + 0.9vw, 1.75rem);
  --leading-body: 1.6;
  --leading-head: 1.25;
  --head-spacing: 0.08em;

  /* Spacing scale (4 px steps at the default text size) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --gutter: 1.25rem;
  --page-width: 68rem;
  --text-width: 38rem;

  /* Lines and corners (manual: thin 1 px lines; 4-6 px buttons, 10 px cards) */
  --line-width: 1px;
  --focus-width: 2px;
  --radius-button: 6px;
  --radius-card: 10px;
  --tap-min: 3rem;
}

/* ---------- 4. Language: which fonts a text uses ---------- */
:root,
:lang(vi),
:lang(en) {
  --font-head: var(--font-latin-head);
  --font-body: var(--font-latin-body);
  --font-tagline: var(--font-latin-tagline);
  --tagline-style: italic;
}
:lang(zh) {
  --font-head: var(--font-zh);
  --font-body: var(--font-zh);
  --font-tagline: var(--font-zh);
  --tagline-style: normal;
}
/* A piece of text marked with its own language (for example one Chinese line on a
   Vietnamese page) picks up that language's body font. */
:where([lang]) {
  font-family: var(--font-body);
}
/* ...but inside a heading, button, label or tagline it keeps that role's font. */
:is(h1, h2, h3, h4, .h1, .h2, .h3, .btn, .eyebrow) :where([lang]) {
  font-family: var(--font-head);
}
.tagline :where([lang]) {
  font-family: var(--font-tagline);
  font-style: var(--tagline-style);
}

/* ---------- 5. Surfaces: the only place text and background colours are paired ----------
   Light (the website body): cream, brown text, plum headlines, bronze details. */
:root,
.surface-cream {
  --bg: var(--cream);
  --ink: var(--brown);
  --ink-heading: var(--plum);
  --ink-accent: var(--bronze);
  --ink-link: var(--plum);
  --ink-tagline: var(--plum);
  --line: var(--bronze);
  --line-strong: var(--brown);
  --btn-bg: var(--brown);
  --btn-ink: var(--cream);
  --btnhover-bg: var(--plum);
  --btnhover-ink: var(--cream);
  background-color: var(--bg);
  color: var(--ink);
}
/* Dark (opening areas, footer): brown, cream text, copper accents. */
.surface-dark {
  --bg: var(--brown);
  --ink: var(--cream);
  --ink-heading: var(--cream);
  --ink-accent: var(--copper);
  --ink-link: var(--copper);
  --ink-tagline: var(--copper);
  --line: var(--copper);
  --line-strong: var(--cream);
  --btn-bg: var(--copper);
  --btn-ink: var(--brown);
  --btnhover-bg: var(--cream);
  --btnhover-ink: var(--brown);
  background-color: var(--bg);
  color: var(--ink);
}
/* BCNV page only: dark with soft pink accents. Never use this class on another page. */
.surface-bcnv {
  --bg: var(--brown);
  --ink: var(--cream);
  --ink-heading: var(--cream);
  --ink-accent: var(--pink);
  --ink-link: var(--pink);
  --ink-tagline: var(--pink);
  --line: var(--pink);
  --line-strong: var(--cream);
  --btn-bg: var(--pink);
  --btn-ink: var(--brown);
  --btnhover-bg: var(--cream);
  --btnhover-ink: var(--brown);
  background-color: var(--bg);
  color: var(--ink);
}

/* ---------- 6. Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  /* The brand colours are the design: ask browsers not to re-colour the page in dark mode. */
  color-scheme: only light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: var(--leading-body);
  overflow-wrap: break-word;
}
img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}
ul,
ol {
  padding-inline-start: 1.25em;
}

/* Headings */
h1,
h2,
h3,
h4,
.h1,
.h2,
.h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: var(--leading-head);
  letter-spacing: var(--head-spacing);
  color: var(--ink-heading);
  overflow-wrap: anywhere;
  text-wrap: balance;
}
h1,
.h1 {
  font-size: var(--text-h1);
  text-transform: uppercase;
}
h2,
.h2 {
  font-size: var(--text-h2);
}
h3,
h4,
.h3 {
  font-size: var(--text-h3);
}

/* Text helpers */
.lead {
  font-size: var(--text-lead);
}
.small {
  font-size: var(--text-small);
}
.muted {
  color: var(--ink-accent);
}
strong,
b {
  font-weight: 500;
}
/* Small capital label above a heading */
.eyebrow {
  font-family: var(--font-head);
  font-size: var(--text-label);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: var(--head-spacing);
  text-transform: uppercase;
  color: var(--ink-accent);
}
/* The tagline, and nothing else, uses the italic serif */
.tagline {
  font-family: var(--font-tagline);
  font-style: var(--tagline-style);
  font-weight: 400;
  font-size: var(--text-tagline);
  line-height: 1.3;
  color: var(--ink-tagline);
  text-wrap: balance;
}

/* Links */
a {
  color: var(--ink-link);
  text-decoration-line: underline;
  text-decoration-thickness: var(--line-width);
  text-decoration-color: var(--line);
  text-underline-offset: 0.2em;
}
@media (hover: hover) {
  a:hover {
    text-decoration-color: currentColor;
  }
}

/* Keyboard focus: always visible, never removed */
:focus-visible {
  outline: var(--focus-width) solid var(--line-strong);
  outline-offset: 3px;
}

/* ---------- 7. Layout ---------- */
.container {
  width: 100%;
  max-width: var(--page-width);
  margin-inline: auto;
  /* On an iPhone held sideways, stay clear of the camera notch and the round corners. */
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px));
}
/* One idea per block: each block is a section with generous space above and below */
.section {
  padding-block: var(--space-8);
}
/* Even vertical rhythm between the children of a block */
.stack > * + * {
  margin-block-start: var(--space-4);
}
.stack-loose > * + * {
  margin-block-start: var(--space-6);
}
.measure {
  max-width: var(--text-width);
}
.center {
  text-align: center;
}
.center.measure,
.center > .measure {
  margin-inline: auto;
}
/* Cards side by side on wide screens, one per row on a phone */
.grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
/* Two panels: stacked on a phone; dark left and cream right on a laptop (as on the posters) */
.split {
  display: grid;
}
.split > * {
  padding: var(--space-7) var(--gutter);
}

/* ---------- 8. Lines ---------- */
hr {
  margin: 0;
}
hr,
.rule {
  height: 0;
  border: 0;
  border-block-start: var(--line-width) solid var(--line);
}
/* The short rule under a title */
.rule-short {
  width: 3.5rem;
  height: 0;
  border: 0;
  border-block-start: var(--line-width) solid var(--line);
}
.center > .rule-short {
  margin-inline: auto;
}

/* ---------- 9. Buttons (at least 48 px tall: easy for a thumb) ---------- */
.btn {
  display: inline-flex;
  /* F03: with very large text a long label breaks onto a second line instead of pushing the page wider. */
  max-width: 100%;
  overflow-wrap: anywhere;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  padding: var(--space-3) var(--space-5);
  border: var(--line-width) solid var(--btn-bg);
  border-radius: var(--radius-button);
  background-color: var(--btn-bg);
  color: var(--btn-ink);
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: var(--head-spacing);
  text-align: center;
  text-decoration-line: none;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* A soft colour change on press and hover, only for people who have not asked for less motion */
@media (prefers-reduced-motion: no-preference) {
  .btn {
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }
}
/* Second choice next to a main button: outline only */
.btn-secondary {
  border-color: var(--line-strong);
  background-color: transparent;
  color: var(--ink);
}
.btn:active {
  border-color: var(--btnhover-bg);
  background-color: var(--btnhover-bg);
  color: var(--btnhover-ink);
}
@media (hover: hover) {
  .btn:hover {
    border-color: var(--btnhover-bg);
    background-color: var(--btnhover-bg);
    color: var(--btnhover-ink);
  }
}
.btn-block {
  display: flex;
  width: 100%;
}
/* A row of buttons: full width and stacked on a phone, side by side from tablet up */
.btn-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* ---------- 10. Cards ---------- */
.card {
  padding: var(--space-5);
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius-card);
}
.photo {
  width: 100%;
  border-radius: var(--radius-card);
}

.partner-logo {
  width: 100%;
  max-width: min(30rem, var(--text-width));
  padding: min(1rem, 3.25%);
  border-radius: var(--radius-button);
}
.partner-logo-img {
  width: 100%;
  height: auto;
  max-width: 28rem;
}
/* ---------- 11. Logo ----------
   The logo files are used exactly as they are; only the shown size is set here.
   Manual: at least 120 px wide, and 1/4 of the logo's height kept clear on every side.
   The PNG has its own see-through margin, so: shown at 168 px or wider, the artwork
   itself is at least 120 px; and a .logo-box padding of 8% of the shown width brings
   the clear space on every side to at least 1/4 of the artwork's height.
   (Worked out from the measurements in src/brand.json; a test re-checks both numbers.)
   Always: <span class="logo-box"><img class="logo" width="2938" height="2463" ...></span>,
   black file on cream, white file on dark. Size it with --logo-w on the box. */
.logo-box {
  --logo-w: 11rem;
  display: inline-block;
  flex: none;
  padding: calc(max(var(--logo-w), 168px) * 0.08);
  line-height: 0;
}
.logo {
  display: block;
  width: max(var(--logo-w, 11rem), 168px);
  min-width: 168px;
  max-width: none;
  flex: none;
  height: auto;
}
/* Large logo: 16rem where there is room, and never more than 60% of the screen's
   width, so the logo and its clear space fit a 320 px phone. The .logo rule above
   still keeps it at 168 px or wider (the manual's smallest size). */
.logo-box-large {
  --logo-w: min(16rem, 60vw);
}

/* ---------- 11b. Language switch (T05) ----------
   Three plain links at the top of every page; the page's own language is marked with
   aria-current. Each link is a full thumb-size tap area. */
.lang-switch ul {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  padding-inline: var(--space-2);
  font-family: var(--font-head);
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: var(--head-spacing);
  color: var(--ink-link);
  text-decoration-line: none;
}
.lang-switch a[aria-current] {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-thickness: var(--focus-width);
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.45em;
}
@media (hover: hover) {
  .lang-switch a:hover {
    text-decoration-line: underline;
  }
}

/* ---------- 11c. Header (T07) ----------
   Phone: logo on the left; on the right the language switch and, under it, a "menu"
   button (a <details>, no script) that opens the six page links below the header.
   Laptop (60rem and wider): the six links sit in a row and the menu button is hidden.
   The links are written twice in the page (row and menu); only one is ever shown. */
:root {
  /* Height of the closed Book bar (button + its padding); the footer keeps this much clear. */
  --bookbar-h: calc(var(--tap-min) + 2 * var(--space-2));
}
html {
  /* Keeps a link reached with the keyboard from hiding behind the Book bar. */
  scroll-padding-block-end: calc(var(--bookbar-h) + var(--space-5));
}
/* First stop for keyboard and screen-reader users; out of sight until it has focus. */
.skip-link {
  position: absolute;
  inset-block-start: var(--space-2);
  inset-inline-start: var(--space-2);
  z-index: 40;
  transform: translateY(-300%);
}
.skip-link:focus {
  transform: none;
}
.site-header {
  position: relative;
  z-index: 10;
  border-block-end: var(--line-width) solid var(--line);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  /* The logo box brings its own clear space, so it starts closer to the screen edge. */
  padding-inline-start: max(calc(var(--gutter) - 0.75rem), env(safe-area-inset-left, 0px));
}
.site-logo {
  display: block;
  flex: none;
}
.site-logo .logo-box {
  /* Capped by the screen width so the logo does not grow past half a phone screen when the text size is raised. */
  --logo-w: min(10.5rem, 44vw);
  display: block;
}
.site-header-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
  min-width: 0;
}
.site-header .lang-switch ul {
  flex-wrap: wrap;
  gap: 0; /* three 48 px links fit in one row beside the logo on a 375 px phone */
}
.site-header .lang-switch a {
  min-width: 3rem;
}
/* Phones under 375 px wide (many Android phones, the smallest iPhones): the three links are a
   little narrower (still 48 px tall) so they stay in one row. */
@media (max-width: 23.43rem) {
  .site-header .lang-switch a {
    min-width: 2.5rem;
    padding-inline: 0;
  }
}
.site-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: flex;
  align-items: center;
  min-height: var(--tap-min);
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: var(--head-spacing);
  text-transform: uppercase;
  text-decoration-line: none;
  color: var(--ink-link);
}
.site-nav a[aria-current] {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-thickness: var(--focus-width);
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.45em;
}
@media (hover: hover) {
  .site-nav a:hover {
    text-decoration-line: underline;
  }
}
.site-nav-row {
  display: none;
}
/* The menu button and the Book button are <summary> elements: hide the browser's own arrow. */
.site-menu > summary,
.book-bar > summary {
  display: block;
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.site-menu > summary .btn {
  white-space: nowrap;
}
.site-menu > summary::-webkit-details-marker,
.book-bar > summary::-webkit-details-marker {
  display: none;
}
/* The open menu: a cream panel across the page, right under the header. */
.site-nav-panel {
  position: absolute;
  inset-inline: 0;
  inset-block-start: 100%;
  padding: var(--space-2) var(--gutter) var(--space-4);
  border-block: var(--line-width) solid var(--line);
}
.site-nav-panel li + li {
  border-block-start: var(--line-width) solid var(--line);
}

/* ---------- 11d. Booking channels (T07) ----------
   <ul class="channel-list"> filled by the build with {{{channelLinks}}} (plain links) or
   {{{channelButtons}}} (large buttons). The links come from "links" in src/site.json. */
.channel-list {
  display: grid;
  gap: var(--space-2);
  padding: 0;
  list-style: none;
}
.channel-list a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  min-width: var(--tap-min);
}

/* ---------- 11e. Footer (T07) ---------- */
.site-footer {
  padding-block: var(--space-7) 0;
}
.site-footer-grid {
  display: grid;
  gap: var(--space-7) var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.site-footer address {
  font-style: normal;
}
.site-footer .channel-list {
  gap: 0;
}

/* Keep the credit visible above the fixed Book bar and the bottom safe area. */
.site-credit {
  margin-block-start: var(--space-7);
  padding-block: var(--space-4) calc(var(--space-4) + var(--bookbar-h) + env(safe-area-inset-bottom, 0px));
}
.site-credit-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}
.seal {
  display: block;
  flex: none;
  width: 1.25rem;
  height: auto;
}
.site-credit-text {
  margin: 0;
}

/* ---------- 11f. Book bar (T07) ----------
   A slim dark bar fixed to the bottom of every page with one Book button. It is a
   <details>: tapping the button opens the five channels right above it, with no script.
   It stays clear of the iPhone home bar (safe-area padding; the page's viewport tag
   has viewport-fit=cover). From laptop width it is a compact button at the bottom right. */
.book-bar {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 30;
  padding-block: var(--space-2) calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px));
  border-block-start: var(--line-width) solid var(--line);
}
.book-bar-open,
.book-bar[open] .book-bar-closed {
  display: none;
}
.book-bar[open] .book-bar-open {
  display: inline;
}
.book-bar-sheet {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 100%;
  /* Never taller than the part of the screen you can see (dvh: Safari with its bars showing). */
  max-height: calc(100vh - var(--bookbar-h) - var(--space-7));
  max-height: calc(100dvh - var(--bookbar-h) - env(safe-area-inset-bottom, 0px) - var(--space-7));
  overflow-y: auto;
  padding-block: var(--space-5) var(--space-3);
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px));
  border-block-start: var(--line-width) solid var(--line);
}
/* Very narrow phones (under 360 px): the logo on its own row, then languages and menu button. */
@media (max-width: 22.49rem) {
  .site-header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-block-end: var(--space-2);
  }
  .site-header-side {
    flex-direction: row;
    flex-wrap: wrap; /* with large text the menu button drops under the language switch */
    align-items: center;
    justify-content: space-between;
    padding-inline-start: 0.75rem;
  }
  .site-header .lang-switch {
    flex: none;
  }
}

/* ---------- 11g. Reviews page (T08) ----------
   The rating, and our own sliding banner: a row of cards that the reader swipes
   sideways. It is plain CSS (scroll-snap), so it works with script switched off;
   the numbered links under it bring any review into view. */
.rating-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-block-start: var(--space-2);
}
.rating-score {
  color: var(--ink-heading);
  font-family: var(--font-head);
  font-size: 3rem;
  font-weight: 600;
  line-height: 1;
}
.stars {
  color: var(--ink-accent);
  font-size: 1.125rem;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.rating-line .stars {
  font-size: 1.5rem;
}
.rating-count,
.rating-date {
  margin-block-start: var(--space-1);
}
.review-section {
  padding-block-end: var(--space-8);
}
.review-banner {
  /* the first card lines up with the page's text column, on a phone and on a laptop */
  --banner-pad: max(var(--gutter), calc((100% - var(--page-width)) / 2 + var(--gutter)));
  display: flex;
  gap: var(--space-4);
  margin: var(--space-5) 0;
  padding: var(--space-1) var(--banner-pad) var(--space-4);
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--banner-pad);
}
.review-card {
  position: relative; /* keeps the hidden screen-reader labels inside the card, so the page never scrolls sideways */
  display: flex;
  flex: none;
  flex-direction: column;
  gap: var(--space-3);
  width: min(82vw, 20rem);
  padding: var(--space-4);
  scroll-snap-align: start;
  scroll-margin-block-start: var(--space-5);
}
.review-card > * {
  margin: 0;
}
.review-photos-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}
.review-photo {
  margin: 0;
}
.review-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-button);
}
/* The credit and the link to the original are small text, but a full thumb tall */
.review-credit,
.review-source {
  display: block;
  min-height: 2.75rem;
  padding-block: var(--space-3);
  font-size: var(--text-small);
  line-height: 1.5;
}
.review-text {
  margin: 0;
}
.review-text p {
  margin: 0;
  overflow-wrap: anywhere;
}
.review-name {
  color: var(--ink-heading);
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: var(--head-spacing);
}
.review-card-sample {
  min-height: 12rem;
  border-style: dashed;
}
.review-notice {
  border-style: dashed;
  font-weight: 600;
}
.review-dots ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.review-dots a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap-min);
  min-height: 3rem;
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius-button);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 600;
  text-decoration-line: none;
}
/* Sliding is smooth only for people who have not asked for less motion */
@media (prefers-reduced-motion: no-preference) {
  .review-banner {
    scroll-behavior: smooth;
  }
}
@media (prefers-reduced-motion: reduce) {
  .review-banner {
    scroll-behavior: auto;
  }
}

/* ---------- 11h. Pictures, galleries, teasers (T09; the other page tickets reuse these) ----------
   .picture       every photo the build writes ({{{picture ...}}} in a page body)
   .gallery       {{{gallery interiors 10 heading-id}}}: a row to swipe sideways on a phone
                  (CSS scroll-snap, no script), columns on a laptop. ".gallery-team" stays a row.
   .teaser        one idea in a narrow, centred block: small label, title, short line, text, button.
                  ".teaser-wide" lets it use the page width; ".teaser-card" (with .card) frames it.
   .section-line  a thin line above a section
   .link-list     a list of large links with thin lines between them */
.picture {
  display: block;
  width: 100%;
  height: auto;
}
.section-line {
  border-block-start: var(--line-width) solid var(--line);
}
.steps {
  padding-inline-start: 1.5rem;
}
.steps-photo {
  margin: 0;
  max-width: 26rem;
  justify-self: center;
}
.event-photos {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}
.event-photos li {
  position: relative;
  overflow: hidden;
}
.event-photos li:first-child {
  grid-column: 1 / -1;
}
.event-photos li:first-child .event-photo,
.steps-photo .event-photo {
  display: block;
  width: 100%;
  height: auto;
}
.event-photos li:not(:first-child) {
  aspect-ratio: 4 / 5;
}
.event-photos li:not(:first-child) .event-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.service-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--space-6);
}
.teaser {
  max-width: var(--text-width);
  margin-inline: auto;
  text-align: center;
}
.teaser .rule-short {
  margin-inline: auto;
}
.teaser-wide {
  max-width: none;
}
.teaser-card {
  padding: var(--space-6) var(--space-5);
}
.teaser .rating-line {
  justify-content: center;
}
.teaser address {
  font-style: normal;
}
.teaser-quote {
  margin-block-start: var(--space-5);
  padding-block: var(--space-5);
  border-block: var(--line-width) solid var(--line);
  font-size: var(--text-lead);
}
.teaser-quote p {
  overflow-wrap: anywhere;
}
/* Contact area map */
.area-map {
  margin: 0;
  max-width: 45rem;
  margin-inline: auto;
}
.stack > .area-map {
  margin-block-start: var(--space-4);
}
.area-map-img {
  display: block;
  width: 100%;
  height: auto;
  border: var(--line-width) solid var(--line);
}
.area-map figcaption {
  margin-block-start: var(--space-2);
}
.link-list {
  display: grid;
  gap: 0 var(--space-6);
  padding: 0;
  list-style: none;
}
.link-list li {
  border-block-end: var(--line-width) solid var(--line);
}
.link-list li:first-child {
  border-block-start: var(--line-width) solid var(--line);
}
.link-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.75rem;
  padding-block: var(--space-3);
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: var(--head-spacing);
  text-transform: uppercase;
  text-decoration-line: none;
  color: var(--ink-link);
}
@media (hover: hover) {
  .link-list a:hover {
    text-decoration-line: underline;
  }
}
.gallery {
  /* the first photo lines up with the page's text column */
  --gallery-pad: max(var(--gutter), calc((100% - var(--page-width)) / 2 + var(--gutter)));
  --gallery-h: min(62vw, 16rem);
  display: flex;
  gap: var(--space-3);
  margin: var(--space-6) 0 0;
  padding: var(--space-1) var(--gallery-pad) var(--space-3);
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gallery-pad);
}
.gallery li {
  flex: none;
  scroll-snap-align: start;
}
/* Every photo keeps its own shape: same height, its own width. Nothing is cut off. */
.gallery .picture {
  width: auto;
  max-width: none;
  height: var(--gallery-h);
  border-radius: var(--radius-button);
}
/* A short row (the team photos) sits in the middle when it fits the screen. */
.gallery-team li:first-child {
  margin-inline-start: auto;
}
.gallery-team li:last-child {
  margin-inline-end: auto;
}

/* ---------- 11i. Home page (T09) ----------
   The first screen: header (logo), then the opener photo across the full width and a flat
   dark panel with the tagline and two buttons. Together they fill the screen down to the
   Book bar, on a small iPhone too. Laptop: dark panel on the left, photo on the right. */
:root {
  /* Height of the header: the logo box (10.5rem wide logo and its clear space) plus its line. */
  --header-h: 10.6rem;
  --text-tagline-large: clamp(1.375rem, 1rem + 1.8vw, 2.5rem);
}
.hero {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-h) - var(--bookbar-h));
  min-height: calc(100svh - var(--header-h) - var(--bookbar-h) - env(safe-area-inset-bottom, 0px));
}
.hero-photo {
  position: relative;
  flex: 1 1 5rem;
  min-height: 5rem;
  overflow: hidden;
}
/* The photo fills its box and is never stretched; the chairs and the lion painting stay in view. */
.hero-photo .picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
}
.hero-panel {
  flex: none;
  padding: var(--space-5) max(var(--gutter), env(safe-area-inset-left, 0px)) var(--space-5) max(var(--gutter), env(safe-area-inset-right, 0px));
  text-align: center;
}
.hero-text {
  max-width: 30rem;
  margin-inline: auto;
}
.hero-text .tagline {
  font-size: var(--text-tagline-large);
}
.hero-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-block-start: var(--space-4);
}
.hero-actions .btn {
  padding-inline: var(--space-3);
}
/* Very narrow phones (under 360 px): the header has two rows there, so it is taller. */
@media (max-width: 22.49rem) {
  :root {
    --header-h: 14.1rem;
  }
}
@media (min-width: 40rem) {
  .link-list {
    grid-template-columns: 1fr 1fr;
  }
  .link-list li:nth-child(2) {
    border-block-start: var(--line-width) solid var(--line);
  }
}
@media (min-width: 60rem) {
  .link-list {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .link-list li:nth-child(3) {
    border-block-start: var(--line-width) solid var(--line);
  }
  /* Interior gallery: four columns, each photo in its own shape */
  .gallery-interiors {
    display: block;
    columns: 4;
    column-gap: var(--space-4);
    max-width: var(--page-width);
    margin-inline: auto;
    padding-inline: var(--gutter);
    overflow-x: visible;
  }
  .gallery-interiors li {
    margin-block-end: var(--space-4);
    break-inside: avoid;
  }
  .gallery-interiors .picture {
    width: 100%;
    height: auto;
  }
  .gallery-hint {
    display: none;
  }
  .hero {
    flex-direction: row-reverse;
    min-height: min(calc(100vh - var(--header-h)), 44rem);
  }
  .hero-photo {
    flex: 1 1 50%;
  }
  .hero-panel {
    display: flex;
    flex: 1 1 50%;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--gutter);
  }
  .hero-actions {
    margin-block-start: var(--space-6);
  }
}

/* ---------- 12. Small helpers ---------- */
/* Anything inside a button keeps the button's own text colour. Every component that has
   its own background pair (--X-bg with --X-ink) needs a line like this; a test checks it. */
.btn * {
  color: inherit;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- 13. Tablet and laptop ---------- */
@media (min-width: 40rem) {
  .event-photos {
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  }
  .event-photos li:first-child {
    grid-column: auto;
  }
  .event-photos li:not(:first-child) {
    aspect-ratio: auto;
  }
  :root {
    --gutter: 2rem;
  }
  .btn-row {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .center > .btn-row,
  .btn-row.center {
    justify-content: center;
  }
}
@media (min-width: 60rem) {
  :root {
    --gutter: 3rem;
  }
  .section {
    padding-block: var(--space-9);
  }
  .split {
    grid-template-columns: 1fr 1fr;
  }
  .service-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-8);
  }
  [aria-labelledby="steps-title"] .service-layout {
    align-items: start;
  }
  .split > * {
    padding: var(--space-9) var(--gutter);
  }
  /* Header: the six links in a row, no menu button */
  .site-nav-row {
    display: block;
  }
  .site-nav-row ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0 var(--space-5);
  }
  .site-menu {
    display: none;
  }
  /* Book bar: a compact button at the bottom right; the channels open above it */
  .book-bar {
    inset-inline: auto var(--gutter);
    inset-block-end: var(--space-5);
    padding: var(--space-2);
    border: var(--line-width) solid var(--line);
    border-radius: var(--radius-card);
  }
  .book-bar > summary .btn {
    min-width: 11rem;
  }
  .book-bar-sheet {
    inset-inline: auto 0;
    inset-block-end: calc(100% + var(--space-2));
    width: 20rem;
    padding: var(--space-5);
    border: var(--line-width) solid var(--line);
    border-radius: var(--radius-card);
  }
}
