/* ==========================================================================
   Bridge Village Hall – main stylesheet
   Mobile first. Breakpoints:
     Mobile  ≤ 769px   (base styles)
     Tablet  770–1279px (@media (min-width: 770px))
     Desktop ≥ 1280px  (@media (min-width: 1280px))
   ========================================================================== */

/* ---------- 0. Fonts (self-hosted, latin subset; SIL Open Font Licence) ----------
   Both are variable fonts: one file covers every weight used. */
@font-face {
    font-family: "Lora";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/lora-latin.woff2") format("woff2");
}

@font-face {
    font-family: "Source Sans 3";
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url("../fonts/source-sans-3-latin.woff2") format("woff2");
}

/* ---------- 1. Design tokens ---------- */
:root {
    --bg: #f8f6f0;
    --cream: #f0e8d8;
    --green-light: #79a5a0;
    --green-dark: #214d52;
    --gold: #d29a45;
    --gold-light: #dbae6a;   /* hover on dark green (4.57:1) and link highlight */
    --ink: #032c30;          /* text on the gold highlight (7.30:1) */
    --text: #1d1d1b;
    --error: #a3262a;

    --font-title: "Lora", Georgia, "Times New Roman", serif;
    --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;

    --container: 1280px;
    --gutter: 20px;
    --content-inset: 0px;   /* extra inset for body content inside the container */

    --hover: 0.2s ease-in-out;
    --reveal: 0.9s ease-out;
}

@media (min-width: 770px) {
    :root { --gutter: 36px; }
}

@media (min-width: 1280px) {
    :root { --gutter: 24px; --content-inset: 48px; }
}

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

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

/* Smooth scrolling for links within a page is handled by scripts/main.js
   (works in every browser; arriving at a page with an anchor jumps straight there) */

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.125rem;   /* 18px */
    line-height: 1.55;
    overflow-x: clip;      /* side-sliding scroll animations never cause sideways scroll */
    -webkit-font-smoothing: antialiased;
}

html.menu-open body { overflow: hidden; }

img,
picture,
iframe { display: block; max-width: 100%; }

img { height: auto; }

h1, h2, h3 {
    margin: 0 0 0.5em;
    font-family: var(--font-title);
    font-weight: 400;
    line-height: 1.25;
    color: var(--green-dark);
}

h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }

p { margin: 0 0 1.35em; }

a {
    color: var(--green-dark);
    text-underline-offset: 0.18em;
    transition: color var(--hover), background-color var(--hover), border-color var(--hover);
}

a:hover { color: var(--ink); }

/* Links in page content: lighter-gold highlight with dark text on hover (7.30:1) */
main a:not(.button):not(.slideshow__pause):hover {
    background-color: var(--gold-light);
    color: var(--ink);
}

ul { margin: 0; padding: 0; list-style: none; }

/* Bulleted list in page content (e.g. About: key historical milestones) */
.bullet-list { margin: 0 0 1.35em; padding-left: 1.25em; list-style: disc; }
.bullet-list li { margin-bottom: 0.5em; padding-left: 0.25em; }
.bullet-list li::marker { color: var(--green-dark); }

address { font-style: normal; }

/* Breathing room when jumping to an anchor (e.g. #hirers-checklist) */
[id] { scroll-margin-top: 24px; }

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

/* Sections focused by the in-page jump script: no outline after a mouse click */
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }

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

.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2000;
    padding: 12px 18px;
    background: var(--bg);
    color: var(--green-dark);
    transform: translateY(-120%);
}

.skip-link:focus { transform: none; }

.container {
    width: min(var(--container), 100% - 2 * var(--gutter));
    margin-inline: auto;
}

.narrow { max-width: 860px; }

.section { padding-block: 40px 56px; }

.lead { font-size: 1.25rem; line-height: 1.5; }

.subtitle { margin-top: 1.4em; font-size: 1.5rem; }
.subtitle:first-child { margin-top: 0; }

.page-heading { font-size: 2rem; }

@media (min-width: 770px) {
    h2 { font-size: 1.875rem; }
    .section { padding-block: 56px 72px; }
    .lead { font-size: 1.375rem; }
    .page-heading { font-size: 2.5rem; }
    .subtitle { font-size: 1.625rem; }
}

