/* ============================================================================
   Heritage-site pages (/culture/<slug>) — ONE stylesheet, all five brands
   ============================================================================
   Generated pages: scripts/gen-culture-pages.py writes the markup (.hsp-*),
   this file styles it, built into dist/<brand>/culture-site.css with the
   brand's tokens. Loaded ONLY by those 151 pages, after styles.v2.css, whose
   brand tokens (--green, --sand, --sand-dark, --terracotta-text …) it reads.

   Redesigned 2026-09-25 after the owner's "it looks pretty messy": the page
   was one 760px column of twenty stacked <h2>s, a 3,400-character narration
   in one paragraph, one photo, and the audio card half-way down. Now:
     - photo hero with the title, period, stage link and the "audio is in the
       app" badge — all inside the first phone screen;
     - the breadcrumb and Back BELOW the fixed navbar (it used to be drawn
       under it), sized by --announcement-h + --navbar-h, both measured by
       common.js;
     - a standfirst, an "At a glance" card and an "On this page" index — a
       sticky sidebar from 1024px, inline cards on a phone;
     - the audio card straight after the intro: stacked on a phone, QR only
       on desktop (a phone cannot scan its own screen);
     - prose in ~3-sentence paragraphs at ~70 characters a line, three group
       headings over the long sections, the script and FAQ collapsed;
     - "Nearby on the route" as photo cards (images the site already ships).
   Mobile-first; every size is on the spacing scale below.

   Accessibility: every text colour here clears WCAG AA on its own ground
   (measured: --hsp-accent 4.92-8.65:1 on the page, white on the hero scrim
   >= 5.7:1 over a pure-white photo); focus is always visible; motion is
   opt-in (prefers-reduced-motion); nothing changes size after first paint
   (Back is server-rendered, images carry width/height).
   ========================================================================= */

