/* ============================================================
   Teapot Arts Hub — styles.css
   Step 3 of the rebuild guide: layout and styles.
   Sections: 1 tokens · 2 base · 3 frames · 4 header/nav
             5 hero · 6 cards · 7 location · 8 events
             10 faq · 11 visit/form · 12 footer
             13 utilities · 14 responsive · 15 motion
   ============================================================ */

/* ---- 1. Tokens ------------------------------------------------ */
:root{
  --sky:        #29A8E0;   /* the flat blue field from the mockup  */
  --sky-tint:   #E6F4FB;
  --sky-ink:    #0E5A7D;
  --paper:      #FBF7EF;
  --ink:        #16242C;
  --muted:      #4A5C66;
  --gold:       #E0A32E;
  --purple:     #6B3FA0;
  --orange:     #E86A33;
  --red:        #D13B45;
  --teal:       #1E8A7B;

  --radius:     18px;
  --frame:      14px;      /* thickness of the coloured frames   */
  --wrap:       1180px;
  --shadow:     0 10px 24px rgba(14,58,84,.14);
  --font-display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---- 2. Base -------------------------------------------------- */
*,*::before,*::after{ box-sizing:border-box; }

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

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--font-body);
  font-size:clamp(1rem, .95rem + .25vw, 1.075rem);
  line-height:1.65;
  overflow-x:hidden;
}

h1,h2,h3{
  font-family:var(--font-display);
  line-height:1.12;
  margin:0 0 .5em;
  letter-spacing:-.01em;
}
h1{ font-size:clamp(2.5rem, 1.6rem + 4.4vw, 4.25rem); font-weight:800; }
h2{ font-size:clamp(1.85rem, 1.25rem + 2.4vw, 2.9rem); font-weight:800; }
h3{ font-size:clamp(1.25rem, 1.05rem + .7vw, 1.6rem); font-weight:700; }

p{ margin:0 0 1rem; }
a{ color:var(--sky-ink); text-underline-offset:2px; }
a:hover{ color:var(--purple); }
img{ max-width:100%; height:auto; }

/* Every section clears the sticky header when jumped to. */
section[id]{ scroll-margin-top:96px; }

:focus-visible{
  outline:3px solid var(--purple);
  outline-offset:3px;
  border-radius:4px;
}

.wrap{
  width:min(100% - 2.5rem, var(--wrap));
  margin-inline:auto;
}
.wrap--narrow{ width:min(100% - 2.5rem, 820px); }

