/* ==========================================================================
   Persianas MAD
   ========================================================================== */

@font-face {
    font-family: "Instrument Sans";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/instrument-sans/instrument-sans-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Instrument Sans";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/instrument-sans/instrument-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --paper: #ffffff;
    --mist: #f5f5f7;
    --fog: #e8e8ed;
    --line: #d2d2d7;
    --ink: #1d1d1f;
    --graphite: #6e6e73;
    --pebble: #86868b;
    --green: #13963a;        /* logo green, for accents and fills */
    --green-strong: #0e7c30; /* buttons and links: passes AA with white */
    --pine: #0b5e25;         /* top bar */
    --forest: #0a4a20;       /* quality band: deeper than pine so the two greens don't merge */
    --sage: #b7d9c0;         /* muted text on forest (6.8:1) */

    --font: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --gutter: 16px;
    --container: 1200px;
    --header-bar: 56px;
    --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

@media (min-width: 734px) {
    :root {
        --gutter: 24px;
        --header-bar: 64px;
    }
}

/* Base
   ========================================================================== */

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

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.47;
    letter-spacing: 0;
    word-spacing: 0.06em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.is-locked {
    overflow: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
}

button {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

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

p,
h1,
h2,
h3 {
    margin: 0;
}

:focus-visible {
    outline: 2px solid var(--green-strong);
    outline-offset: 3px;
    border-radius: 6px;
}

.icon {
    width: 1em;
    height: 1em;
    flex: none;
}

.container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.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: 8px;
    left: 8px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    font-size: 14px;
    transform: translateY(-200%);
}

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

/* Buttons
   ========================================================================== */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.button--primary {
    background: var(--green-strong);
    color: #fff;
}

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

.button--secondary {
    border-color: currentColor;
}

/* Top bar
   ========================================================================== */

.topbar {
    background: var(--pine);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.01em;
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 36px;
}

.topbar a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    opacity: 0.92;
    transition: opacity 0.2s;
}

.topbar a:hover {
    opacity: 1;
}

.topbar .icon {
    width: 15px;
    height: 15px;
}

.topbar__social,
.topbar__email,
.topbar__label {
    display: none;
}

.topbar__shipping {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 500;
}

.topbar__shipping .icon {
    width: 17px;
    height: 17px;
}

.topbar__contact {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar__dealer {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

@media (min-width: 734px) {
    .topbar__social {
        display: flex;
        gap: 4px;
        margin-left: -8px;
    }

    .topbar__social a {
        justify-content: center;
        min-width: 32px;
    }

    .topbar__label {
        display: inline;
    }

    /* Shipping joins the contact group on the right with the same spacing */
    .topbar__inner {
        gap: 20px;
    }

    .topbar__shipping {
        margin-left: auto;
    }

    .topbar__contact {
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .topbar__email {
        display: block;
    }
}

/* Header
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* backdrop-filter would turn the header into the containing block of the fixed drawer */
.site-header.is-open {
    background: var(--paper);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.site-header__bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 16px;
    min-height: var(--header-bar);
}

.brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.brand img {
    width: auto;
    height: 30px;
}

.site-header__actions {
    grid-column: 3;
    display: flex;
    align-items: center;
    gap: 2px;
    margin-right: -10px;
}

.icon-button,
.login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 44px;
    height: 44px;
    border-radius: 999px;
    color: var(--ink);
    transition: background-color 0.2s;
}

.icon-button .icon,
.login .icon {
    width: 21px;
    height: 21px;
}

.login__text {
    display: none;
}

/* Search: collapsed behind a toggle on small screens */
.search {
    position: relative;
    display: none;
    grid-column: 1 / -1;
    grid-row: 2;
    margin-bottom: 12px;
}

.search.is-open {
    display: block;
}

.search__icon {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--graphite);
    transform: translateY(-50%);
    pointer-events: none;
}

.search__input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 42px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--mist);
    font-size: 16px; /* 16px keeps iOS from zooming on focus */
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.search__input::placeholder {
    color: var(--graphite);
}

.search__input:focus {
    border-color: var(--green-strong);
    background: var(--paper);
}

/* Menu toggle (two-line burger that turns into an X) */
.menu-toggle__bars,
.menu-toggle__bars::before {
    position: relative;
    display: block;
    width: 18px;
    height: 1.5px;
    border-radius: 2px;
    background: currentColor;
    transform: translateY(-3.5px);
    transition: transform 0.3s var(--ease);
}