@media (min-width: 1280px) {
    .section { padding-block: 72px 88px; }
    .container.narrow { padding-inline: var(--content-inset); max-width: var(--container); }
    .container.narrow > * { max-width: 860px; }
}

/* ---------- 3. Buttons ---------- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border: 0;
    background: var(--green-dark);   /* white on dark green: 9.34:1 */
    color: #fff;
    font-family: var(--font-title);
    font-size: 1.25rem;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--hover), color var(--hover);
}

/* Hover: lighter gold with dark ink text (7.30:1), same as link hover */
.button:hover { background: var(--gold-light); color: var(--ink); }

.button--large {
    min-height: 46px;
    padding: 8px 18px;
    font-size: 1.125rem;
}

.button--cream {
    width: 225px;
    padding: 9px 16px;
    background: var(--cream);
    color: var(--green-dark);
    font-size: 1.1875rem;
}

.button--cream:hover { background: var(--gold-light); color: var(--ink); }

.button--dark {
    padding: 10px 22px;
    background: var(--green-dark);
    color: var(--bg);
    font-family: var(--font-body);
    font-size: 1.25rem;
}

.button-stack {
    display: grid;
    gap: 18px;
    margin-top: 32px;
}

/* Home: quick link to the Sports Pavilion note (a separate venue) on Facilities */
.pavilion-link { margin-top: 36px; }
.pavilion-link h3 { margin-bottom: 0.3em; }
.pavilion-link p { margin: 0; }
.pavilion-link a { font-weight: 600; }

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 24px;
    margin-top: 32px;
}

@media (max-width: 769px) {
    .button-row .button { width: 100%; }
}

@media (min-width: 770px) {
    .button-stack { justify-content: center; }
}

@media (min-width: 1280px) {
    .button--large { min-height: 55px; padding: 10px 21px; font-size: 1.3125rem; }
    .button-stack { justify-content: start; }
}

.download-link {
    font-weight: 600;
}

/* ---------- 4. Header ---------- */
.site-header {
    position: relative;
    background: var(--green-dark);
    color: var(--bg);
}

.site-header__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-block: 84px 18px;
}

.site-logo { display: block; }
.site-logo img { width: 100%; }
.site-logo__wide { display: none !important; }
.site-logo__stacked { width: 270px !important; }

.main-nav { display: none; }

.hire-button {
    position: absolute;
    top: 0;
    right: calc(-1 * var(--gutter));
    padding: 12px 18px;
    background: var(--cream);         /* dark green on cream: 7.67:1, like the footer buttons */
    color: var(--green-dark);
    font-family: var(--font-title);
    font-size: 1.5rem;
    line-height: 1.25;
    text-decoration: none;
    transition: background-color var(--hover), color var(--hover);
}

.hire-button:hover { background: var(--gold-light); color: var(--ink); }

/* Hamburger and close buttons */
.menu-toggle,
.menu-close {
    position: absolute;
    top: 14px;
    left: -6px;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--cream);
    cursor: pointer;
    transition: color var(--hover);
}

.menu-toggle:hover,
.menu-close:hover { color: var(--gold); }

.menu-toggle__bars {
    display: grid;
    gap: 6px;
    width: 40px;
}

.menu-toggle__bars span {
    display: block;
    height: 3px;
    border-radius: 2px;
    background: currentColor;
}

.menu-close__icon {
    position: relative;
    width: 38px;
    height: 38px;
}

.menu-close__icon::before,
.menu-close__icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -4px;
    right: -4px;
    height: 3px;
    margin-top: -1.5px;
    border-radius: 2px;
    background: currentColor;
    transform: rotate(45deg);
}

.menu-close__icon::after { transform: rotate(-45deg); }

/* Slide-down mobile menu (tablet and mobile) */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 1000;
    overflow-y: auto;
    background: var(--green-dark);
    visibility: hidden;
    transform: translateY(-100%);

    @media (prefers-reduced-motion: no-preference) {
        transition: transform 0.45s ease-in-out, visibility 0s linear 0.45s;
    }
}

.mobile-menu.is-open {
    visibility: visible;
    transform: none;

    @media (prefers-reduced-motion: no-preference) {
        transition: transform 0.45s ease-in-out, visibility 0s;
    }
}

.mobile-menu__bar {
    position: relative;
    width: min(var(--container), 100% - 2 * var(--gutter));
    height: 84px;
    margin-inline: auto;
}

