:root {
    --container-max-width: 1280px;
    --page-gutter: clamp(1rem, 4vw, 2rem);
    /* How far full-width rounded blocks (the hero, tinted bands) sit from the edge of the screen. */
    --band-inset: clamp(0.5rem, 1.5vw, 1rem);
    --section-space: clamp(3.5rem, 8vw, 6rem);
    --grid-gap: 1.25rem;

    --color-primary: rgb(12 113 195);
    --color-primary-dark: rgb(10 92 160);
    --color-primary-light: rgb(124 192 245);
    --color-primary-soft: color-mix(in srgb, var(--color-primary) 9%, #fff);
    /* The sun from the logo (rgb(255 242 0) there), a touch warmer so it still reads as yellow on white. Only
       ever a background or decoration: pair it with --color-ink text, never use it as a text color. */
    --color-accent: rgb(255 214 0);
    --color-accent-dark: rgb(245 192 0);
    --color-accent-soft: color-mix(in srgb, var(--color-accent) 14%, #fff);
    --color-ink: rgb(11 29 48);
    --color-surface: rgb(243 247 251);
    --color-text-muted: rgb(75 85 99);
    --color-border: color-mix(in srgb, var(--color-ink) 8%, transparent);
    --color-border-strong: color-mix(in srgb, var(--color-ink) 16%, transparent);

    --radius-sm: 0.75rem;
    --radius-md: 1.25rem;
    --radius-lg: 1.5rem;
    --radius-pill: 999px;

    --shadow-sm: 0 0.25rem 0.75rem -0.25rem color-mix(in srgb, var(--color-ink) 12%, transparent);
    --shadow-lg: 0 1.25rem 2.5rem -1.25rem color-mix(in srgb, var(--color-ink) 25%, transparent);

    --duration: 0.25s;
}


/* || RESET */

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

html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

body {
    min-height: 100vh;
    line-height: 1.6;
    font-family: 'Red Hat Display', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--color-ink);
    background-color: #fff;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
}

/* || UTILITIES */

.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin-inline: auto;
    padding-inline: var(--page-gutter);
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.hidden {
    display: none;
}

/* Hidden on screen but still read out by screen readers. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Vertical rhythm: every section is spaced the same from the one before, the last one also from the footer. */
.section {
    padding-block-start: var(--section-space);
}

.section:last-child {
    padding-block-end: var(--section-space);
}

/*
 * Bands: a section on a coloured block, inset with rounded corners like the hero. Put the content in a .container
 * inside. --tinted is light blue; --brand is the solid brand blue, for the sections that should stand out most.
 * Don't put two of the same kind directly after each other.
 */
.section--tinted,
.section--brand {
    margin: var(--section-space) var(--band-inset) 0;
    padding-block: var(--section-space);
    border-radius: var(--radius-lg);
}

/* As the last section the band would butt against the footer; keep the usual section space between them. */
.section--tinted:last-child,
.section--brand:last-child {
    margin-block-end: var(--section-space);
}

/*
 * Light blue. Cards on it are white instead of the usual light grey-blue, to stand out from the band. (No yellow
 * in here: yellow over the blue tint mixes to a muddy green.)
 */
.section--tinted {
    --color-surface: #fff;

    background:
        radial-gradient(circle at 0 0, rgb(255 255 255 / 0.7), transparent 28rem),
        var(--color-primary-soft);
}

/* The primary blue is just short of 4.5:1 on the tint, so small blue text uses the darker shade there. */
.section--tinted .section-heading__eyebrow {
    color: var(--color-primary-dark);
}

/*
 * Solid brand blue. The heading turns white and the buttons yellow and white; cards on it keep their own
 * colours. The gradient only darkens, so white text keeps at least 5:1 everywhere on it.
 */
.section--brand {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}

.section--brand .section-heading__title,
.section--brand .section-heading__description {
    color: #fff;
}

/* A yellow label rather than yellow text, which would be too faint on the blue. */
.section--brand .section-heading__eyebrow {
    width: fit-content;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    color: var(--color-ink);
    background-color: var(--color-accent);
}

.section--brand .button:not(.button--outline, .button--glass) {
    color: var(--color-ink);
    background-color: var(--color-accent);
}

.section--brand .button:not(.button--outline, .button--glass):hover {
    background-color: var(--color-accent-dark);
}

.section--brand .button--outline {
    border-color: rgb(255 255 255 / 0.6);
    color: #fff;
    background-color: transparent;
}

.section--brand .button--outline:hover {
    border-color: #fff;
    color: var(--color-primary-dark);
    background-color: #fff;
}

.section--brand .button:focus-visible {
    outline-color: #fff;
}

.section-heading {
    margin-block-end: 2.5rem;
}

.section-heading__eyebrow {
    margin-block-start: 0;
    margin-block-end: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.section-heading__title {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.section-heading__description {
    max-width: 65ch;
    margin-block: 1rem 0;
    color: var(--color-text-muted);
}

/* The heading at the top of a page, with the page's h1: bigger than a section heading. */
.section-heading--page .section-heading__title {
    font-size: clamp(2rem, 4vw, 3rem);
    text-wrap: balance;
}

/* || COMPONENTS */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    text-decoration: none;
    background-color: var(--color-primary);
    cursor: pointer;
    transition: background-color var(--duration);
}

.button:hover {
    background-color: var(--color-primary-dark);
}

.button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

.button svg {
    transition: translate var(--duration);
}

.button:hover svg {
    translate: 0.25rem 0;
}

/* Sunny variant in the logo's yellow. Use it sparingly, for the one action on a page that should stand out. */
.button--accent {
    color: var(--color-ink);
    background-color: var(--color-accent);
}

.button--accent:hover {
    background-color: var(--color-accent-dark);
}

/* Frosted variant for use on top of photos and video. */
.button--glass {
    border-color: rgb(255 255 255 / 0.4);
    background-color: rgb(255 255 255 / 0.12);
    backdrop-filter: blur(8px);
}

.button--glass:hover {
    background-color: rgb(255 255 255 / 0.22);
}

/* Secondary variant for use on light backgrounds. */
.button--outline {
    border-color: var(--color-border-strong);
    color: var(--color-ink);
    background-color: #fff;
}

.button--outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background-color: #fff;
}

/* A row of buttons, wrapping onto more lines on small screens. */
.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* A white icon on a blue tile, for 24px icons. */
.icon-tile {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-sm);
    color: #fff;
    background-color: var(--color-primary);
}