.hsp-page {
  /* AA on the page (#faf7f2) and on white for every brand — francigena's
     --green (#B05C30) is 4.45:1 on the page, so text uses the brand's
     GREEN_ON_SAND token (#a6562d there, 4.92:1) instead. */
  --hsp-accent: #2D5016;
  --hsp-bg: #faf7f2;
  --hsp-card: #ffffff;
  --hsp-line: var(--sand-dark, #e8dfd2);
  --hsp-text: #2b2b2b;
  --hsp-muted: #5f6368;
  --hsp-top: calc(var(--announcement-h, 0px) + var(--navbar-h, 65px));
  --hsp-radius: 14px;
  /* spacing scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  background: var(--hsp-bg);
  color: var(--hsp-text);
}

.hsp-wrap { max-width: 1120px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

/* ---- breadcrumb + Back: below the fixed navbar -------------------------- */
.hsp-page .hsp-crumbs {
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(var(--hsp-top) + var(--s3)) 20px var(--s3);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3);
  font-size: 13px; line-height: 1.5; color: var(--hsp-muted);
}
.hsp-crumbs .hsp-trail { min-width: 0; }
.hsp-crumbs .hsp-trail a { color: var(--hsp-accent); text-decoration: underline; text-underline-offset: 2px; }
.hsp-crumbs [aria-current="page"] { color: var(--hsp-text); }
/* The server-rendered Back. Same box as the one common.js injects elsewhere,
   so nothing moves if that stylesheet arrives later; the gap replaces its
   margin. */
.hsp-crumbs .lw-back-btn {
  display: inline-flex !important; align-items: center; gap: 5px;
  margin: 0; padding: 6px 12px 6px 9px; min-height: 32px;
  background: #fff !important; border: 1px solid var(--hsp-line) !important;
  border-radius: 999px !important; font-size: 0.82rem; font-weight: 600; line-height: 1;
  color: var(--hsp-accent) !important; text-decoration: none !important;
}
.hsp-crumbs .lw-back-btn:hover { border-color: var(--hsp-accent) !important; }
.hsp-crumbs .lw-back-btn-arrow { font-size: 1.05rem; font-weight: 700; }

/* ---- hero ---------------------------------------------------------------- */
.hsp-hero {
  position: relative;
  display: flex; align-items: flex-end;
  min-height: 300px;
  background: #2b2418;
  color: #fff;
  overflow: hidden;
}
.hsp-hero-media, .hsp-hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.hsp-hero-media img { object-fit: cover; }
/* The scrim: light at the top so the photo reads, >= 0.62 black where the
   text sits — white text clears 5.7:1 even over a white sky. */
.hsp-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.10) 0%, rgba(0,0,0,.45) 38%, rgba(0,0,0,.72) 100%);
}
.hsp-hero-inner {
  position: relative; z-index: 1; width: 100%;
  padding-top: var(--s7); padding-bottom: var(--s5);
}
.hsp-eyebrow {
  margin: 0 0 var(--s2);
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.92);
}
.hsp-hero h1 {
  margin: 0 0 var(--s3);
  font-family: 'Playfair Display', Georgia, serif; font-weight: 700;
  font-size: clamp(2rem, 6.4vw, 3.4rem); line-height: 1.1; letter-spacing: -.01em;
  color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.45);
  overflow-wrap: anywhere;
}
.hsp-meta { list-style: none; margin: 0 0 var(--s4); padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.hsp-pill {
  display: inline-flex; align-items: center; min-height: 32px;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(0,0,0,.38); border: 1px solid rgba(255,255,255,.34);
  font-size: .86rem; font-weight: 600; line-height: 1.3; color: #fff;
}
a.hsp-pill-link { text-decoration: underline; text-decoration-color: rgba(255,255,255,.6); text-underline-offset: 3px; }
a.hsp-pill-link:hover { background: rgba(0,0,0,.55); border-color: #fff; }
.hsp-audio-badge {
  display: inline-flex; align-items: center; gap: var(--s2);
  min-height: 44px; padding: 10px 18px;
  border-radius: 999px; background: #fff; color: var(--hsp-accent);
  font-weight: 700; font-size: .95rem; line-height: 1.3; text-decoration: none;
  box-shadow: 0 6px 22px rgba(0,0,0,.22);
}
.hsp-audio-badge:hover { background: var(--sand, #f5f0e8); }
.hsp-audio-badge-icon { font-size: 1.15rem; line-height: 1; }

/* ---- layout: standfirst, sidebar, main ----------------------------------- */
.hsp-layout {
  display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "lead" "side" "main";
  row-gap: var(--s5);
  padding-top: var(--s5); padding-bottom: var(--s7);
}
.hsp-standfirst {
  grid-area: lead; margin: 0; max-width: 42rem;
  font-size: 1.14rem; line-height: 1.6; color: #1f1f1f; font-weight: 500;
}
.hsp-side { grid-area: side; display: grid; gap: var(--s4); align-content: start; }
.hsp-main { grid-area: main; min-width: 0; }

.hsp-box {
  background: var(--hsp-card); border: 1px solid var(--hsp-line);
  border-radius: var(--hsp-radius); padding: var(--s4) 18px;
}
.hsp-box h2 {
  margin: 0 0 var(--s3);
  font-family: 'Inter', system-ui, sans-serif; font-size: .78rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--hsp-muted);
}
.hsp-glance dl { margin: 0; display: grid; gap: var(--s3); }
.hsp-fact { display: grid; grid-template-columns: 6.25rem minmax(0, 1fr); gap: var(--s3); }
.hsp-fact dt { font-size: .86rem; font-weight: 600; color: var(--hsp-muted); }
.hsp-fact dd { margin: 0; font-size: .95rem; line-height: 1.45; color: var(--hsp-text); }
.hsp-fact a { color: var(--hsp-accent); text-decoration: underline; text-underline-offset: 2px; }

/* "On this page": wrapped chips on a phone, a list in the sidebar */
.hsp-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.hsp-toc a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px;
  border-radius: 999px; background: var(--hsp-bg); border: 1px solid var(--hsp-line);
  font-size: .88rem; font-weight: 600; line-height: 1.3; color: var(--hsp-accent); text-decoration: none;
}
.hsp-toc a:hover { border-color: var(--hsp-accent); }

/* ---- prose ------------------------------------------------------------------ */
.hsp-main p, .hsp-main li { max-width: 70ch; }
.hsp-main p { margin: 0 0 var(--s4); font-size: 1.0625rem; line-height: 1.75; color: #333; }
.hsp-intro p { font-size: 1.0625rem; }
/* styles.v2.css strips underlines site-wide; a link inside running text has
   to be told apart by more than colour (WCAG 1.4.1 — axe link-in-text-block). */
.hsp-main a { color: var(--hsp-accent); text-underline-offset: 2px; }
.hsp-main p a, .hsp-main li a { text-decoration: underline; }

.hsp-section { margin-top: var(--s7); scroll-margin-top: calc(var(--hsp-top) + var(--s4)); }
.hsp-section > h2 {
  margin: 0 0 var(--s4); padding-bottom: var(--s2);
  font-family: 'Playfair Display', Georgia, serif; font-weight: 700;
  font-size: clamp(1.45rem, 3.6vw, 1.85rem); line-height: 1.2; color: var(--hsp-accent);
  border-bottom: 2px solid var(--hsp-line);
}
.hsp-sub { padding-top: var(--s4); }
.hsp-sub + .hsp-sub { margin-top: var(--s2); border-top: 1px solid var(--hsp-line); }
.hsp-main h3 {
  margin: 0 0 var(--s2);
  font-family: 'Inter', system-ui, sans-serif; font-size: 1.1rem; font-weight: 700; line-height: 1.35;
  color: #1f1f1f;
}

.hsp-list {
  list-style: none; margin: 0; padding: var(--s1) 0;
  background: var(--hsp-card); border: 1px solid var(--hsp-line); border-radius: var(--hsp-radius);
}
.hsp-list li {
  position: relative; padding: var(--s3) var(--s4) var(--s3) 42px;
  font-size: 1rem; line-height: 1.6; color: #333;
}
.hsp-list li + li { border-top: 1px solid var(--hsp-line); }
.hsp-list li::before {
  position: absolute; left: 16px; top: 13px; width: 16px; text-align: center;
  font-weight: 700; color: var(--hsp-accent);
}
.hsp-list-star li::before { content: "\2726"; }
.hsp-list-dot li::before { content: "\2022"; font-size: 1.3rem; top: 8px; }

/* ---- the audio card ----------------------------------------------------------- */
.hsp-audio {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s3) var(--s4);
  align-items: start;
  margin: var(--s5) 0 0; padding: var(--s5);
  background: var(--hsp-card); border: 1px solid var(--hsp-line);
  border-left: 5px solid var(--hsp-accent); border-radius: var(--hsp-radius);
  box-shadow: 0 6px 24px rgba(0,0,0,.05);
  scroll-margin-top: calc(var(--hsp-top) + var(--s4));
}
.hsp-audio-icon { font-size: 1.7rem; line-height: 1.2; }
.hsp-audio-copy { min-width: 0; }
.hsp-audio-copy p { margin: 0 0 var(--s2); font-size: .98rem; line-height: 1.6; color: #444; }
.hsp-main .hsp-audio-copy .hsp-audio-title {
  margin: 0 0 var(--s1); font-size: 1.08rem; font-weight: 700; line-height: 1.35; color: #1f1f1f;
}
/* On a phone the actions take their own full-width row under the copy. */
.hsp-audio-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); }
.hsp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; min-height: 48px; padding: 12px 20px;
  border-radius: 12px; background: var(--hsp-accent); color: #fff !important;
  font-weight: 700; font-size: 1rem; line-height: 1.25; text-decoration: none; text-align: center;
}
.hsp-btn:hover { filter: brightness(0.9); }
/* The QR is hidden until the desktop rule below shows it. The copy says "Scan"
   only beside a QR and "Tap the button below" everywhere else, so the two
   variants are switched in the SAME two rules as the QR — one breakpoint, never
   two that could drift apart. display:none also takes the unseen variant out of
   the accessibility tree, so a screen reader hears one. */