.mobile-menu nav ul {
    display: grid;
    gap: 22px;
    padding: 48px var(--gutter) 64px;
    text-align: center;
}

.mobile-menu nav a {
    color: var(--bg);
    font-size: 1.625rem;
    text-decoration: none;
}

.mobile-menu nav a:hover,
.mobile-menu nav a[aria-current="page"] { color: var(--gold-light); }

@media (min-width: 770px) {
    .site-header__inner { padding-block: 90px 22px; }
    .hire-button { right: 0; }
    .menu-toggle, .menu-close { top: 14px; left: -8px; }
}

@media (min-width: 1280px) {
    .site-header__inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-block: 46px;   /* 171px bar: 79px logo centred */
    }

    .site-logo { width: min(371px, 30%); }   /* 75% of the 495px artwork */
    .site-logo__wide { display: block !important; }
    .site-logo__stacked { display: none !important; }

    .menu-toggle,
    .mobile-menu { display: none; }

    .main-nav { display: block; padding: 8px 48px 0 0;   /* lines up with the logo wording, not the house */ }

    .main-nav ul {
        display: flex;
        gap: clamp(28px, 3.2vw, 50px);
    }

    .main-nav a {
        color: var(--bg);
        font-size: 1.25rem;
        text-decoration: none;
    }

    .main-nav a:hover,
    .main-nav a[aria-current="page"] { color: var(--gold-light); }

    .hire-button { padding: 10px 15px; font-size: 1.3125rem; }
}

/* ---------- 5. Heroes ---------- */
.hero { background: var(--cream); }

.hero__frame { position: relative; }

.hero__image,
.slideshow img {
    width: 100%;
    aspect-ratio: 1;       /* mobile: square */
    object-fit: cover;
}

.hero__caption {
    padding: 26px var(--gutter) 28px;
    text-align: center;
}

.hero__title {
    margin: 0;
    font-size: 2.125rem;
    line-height: 1.25;
}

.hero__title--home {
    display: grid;
    gap: 4px;
    font-size: 1.625rem;
}

.hero__subtitle { font-size: 1.125rem; }

/* Inner page titles (25% smaller than the original 34 / 40 / 48px) */
.hero--inner .hero__title { font-size: 1.59375rem; }

/* Hero text sits over the image at every size (home slideshow and inner page titles) */
.hero .hero__caption {
    position: absolute;
    top: 50%;
    left: 50%;
    width: max-content;
    max-width: calc(100% - 2 * var(--gutter));
    padding: 12px 26px;
    background: rgb(248 246 240 / 0.82);
    transform: translate(-50%, -50%);
}

/* Home slideshow: slides stacked, cross-fading */
.slideshow {
    display: grid;
    overflow: hidden;
}

