:root {
    color-scheme: light dark;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;

    --page: #fbfaf7;
    --panel: #ffffff;
    --ink: #1c2230;
    --quiet: #566072;
    --line: #dcd9d0;
    /* The edge of a control: 3:1 or more against the page and the panel, where --line is only decoration. */
    --edge: #7f8693;
    --accent: #2f4fd8;
    --on-accent: #ffffff;
    --measure: 68rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --page: #11141b;
        --panel: #1a1f2a;
        --ink: #eceef3;
        --quiet: #a6aebd;
        --line: #2e3545;
        --edge: #727b90;
        --accent: #8fa6ff;
        --on-accent: #0d1220;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--accent);
}

h1,
h2,
h3 {
    line-height: 1.2;
    text-wrap: balance;
}

h2 {
    margin: 0 0 1.5rem;
    font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
}

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

.skip {
    position: absolute;
    left: 0.5rem;
    top: -4rem;
    z-index: 2;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background: var(--panel);
}

.skip:focus {
    top: 0.5rem;
}

.top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    max-width: var(--measure);
    margin: 0 auto;
    padding: 1rem 1.25rem;
}

.brand {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.top ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.top nav a {
    display: inline-block;
    padding: 0.4rem 0;
    color: inherit;
    text-decoration: none;
}

.top nav a:hover {
    text-decoration: underline;
}

/* The words sit on the picture, so their colours are fixed and the picture is darkened under them in both schemes. */
.hero {
    position: relative;
    display: grid;
    place-items: center;
    min-height: min(32rem, 80vh);
    overflow: hidden;
    background: #0d1220;
    color: #ffffff;
    text-align: center;
}

.hero-picture {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
}

.hero-words {
    position: relative;
    max-width: 48rem;
    padding: 4rem 1.25rem;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.2rem, 1.4rem + 3.6vw, 4rem);
}

.tagline {
    margin: 1rem 0 2rem;
    font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem);
}

.button {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    border: 0;
    border-radius: 0.6rem;
    background: var(--accent);
    color: var(--on-accent);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.button:hover {
    filter: brightness(1.1);
}

.hero .button {
    background: #ffffff;
    color: #0d1220;
}

.band {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 4rem 1.25rem;
    /* A section jumped to from the menu clears the top of the window. */
    scroll-margin-top: 1rem;
}

.about {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

.about-picture {
    width: 100%;
    max-width: 24rem;
    margin: 0 auto;
    border-radius: 0.75rem;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

@media (min-width: 48rem) {
    .about {
        grid-template-columns: 3fr 2fr;
    }
}

.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

#services-heading,
#contact-heading {
    text-align: center;
}

.service {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    background: var(--panel);
}

.service img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.service h3 {
    margin: 1.25rem 1.25rem 0.5rem;
    font-size: 1.2rem;
}

.service p {
    margin: 0 1.25rem 1.5rem;
    color: var(--quiet);
}

.contact {
    max-width: 40rem;
}

.field {
    margin: 0 0 1rem;
}

.field label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.field input,
.field textarea {
    display: block;
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--edge);
    border-radius: 0.5rem;
    background: var(--panel);
    color: inherit;
    font: inherit;
}

.field textarea {
    resize: vertical;
}

.turnstile:not(:empty) {
    margin-bottom: 1rem;
}

.status:empty {
    display: none;
}

#contact-address,
.hours {
    text-align: center;
}

.hours {
    color: var(--quiet);
}

.foot {
    padding: 2rem 1.25rem 3rem;
    border-top: 1px solid var(--line);
    color: var(--quiet);
    font-size: 0.9rem;
    text-align: center;
}

.foot p {
    margin: 0.25rem 0;
}

.missing {
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