.hsp-qr, .hsp-audio-copy .hsp-audio-scan { display: none; }

/* ---- the narration script + FAQ: collapsed ------------------------------------ */
.hsp-main .hsp-guide-meta { font-size: .92rem; color: var(--hsp-muted); margin-bottom: var(--s1); }
.hsp-main .hsp-guide-intro { font-size: .95rem; color: #555; }
.hsp-script, .hsp-lang, .hsp-faq-item {
  background: var(--hsp-card); border: 1px solid var(--hsp-line); border-radius: 12px;
}
.hsp-script { margin: var(--s4) 0 var(--s5); }
.hsp-lang { margin: 0 0 var(--s3); }
.hsp-script > summary, .hsp-lang > summary, .hsp-faq-item > summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  min-height: 48px; padding: var(--s3) var(--s4);
  cursor: pointer; list-style: none;
  font-weight: 700; font-size: 1rem; line-height: 1.4; color: var(--hsp-accent);
}
.hsp-script > summary::-webkit-details-marker, .hsp-lang > summary::-webkit-details-marker,
.hsp-faq-item > summary::-webkit-details-marker { display: none; }
.hsp-script > summary::after, .hsp-lang > summary::after, .hsp-faq-item > summary::after {
  content: "+"; flex: none; font-size: 1.35rem; font-weight: 400; line-height: 1;
}
.hsp-script[open] > summary::after, .hsp-lang[open] > summary::after, .hsp-faq-item[open] > summary::after { content: "\2212"; }
.hsp-script[open] > summary, .hsp-lang[open] > summary, .hsp-faq-item[open] > summary { border-bottom: 1px solid var(--hsp-line); }
.hsp-transcript, .hsp-faq-a { padding: var(--s4) var(--s4) var(--s2); }
.hsp-lang > .hsp-guide-meta { padding: var(--s3) var(--s4) 0; }
.hsp-faq { display: grid; gap: var(--s2); }
.hsp-faq-item > summary { color: #1f1f1f; }

/* ---- nearby: photo cards ------------------------------------------------------ */
.hsp-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 148px), 1fr)); gap: var(--s3); }
.hsp-cards li { max-width: none; }
.hsp-card-link {
  display: flex; flex-direction: column; height: 100%;
  background: var(--hsp-card); border: 1px solid var(--hsp-line); border-radius: var(--hsp-radius);
  overflow: hidden; text-decoration: none; color: inherit;
}
.hsp-card-link:hover { border-color: var(--hsp-accent); }
.hsp-card-media { display: block; aspect-ratio: 16 / 9; background: var(--sand, #f5f0e8); }
/* A card whose page has no photo of its own (Lycian Way stages without one,
   Cappadocia's valleys) gets a brand-coloured tile of the same size, so the
   grid stays even — never a borrowed photo of somewhere else. */
.hsp-card-link:not(:has(.hsp-card-media))::before {
  content: ""; display: block; aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.18) 1px, transparent 0) 0 0 / 14px 14px,
    linear-gradient(135deg, var(--hsp-accent), var(--green-light, var(--hsp-accent)));
}
.hsp-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hsp-card-k { display: block; padding: var(--s3) var(--s4) 0; font-size: .8rem; font-weight: 600; color: var(--hsp-muted); }
.hsp-card-t { display: block; padding: var(--s1) var(--s4) var(--s4); font-weight: 700; font-size: 1.02rem; line-height: 1.35; color: var(--hsp-accent); }