.slideshow__slide {
    grid-area: 1 / 1;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.slideshow__slide.is-active { opacity: 1; }

/* Small, quiet pause / play button in the hero's bottom-right corner */
.slideshow__pause {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgb(248 246 240 / 0.7);
    color: var(--green-dark);
    cursor: pointer;
    transition: background-color var(--hover);
}

.slideshow__pause:hover { background: var(--bg); }
.slideshow__pause[hidden] { display: none; }

.slideshow__pause-icon {
    width: 10px;
    height: 12px;
    border-inline: 3px solid currentColor;
}

.slideshow__pause.is-paused .slideshow__pause-icon {
    margin-left: 2px;
    border: 0;
    background: currentColor;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* Slow, slight zoom-in while a slide is showing (class added by main.js).
   The outgoing slide holds its zoom until it has faded out, then resets. */
@media (prefers-reduced-motion: no-preference) {
    .slideshow__slide img {
        transform: scale(1);
        transition: transform 0s linear 1.2s;
    }

    .slideshow__slide.is-moving img {
        transform: scale(1.06);
        transition: transform 7s ease-out;
    }
}

@media (min-width: 770px) {
    .hero__image { aspect-ratio: 1280 / 475; }
    .slideshow img { aspect-ratio: 1280 / 571; }
    .hero__caption { padding-block: 30px 34px; }
    .hero__title { font-size: 2.5rem; }
    .hero--inner .hero__title { font-size: 1.875rem; }
    .hero--inner .hero__caption { padding: 14px 36px; }
    .hero--home .hero__caption { padding: 16px 32px; }
    .hero__title--home { font-size: 2rem; }
    .hero__subtitle { font-size: 1.5rem; }
}

@media (min-width: 1280px) {
    .hero__frame { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }

    .hero__caption {
        position: absolute;
        top: 50%;
        left: 50%;
        padding: 22px 58px;
        background: rgb(248 246 240 / 0.82);
        transform: translate(-50%, -50%);
        white-space: nowrap;
    }

    .hero__title { font-size: 3rem; }

    .hero__title--home {
        gap: 0;
        font-size: 2rem;
        line-height: 1.35;
    }

    .hero--home .hero__caption { padding: 18px 32px; }
    .hero--inner .hero__title { font-size: 2.25rem; }
    .hero--inner .hero__caption { padding: 16px 44px; }
    .hero__subtitle { font-size: inherit; }
}

/* ---------- 6. Content layouts ---------- */
.content-grid {
    display: grid;
    gap: 40px;
}

.content-grid > * { min-width: 0; }

/* Home: stacked on tablet, two equal columns on desktop */
@media (min-width: 770px) {
    .content-grid--home .facilities-box { width: 65%; margin-inline: auto; }
}

/* About / Facilities / Booking: 60/40 on tablet */
@media (min-width: 770px) {
    .content-grid--inner {
        grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
        gap: 32px;
        align-items: start;
    }
}

@media (min-width: 1280px) {
    .content-grid { padding-inline: var(--content-inset); }

    .content-grid--home {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 64px;
        align-items: start;
    }

    .content-grid--home .facilities-box { width: auto; }
    .content-grid--home .content-main { padding-top: 16px; }

    .content-grid--inner {
        grid-template-columns: minmax(0, 1fr) 425px;
        gap: 44px;
    }

    .content-grid--contact {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 64px;
        align-items: start;
    }
}

/* ---------- 7. Facilities box ---------- */
.facilities-box {
    padding: 30px 22px 32px;
    background: var(--cream);
}

/* Title with a "More →" button on the right */
.facilities-box__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 26px;
}

.facilities-box h2 { margin-bottom: 0; }

.button--small {
    gap: 8px;
    padding: 6px 14px;
    font-size: 1.0625rem;
}

@media (prefers-reduced-motion: no-preference) {
    .button__arrow { transition: transform var(--hover); }
    .button:hover .button__arrow { transform: translateX(3px); }
}

.facilities-list {
    display: grid;
    gap: 12px;
}

.facilities-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--green-dark);
    font-size: 1.0625rem;
    line-height: 1.45;
}

.facilities-list img {
    flex: 0 0 auto;
    width: 74px;
}

@media (min-width: 1280px) {
    .facilities-box { padding: 40px 30px 34px; }
    .facilities-list img { width: 87px; }
}

/* ---------- 8. Gallery ---------- */
.gallery {
    --gallery-h: 230px;
    --gallery-gap: 14px;
    --gallery-inset: 40px;
    --arrow-w: 24px;

    position: relative;
    padding-bottom: 56px;
}

/* Invisible: marks the "in focus" area that the JS aligns photos to */
.gallery__window {
    position: absolute;
    top: 0;
    left: var(--gallery-inset);
    right: var(--gallery-inset);
    height: 1px;
    visibility: hidden;
    pointer-events: none;
}

.gallery__viewport {
    overflow: hidden;
    touch-action: pan-y;
}

.gallery__track {
    display: flex;
    gap: var(--gallery-gap);
    width: max-content;
    padding-left: var(--gallery-inset);   /* starting position before JS takes over */
    will-change: transform;
}

.gallery.is-ready .gallery__track { padding-left: 0; }

@media (prefers-reduced-motion: no-preference) {
    .gallery__track.is-animating { transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1); }
}

.gallery__slide {
    flex: 0 0 auto;
    opacity: 0.45;
    transition: opacity 0.8s ease-in-out;
}

.gallery__slide.is-visible { opacity: 1; }

.gallery__slide img {
    width: auto;
    max-width: none;
    height: var(--gallery-h);
    user-select: none;
    -webkit-user-drag: none;
}

.gallery__arrow {
    position: absolute;
    top: calc(var(--gallery-h) / 2);
    display: grid;
    place-items: center;
    width: 44px;
    height: 72px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--green-dark);
    cursor: pointer;
    transform: translateY(-50%);
    transition: color var(--hover);
}