.menu-toggle__bars::before {
    content: "";
    position: absolute;
    transform: translateY(7px);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars {
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before {
    transform: rotate(-90deg);
}

@media (hover: hover) {
    .icon-button:hover,
    .login:hover {
        background: var(--mist);
    }
}

@media (min-width: 734px) {
    .brand img {
        height: 36px;
    }

    .site-header__bar {
        column-gap: 32px;
    }

    .search,
    .search.is-open {
        display: block;
        grid-column: 2;
        grid-row: 1;
        width: 100%;
        max-width: 560px;
        margin: 0 auto;
    }

    .search__input {
        height: 40px;
        font-size: 15px;
    }

    .search-toggle {
        display: none;
    }
}

@media (min-width: 1024px) {
    .site-header__actions {
        margin-right: 0;
    }

    .login {
        padding: 0 14px 0 10px;
        font-size: 14px;
        font-weight: 500;
    }

    .login__text {
        display: inline;
    }

    .menu-toggle {
        display: none;
    }
}

/* Main navigation: mobile drawer
   ========================================================================== */

.main-nav {
    position: fixed;
    inset: var(--nav-top, 92px) 0 0;
    z-index: 49;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--paper);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
}

.main-nav.is-open {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s var(--ease), visibility 0s;
}

.main-nav__list {
    padding-top: 12px;
    padding-bottom: 24px;
}

.main-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 52px;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-align: left;
}

.main-nav__chevron {
    width: 22px;
    height: 22px;
    color: var(--pebble);
    transform: rotate(-90deg);
    transition: transform 0.25s var(--ease);
}

.main-nav__extras {
    margin-top: auto;
    padding-top: 24px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--fog);
    font-size: 15px;
}

.main-nav__dealer {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--green-strong);
    font-weight: 600;
}

.main-nav__contact a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--graphite);
}

.main-nav__contact .icon {
    width: 18px;
    height: 18px;
}

.main-nav__social {
    display: flex;
    gap: 4px;
    margin: 8px 0 0 -12px;
}

.main-nav__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--ink);
}

.main-nav__social .icon {
    width: 22px;
    height: 22px;
}

/* Dropdown panel on mobile: slides in over the list */
.mega {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--paper);
    visibility: hidden;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease), visibility 0s linear 0.4s;
}

.mega.is-open {
    visibility: visible;
    transform: none;
    transition: transform 0.4s var(--ease), visibility 0s;
}

.mega__inner {
    padding-top: 8px;
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
}

.mega__back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    margin-left: -6px;
    color: var(--graphite);
    font-size: 15px;
}

.mega__back .icon {
    width: 20px;
    height: 20px;
}

.mega__groups {
    display: grid;
    gap: 28px;
    margin-top: 8px;
}