/*
 * The waves from the logo along the bottom of a block: rows of scallops with pointed crests, thin at the top and
 * thickening into solid water at the bottom, each row shifted a little to the left, as in the logo. One 20 × 60
 * tile, one scallop wide, repeated across; at the default font size it renders at exactly 20 × 60 pixels, so
 * the tiles join without seams. The SVG is only a mask, so the colour comes from the background below.
 *
 * Add .waves to the block. The waves sit behind its content, so leave --waves-height of room at the bottom (see
 * the padding of .help__card). Change --waves-color and --waves-opacity to suit the background. The bottom corners
 * follow the block's own, as the block isn't clipped (that would cut off focus outlines).
 */
.waves {
    --waves-height: 3.75rem;
    --waves-color: var(--color-primary);
    --waves-opacity: 0.14;

    position: relative;
    isolation: isolate;
}

.waves::before {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    height: var(--waves-height);
    border-bottom-right-radius: inherit;
    border-bottom-left-radius: inherit;
    background-color: var(--waves-color);
    opacity: var(--waves-opacity);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='60' viewBox='0 0 20 60'%3E%3Cpath d='M-20 1a14.5 14.5 0 0 0 20 0 14.5 14.5 0 0 0 20 0 14.5 14.5 0 0 0 20 0v3a14.5 14.5 0 0 1-20 0 14.5 14.5 0 0 1-20 0 14.5 14.5 0 0 1-20 0zM-23 15a14.5 14.5 0 0 0 20 0 14.5 14.5 0 0 0 20 0 14.5 14.5 0 0 0 20 0v6a14.5 14.5 0 0 1-20 0 14.5 14.5 0 0 1-20 0 14.5 14.5 0 0 1-20 0zM-26 31a14.5 14.5 0 0 0 20 0 14.5 14.5 0 0 0 20 0 14.5 14.5 0 0 0 20 0v10a14.5 14.5 0 0 1-20 0 14.5 14.5 0 0 1-20 0 14.5 14.5 0 0 1-20 0zM-29 48a14.5 14.5 0 0 0 20 0 14.5 14.5 0 0 0 20 0 14.5 14.5 0 0 0 20 0V60H-29z'/%3E%3C/svg%3E") repeat-x left bottom / auto var(--waves-height);
    pointer-events: none;
}

/* Short labels, such as brand names, as a row of pills. */
.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pill-list li {
    padding: 0.375rem 0.875rem;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 600;
    background-color: #fff;
}

/* The opening hours per day (template-parts/opening-hours.php), the closed days toned down. */
.opening-hours {
    margin: 0;
}

.opening-hours__day {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.625rem;
    border-block-end: 1px solid var(--color-border);
}

.opening-hours__day:first-child {
    padding-block-start: 0;
}

