:root {
    /* The front page is wider: see frontpage.css. */
    --container-max-width: 1280px;
    --page-gutter: clamp(1rem, 4vw, 2rem);
    --section-spacing: clamp(3.5rem, 8vw, 6.5rem);
    --header-height: 5rem;

    --color-primary: rgb(12 113 195);
    --color-primary-dark: rgb(10 92 160);
    --color-primary-light: rgb(124 192 245);
    --color-ink: rgb(11 29 48);
    --color-surface: rgb(243 247 251);
    --color-text-muted: rgb(75 85 99);
    --color-border: rgb(11 29 48 / 0.1);
    --color-white: rgb(255 255 255);

    --radius-small: 6px;
    --radius-medium: 20px;
    --radius-large: 30px;
    --shadow-card: 0 18px 40px -24px rgb(11 29 48 / 0.35);

    --icon-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16M14 6l6 6-6 6'/%3E%3C/svg%3E");
    --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}


/* || RESET */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    min-height: 100vh;
    margin: 0;
    line-height: 1.6;
    font-family: 'Quicksand', ui-rounded, 'Hiragino Maru Gothic ProN', Calibri, sans-serif;
    font-weight: 500;
    color: var(--color-ink);
    background-color: var(--color-surface);
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

img,
video {
    height: auto;
}

input,
button,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
}

a {
    color: var(--color-primary);
}

:focus-visible {
    outline: 3px solid var(--color-primary-light);
    outline-offset: 2px;
}

[hidden] {
    display: none !important;
}

section[id] {
    scroll-margin-top: var(--header-height);
}

/* || 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;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    z-index: 1000;
    top: 0.75rem;
    left: 0.75rem;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0.75rem 1.25rem;
    clip-path: none;
    font-weight: 700;
    text-decoration: none;
    color: var(--color-white);
    background-color: var(--color-ink);
    border-radius: var(--radius-small);
}

/* 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-spacing);
}

.section:last-child {
    padding-block-end: var(--section-spacing);
}

.section-heading {
    margin-block-end: 1.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: 1.5rem;
    font-weight: 700;
}

.section-heading__description {
    margin-block-start: 0.75rem;
    margin-block-end: 0;
    color: var(--color-text-muted);
    max-width: 65ch;
}

/* 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;
}

/* Paragraphs in page content keep a readable line length. Not on the front page, which is built differently. */
body:not(.home) .wp-block-paragraph {
    max-width: 75ch;
}

/* || BUTTONS */

.button {
    display: inline-flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.75rem 1rem 0.75rem 1.25rem;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
    color: var(--color-white);
    background-color: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-small);
    transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

.button::after {
    content: '';
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    background-color: currentColor;
    mask: var(--icon-arrow) center / contain no-repeat;
    transition: translate 200ms ease;
}

.button:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.button:hover::after {
    translate: 0.25rem 0;
}

.button--ghost {
    color: var(--color-ink);
    background-color: transparent;
    border-color: var(--color-border);
}

.button--ghost:hover {
    color: var(--color-primary-dark);
    background-color: var(--color-white);
    border-color: var(--color-primary-light);
}

/* || HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background-color: var(--color-white);
    box-shadow: 0 1px 0 var(--color-border), 0 8px 24px -20px rgb(11 29 48 / 0.4);
}

/* Positioned for the mobile menu panel, which hangs below it. */
.site-header__inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 2rem;
    min-height: var(--header-height);
}

.site-header__logo {
    flex-shrink: 0;
    padding-block: 0.75rem;
}

.site-header__logo img {
    width: auto;
    height: clamp(2rem, 1.5rem + 1.5vw, 2.5rem);
}

.site-nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 700;
    color: var(--color-ink);
    background-color: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-small);
    cursor: pointer;
    transition: border-color 200ms ease, color 200ms ease;
}

.site-nav__toggle:hover {
    color: var(--color-primary-dark);
    border-color: var(--color-primary-light);
}

.site-nav__toggle[aria-expanded='true'] .site-nav__icon-open,
.site-nav__toggle[aria-expanded='false'] .site-nav__icon-close {
    display: none;
}

.site-nav__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* No side padding, so the line under a hovered or current link is exactly as wide as its text. */
.site-nav__list a {
    display: block;
    padding: 0.5rem 0 0.25rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--color-ink);
    border-block-end: 3px solid transparent;
    transition: opacity 200ms ease, border-color 200ms ease;
}

.site-nav__list > :not(.site-nav__cta) > a:hover,
.site-nav__list > .current-menu-item:not(.site-nav__cta) > a {
    opacity: 0.8;
    border-block-end-color: var(--color-primary);
}

/* The contact link, last in the menu, as a button with the arrow every call to action on the site has. */
.site-nav__list .site-nav__cta > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem 0.5rem 0.875rem;
    font-weight: 700;
    color: var(--color-white);
    background-color: var(--color-primary);
    border: 0;
    border-radius: var(--radius-small);
    transition: background-color 200ms ease;
}

.site-nav__list .site-nav__cta > a::after {
    content: '';
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    background-color: currentColor;
    mask: var(--icon-arrow) center / contain no-repeat;
    transition: translate 200ms ease;
}

.site-nav__list .site-nav__cta > a:hover,
.site-nav__list .site-nav__cta.current-menu-item > a {
    color: var(--color-white);
    background-color: var(--color-primary-dark);
}