.mega__all {
    display: inline-block;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.mega__heading {
    margin-bottom: 6px;
    color: var(--graphite);
    font-size: 13px;
}

.mega__links a {
    display: flex;
    align-items: center;
    min-height: 40px;
    font-size: 19px;
    font-weight: 500;
}

.mega__feature {
    display: grid;
    gap: 6px;
    margin-top: 32px;
    padding: 22px;
    border-radius: 18px;
    background: var(--mist);
}

.mega__feature-title {
    font-size: 17px;
    font-weight: 600;
}

.mega__feature-text {
    color: var(--graphite);
    font-size: 14px;
    line-height: 1.43;
}

.mega__feature-link {
    margin-top: 6px;
    color: var(--green-strong);
    font-size: 14px;
    font-weight: 600;
}

.nav-scrim {
    display: none;
}

/* Main navigation: desktop bar with mega menus
   ========================================================================== */

@media (min-width: 1024px) {
    .main-nav {
        position: static;
        display: block;
        overflow: visible;
        visibility: visible;
        opacity: 1;
        background: none;
        transition: none;
    }

    .main-nav__list {
        display: flex;
        justify-content: center;
        gap: 4px;
        padding-top: 0;
        padding-bottom: 0;
    }

    .main-nav__link {
        gap: 4px;
        width: auto;
        min-height: 44px;
        padding: 0 14px;
        color: rgba(29, 29, 31, 0.8);
        font-size: 14px;
        font-weight: 500;
        letter-spacing: -0.005em;
        transition: color 0.2s;
    }

    .main-nav__link:hover,
    .main-nav__link[aria-expanded="true"] {
        color: var(--ink);
    }

    .main-nav__chevron {
        width: 12px;
        height: 12px;
        transform: none;
    }

    .main-nav__link[aria-expanded="true"] .main-nav__chevron {
        transform: rotate(180deg);
    }

    .main-nav__extras,
    .mega__back {
        display: none;
    }

    .mega {
        top: 100%;
        bottom: auto;
        overflow: visible;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        transform: none;
        opacity: 0;
        transition: opacity 0.2s ease, visibility 0s linear 0.2s;
    }

    .mega.is-open {
        opacity: 1;
        transition: opacity 0.25s ease, visibility 0s;
    }

    .mega__inner {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 48px;
        padding-top: 36px;
        padding-bottom: 48px;
        opacity: 0;
        transform: translateY(-6px);
        transition: opacity 0.3s ease, transform 0.4s var(--ease);
    }

    .mega.is-open .mega__inner {
        opacity: 1;
        transform: none;
    }

    .mega__inner:not(:has(.mega__feature)) {
        grid-template-columns: 1fr;
    }

    .mega__groups {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 40px;
        margin-top: 0;
    }

    .mega__all {
        font-size: 24px;
    }

    .mega__links a {
        min-height: 32px;
        font-size: 14px;
        font-weight: 500;
        color: rgba(29, 29, 31, 0.85);
        transition: color 0.2s;
    }

    .mega__links a:hover,
    .mega__all:hover {
        color: var(--green-strong);
    }

    .mega__feature {
        align-self: start;
        margin-top: 0;
    }

    .nav-scrim {
        position: fixed;
        inset: 0;
        z-index: 40;
        display: block;
        background: rgba(232, 232, 237, 0.4);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .nav-scrim.is-visible {
        opacity: 1;
    }

    .nav-scrim[hidden] {
        display: none;
    }
}

/* Hero carousel
   ========================================================================== */

.hero {
    --slide-w: 84vw;
    --slide-h: clamp(440px, 122vw, 620px);
    --slide-gap: 10px;
    --slide-radius: 22px;
    padding: 16px 0 32px;
    overflow: hidden;
}

.hero__viewport {
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

.hero__track {
    display: flex;
    gap: var(--slide-gap);
    transition: transform 0.7s var(--ease);
    will-change: transform;
}

.hero__track.is-instant,
.hero__track.is-dragging {
    transition: none;
}

.hero__slide {
    position: relative;
    flex: 0 0 var(--slide-w);
    height: var(--slide-h);
    overflow: hidden;
    border-radius: var(--slide-radius);
    background: var(--mist);
    transform: scale(0.92);
    transform-origin: left center;
    transition: transform 0.7s var(--ease);
    cursor: pointer;
}

/* Neighbours shrink toward the active slide so their peek stays visible */
.hero__slide.is-before {
    transform-origin: right center;
}

.hero__slide.is-active {
    transform: none;
    cursor: auto;
}

.hero__track.is-instant .hero__slide,
.hero__track.is-instant .hero__caption {
    transition: none;
}

.hero__media,
.hero__media img {
    width: 100%;
    height: 100%;
}

.hero__media img {
    object-fit: cover;
}

/* Scrim so the caption stays readable on any photo */
.hero__slide::after {
    content: "";
    position: absolute;
    inset: 40% 0 0;
    pointer-events: none;
}

.hero__slide--light::after {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}

.hero__slide--dark::after {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0));
}

/* Caption on top: flip the scrim so it fades down from the top edge */
.hero__slide--caption-top::after {
    inset: 0 0 45%;
}

.hero__slide--light.hero__slide--caption-top::after {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
}

.hero__slide--dark.hero__slide--caption-top::after {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.7) 45%, rgba(255, 255, 255, 0));
}

.hero__slide--caption-top .hero__caption {
    inset: 0 0 auto;
}

.hero__caption {
    position: absolute;
    inset: auto 0 0;
    z-index: 1;
    padding: 24px 22px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.6s var(--ease);
    pointer-events: none;
}

.hero__slide.is-active .hero__caption {
    opacity: 1;
    transform: none;
    transition-delay: 0.25s;
    pointer-events: auto;
}

.hero__slide--light .hero__caption {
    color: #fff;
}

.hero__slide--dark .hero__caption {
    color: var(--ink);
}

.hero__title {
    max-width: 14ch;
    font-size: 34px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.04;
    text-wrap: balance;
}