.hsp-plan { padding: var(--s5); background: var(--hsp-card); border: 1px solid var(--hsp-line); border-radius: var(--hsp-radius); }
.hsp-plan > h2 { border-bottom: 0; padding-bottom: 0; }
.hsp-plan p { margin: 0; }

/* ---- the marketplace promo: kept, but visually secondary ---------------------- */
.hsp-page .mp-apps { padding: var(--s7) 0; background: transparent; border-top: 1px solid var(--hsp-line); }
.hsp-page .mp-apps-head { margin-bottom: var(--s5); }
.hsp-page .mp-apps-headline { font-size: clamp(1.25rem, 2.4vw, 1.55rem); }
.hsp-page .mp-lane { box-shadow: none; }

/* ---- focus + motion ------------------------------------------------------------- */
.hsp-page a:focus-visible, .hsp-page summary:focus-visible {
  outline: 3px solid var(--hsp-accent); outline-offset: 2px; border-radius: 6px;
}
.hsp-hero a:focus-visible { outline-color: #fff; }
/* styles.v2.css turns smooth scrolling on for the whole site, whatever the
   visitor's setting; on these pages every index chip and the audio badge is
   an in-page jump, so honour reduced motion here. */
@media (prefers-reduced-motion: reduce) {
  html:has(.hsp-page) { scroll-behavior: auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .hsp-card-link, .hsp-toc a, .hsp-pill, .hsp-btn, .hsp-audio-badge { transition: border-color .15s, background-color .15s, filter .15s; }
}

/* ---- tablet --------------------------------------------------------------------- */
@media (min-width: 640px) {
  .hsp-hero { min-height: 360px; }
  .hsp-box { padding: var(--s4) var(--s5); }
}
/* The actions never sit BESIDE the copy — a nowrap button next to it is what
   squeezed the old card's copy to 3px on phones. From a tablet up they move
   under the copy, button and (desktop) QR side by side. */
@media (min-width: 768px) {
  .hsp-cards { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--s4); }
  .hsp-btn { width: auto; }
  .hsp-audio-actions { grid-column: 2; }
}

/* ---- desktop: the sidebar ------------------------------------------------------- */
@media (min-width: 1024px) {
  .hsp-hero { min-height: 440px; }
  .hsp-hero-inner { padding-bottom: var(--s6); }
  .hsp-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas: "lead side" "main side";
    column-gap: var(--s7); row-gap: var(--s4);
    padding-top: var(--s6);
  }
  .hsp-standfirst { font-size: 1.3rem; line-height: 1.55; }
  .hsp-side {
    align-self: start; position: sticky; top: calc(var(--hsp-top) + var(--s4));
    max-height: calc(100vh - var(--hsp-top) - var(--s5)); overflow: auto;
  }
  .hsp-toc ul { display: grid; gap: 2px; }
  .hsp-toc a {
    display: flex; min-height: 34px; padding: 6px 10px; border: 0; border-radius: 8px;
    background: transparent; font-weight: 500; color: var(--hsp-text);
  }
  .hsp-toc a:hover { background: var(--hsp-bg); color: var(--hsp-accent); }
  .hsp-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; }
  .hsp-audio-copy .hsp-audio-scan { display: block; }
  .hsp-audio-copy .hsp-audio-tap { display: none; }
  .hsp-qr img { display: block; width: 116px; height: 116px; border: 1px solid var(--hsp-line); border-radius: 10px; background: #fff; padding: 6px; }
  .hsp-qr span { font-size: .78rem; color: var(--hsp-muted); }
  .hsp-audio-actions { gap: var(--s5); }
}