.site-nav__list .site-nav__cta > a:hover::after {
    translate: 0.25rem 0;
}

/*
 * Below this width the menu doesn't fit beside the logo, so it collapses into a panel behind the toggle. Its long
 * labels need about 1250px; recheck this breakpoint when the menu changes.
 */
@media (max-width: 79.99em) {
    .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;
        align-items: flex-start;
        padding: 0.75rem 1.25rem 1.25rem;
        background-color: var(--color-white);
        border-radius: var(--radius-medium);
        box-shadow: 0 0 0 1px var(--color-border), 0 24px 48px -24px rgb(11 29 48 / 0.45);
    }

    .site-nav--js .site-nav__list a {
        padding-block: 0.625rem 0.375rem;
    }

    .site-nav--js .site-nav__list .site-nav__cta {
        align-self: stretch;
        margin-block-start: 0.75rem;
    }

    .site-nav--js .site-nav__list .site-nav__cta > a {
        padding: 0.875rem 1rem;
    }
}

@media (min-width: 80em) {
    .site-nav__toggle {
        display: none;
    }
}

/* || HERO */

.hero {
    --hero-offset: clamp(0.75rem, 2.5vw, 1.75rem);

    padding-block: clamp(2.5rem, 6vw, 5rem) var(--section-spacing);
}

.hero__inner {
    display: grid;
    align-items: center;
    gap: clamp(3rem, 6vw, 5rem);
}

.hero__title {
    position: relative;
    margin-block: 0 1.5rem;
    padding-inline-start: 1.25rem;
    font-size: clamp(2.25rem, 1rem + 4vw, 3.75rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.hero__title::before {
    content: '';
    position: absolute;
    inset-block: 0.15em 0.1em;
    inset-inline-start: 0;
    width: 5px;
    background-color: var(--color-primary);
    border-radius: 5px;
}

.hero__title span {
    display: block;
    margin-block-end: 0.35rem;
    font-size: 0.5em;
    font-weight: 500;
    letter-spacing: 0;
}

.hero__lead {
    max-width: 34rem;
    margin: 0;
    font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
    color: var(--color-text-muted);
}

.hero__cta-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-block-start: 2rem;
}

.hero__usps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-block: 2rem 0;
    padding: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    list-style: none;
}

.hero__usps li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero__usps li::before {
    content: '';
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    background-color: var(--color-primary);
    mask: var(--icon-check) center / contain no-repeat;
}

.hero__note {
    margin-block: 2rem 0;
    font-size: 0.9375rem;
    color: var(--color-text-muted);
}

.hero__media {
    position: relative;
    margin-block-start: var(--hero-offset);
    margin-inline-end: var(--hero-offset);
}

/* The coloured block peeking out above and to the right of the image. */
.hero__media::before {
    content: '';
    position: absolute;
    inset: calc(var(--hero-offset) * -1) calc(var(--hero-offset) * -1) 20% 20%;
    background-color: var(--color-primary);
    border-radius: var(--radius-large);
}

.hero__image {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    /* Just left of centre, so the crop of the 16:9 photo keeps both the back of the caravan and the cart. */
    object-position: 45% 50%;
    border-radius: var(--radius-large);
}

@media (min-width: 56em) {
    .hero__inner {
        /* The photo gets the larger share. The text never gets narrower than the site name in the title, which
           can't wrap. */
        grid-template-columns: minmax(min-content, 1fr) minmax(0, 1.5fr);
    }

    /* Grows a little slower next to the photo, so on smaller screens the photo keeps more of the width. Full size
       from about 1320px. */
    .hero__title {
        font-size: clamp(2.25rem, 0.25rem + 4.25vw, 3.75rem);
    }
}

/* With an illustration (the 404 page) instead of the photo: shown whole, at its own 10:9, in a column about as
   wide as the text. */
.hero--illustration .hero__image {
    aspect-ratio: 10 / 9;
    object-position: center;
}

@media (min-width: 56em) {
    .hero--illustration .hero__inner {
        grid-template-columns: minmax(min-content, 1fr) minmax(0, 1.05fr);
    }
}

/* || FOOTER */

.site-footer {
    padding-block: 2.5rem 1.5rem;
    font-size: 0.9375rem;
    background-color: var(--color-white);
    border-block-start: 1px solid var(--color-border);
}

.site-footer a {
    color: inherit;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.site-footer__back-to-top {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.site-footer__back-to-top::before {
    content: '';
    width: 1.25rem;
    height: 1.25rem;
    background-color: currentColor;
    mask: var(--icon-arrow) center / contain no-repeat;
    rotate: -90deg;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
    gap: 2rem;
    margin-block-start: 2rem;
    padding-block-start: 2.5rem;
    border-block-start: 1px solid var(--color-border);
}

.site-footer__about img {
    width: auto;
    height: 2.25rem;
    margin-block-end: 1rem;
}

.site-footer__about p {
    max-width: 32ch;
    color: var(--color-text-muted);
}

.site-footer h2 {
    margin-block: 0 1rem;
    font-size: 1rem;
    font-weight: 700;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-block-start: 0.25rem;
}

.site-footer address {
    font-style: normal;
}

.site-footer p {
    margin-block: 0 0.25rem;
}

.site-footer__copyright {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1.5rem;
    row-gap: 0.25rem;
    margin-block-start: 2.5rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.site-footer__copyright p {
    margin: 0;
}