.hero__subtitle {
    max-width: 34ch;
    margin-top: 10px;
    font-size: 17px;
    line-height: 1.35;
    opacity: 0.9;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.hero__actions .button {
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
}

.hero__slide--light .button--secondary {
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.hero__slide--light .button--secondary:hover {
    background: rgba(255, 255, 255, 0.24);
}

.hero__slide--dark .button--secondary {
    background: rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.hero__slide--dark .button--secondary:hover {
    background: rgba(255, 255, 255, 0.85);
}

/* Controls: dot pill + play/pause */
.hero__controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.hero__dots {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(232, 232, 237, 0.8);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.hero__dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 44px;
}

.hero__dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--pebble);
    transition: width 0.5s var(--ease), background-color 0.3s;
}

.hero__dot:hover::before {
    background: var(--graphite);
}

.hero__dot.is-active {
    width: 64px;
}

.hero__dot.is-active::before {
    width: 48px;
    background: rgba(134, 134, 139, 0.45);
}

.hero__dot {
    position: relative;
    transition: width 0.5s var(--ease);
}

.hero__dot-fill {
    position: absolute;
    top: 50%;
    left: 8px;
    width: 48px;
    height: 8px;
    margin-top: -4px;
    border-radius: 999px;
    background: var(--green);
    transform: scaleX(0);
    transform-origin: left center;
    opacity: 0;
}

.hero__dot.is-active .hero__dot-fill {
    opacity: 1;
}

.hero__dot.is-progress .hero__dot-fill {
    animation: hero-progress var(--hero-interval, 6s) linear forwards;
}

.hero.is-paused .hero__dot-fill {
    animation-play-state: paused;
}

/* Without autoplay the active bar is shown full */
.hero.is-stopped .hero__dot.is-active .hero__dot-fill {
    transform: none;
}

@keyframes hero-progress {
    to {
        transform: scaleX(1);
    }
}

.hero__play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(232, 232, 237, 0.8);
    color: var(--ink);
    transition: background-color 0.2s;
}

.hero__play:hover {
    background: var(--line);
}

.hero__play .icon {
    width: 16px;
    height: 16px;
}

.hero__icon-play,
.hero.is-stopped .hero__icon-pause {
    display: none;
}

.hero.is-stopped .hero__icon-play {
    display: block;
}