.eyebrow{
  font-family:var(--font-display);
  font-weight:700;
  font-size:.95rem;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--sky-ink);
  margin:0 0 .35rem;
}
.eyebrow--light{ color:#BFE7F7; }

.skip-link{
  position:absolute; left:-9999px;
  background:var(--ink); color:var(--paper);
  padding:.75rem 1.25rem; border-radius:0 0 var(--radius) 0;
  z-index:200;
}
.skip-link:focus{ left:0; top:0; }

/* Component display rules must not override the hidden attribute. */
[hidden]{ display:none !important; }

.visually-hidden{
  position:absolute!important; width:1px; height:1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;
}

/* ---- 3. Frames (the signature element) ------------------------ */
.frame{
  margin:0;
  background:var(--cream, var(--paper));
  padding:var(--frame);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  border:6px solid var(--frame-colour, var(--gold));
  transition:transform .3s ease;
}
.frame img{
  display:block;
  width:100%; height:auto;
  border-radius:calc(var(--radius) - 8px);
}
.frame--gold{   --frame-colour:var(--gold);   background:#FDF4DF; }
.frame--purple{ --frame-colour:var(--purple); background:#F1E9FA; }
.frame--orange{ --frame-colour:var(--orange); background:#FCEBE2; }
.frame--red{    --frame-colour:var(--red);    background:#FBE9EA; }
.frame--teal{   --frame-colour:var(--teal);   background:#E4F3F0; }

.frame--tilt-a{ --tilt:-3deg;  transform:rotate(var(--tilt)); }
.frame--tilt-b{ --tilt:1.4deg; transform:rotate(var(--tilt)); }
/* On hover the frames hop and wiggle, then settle back to their tilt. */
.frame--tilt-a:hover,
.frame--tilt-b:hover{ animation:frame-excited .85s ease-in-out; }
@keyframes frame-excited{
  0%  { transform:translateY(0)     rotate(var(--tilt)); }
  12% { transform:translateY(-14px) rotate(calc(var(--tilt) - 4deg)); }
  26% { transform:translateY(0)     rotate(calc(var(--tilt) + 4deg)); }
  40% { transform:translateY(-9px)  rotate(calc(var(--tilt) - 3deg)); }
  54% { transform:translateY(0)     rotate(calc(var(--tilt) + 2.5deg)); }
  68% { transform:translateY(-4px)  rotate(calc(var(--tilt) - 1.5deg)); }
  82% { transform:translateY(0)     rotate(calc(var(--tilt) + .8deg)); }
  100%{ transform:translateY(0)     rotate(var(--tilt)); }
}

/* ---- 4. Header / nav ------------------------------------------ */
.site-header{
  position:sticky; top:0; z-index:100;
  background:var(--sky);
  border-bottom:6px solid var(--gold);
}
.site-header__inner{
  display:flex; align-items:center; justify-content:space-between;
  gap:1rem; min-height:76px;
}
.brand{
  display:flex; align-items:center; gap:.7rem;
  text-decoration:none; color:var(--ink);
}
.brand__mark{
  width:46px; height:auto;
  background:var(--paper); border:3px solid var(--paper);
  border-radius:10px;
}
.brand__name{
  font-family:var(--font-display); font-weight:800;
  font-size:1.2rem; line-height:1.1;
}

.site-nav ul{
  list-style:none; display:flex; gap:.35rem;
  margin:0; padding:0;
}
.site-nav a{
  display:block; padding:.5rem .7rem;
  font-weight:500; text-decoration:none;
  color:var(--ink); border-radius:10px;
}
.site-nav a:hover{ background:rgba(255,255,255,.35); color:var(--ink); }
.site-nav a[aria-current="true"]{
  background:var(--paper); color:var(--sky-ink); font-weight:600;
}
.nav-cta{ margin-left:.5rem; }
/* .site-nav a outranks .btn--primary; restore the button look. */
.site-nav a.nav-cta,
.site-nav a.nav-cta:hover{
  display:inline-block; padding:.85rem 1.4rem;
  font-weight:700; border-radius:999px;
  background:var(--ink); color:var(--paper);
}
.site-nav{ display:flex; align-items:center; }

.nav-toggle{
  display:none;
  width:48px; height:44px;
  background:var(--paper); border:none; border-radius:12px;
  cursor:pointer; padding:0;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after{
  display:block; width:22px; height:3px; margin-inline:auto;
  background:var(--ink); border-radius:2px; content:"";
}
.nav-toggle__bars::before{ transform:translateY(-7px); }
.nav-toggle__bars::after{  transform:translateY(4px); }

/* ---- 5. Buttons ----------------------------------------------- */
.btn{
  display:inline-block;
  font-family:var(--font-display); font-weight:700;
  font-size:1.02rem; line-height:1;
  padding:.85rem 1.4rem;
  border-radius:999px; border:3px solid var(--ink);
  text-decoration:none; cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease;
}
.btn:hover{ transform:translateY(-2px); box-shadow:var(--shadow); }
.btn--primary{ background:var(--ink); color:var(--paper); }
.btn--primary:hover{ color:var(--paper); }
.btn--ghost{ background:transparent; color:var(--ink); }
.btn--ghost:hover{ background:var(--paper); color:var(--ink); }
.btn--small{ font-size:.92rem; padding:.65rem 1.1rem; }
.btn--disabled{
  background:#C9D2D7; color:#5A666C; border-color:#AEB8BE;
  cursor:not-allowed; opacity:.9;
}

/* ---- 6. Hero -------------------------------------------------- */
.hero{
  background:var(--sky);
  padding:clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 5.5rem);
  position:relative; isolation:isolate;
}
/* Faint photo over the blue. Opacity sits on this layer only;
   isolation keeps the z-index:-1 layer above the hero's own blue. */
.hero::before{
  content:""; position:absolute; inset:0; z-index:-1;
  background:url("../img/teapot_hub_garden.webp") center / cover no-repeat;
  opacity:.15;
  pointer-events:none;
}
.hero__grid{
  display:grid; gap:clamp(2rem, 4vw, 3.5rem);
  grid-template-columns:1.05fr .95fr;
  align-items:center;
}
.hero__tagline{
  font-family:var(--font-display); font-weight:700;
  font-size:clamp(1.25rem, 1rem + 1vw, 1.7rem);
  color:var(--sky-ink); margin:0 0 1rem;
}
.hero__lede{
  font-size:clamp(1.05rem, 1rem + .35vw, 1.2rem);
  max-width:34ch; margin-bottom:1.6rem;
}
.hero__actions{ display:flex; flex-wrap:wrap; gap:.85rem; }
.hero__note{
  margin:1.2rem 0 0; font-size:.95rem; color:var(--sky-ink);
}
.hero__art{
  display:grid; gap:1.25rem;
  grid-template-columns:1fr 1fr;
  align-items:start;
}
.hero__art .frame--tilt-b{ margin-top:2rem; }

/* ---- 7. Sections ---------------------------------------------- */
.section{ padding:clamp(3rem, 6vw, 5rem) 0; }
.section--tint{ background:var(--sky-tint); }
.section--dark{ background:var(--sky-ink); color:var(--paper); }
.section--dark h2, .section--dark a{ color:var(--paper); }

.section__head{ max-width:62ch; margin-bottom:2.5rem; }
.section__lede{ font-size:1.08rem; color:var(--muted); }
.section__foot{ margin:2.5rem 0 0; text-align:center; }

/* ---- 8. Cards ------------------------------------------------- */
.cards{
  display:grid; gap:2rem;
  grid-template-columns:repeat(auto-fit, minmax(250px, 1fr));
}
.card{
  background:#fff; border-radius:var(--radius);
  padding:1.5rem; border:3px solid #E7DED0;
  box-shadow:var(--shadow);
}
.card h3{ margin-top:1.1rem; }
.card p:last-child{ margin-bottom:0; }
.card__doodle{
  display:block;
  font-family:var(--font-display); font-size:3.2rem; line-height:1;
  color:var(--gold);
}

/* ---- 9. Location ---------------------------------------------- */
.split{
  display:grid; gap:clamp(2rem, 4vw, 3.5rem);
  grid-template-columns:1fr 1fr; align-items:start;
}
.towns{
  list-style:none; padding:0; margin:1.5rem 0 0;
  display:flex; flex-wrap:wrap; gap:.5rem;
}
.towns li{
  background:#fff; border:2px solid var(--sky);
  border-radius:999px; padding:.3rem .8rem;
  font-size:.9rem; font-weight:500;
}

/* ---- 10. Events ----------------------------------------------- */
/* Heading with an action button on the right; stacks on mobile. */
.section__head--action{
  max-width:none;
  display:flex; flex-wrap:wrap; gap:1rem 2rem;
  align-items:flex-end; justify-content:space-between;
}
.section__head--action h2{ margin-bottom:0; }

/* Feature button: larger, purple, with a gold offset shadow so it
   stands apart from the ink primary buttons. Paper on purple 6.9:1. */
.btn--feature{
  display:inline-flex; align-items:center; justify-content:center; gap:.6rem;
  font-size:1.2rem; padding:1.05rem 1.9rem;
  background:var(--purple); color:var(--paper); border-color:var(--ink);
  box-shadow:5px 5px 0 var(--gold);
}
.btn--feature:hover{
  background:#5A3289; color:var(--paper);
  transform:translate(-2px, -2px); box-shadow:7px 7px 0 var(--gold);
}
.btn--feature:active{ transform:translate(3px, 3px); box-shadow:2px 2px 0 var(--gold); }
.btn--feature svg{ width:1.35em; height:1.35em; flex:none; }

/* Up to three cards; fewer cards never leave empty slots. */
.events{
  display:grid; gap:1.75rem;
  grid-template-columns:repeat(auto-fit, minmax(270px, 1fr));
}
.events[data-count="1"]{ max-width:400px; }
.events[data-count="2"]{ max-width:820px; }
.event{
  background:#fff; border-radius:var(--radius);
  border-top:8px solid var(--orange);
  border-inline:3px solid #E7DED0; border-bottom:3px solid #E7DED0;
  box-shadow:var(--shadow); overflow:hidden;
  display:flex; flex-direction:column;
}
.event__media{ margin:0; aspect-ratio:8 / 5; background:var(--sky-tint); }
.event__media img{ display:block; width:100%; height:100%; object-fit:cover; }
/* The square hub logo stands in when an event has no image: show it whole. */
.event__media img.is-fallback{ object-fit:contain; background:#fff; padding:.5rem; }
.event__body{
  padding:1.6rem; flex:1;
  display:flex; flex-direction:column;
}
.event__when{
  font-family:var(--font-display); font-weight:700;
  color:var(--sky-ink); font-size:.95rem;
  letter-spacing:.03em; text-transform:uppercase;
  margin:0 0 .4rem;
}
.event__meta{ font-size:.92rem; color:var(--muted); }
.event .btn{ margin-top:auto; align-self:flex-start; }

/* Zero-events state. */
.events-note{
  max-width:68ch; margin:0 0 1.25rem; padding:.7rem 1rem;
  border-left:4px solid var(--sky); border-radius:8px;
  background:var(--sky-tint); color:var(--ink); font-size:.95rem;
}
.events-empty{
  background:#fff; border-radius:var(--radius);
  border-top:8px solid var(--orange);
  border-inline:3px solid #E7DED0; border-bottom:3px solid #E7DED0;
  box-shadow:var(--shadow);
  padding:clamp(2rem, 5vw, 3rem) 1.5rem;
  text-align:center;
}
.events-empty p{ max-width:52ch; margin:0 auto 1.5rem; color:var(--muted); }

/* ---- 10b. Modal (events calendar) ----------------------------- */
.modal{
  width:min(900px, calc(100% - 2rem));
  max-width:none; max-height:min(90vh, 900px);
  padding:0; border:0; border-top:8px solid var(--gold);
  border-radius:var(--radius);
  background:var(--paper); color:var(--ink);
  box-shadow:0 24px 60px rgba(14,58,84,.35);
}
.modal[open]{ display:flex; flex-direction:column; }
.modal::backdrop{ background:rgba(22,36,44,.6); }
.modal__head{
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
  padding:1rem 1.25rem 1rem 1.5rem;
  background:#fff; border-bottom:3px solid #E7DED0;
}
.modal__title{
  margin:0; font-size:clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
  display:flex; align-items:center; gap:.6rem;
}
.modal__logo{ flex:none; width:clamp(44px, 36px + 2vw, 64px); height:auto; }
.modal__close{
  flex:none; width:44px; height:44px;
  border:3px solid var(--ink); border-radius:999px;
  background:var(--paper); color:var(--ink);
  font-size:1.6rem; line-height:1; cursor:pointer;
}
.modal__close:hover{ background:var(--ink); color:var(--paper); }
.modal__body{ flex:1; overflow-y:auto; padding:1.5rem; min-height:240px; }
/* Calendar inside the modal (our month grid + its states). */
.calendar-bar{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  gap:.75rem 1rem; margin-bottom:1rem;
}
.calendar-bar__link{ font-weight:600; margin-left:auto; }
.calendar-status{ color:var(--muted); margin:0 0 1rem; }
.calendar-status:empty{ display:none; }
.calendar-error{
  background:#FBE9EA; border-left:6px solid var(--red);
  padding:.9rem 1rem; border-radius:10px; margin-bottom:1rem;
}
.calendar-error p{ margin:0; }
.calendar-mount{ min-height:120px; }

/* Native month calendar (main.js section 14). */
.calendar-nav{ display:flex; align-items:center; gap:.5rem; }
.calendar-nav__month{ margin:0; min-width:10.5rem; text-align:center; font-size:1.25rem; }
.calendar-nav__btn{
  width:44px; height:44px; flex:none; display:grid; place-items:center;
  border:3px solid var(--ink); border-radius:999px; background:#fff; color:var(--ink);
  font-size:1.6rem; line-height:1; cursor:pointer;
}
.calendar-nav__btn:hover{ background:var(--ink); color:var(--paper); }
.cal-grid{ width:100%; border-collapse:separate; border-spacing:4px; table-layout:fixed; }
.cal-grid th{ font-size:.85rem; color:var(--muted); font-weight:700; padding:.25rem 0; text-align:center; }
.cal-day{ vertical-align:top; height:6.5rem; padding:.35rem; background:#fff; border:1px solid #E7DED0; border-radius:10px; }
.cal-day.is-outside{ background:transparent; border-color:transparent; }
.cal-day.is-today{ border:3px solid var(--purple); }
.cal-day__num{ display:block; font-weight:700; font-size:.9rem; }
.cal-day.is-today .cal-day__num{ color:var(--purple); }
.cal-day__label{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.cal-day__events{ list-style:none; margin:.25rem 0 0; padding:0; display:grid; gap:.25rem; }
.cal-entry{
  display:block; padding:.2rem .35rem; border-radius:6px; background:var(--sky-tint);
  color:var(--ink); text-decoration:none; font-size:.78rem; line-height:1.25;
  overflow-wrap:anywhere;
}
.cal-entry:hover{ background:var(--purple); color:#fff; }
.cal-entry__time{ display:block; font-weight:700; }
.cal-entry__name{
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; line-clamp:3; overflow:hidden;
}
.cal-none{ margin:1rem 0 0; text-align:center; color:var(--muted); }
/* Phones: a list of the days that have something on. */
@media (max-width:640px){
  .calendar-nav__month{ min-width:0; font-size:1.1rem; }
  .cal-grid, .cal-grid tbody, .cal-grid tr, .cal-grid td{ display:block; width:auto; }
  .cal-grid thead, .cal-day.is-empty, .cal-day.is-outside, .cal-day__num{ display:none; }
  .cal-day{ height:auto; margin:0 0 .5rem; padding:.6rem .75rem; }
  .cal-day__label{ position:static; width:auto; height:auto; overflow:visible; clip:auto; display:block; font-weight:700; }
  .cal-entry{ font-size:.95rem; padding:.45rem .6rem; }
  .cal-entry__time{ display:inline; margin-right:.4rem; }
  .cal-entry__name{ display:inline; -webkit-line-clamp:unset; line-clamp:none; }
}

/* Background scroll lock while a modal is open. */
html.is-scroll-locked,
html.is-scroll-locked body{ overflow:hidden; }

/* ---- 12. FAQ -------------------------------------------------- */
.faq__item{
  background:#fff; border:3px solid #E7DED0;
  border-radius:var(--radius);
  margin-bottom:1rem; overflow:hidden;
}
.faq__item summary{
  cursor:pointer; padding:1.05rem 1.25rem;
  font-family:var(--font-display); font-weight:700;
  font-size:1.1rem; list-style:none;
  display:flex; justify-content:space-between; gap:1rem;
}
.faq__item summary::-webkit-details-marker{ display:none; }
.faq__item summary::after{ content:"+"; font-size:1.4rem; line-height:1; }
.faq__item[open] summary::after{ content:"\2013"; }
.faq__item p{ margin:0; padding:0 1.25rem 1.25rem; }

/* ---- 13. Visit + form ---------------------------------------- */
.visit{
  display:grid; gap:clamp(2rem, 4vw, 3rem);
  grid-template-columns:1fr 1fr; align-items:start;
}
.hours{
  width:100%; border-collapse:collapse;
  background:#fff; border-radius:var(--radius); overflow:hidden;
  margin-bottom:2rem;
}
.hours th, .hours td{
  text-align:left; padding:.6rem 1rem;
  border-bottom:1px solid #E7DED0;
}
.hours th{ font-weight:600; width:42%; }
.hours tr:last-child th, .hours tr:last-child td{ border-bottom:0; }

.contact-list{ font-style:normal; margin-bottom:1.5rem; }
.contact-list p{ margin:0 0 .4rem; }

.map{
  border-radius:var(--radius); overflow:hidden;
  border:3px solid var(--sky); background:#fff;
}
.map iframe{ display:block; width:100%; height:320px; border:0; }
.map--placeholder{
  display:grid; place-content:center; text-align:center;
  min-height:220px; padding:1.5rem;
  border-style:dashed; background:var(--sky-tint); color:var(--muted);
}
.map--small{ min-height:160px; }
/* Leaflet panes use z-index up to 1000; contain them so the map
   never slides over the sticky header. */
.map--leaflet{ position:relative; z-index:0; height:320px; }
.map--leaflet.map--small{ height:240px; }
.map-popup__directions{
  display:inline-block; margin-top:.5rem; padding:.35rem .8rem;
  border-radius:999px; background:var(--purple); color:#fff !important;
  font-weight:600; text-decoration:none;
}
.map-popup__directions:hover,
.map-popup__directions:focus-visible{ background:var(--ink); }
.map__fallback{
  display:grid; place-content:center; height:100%;
  margin:0; padding:1.5rem; text-align:center;
  background:var(--sky-tint);
}

.visit__form{
  background:#fff; border-radius:var(--radius);
  padding:1.75rem; border:3px solid var(--sky);
  box-shadow:var(--shadow);
}
.field{ margin-bottom:1.1rem; }
.field label{
  display:block; font-weight:600; margin-bottom:.3rem;
  font-size:.96rem;
}
.field .req{ color:var(--red); }
.field .opt{ color:var(--muted); font-weight:400; }
.field input, .field select, .field textarea{
  width:100%; padding:.7rem .85rem;
  font:inherit; color:var(--ink);
  border:2px solid #C9D2D7; border-radius:10px;
  background:#fff;
}
.field input:focus, .field select:focus, .field textarea:focus{
  border-color:var(--sky-ink); outline:none;
  box-shadow:0 0 0 3px rgba(41,168,224,.35);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"]{ border-color:var(--red); }
.field__error{ display:block; color:var(--red); font-size:.88rem; margin-top:.3rem; }
.field-check{ display:flex; align-items:center; gap:.6rem; margin:0 0 1.25rem; }
.field-check input{
  flex:none; width:1.25rem; height:1.25rem; margin:0;
  accent-color:var(--purple); cursor:pointer;
}
.field-check input:focus-visible{ outline:3px solid rgba(41,168,224,.6); outline-offset:2px; }
.field-check label{ font-weight:600; font-size:.96rem; cursor:pointer; }

.hp{ position:absolute; left:-9999px; }
.form-actions{ margin:1.4rem 0 .6rem; }
.form-privacy{ font-size:.85rem; color:var(--muted); margin:0; }

.form-status{
  background:#E4F3F0; border-left:6px solid var(--teal);
  padding:.9rem 1rem; border-radius:10px; margin-bottom:1.2rem;
}
.form-status--error{
  background:#FBE9EA; border-left-color:var(--red);
}
.context-chip{
  background:var(--sky-tint); border:2px solid var(--sky);
  border-radius:10px; padding:.6rem .85rem;
  font-size:.93rem; margin-bottom:1.2rem;
  display:flex; flex-wrap:wrap; align-items:center; gap:.5rem;
}
.context-chip__clear{
  margin-left:auto; background:none; border:0; cursor:pointer;
  color:var(--sky-ink); font:inherit; text-decoration:underline;
}

/* ---- 14. Footer ----------------------------------------------- */
.site-footer{
  background:var(--ink); color:var(--paper);
  padding:3rem 0 2rem; border-top:8px solid var(--gold);
}
.site-footer__inner{
  display:grid; gap:2rem;
  grid-template-columns:repeat(auto-fit, minmax(230px, 1fr));
}
.site-footer__brand{
  font-family:var(--font-display); font-weight:800;
  font-size:1.3rem; margin-bottom:.4rem;
}
.site-footer a{ color:#BFE7F7; }
.site-footer a:hover{ color:var(--paper); }
.site-footer ul{ list-style:none; padding:0; margin:0; }
.site-footer li{ margin-bottom:.4rem; }
.site-footer__ack{ font-size:.9rem; color:#C8D4DA; }
.site-footer__fine{ font-size:.85rem; color:#93A4AC; margin:0; }

/* ---- 15. Utilities -------------------------------------------- */
.to-top{
  position:fixed; right:1.25rem; bottom:1.25rem; z-index:90;
  background:var(--ink); color:var(--paper);
  border:3px solid var(--paper); border-radius:999px;
  padding:.7rem 1.1rem; cursor:pointer;
  font-family:var(--font-display); font-weight:700; font-size:.9rem;
  box-shadow:var(--shadow);
}
[data-todo]{
  background:#FFF6D6;
  box-shadow:0 0 0 3px #FFF6D6;
  border-radius:3px;
}
/* Unset opening hours use the soft blue tint, not the yellow. */
.hours__note{ margin:-1.25rem 0 2rem; font-size:.92rem; color:var(--muted); }

/* Notice banner (written by the admin area's Publish) */
.site-banner{
  position:relative; display:flex; align-items:center; justify-content:center;
  padding:.6rem 3.25rem .6rem 1rem; text-align:center;
  font-weight:600; font-size:.95rem;
  background:var(--sky-tint); color:var(--ink); border-bottom:3px solid var(--sky);
}
.site-banner--important{ background:var(--purple); color:#fff; border-bottom-color:var(--gold); }
.site-banner__text{ margin:0; max-width:70ch; }
.site-banner a{ color:inherit; text-decoration:underline; text-underline-offset:2px; }
.site-banner__close{
  position:absolute; right:.4rem; top:50%; transform:translateY(-50%);
  width:40px; height:40px; border:0; border-radius:999px;
  background:transparent; color:inherit; font-size:1.5rem; line-height:1; cursor:pointer;
}
.site-banner__close:hover,
.site-banner__close:focus-visible{ background:rgba(0,0,0,.1); outline:2px solid currentColor; outline-offset:-2px; }

.hours [data-todo]{
  background:var(--sky-tint);
  box-shadow:0 0 0 3px var(--sky-tint);
}

.reveal{ opacity:1; }
.js-reveal .reveal{
  opacity:0; transform:translateY(18px);
  transition:opacity .55s ease, transform .55s ease;
}
.js-reveal .reveal.is-visible{ opacity:1; transform:none; }

/* ---- 16. Responsive ------------------------------------------- */
@media (max-width:960px){
  .hero__grid,
  .split,
  .visit{ grid-template-columns:1fr; }
  .hero__art{ margin-top:1rem; }

  .nav-toggle{ display:block; }

  .site-nav{
    position:absolute; top:100%; left:0; right:0;
    background:var(--paper);
    border-bottom:6px solid var(--gold);
    padding:1rem 1.25rem 1.5rem;
    display:none;
    max-height:calc(100vh - 82px); overflow-y:auto;
  }
  .site-nav[data-open="true"]{ display:block; }
  .site-nav ul{ flex-direction:column; gap:.15rem; }
  .site-nav a{ padding:.75rem .6rem; font-size:1.05rem; }
  .nav-cta{ margin:.8rem 0 0; width:100%; text-align:center; }
}

@media (max-width:620px){
  section[id]{ scroll-margin-top:84px; }
  .hero__art{ grid-template-columns:1fr; }
  .hero__art .frame--tilt-b{ margin-top:0; }
  .hero__actions .btn{ width:100%; text-align:center; }
  .brand__name{ font-size:1.05rem; }

  .section__head--action{ flex-direction:column; align-items:stretch; }
  .section__head--action .btn{ text-align:center; }
  .events[data-count]{ max-width:none; }
  .modal{
    width:calc(100% - 1rem); height:calc(100% - 1rem);
    max-height:none;
  }
}

/* ---- 17. Motion preferences ----------------------------------- */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    transition-duration:.001ms!important;
  }
  .js-reveal .reveal{ opacity:1; transform:none; }
  .frame--tilt-a, .frame--tilt-b{ transform:none; animation:none!important; }
}

/* ---- Policy pages (built by includes/policies/build.php) ------ */
.site-footer__heading{ font-weight:600; color:var(--paper); margin:0 0 .6rem; }
.breadcrumb ol{ display:flex; flex-wrap:wrap; gap:.25rem .5rem; list-style:none; margin:0 0 1.5rem; padding:0; font-size:.92rem; color:var(--muted); }
.breadcrumb li + li::before{ content:"›"; margin-right:.5rem; color:var(--muted); }
.breadcrumb [aria-current]{ color:var(--ink); }
.policy-notice{
  margin:0 0 1.5rem; padding:.8rem 1rem; border-radius:10px;
  border-left:5px solid var(--gold); background:#FFF6D6; color:var(--ink); font-size:.95rem;
}
.policy h1{ margin-bottom:.4rem; }
.doc-meta{ color:var(--muted); font-size:.95rem; margin:0 0 2rem; }
.policy__body, .form-sheet{ max-width:72ch; }
.policy__body h2, .form-sheet h2{ font-size:1.35rem; margin:2rem 0 .6rem; }
.policy__body h3{ font-size:1.1rem; margin:1.5rem 0 .5rem; }
.policy__body li + li{ margin-top:.35rem; }
.policy-back{ margin-top:3rem; }
.policy-list{ list-style:none; margin:0 0 2rem; padding:0; border-top:1px solid #E7DED0; }
.policy-list li{ display:flex; flex-wrap:wrap; justify-content:space-between; gap:.25rem 1rem; padding:.85rem 0; border-bottom:1px solid #E7DED0; }
.policy-list a{ display:flex; gap:.75rem; font-weight:600; text-decoration:none; }
.policy-list a:hover .policy-list__title{ text-decoration:underline; }
.policy-list__no{ color:var(--muted); font-variant-numeric:tabular-nums; }
.policy-list__date{ color:var(--muted); font-size:.9rem; }

/* Printable forms */
.form-actions{ display:flex; flex-wrap:wrap; align-items:center; gap:.75rem; margin:0 0 2rem; }
.form-actions__missing{ color:var(--muted); font-size:.92rem; font-style:italic; }
.form-sheet{ background:#fff; border:1px solid #E7DED0; border-radius:var(--radius); padding:1.5rem 1.75rem; }
.form-sheet__section{ margin-top:1.5rem; }
.form-sheet__section:first-of-type{ margin-top:.5rem; }
.form-line{ display:flex; align-items:flex-end; gap:.75rem; margin:0 0 1.1rem; }
.form-line__label{ flex:none; font-weight:600; }
.form-line__space{ flex:1; min-width:6rem; border-bottom:1.5px solid var(--ink); height:1.6rem; }
.form-tick{ display:flex; gap:.75rem; align-items:flex-start; margin:0 0 .9rem; }
.form-tick__box{ flex:none; width:1.1rem; height:1.1rem; margin-top:.2rem; border:1.5px solid var(--ink); border-radius:3px; }
.form-sheet__sign{ margin-top:2.25rem; padding-top:1rem; border-top:1px dashed #C9D2D7; }

@media print{
  .policy-page .site-header, .policy-page .site-footer, .policy-page .skip-link,
  .policy-page .breadcrumb, .policy-page .policy-notice, .policy-page .form-actions,
  .policy-page .policy-back, .policy-page .to-top{ display:none !important; }
  .policy-page{ background:#fff; color:#000; }
  .policy-page .section{ padding:0; }
  .policy-page .wrap--narrow{ width:100%; }
  .form-sheet{ border:0; padding:0; }
  .form-sheet__section, .form-line, .form-tick{ break-inside:avoid; }
  .policy__body a::after{ content:" (" attr(href) ")"; font-size:.85em; }
}

/* ---- Volunteer application (/volunteer/) ----------------------- */
.vol-form{ max-width:640px; }
.vol-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:0 1.25rem; }
.vol-form fieldset{ border:0; padding:0; margin:0 0 1.1rem; }
.vol-form legend{ font-weight:600; margin-bottom:.4rem; }
.vol-form .field-check{ margin:0 0 .5rem; }
.vol-notice{ margin:1.5rem 0 .75rem; padding:1rem 1.25rem; border-radius:var(--radius); background:var(--sky-tint); font-size:.95rem; }
.vol-notice > :last-child{ margin-bottom:0; }
.form-error{ margin:0 0 1rem; padding:.7rem 1rem; border-left:5px solid var(--red); background:#FBE9EA; border-radius:8px; }

/* ---- Volunteer portal (/volunteer/portal/) --------------------- */
.portal-nav{ display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:.75rem 1.5rem; margin:0 0 1.5rem; padding:.75rem 0; border-bottom:2px solid #E7DED0; }
.portal-nav ul{ display:flex; flex-wrap:wrap; gap:.25rem .5rem; list-style:none; margin:0; padding:0; }
.portal-nav a{ display:block; padding:.35rem .7rem; border-radius:999px; text-decoration:none; font-weight:600; }
.portal-nav a[aria-current="page"]{ background:var(--purple); color:#fff; }
.portal-nav form{ margin:0; font-size:.92rem; color:var(--muted); }
.portal-nav .link, .portal-card .link{ background:none; border:0; padding:0; font:inherit; color:var(--sky-ink, #0E6C96); text-decoration:underline; cursor:pointer; }
.portal-card{ background:#fff; border:1px solid #E7DED0; border-radius:var(--radius); padding:1.25rem 1.5rem; margin:0 0 1.5rem; }
.portal-card h2{ font-size:1.3rem; margin-top:0; }
.portal-flash{ margin:0 0 1rem; padding:.7rem 1rem; border-left:5px solid #1E7B4B; background:#E6F4EC; border-radius:8px; }
.portal-todo{ padding-left:1.2rem; }
.portal-todo li + li{ margin-top:.4rem; }
.portal-list{ list-style:none; margin:0 0 1rem; padding:0; }
.portal-list li{ display:flex; flex-wrap:wrap; justify-content:space-between; gap:.25rem 1rem; padding:.6rem 0; border-bottom:1px solid #E7DED0; }
.portal-list form{ margin:0; }
.avail-wrap{ overflow-x:auto; margin:0 0 1rem; }
.avail{ border-collapse:collapse; min-width:100%; }
.avail th, .avail td{ padding:.45rem .6rem; border-bottom:1px solid #E7DED0; text-align:center; }
.avail th[scope="row"]{ text-align:left; }
.avail input{ width:1.25rem; height:1.25rem; accent-color:var(--purple); }
.portal-actions{ display:flex; flex-wrap:wrap; gap:.75rem; align-items:center; margin:0 0 1rem; }
.portal-actions form{ display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; margin:0; }
.portal-actions input{ padding:.55rem .7rem; border:2px solid #C9D2D7; border-radius:10px; font:inherit; }
.portal-hours{ display:flex; flex-wrap:wrap; gap:.4rem .6rem; align-items:center; margin:0; }
.portal-hours input, .portal-hours select{ padding:.45rem .6rem; border:2px solid #C9D2D7; border-radius:10px; font:inherit; }

/* ---- Event pages (/events/<slug>) ------------------------------ */
.event-notice{ margin-bottom:1.5rem; }
.event-page__media{ margin:0 0 1.5rem; border-radius:var(--radius); overflow:hidden; border:3px solid var(--ink); background:#fff; }
.event-page__media img{ display:block; width:100%; height:auto; aspect-ratio:8 / 5; object-fit:cover; }
.lead{ font-size:1.15rem; }
.event-facts{ display:grid; gap:.6rem; margin:0 0 2rem; padding:1.1rem 1.4rem; background:#fff; border:1px solid #E7DED0; border-radius:var(--radius); }
.event-facts div{ display:grid; grid-template-columns:6rem 1fr; gap:.75rem; }
.event-facts dt{ font-weight:700; color:var(--purple); }
.event-facts dd{ margin:0; }
.event-dates{ padding-left:1.5rem; margin:0 0 2rem; }
.event-dates li{ padding:.25rem 0; }
.event-dates li.is-cancelled time{ text-decoration:line-through; color:var(--muted); }
.event-dates__note{ display:block; color:var(--muted); font-size:.95rem; }
.event-book{ margin:2rem 0; padding:1.25rem 1.5rem; background:var(--sky-tint); border-radius:var(--radius); }
.event-book h2{ margin-top:0; }
.event-book > :last-child{ margin-bottom:0; }
.event-back{ margin-top:2rem; }
@media (max-width:480px){ .event-facts div{ grid-template-columns:1fr; gap:0; } }

/* ---- Booking forms (/events/book.php, booking.php) ------------- */
.hp{ position:absolute!important; left:-9999px; width:1px; height:1px; overflow:hidden; }
.book-start .book-qty select{ padding:.5rem .7rem; border:2px solid #C9D2D7; border-radius:10px; font:inherit; background:#fff; }
.book-sessions{ border:0; padding:0; margin:0 0 1rem; }
.book-sessions legend{ font-weight:700; margin-bottom:.4rem; }
.book-left{ color:var(--purple); }
.book-held{ font-size:1.05rem; }
.book-dates{ margin:0 0 1.5rem; }
.book-dates summary{ cursor:pointer; font-weight:600; color:var(--sky-ink); }
.book-person{ border:1px solid #E7DED0 !important; border-radius:var(--radius); padding:1rem 1.25rem !important; background:#fff; }
.book-photo{ margin:.5rem 0 0 !important; }
.book-photo .field-check{ display:inline-flex; margin-right:1.25rem; }
.book-wording{ margin:1rem 0 .5rem; }
.book-form textarea{ width:100%; }

/* ---- Paid events before online payment (payment placeholder) --- */
.book-quote .book-qty select{ padding:.5rem .7rem; border:2px solid #C9D2D7; border-radius:10px; font:inherit; background:#fff; }
.book-total{ display:grid; gap:.4rem; margin:1rem 0 1.25rem; padding:1rem 1.25rem; background:#fff; border:1px solid #E7DED0; border-radius:var(--radius); }
.book-total div{ display:flex; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
.book-total dt{ font-weight:700; color:var(--purple); }
.book-total dd{ margin:0; text-align:right; }
.book-total__sum{ border-top:1px solid #E7DED0; padding-top:.5rem; font-size:1.1rem; }
.book-payment{ padding:1rem 1.25rem; border:3px dashed var(--purple); border-radius:var(--radius); background:#F6F1FB; }
.book-payment h3{ margin-top:0; }
.book-payment > :last-child{ margin-bottom:0; }
.book-payment__soon{ font-size:1.1rem; }

/* ---- Booking form: review section and consents ----------------- */
.book-review{ margin:0 0 2rem; padding:1.25rem 1.5rem; background:#fff; border:1px solid #E7DED0; border-radius:var(--radius); }
.book-review h2{ margin-top:0; }
.book-review h3, .book-wording h3{ font-size:1.1rem; margin:1.25rem 0 .5rem; }
.book-wording h3{ margin-top:0; }
.book-about summary{ cursor:pointer; font-weight:600; color:var(--sky-ink); }
.book-agree{ padding-left:1.25rem; margin:0; }
.book-agree li + li{ margin-top:.3rem; }
.book-policy{ margin:.5rem 0 0; font-weight:600; }