.opening-hours__day:last-child {
    padding-block-end: 0;
    border-block-end: 0;
}

.opening-hours__day dt {
    font-weight: 600;
}

.opening-hours__day dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.opening-hours__day--closed {
    color: var(--color-text-muted);
}

.opening-hours__day--closed dt {
    font-weight: 400;
}

/*
 * Contact Form 7 forms: wrap the shortcode in .form. This styles the fields; how they are laid out (a grid on
 * the inner form element) is up to each form.
 */
.form {
    --form-label-size: 0.875rem;
    --form-label-gap: 0.375rem;
    /* The height of a field label (one line of text plus the gap to its input), to line things up with inputs. */
    --form-label-offset: calc(var(--form-label-size) * 1.6 + var(--form-label-gap));
}

.form p {
    position: relative;
    margin: 0;
}

.form label {
    display: flex;
    flex-direction: column;
    gap: var(--form-label-gap);
    font-size: var(--form-label-size);
    font-weight: 600;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.form input,
.form textarea {
    display: block;
    width: 100%;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    line-height: 1.2;
    transition: border-color var(--duration), background-color var(--duration);
}

.form textarea {
    min-height: 10rem;
    border-radius: var(--radius-md);
    line-height: 1.6;
    resize: vertical;
}

.form input:not([type='submit']),
.form textarea {
    border: 1px solid var(--color-border-strong);
    color: var(--color-ink);
    background-color: #fff;
}

.form input:not([type='submit']):hover,
.form textarea:hover {
    border-color: color-mix(in srgb, var(--color-ink) 30%, transparent);
}

.form input:focus-visible,
.form textarea:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

/* Contact Form 7 renders its own submit input, so it mirrors .button here. The transparent border keeps it the
   same height as the inputs. */
.form input[type='submit'] {
    border: 1px solid transparent;
    font-weight: 700;
    color: #fff;
    background-color: var(--color-primary);
    cursor: pointer;
}

.form input[type='submit']:hover {
    background-color: var(--color-primary-dark);
}

/*
 * While the form is sending, Contact Form 7's spinner takes the place of the button's label, centered on the
 * button. The button keeps its size, so nothing around it shifts. Recolored white to suit the blue button.
 * This needs the paragraph around the button to be exactly as big as the button.
 */
.form .wpcf7-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    margin: 0;
    translate: -50% -50%;
    opacity: 1;
    background-color: rgb(255 255 255 / 0.3);
    pointer-events: none;
}

.form .wpcf7-spinner::before {
    background-color: #fff;
}

.form form.submitting input[type='submit'] {
    color: transparent;
    cursor: progress;
}

.form .wpcf7-not-valid-tip {
    margin-block-start: 0.375rem;
    padding-inline-start: 1.25rem;
    font-size: 0.875rem;
    color: #c81e1e;
}

.form .wpcf7 form .wpcf7-response-output {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0.75rem 1.25rem;
    border-width: 1px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

/* || HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    border-block-end: 1px solid var(--color-border);
    background-color: rgb(255 255 255 / 0.85);
    backdrop-filter: blur(12px);
}

.site-header__inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 2rem;
    min-height: 4.5rem;
    padding-block: 0.75rem;
}

/*
 * The logo is a white "sticker" that hangs below the header bar. The negative bottom margin cancels out
 * everything taller than 3rem, so the bar keeps its own height and the rest overflows onto the page.
 */
.site-header__logo {
    --logo-height: clamp(4.25rem, 6vw, 5rem);
    --logo-padding: clamp(0.5rem, 1vw, 0.75rem);

    position: relative;
    z-index: 1;
    align-self: flex-start;
    margin-block-end: calc(3rem - var(--logo-height) - 2 * var(--logo-padding));
    padding: var(--logo-padding) calc(var(--logo-padding) * 1.5);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: #fff;
    box-shadow: var(--shadow-lg);
    rotate: -2deg;
    transition: rotate var(--duration), scale var(--duration);
}

.site-header__logo:hover {
    rotate: 0deg;
    scale: 1.03;
}

.site-header__logo:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

.site-header__logo img {
    width: auto;
    height: var(--logo-height);
}

.site-nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-pill);
    font-weight: 600;
    color: var(--color-ink);
    background-color: #fff;
    cursor: pointer;
}

.site-nav__toggle[hidden],
.site-nav__toggle[aria-expanded='true'] .site-nav__icon-open,
.site-nav__toggle[aria-expanded='false'] .site-nav__icon-close {
    display: none;
}

.site-nav__toggle:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