@media (min-width: 734px) {
    .hero {
        --slide-w: min(86vw, 1240px);
        --slide-h: clamp(460px, 52vw, 640px);
        --slide-gap: 20px;
        --slide-radius: 28px;
        padding: 24px 0 40px;
    }

    .hero__caption {
        padding: 48px 56px;
    }

    .hero__slide--align-end .hero__caption {
        left: auto;
        width: 50%;
        padding-left: 0;
    }

    .hero__title {
        font-size: clamp(44px, 5.4vw, 72px);
    }

    .hero__subtitle {
        margin-top: 14px;
        font-size: clamp(19px, 1.7vw, 22px);
    }

    .hero__actions {
        gap: 12px;
        margin-top: 28px;
    }

    /* The photo carries its own headline: keep the text for screen readers, show only the buttons */
    .hero__slide--title-in-image .hero__title,
    .hero__slide--title-in-image .hero__subtitle {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .hero__slide--title-in-image .hero__actions {
        margin-top: 0;
    }

    .hero__slide--title-in-image::after {
        inset: 70% 0 0;
    }

    .hero__actions .button {
        min-height: 48px;
        padding: 0 26px;
        font-size: 16px;
    }
}

/* Home sections
   ========================================================================== */

.section {
    padding-block: 56px;
}

.section__title {
    max-width: 22ch;
    margin-bottom: 28px;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    text-wrap: balance;
}

@media (min-width: 734px) {
    .section {
        padding-block: 88px;
    }

    .section__title {
        margin-bottom: 40px;
        font-size: clamp(40px, 4.4vw, 52px);
        line-height: 1.06;
    }
}

/* Products: swipe rail on phones, a single row from tablet up */
.products {
    padding-top: 24px;
    padding-bottom: 24px;
}

.products__rail {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-inline: var(--gutter);
    padding-bottom: 8px;
    scroll-padding-inline: var(--gutter);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.products__rail::-webkit-scrollbar {
    display: none;
}

.products__item {
    flex: 0 0 min(44vw, 240px);
    scroll-snap-align: start;
}

.products__link {
    display: block;
    border-radius: 18px;
}

.products__link img {
    width: 100%;
    height: auto;
    transition: transform 0.5s var(--ease);
}

@media (hover: hover) {
    .products__link:hover img {
        transform: scale(1.03);
    }
}

@media (min-width: 734px) {
    .products__rail {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 16px;
        max-width: calc(var(--container) + var(--gutter) * 2);
        margin-inline: auto;
        overflow: visible;
        padding-bottom: 0;
    }

    .products__link {
        border-radius: 22px;
    }
}

@media (min-width: 1024px) {
    .products__rail {
        gap: 24px;
    }
}

/* Samples and Treeshades. It follows the supplier rail, whose bottom padding is the gap */
.samples {
    padding-top: 0;
}

.samples__head {
    display: grid;
    gap: 24px;
    justify-items: start;
}

.samples__partner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 12px;
    row-gap: 4px;
    color: var(--graphite);
    font-size: 17px;
}

.samples__partner img {
    width: auto;
    height: 40px;
}

.samples__title {
    max-width: 22ch;
    margin-top: 12px;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    text-wrap: balance;
}

.samples__media {
    margin-top: 32px;
    overflow: hidden;
    border-radius: 22px;
    background: var(--mist);
}

.samples__media img {
    width: 100%;
    height: auto;
}

@media (min-width: 734px) {
    .samples__partner img {
        height: 52px;
    }

    .samples__title {
        font-size: clamp(40px, 4.4vw, 52px);
        line-height: 1.06;
    }

    .samples__cta {
        min-height: 48px;
        padding: 0 26px;
        font-size: 16px;
    }

    .samples__media {
        margin-top: 48px;
        border-radius: 28px;
    }
}

@media (min-width: 1024px) {
    .samples__head {
        grid-template-columns: 1fr auto;
        align-items: end;
        gap: 32px;
    }
}

/* Supplier: swipe rail of photo cards. The rail bleeds to the screen edge but its first
   card lines up with the container, so the inset is the container's side margin. */
.supplier {
    --rail-inset: max(var(--gutter), calc((100% - var(--container)) / 2));
}

/* The lead statement of the page: larger than the other section titles and centred */
.supplier__title {
    max-width: none;
    margin-inline: auto;
    font-size: 36px;
    letter-spacing: -0.04em;
    line-height: 1.02;
    text-align: center;
}

.supplier__rail {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-inline: var(--rail-inset);
    scroll-padding-inline: var(--rail-inset);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.supplier__rail::-webkit-scrollbar {
    display: none;
}

.supplier__card {
    flex: 0 0 min(82vw, 420px);
    scroll-snap-align: start;
}

.supplier__media {
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border-radius: 22px;
    background: var(--mist);
}

.supplier__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.supplier__caption {
    max-width: 34ch;
    margin-top: 20px;
    padding-inline: 4px;
    color: var(--graphite);
    font-size: 17px;
    line-height: 1.35;
}

.supplier__caption strong {
    color: var(--ink);
    font-weight: 600;
}

.supplier__controls {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.supplier__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: var(--fog);
    color: var(--ink);
    transition: background-color 0.2s var(--ease), opacity 0.2s var(--ease);
}

.supplier__nav .icon {
    width: 22px;
    height: 22px;
}

.supplier__nav:focus-visible {
    border-radius: 999px;
}

.supplier__nav:disabled {
    cursor: default;
    opacity: 0.4;
}

@media (hover: hover) {
    .supplier__nav:not(:disabled):hover {
        background: var(--line);
    }
}

/* No script, nothing to drive the buttons */
.supplier:not(.is-ready) .supplier__controls {
    display: none;
}

@media (min-width: 734px) {
    .supplier__title {
        max-width: 20ch;
        margin-bottom: 56px;
        font-size: clamp(56px, 6.4vw, 80px);
        line-height: 1;
    }

    .supplier__rail {
        gap: 20px;
    }

    .supplier__card {
        flex-basis: clamp(300px, 44vw, 400px);
    }

    .supplier__media {
        border-radius: 28px;
    }

    .supplier__caption {
        margin-top: 24px;
        padding-inline: 8px;
    }
}

/* Quality: the icons are white, so this band is dark green */
.quality {
    background: var(--forest);
    color: #fff;
}

.quality__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 16px;
}

.quality__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    color: var(--sage);
    font-size: 14px;
    line-height: 1.35;
    text-align: center;
}

.quality__item img {
    width: auto;
    max-width: 100%;
    height: 64px;
    object-fit: contain;
}

@media (min-width: 734px) {
    .quality__grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 56px 24px;
    }

    .quality__item img {
        height: 80px;
    }
}

/* Message page (errors)
   ========================================================================== */

.message-page {
    padding-top: 80px;
    padding-bottom: 120px;
}

.message-page h1 {
    font-size: 40px;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.message-page p {
    max-width: 60ch;
    margin-top: 12px;
    color: var(--graphite);
}

.message-page a {
    color: var(--green-strong);
    text-decoration: underline;
}

.message-page__meta {
    font-size: 14px;
}

/* Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* The carousel progress bar drives autoplay timing, so keep its real duration */
@media (prefers-reduced-motion: reduce) {
    .hero__dot-fill {
        animation-duration: var(--hero-interval, 6s) !important;
    }
}