.gallery__arrow::before {
    content: "";
    width: var(--arrow-w);
    height: calc(var(--arrow-w) * 2);
    background: currentColor;
}

.gallery__arrow--prev { left: max(0px, var(--gallery-inset) * 0.5 - 22px); }
.gallery__arrow--prev::before { clip-path: polygon(100% 0, 0 50%, 100% 100%); }
.gallery__arrow--next { right: max(0px, var(--gallery-inset) * 0.5 - 22px); }
.gallery__arrow--next::before { clip-path: polygon(0 0, 100% 50%, 0 100%); }

.gallery__arrow:hover { color: var(--gold); }

/* Pause / play the automatic scrolling – styled like the cream footer buttons */
.gallery__controls {
    display: flex;
    justify-content: center;
    margin-top: 22px;
}

.gallery__pause {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 20px;
    border: 0;
    background: var(--cream);
    color: var(--green-dark);
    font-family: var(--font-title);
    font-size: 1.0625rem;
    cursor: pointer;
    transition: background-color var(--hover), color var(--hover);
}

.gallery__pause:hover { background: var(--green-dark); color: var(--bg); } /* 8.64:1 */

.gallery__pause[hidden] { display: none; }

/* Icon: two bars while playing (press to pause), a triangle when paused (press to play) */
.gallery__pause-icon {
    width: 12px;
    height: 14px;
    border-inline: 4px solid currentColor;
}

.gallery__pause.is-paused .gallery__pause-icon {
    border: 0;
    background: currentColor;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

@media (min-width: 770px) {
    .gallery {
        --gallery-h: 440px;
        --gallery-gap: 20px;
        --gallery-inset: 80px;
        --arrow-w: 28px;
        padding-bottom: 72px;
    }
}

@media (min-width: 1280px) {
    .gallery {
        --gallery-h: 510px;
        --gallery-gap: 48px;
        /* aligns the first photo with the body content edge */
        --gallery-inset: calc((100% - min(var(--container), 100% - 2 * var(--gutter))) / 2 + var(--content-inset));
        --arrow-w: 30px;
        padding-bottom: 76px;
    }
    /* Triangles sit 40px from the browser edge (button is wider than its triangle) */
    .gallery__arrow--prev { left: calc(40px - (44px - var(--arrow-w)) / 2); }
    .gallery__arrow--next { right: calc(40px - (44px - var(--arrow-w)) / 2); }
}

/* Hire charges (Hire the Hall page) */
/* Full-width single-column body (inset to line up with other pages on desktop) */
@media (min-width: 1280px) {
    .page-body { padding-inline: var(--content-inset); }
}

/* Full-column photos in body copy (Facilities, About) – keep a 715 × 400 shape and scale down on smaller screens */
.content-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 715 / 400;
    object-fit: cover;
    margin-bottom: 1.35em;
}

/* Placeholder block for photos still to come */
.image-placeholder {
    display: grid;
    place-items: center;
    height: 400px;
    margin-bottom: 1.35em;
    padding: 20px;
    background: var(--cream);
    color: var(--green-dark);
    font-family: var(--font-title);
    font-size: 1.25rem;
    text-align: center;
}

/* Hall Booking Online calendar (Hire the Hall) – the embed sizes its own height */
.booking-calendar {
    margin-bottom: 1.35em;
    min-height: 520px;
}

/* Section divider */
.divider {
    height: 0;
    margin: 48px 0;
    border: 0;
    border-top: 1px solid var(--green-light);
}

/* FAQ (Booking Information) */
.faq { margin: 0 0 1.35em; }

.faq dt {
    margin-top: 1.2em;
    color: var(--green-dark);
    font-family: var(--font-title);
    font-size: 1.1875rem;
}

.faq dt:first-child { margin-top: 0; }

.faq dd {
    margin: 0.3em 0 0;
}

/* Privacy policy */
.policy__meta {
    margin-top: 2.5em;
    padding-top: 1.2em;
    border-top: 1px solid var(--cream);
    color: #5b5b57;
    font-size: 0.9375rem;
}

.price-list {
    display: grid;
    gap: 10px;
    margin-bottom: 1.1em;
}

/* Room name with its price underneath */
.price-list li {
    display: grid;
    gap: 2px;
    padding: 14px 20px;
    background: var(--cream);
}