.site-nav__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav__list a {
    display: block;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    color: var(--color-ink);
    text-decoration: none;
    transition: color var(--duration), background-color var(--duration);
}

.site-nav__list a:hover {
    background-color: var(--color-surface);
}

.site-nav__list a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

.site-nav__list .current-menu-item > a {
    color: var(--color-primary);
    background-color: color-mix(in srgb, var(--color-primary) 8%, transparent);
}

.site-nav__list .site-nav__cta > a {
    color: #fff;
    background-color: var(--color-primary);
}

.site-nav__list .site-nav__cta > a:hover,
.site-nav__list .site-nav__cta.current-menu-item > a {
    color: #fff;
    background-color: var(--color-primary-dark);
}

@media (max-width: 63.99rem) {
    .site-nav--js .site-nav__toggle[aria-expanded='false'] + .site-nav__list {
        display: none;
    }

    .site-nav--js .site-nav__list {
        position: absolute;
        z-index: 2;
        top: calc(100% + 0.5rem);
        right: var(--page-gutter);
        left: var(--page-gutter);
        flex-direction: column;
        padding: 0.75rem;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        background-color: #fff;
        box-shadow: var(--shadow-lg);
    }

    .site-nav--js .site-nav__list a {
        padding: 0.875rem 1rem;
        border-radius: var(--radius-sm);
    }

    .site-nav--js .site-nav__list .site-nav__cta {
        margin-block-start: 0.25rem;
    }

    .site-nav--js .site-nav__list .site-nav__cta > a {
        border-radius: var(--radius-pill);
        text-align: center;
    }
}

@media (min-width: 64rem) {
    .site-nav__toggle {
        display: none;
    }

    .site-nav__list .site-nav__cta {
        margin-inline-start: 0.5rem;
    }
}

/* || FOOTER */

/*
 * Brand blue, deepening towards the bottom. The gradient only gets darker, so the text keeps at least 4.5:1
 * everywhere: 85% white, and the yellow headings, measured against the lightest blue at the top.
 *
 * The top edge is a wave: the footer reserves --footer-wave-height at the top, and a mask cuts that strip into the
 * shape in footer-wave.svg (the rest of the footer is fully shown by the second mask layer, overlapping by a pixel
 * so no seam shows). Being part of the footer itself, the wave carries the same gradient.
 *
 * The footer moves up into the white space below the last section, but leaves 1rem, so the highest point of the
 * wave stays clear of the content above it on every screen size.
 */
.site-footer {
    --footer-wave-height: 6rem;

    margin-block-start: calc(1rem - var(--section-space));
    padding-block-start: var(--footer-wave-height);
    color: rgb(255 255 255 / 0.85);
    background: linear-gradient(
        to bottom,
        var(--color-primary-dark),
        color-mix(in srgb, var(--color-primary-dark) 75%, var(--color-ink))
    );
    mask:
        url('../image/footer-wave.svg') top / 100% var(--footer-wave-height) no-repeat,
        linear-gradient(#000, #000) bottom / 100% calc(100% - var(--footer-wave-height) + 1px) no-repeat;
}

.site-footer a {
    color: inherit;
    text-decoration: none;
    transition: color var(--duration);
}

.site-footer a:hover {
    color: #fff;
}

.site-footer a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
    border-radius: 0.25rem;
}

.site-footer__inner {
    display: grid;
    gap: 2.5rem;
    padding-block: var(--section-space) 3rem;
}

@media (min-width: 40rem) {
    .site-footer__inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 64rem) {
    .site-footer__inner {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        gap: 3rem;
    }
}

.site-footer h2 {
    margin-block: 0 1.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.site-footer .site-footer__logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
}

.site-footer__brand p {
    max-width: 34ch;
    margin-block: 1rem 0;
}

.site-footer__list {
    display: grid;
    gap: 0.625rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__contact {
    gap: 1rem;
}

.site-footer__contact li {
    display: flex;
    gap: 0.75rem;
}

.site-footer__contact svg {
    flex-shrink: 0;
    margin-block-start: 0.125rem;
    color: var(--color-accent);
}

.site-footer address {
    font-style: normal;
}

.site-footer__hours {
    display: grid;
    gap: 1rem;
    margin: 0;
}

.site-footer__hours dt {
    font-size: 0.875rem;
}

.site-footer__hours dd {
    margin: 0;
    font-weight: 600;
    color: #fff;
}

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding-block: 1.5rem;
    border-block-start: 1px solid rgb(255 255 255 / 0.2);
    font-size: 0.875rem;
}

.site-footer__bottom p {
    margin: 0;
}

.site-footer__bottom small {
    font-size: inherit;
}

.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