.price-list strong {
    color: var(--green-dark);
    font-family: var(--font-title);
    font-weight: 400;
    font-size: 1.1875rem;
}

/* ---------- 9. What's On ---------- */
.intro { margin-bottom: 40px; }

.hirers {
    display: grid;
    gap: 40px;
}

.hirer {
    display: grid;
    gap: 20px;
}

.hirer__logo {
    width: min(228px, 100%);
    border-radius: 14px;
    overflow: hidden;
    background: var(--green-dark);
}

.hirer__logo img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* Name tile for hirers without a logo – matches the supplied tile logos */
.hirer__tile {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    padding: 12%;
    background: var(--green-dark);
    color: var(--cream);
    font-size: 1.625rem;
    line-height: 1.25;
    text-align: center;
}

.hirer__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
}

.hirer__contact {
    margin: 0;
    color: var(--green-dark);
    font-weight: 600;
}

.hirer h3 { margin-bottom: 0; }

/* Name with schedule tag: tag below the name on mobile, top right from tablet up */
.hirer__head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 0.7em;
}

.hirer__when {
    margin: 0;
    padding: 5px 14px;
    background: var(--cream);
    color: var(--green-dark);
    font-family: var(--font-title);
    font-size: 1rem;
    line-height: 1.4;
}

/* Jump buttons under the intro */
.jump-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-top: 28px;
}

/* Weekly / Monthly / Additional sections */
.hirer-group + .hirer-group { margin-top: 64px; }

.hirer-group__title {
    margin-bottom: 32px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--green-light);
    font-size: 1.875rem;
}

.hirer-group__note {
    margin: 40px 0 0;
    padding: 20px 24px;
    background: var(--cream);
    color: var(--green-dark);
}

@media (max-width: 769px) {
    .jump-links .button { flex: 1 1 100%; }

    /* Mobile: more space between hirers, with a white rule between each */
    .hirers { gap: 0; }

    .hirer + .hirer {
        margin-top: 44px;
        padding-top: 44px;
        border-top: 2px solid #fff;
    }
}

@media (min-width: 770px) {
    .hirer__head {
        flex-direction: row;
        justify-content: space-between;
        gap: 16px;
    }

    .hirer__when { flex: 0 0 auto; max-width: 50%; text-align: center; }
}
.hirer p { font-size: 1.0625rem; }

.hirer .button { font-size: 1rem; padding: 8px 17px; }

@media (min-width: 770px) {
    .hirers { gap: 36px; }

    .hirer {
        grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
        gap: 32px;
        align-items: center;
    }

    .hirer__logo { width: 100%; max-width: 228px; }
}

@media (min-width: 1280px) {
    .intro,
    .hirers,
    .hirer-group__title,
    .hirer-group__note { margin-inline: var(--content-inset); }
    .intro, .hirers { padding-inline: 0; }

    .intro { margin-bottom: 56px; }

    .hirer { grid-template-columns: 228px minmax(0, 1fr); gap: 40px; }
    .hirer .button { font-size: 1.0625rem; }
}

/* ---------- 10. Contact ---------- */
.contact-form form { margin-top: 28px; }

.contact-form__intro { margin: 0; }

/* Email address shown while the contact form is switched off */
.contact-email { margin: 18px 0 0; font-size: 1.25rem; font-weight: 600; overflow-wrap: anywhere; }

.contact-form__field { margin-bottom: 26px; }

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 1.25rem;
}

.contact-form__optional { font-size: 1rem; color: #5b5b57; }

.contact-form input,
.contact-form textarea {
    display: block;
    width: 100%;
    padding: 15px 17px;
    border: 1px solid var(--green-dark);
    border-radius: 8px;
    background: var(--cream);
    color: var(--text);
    font: inherit;
    transition: border-color var(--hover);
}

.contact-form input { min-height: 62px; }
.contact-form textarea { min-height: 238px; resize: vertical; }

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
    outline: 2px solid var(--green-dark);
    outline-offset: 2px;
}

.contact-form [aria-invalid="true"] { border-color: var(--error); }

.contact-form__error {
    margin: 8px 0 0;
    color: var(--error);
    font-size: 1rem;
}

.contact-form__alert {
    margin: 0 0 26px;
    padding: 14px 18px;
    border-left: 4px solid var(--error);
    background: #f8e6e4;
    color: var(--error);
}

.contact-form__success {
    margin-top: 28px;
    padding: 28px;
    background: var(--cream);
}

.contact-form__success-title {
    margin-bottom: 0.4em;
    color: var(--green-dark);
    font-family: var(--font-title);
    font-size: 1.625rem;
}

.contact-form__success p:last-child { margin-bottom: 0; }

/* Honeypot – off-screen for people, still in the form for bots */
.contact-form__hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-form__turnstile { margin-bottom: 26px; }

.contact-form__privacy {
    margin: 18px 0 0;
    font-size: 0.9375rem;
    color: #5b5b57;
}

.find-us__title { margin-top: 48px; }

.find-us__address { margin-bottom: 16px; }

.call-us { margin: 0; }
.call-us + .call-us { margin-top: 10px; }
.call-us a { font-weight: 600; white-space: nowrap; }

.map {
    margin-bottom: 28px;
    background: var(--cream);
}

.map iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 550 / 382;
    border: 0;
}

@media (min-width: 770px) {
    .find-us__title { margin-top: 64px; }
}

/* ---------- 11. Footer ---------- */
.site-footer {
    background: var(--green-dark);
    color: var(--bg);
}

.site-footer__inner {
    display: grid;
    gap: 40px;
    justify-items: center;
    padding-top: 48px;
    text-align: center;
}

.site-footer__title {
    margin-bottom: 18px;
    color: var(--bg);
    font-size: 1.875rem;
}

.site-footer__links ul { display: grid; gap: 12px; }

.site-footer a:not(.button) {
    color: var(--bg);
    font-size: 1.1875rem;
    text-decoration: none;
}

.site-footer a:not(.button):hover { color: var(--gold-light); }

.site-footer__brand { order: 3; }
.site-footer__brand img { width: 270px; margin-inline: auto; }

.site-footer__address {
    margin-top: 14px;
    font-size: 0.9375rem;
    opacity: 0.85;
}

.site-footer__buttons { display: grid; gap: 14px; }

.site-footer__legal {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 28px var(--gutter) 32px;
    font-size: 0.875rem;
    text-align: center;
}

.site-footer__legal a:not(.button) { font-size: inherit; }

.site-footer__sep { display: none; }

@media (min-width: 1280px) {
    .site-footer__inner {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: start;
        justify-items: stretch;
        padding: 52px var(--content-inset) 0;
        text-align: left;
    }

    .site-footer__brand { order: 0; text-align: center; }
    .site-footer__brand img { width: 303px; }
    .site-footer__buttons { justify-self: end; }

    .site-footer__legal {
        display: block;
        padding-top: 40px;
    }

    .site-footer__sep { display: inline; margin-inline: 0.6em; }
}

/* ---------- 12. Scroll animations ----------
   Added by scripts/main.js. Full-width elements fade in up; half-width
   elements slide in from their side. Without JS, or with reduced motion,
   everything is simply visible. */
@media (prefers-reduced-motion: no-preference) {
    .js [data-animate] {
        opacity: 0;
        transition: opacity var(--reveal), transform var(--reveal);
    }

    .js [data-animate="up"] { transform: translateY(40px); }
    .js [data-animate="left"] { transform: translateX(-60px); }
    .js [data-animate="right"] { transform: translateX(60px); }

    .js [data-animate].is-in {
        opacity: 1;
        transform: none;
    }
}

/* Where the two columns stack, they become full width – so fade up */
@media (prefers-reduced-motion: no-preference) and (max-width: 769px) {
    .js [data-animate="left"]:not(.is-in),
    .js [data-animate="right"]:not(.is-in) { transform: translateY(40px); }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 1279px) {
    .js .content-grid--home [data-animate]:not(.is-in),
    .js .content-grid--contact [data-animate]:not(.is-in) { transform: translateY(40px); }
}

/* ---------- 13. Reduced motion ----------
   Each movement above only runs inside @media (prefers-reduced-motion: no-preference),
   so visitors who ask for less motion get static pages; colour/hover fades stay. */

/* ---------- 14. Page-to-page cross-fade ----------
   Chrome, Edge and Safari 18.2+ fade between pages; other browsers just load
   the next page. To remove: delete this block. */
@media (prefers-reduced-motion: no-preference) {
    @view-transition {
        navigation: auto;
    }

    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 0.35s;
    }
}
