/* ==========================================================================
   Dis-Chem Ride for Sight 2027
   1. Tokens   2. Base   3. Layout & 12-column grid   4. Components
   5. Header / nav   6. Heroes   7. Page sections   8. Footer
   9. Accessibility modes   10. Responsive
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
    /* Brand (sampled from the Ride for Sight logo) */
    --navy: #1e367e;
    --navy-700: #172b68;
    --navy-900: #0e1b44;
    --navy-950: #08112e;
    --green: #00913d;
    --green-700: #007a33;
    --green-050: #e6f4ec;
    --blue: #009cdb;
    --blue-700: #0074a6;
    --blue-050: #e6f5fc;
    --yellow: #ffe21a;
    --yellow-050: #fff8cc;
    --gold: #c9a13b;

    /* Neutrals */
    --ink: #16203d;
    --ink-muted: #4a5573;
    --white: #ffffff;
    --surface: #f2f5fb;
    --surface-2: #e7edf8;
    --line: #d5ddec;
    --on-dark: #ffffff;
    --on-dark-muted: #c9d4f2;

    /* Type */
    --font-display: "Montserrat", "Arial Black", "Helvetica Neue", Arial, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    /* Layout */
    --container: 1100px;
    --gutter: 20px;
    --gutter-page: 16px;
    --nav-h: 56px;

    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 10px 30px -14px rgba(14, 27, 68, 0.28);
    --shadow-lg: 0 26px 50px -22px rgba(14, 27, 68, 0.42);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

html[data-text="lg"] { font-size: 112.5%; }
html[data-text="xl"] { font-size: 125%; }

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote {
    margin: 0;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.12;
    color: var(--navy);
    letter-spacing: -0.01em;
    text-wrap: balance;
}

h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p, li { text-wrap: pretty; }

img, svg, video, iframe {
    max-width: 100%;
}

img {
    display: block;
    height: auto;
}

a {
    color: var(--navy);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--green-700);
}

strong { font-weight: 700; }

button {
    font: inherit;
}

[id] {
    scroll-margin-top: calc(var(--nav-h) + 24px);
}

main:focus {
    outline: none;
}

:focus-visible {
    outline: 3px solid var(--navy-900);
    outline-offset: 2px;
    box-shadow: 0 0 0 7px var(--yellow);
    border-radius: 4px;
}

::selection {
    background: var(--yellow);
    color: var(--navy-900);
}

.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;
    left: 1rem;
    top: -200px;
    z-index: 1000;
    padding: 0.75rem 1.25rem;
    background: var(--yellow);
    color: var(--navy-900);
    font-family: var(--font-display);
    font-weight: 800;
    text-decoration: none;
    border-radius: var(--radius-sm);
}

.skip-link:focus {
    top: 1rem;
}

.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.22em;
}

/* 3. Layout & 12-column grid ------------------------------------------------
   Content area is exactly 1100px wide. Spans available: 12, 6, 3, 2, 1. */
.container {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter-page));
    margin-inline: auto;
    padding-inline: var(--gutter-page);
}

.grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gutter);
}

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

.span-12 { grid-column: span 12; }
.span-6 { grid-column: span 6; }
.span-3 { grid-column: span 3; }
.span-2 { grid-column: span 2; }
.span-1 { grid-column: span 1; }

.grid--center { align-items: center; }
.grid--start { align-items: start; }

.section {
    padding-block: clamp(3rem, 6vw, 5.5rem);
}

.section--tight {
    padding-block: clamp(2rem, 4vw, 3.5rem);
}

.section--alt {
    background: var(--surface);
}

.section--dark {
    background: var(--navy-900);
    color: var(--on-dark);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
    color: var(--on-dark);
}

.section--dark a:not(.btn) {
    color: var(--yellow);
}

.section-head {
    max-width: 46rem;
    margin-bottom: 2.25rem;
}

.section-head--center {
    margin-inline: auto;
    text-align: center;
}

.section-head > * + * {
    margin-top: 0.75rem;
}

.section-head__lead {
    font-size: 1.2rem;
    color: var(--ink-muted);
}

.section--dark .section-head__lead {
    color: var(--on-dark-muted);
}

.section-title {
    font-size: clamp(1.9rem, 3.6vw, 2.75rem);
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: -0.005em;
}

.eyebrow {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--green-700);
}

.eyebrow--light {
    color: var(--yellow);
}

.stack > * + * {
    margin-top: var(--stack, 1rem);
}

.prose {
    max-width: 68ch;
}

.prose > * + * {
    margin-top: 1em;
}

.prose h2,
.prose h3 {
    margin-top: 1.75em;
}

.prose ul,
.prose ol {
    padding-left: 1.25em;
}

.prose li + li {
    margin-top: 0.4em;
}

.lead {
    font-size: 1.25rem;
    line-height: 1.55;
    color: var(--ink-muted);
}

.muted { color: var(--ink-muted); }
.small { font-size: 0.92rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* 4. Components ------------------------------------------------------------ */

/* Brush-stroke highlight, echoing the campaign artwork */
.brush {
    position: relative;
    display: inline-block;
    padding: 0 0.28em;
    isolation: isolate;
}

.brush::before {
    content: "";
    position: absolute;
    inset: -0.06em -0.12em -0.02em;
    z-index: -1;
    background: url("../img/brush-yellow.svg") center / 100% 100% no-repeat;
    transform: rotate(-1.2deg);
}

.brush--yellow { color: var(--navy-900); }
.brush--navy { color: var(--white); }
.brush--navy::before { background-image: url("../img/brush-navy.svg"); }
.brush--green { color: var(--white); }
.brush--green::before { background-image: url("../img/brush-green.svg"); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    min-height: 48px;
    padding: 0.85em 1.5em;
    border: 2px solid transparent;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s var(--ease), background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn--primary {
    background: var(--yellow);
    color: var(--navy-900);
    box-shadow: 0 8px 20px -10px rgba(255, 226, 26, 0.9);
}

.btn--primary:hover {
    background: #fff07a;
    color: var(--navy-900);
}

.btn--secondary {
    background: var(--navy);
    color: var(--white);
}

.btn--secondary:hover {
    background: var(--navy-700);
    color: var(--white);
}

.btn--green {
    background: var(--green-700);
    color: var(--white);
}

.btn--green:hover {
    background: #006229;
    color: var(--white);
}

.btn--outline {
    border-color: var(--navy);
    color: var(--navy);
    background: transparent;
}

.btn--outline:hover {
    background: var(--navy);
    color: var(--white);
}

.btn--ghost-light {
    border-color: rgba(255, 255, 255, 0.85);
    color: var(--white);
    background: transparent;
}

.btn--ghost-light:hover {
    background: var(--white);
    color: var(--navy-900);
}

.btn--sm {
    min-height: 40px;
    padding: 0.6em 1.1em;
    font-size: 0.85rem;
}

.btn--lg {
    min-height: 56px;
    padding: 1em 1.8em;
    font-size: 1.08rem;
}

.btn--block {
    width: 100%;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

/* Cards */
.card {
    height: 100%;
    padding: 1.6rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.card > * + * {
    margin-top: 0.75rem;
}

.card--shadow {
    border-color: transparent;
    box-shadow: var(--shadow);
}

.card--dark {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--on-dark);
}

.card--dark h3 { color: var(--on-dark); }
.card--dark a:not(.btn) { color: var(--yellow); }

.card__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--surface-2);
    color: var(--navy);
    font-size: 1.25rem;
}

.card__icon--green { background: var(--green-050); color: var(--green-700); }
.card__icon--blue { background: var(--blue-050); color: var(--blue-700); }
.card__icon--yellow { background: var(--yellow-050); color: var(--navy-900); }

.card__title {
    font-size: 1.25rem;
}

.card__price {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 900;
    font-style: italic;
    color: var(--navy);
}

/* Chips, badges and tags */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

.chip--light {
    background: var(--surface-2);
    color: var(--navy);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.32rem 0.6rem;
    border-radius: 4px;
    background: var(--yellow);
    color: var(--navy-900);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.2;
}

.badge--green { background: var(--green-700); color: var(--white); }
.badge--navy { background: var(--navy); color: var(--white); }
.badge--outline { background: transparent; border: 1.5px solid currentColor; color: var(--ink-muted); }

/* Lists */
.check-list {
    list-style: none;
    padding: 0;
}

.check-list li {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}

.check-list li + li {
    margin-top: 0.55rem;
}

.check-list .icon {
    margin-top: 0.22em;
    color: var(--green);
}

.section--dark .check-list .icon,
.card--dark .check-list .icon,
.distance-card--feature .check-list .icon {
    color: var(--yellow);
}

/* Callouts */
.callout {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 1.1rem 1.3rem;
    border-left: 6px solid var(--yellow);
    border-radius: var(--radius-sm);
    background: var(--yellow-050);
    color: var(--ink);
}

.callout .icon {
    margin-top: 0.15em;
    color: var(--navy);
    font-size: 1.15rem;
}

.callout > div > * + * { margin-top: 0.4rem; }

.callout--info { background: var(--blue-050); border-color: var(--blue); }
.callout--green { background: var(--green-050); border-color: var(--green); }

.callout__title {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--navy);
}

/* Tables */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

.table caption {
    padding: 1rem 1.1rem 0.25rem;
    text-align: left;
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--navy);
}

.table th,
.table td {
    padding: 0.85rem 1.1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
}

.table thead th {
    background: var(--navy);
    color: var(--white);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tbody tr:nth-child(even) {
    background: var(--surface);
}

.table tbody tr:last-child th,
.table tbody tr:last-child td {
    border-bottom: 0;
}

.table tbody th {
    font-weight: 700;
    color: var(--navy);
}

.table .num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.table tfoot td,
.table tfoot th {
    background: var(--surface-2);
    font-weight: 700;
}

/* Accordions (FAQ) */
.accordion {
    border-top: 1px solid var(--line);
}

.accordion details {
    border-bottom: 1px solid var(--line);
}

.accordion summary {
    position: relative;
    padding: 1.15rem 3.25rem 1.15rem 0;
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--navy);
    cursor: pointer;
    list-style: none;
}

.accordion summary::-webkit-details-marker {
    display: none;
}

.accordion summary::before,
.accordion summary::after {
    content: "";
    position: absolute;
    right: 0.9rem;
    top: 50%;
    width: 16px;
    height: 3px;
    margin-top: -1.5px;
    border-radius: 2px;
    background: var(--green-700);
    transition: transform 0.25s var(--ease);
}

.accordion summary::after {
    transform: rotate(90deg);
}

.accordion details[open] summary::after {
    transform: rotate(0deg);
}

.accordion summary:hover {
    color: var(--green-700);
}

.accordion__answer {
    max-width: 68ch;
    padding: 0 0 1.35rem;
    color: var(--ink);
}

/* Media */
.figure {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface-2);
}

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

.figure--wide { aspect-ratio: 16 / 9; }
.figure--square { aspect-ratio: 1; }
.figure--tall { aspect-ratio: 3 / 4; }

.figure figcaption {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    background: rgba(8, 17, 46, 0.82);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
}

.media-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--navy-900);
    box-shadow: var(--shadow-lg);
}

.media-frame iframe,
.media-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

.placeholder {
    display: grid;
    place-items: center;
    gap: 0.5rem;
    height: 100%;
    min-height: 180px;
    padding: 1.5rem;
    border: 2px dashed #b9c5dd;
    border-radius: var(--radius);
    background: repeating-linear-gradient(-45deg, var(--surface), var(--surface) 12px, #eaeff8 12px, #eaeff8 24px);
    color: var(--ink-muted);
    text-align: center;
    font-weight: 600;
}

.placeholder .icon {
    width: 2rem;
    height: 2rem;
    color: var(--navy);
}

/* Stats */
.stat {
    padding: 1.5rem 1rem;
    text-align: center;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    height: 100%;
}

.stat__num {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 900;
    font-style: italic;
    line-height: 1;
    color: var(--yellow);
}

.stat__label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: var(--on-dark-muted);
}

/* Swoosh band */
.swoosh {
    line-height: 0;
    pointer-events: none;
}

.swoosh svg {
    display: block;
    width: 100%;
    height: clamp(40px, 6vw, 90px);
}

.swoosh--hero {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
}

.swoosh--footer {
    background: var(--white);
}

/* 5. Header / nav ---------------------------------------------------------- */
.utility-bar {
    background: var(--navy-950);
    color: var(--on-dark-muted);
    font-size: 0.88rem;
}

.utility-bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    min-height: 44px;
    padding-block: 0.35rem;
}

.utility-bar__event {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}

.utility-bar__event .icon {
    color: var(--yellow);
}

.utility-bar__sep {
    margin-inline: 0.35rem;
    opacity: 0.5;
}

.a11y-tools,
.a11y-tools__group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.a11y-tools {
    gap: 0.6rem;
}

.a11y-tools__label {
    font-weight: 600;
}

.a11y-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 34px;
    min-height: 32px;
    padding: 0.2rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    background: transparent;
    color: var(--white);
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.a11y-btn:hover {
    border-color: var(--yellow);
}

.a11y-btn--lg { font-size: 0.98rem; }
.a11y-btn--xl { font-size: 1.14rem; }

.a11y-btn[aria-pressed="true"] {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--navy-900);
}

.masthead {
    --logo-h: 96px;
    position: relative;
    z-index: 60;
    background: var(--white);
}

.masthead__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-block: 0.9rem;
}

.masthead__logo {
    flex-shrink: 0;
}

.masthead__logo img {
    width: auto;
    height: var(--logo-h);
}

/* The Retina logo is wider in proportion, so 70% of the height gives both logos the same width */
.masthead__beneficiary img {
    width: auto;
    height: calc(var(--logo-h) * 0.7);
}

.masthead__meta {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-left: auto;
}

.masthead__edition {
    max-width: 9rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.08em;
    text-align: right;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.masthead__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.masthead__enter {
    display: none;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.45rem;
    min-height: 44px;
    padding: 0.5rem 0.9rem;
    border: 2px solid var(--navy);
    border-radius: 999px;
    background: var(--white);
    color: var(--navy);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
}

.nav-toggle__close,
.nav-toggle[aria-expanded="true"] .nav-toggle__open {
    display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__close {
    display: inline;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--navy);
    box-shadow: 0 8px 24px -16px rgba(8, 17, 46, 0.7);
}

.site-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--nav-h);
}

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

.site-nav__item--home {
    display: none;
}

.site-nav__list a {
    position: relative;
    display: block;
    padding: 1.1rem 0.62rem;
    color: var(--white);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav__list a::after {
    content: "";
    position: absolute;
    left: 0.62rem;
    right: 0.62rem;
    bottom: 0.55rem;
    height: 3px;
    border-radius: 2px;
    background: var(--yellow);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s var(--ease);
}

.site-nav__list a:hover,
.site-nav__list a[aria-current="page"] {
    color: var(--yellow);
}

.site-nav__list a:hover::after,
.site-nav__list a[aria-current="page"]::after {
    transform: scaleX(1);
}

.site-nav__enter {
    flex-shrink: 0;
}

/* 6. Heroes ----------------------------------------------------------------
   The home slideshow hero and every inner-page hero share one height
   (--hero-h), so the hero stays the same size from page to page. Content is
   centred inside it; it only grows if the text needs more room (e.g. A++). */
:root {
    --hero-h: 600px;
    --swoosh-h: clamp(40px, 6vw, 90px);
}

.hero,
.page-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: var(--hero-h);
    overflow: hidden;
    background: var(--navy-900);
    color: var(--on-dark);
}

.hero__inner,
.page-hero__inner {
    padding-block: 2.5rem calc(var(--swoosh-h) + 1.5rem);
}

.page-hero__bg,
.hero__slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-hero__bg {
    z-index: -2;
}

/* Navy wash keeps the text side readable while letting the photo show on the right */
.hero::before,
.page-hero--image::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(8, 17, 46, 0.92) 0%, rgba(8, 17, 46, 0.8) 42%, rgba(8, 17, 46, 0.3) 72%, rgba(8, 17, 46, 0.12) 100%),
        linear-gradient(0deg, rgba(8, 17, 46, 0.55), transparent 40%);
}

.page-hero:not(.page-hero--image) {
    background:
        radial-gradient(60rem 30rem at 85% -10%, rgba(0, 156, 219, 0.35), transparent 60%),
        radial-gradient(40rem 24rem at 0% 120%, rgba(0, 145, 61, 0.35), transparent 60%),
        var(--navy-900);
}

/* Text on the right, for photos whose subject is on the left */
.page-hero--right .page-hero__content {
    grid-column: 7 / span 6;
}

.page-hero--image.page-hero--right::before {
    background:
        linear-gradient(270deg, rgba(8, 17, 46, 0.92) 0%, rgba(8, 17, 46, 0.8) 42%, rgba(8, 17, 46, 0.3) 72%, rgba(8, 17, 46, 0.12) 100%),
        linear-gradient(0deg, rgba(8, 17, 46, 0.55), transparent 40%);
}

/* Slideshow */
.hero__slides {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero__slide {
    position: absolute;
    inset: 0;
    margin: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.hero__slide[hidden] {
    display: none;
}

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

@media (prefers-reduced-motion: no-preference) {
    .hero__slide.is-active img {
        animation: hero-zoom 9s ease-out both;
    }

    .hero.is-paused .hero__slide img {
        animation-play-state: paused;
    }
}

@keyframes hero-zoom {
    from { transform: scale(1.07); }
    to { transform: scale(1); }
}

.hero__controls {
    position: absolute;
    right: max(var(--gutter-page), calc((100% - var(--container)) / 2));
    bottom: calc(var(--swoosh-h) + 1rem);
    z-index: 2;
    display: none;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem;
    border-radius: 999px;
    background: rgba(8, 17, 46, 0.6);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.js .hero__controls {
    display: flex;
}

.hero__control {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--white);
    cursor: pointer;
}

.hero__control:hover {
    background: rgba(255, 255, 255, 0.16);
}

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

.hero.is-paused .hero__icon-play {
    display: inline;
}

.hero__dots {
    display: flex;
    align-items: center;
}

.hero__dot {
    display: grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 3px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.hero__dot::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.3s var(--ease), background-color 0.3s;
}

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

.hero__dot[aria-current="true"]::before {
    width: 26px;
    background: var(--yellow);
}

.hero__title {
    color: var(--white);
}

.hero__title-small {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 1rem;
    font-weight: 800;
    font-style: normal;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--yellow);
}

.hero__title-big {
    display: block;
    font-size: clamp(2.3rem, 5vw, 3.7rem);
    font-weight: 900;
    font-style: italic;
    line-height: 1.05;
    text-transform: uppercase;
}

.hero__lead {
    margin-top: 1.25rem;
    max-width: 34rem;
    font-size: 1.2rem;
    color: var(--on-dark-muted);
}

.page-hero__content > * + * {
    margin-top: 1rem;
}

.page-hero__title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 900;
    font-style: italic;
    line-height: 1.06;
    text-transform: uppercase;
    color: var(--white);
}

.page-hero__lead {
    font-size: 1.2rem;
    color: var(--on-dark-muted);
}

/* Countdown strip below the home hero */
.race-bar {
    padding-top: clamp(1.5rem, 3vw, 2.5rem);
    background: var(--white);
}

.countdown {
    padding: 1.5rem 1.75rem;
    border-radius: var(--radius);
    background:
        radial-gradient(30rem 14rem at 100% 0%, rgba(0, 156, 219, 0.3), transparent 60%),
        linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%);
    color: var(--on-dark);
    box-shadow: var(--shadow-lg);
}

.countdown__title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--yellow);
}

.countdown__date,
.countdown__venue {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.5rem;
    font-weight: 600;
    line-height: 1.35;
}

.countdown__date .icon,
.countdown__venue .icon {
    color: var(--yellow);
}

.countdown__units {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
}

.countdown__unit {
    padding: 0.9rem 0.25rem 0.75rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    text-align: center;
}

.countdown__num {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 3.4vw, 2.8rem);
    font-weight: 900;
    font-style: italic;
    line-height: 1;
    color: var(--white);
    font-variant-numeric: tabular-nums;
}

.countdown__label {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--on-dark-muted);
}

.countdown__done {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 900;
    font-style: italic;
    color: var(--yellow);
}

@media (max-width: 960px) {
    :root {
        --hero-h: 560px;
    }

    /* Hero text runs full width on tablets, so the photo sits under an even wash */
    .hero__inner .span-6,
    .page-hero__content,
    .page-hero--right .page-hero__content {
        grid-column: span 12;
        max-width: 40rem;
    }

    .hero::before,
    .page-hero--image::before,
    .page-hero--image.page-hero--right::before {
        background:
            linear-gradient(90deg, rgba(8, 17, 46, 0.88) 0%, rgba(8, 17, 46, 0.7) 100%),
            linear-gradient(0deg, rgba(8, 17, 46, 0.5), transparent 40%);
    }

    .countdown__units-col {
        order: 3;
    }
}

@media (max-width: 600px) {
    :root {
        --hero-h: 620px;
    }

    .hero::before,
    .page-hero--image::before,
    .page-hero--image.page-hero--right::before {
        background:
            linear-gradient(0deg, rgba(8, 17, 46, 0.88) 0%, rgba(8, 17, 46, 0.72) 100%);
    }

    .hero--slideshow .hero__inner {
        padding-bottom: calc(var(--swoosh-h) + 4.5rem);
    }

    .hero__controls {
        right: 50%;
        transform: translateX(50%);
        bottom: calc(var(--swoosh-h) + 0.5rem);
    }
}

/* 7. Page sections --------------------------------------------------------- */

/* Distance cards */
.distance-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
    border-top: 8px solid var(--accent, var(--navy));
}

.distance-card--green { --accent: var(--green); }
.distance-card--blue { --accent: var(--blue); }

.distance-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.9rem;
    padding: 1.5rem;
}

.distance-card__km {
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 6vw, 4.6rem);
    font-weight: 900;
    font-style: italic;
    line-height: 0.9;
    letter-spacing: -0.03em;
    color: var(--navy);
}

.distance-card__km span {
    font-size: 0.42em;
    letter-spacing: 0;
}

.distance-card--green .distance-card__km { color: var(--green-700); }
.distance-card--blue .distance-card__km { color: var(--blue-700); }

.distance-card__name {
    font-size: 1.3rem;
}

.distance-card__presenter {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-muted);
}

.distance-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.distance-card__fee {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.distance-card__fee-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-muted);
}

.distance-card__fee-amount {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 900;
    font-style: italic;
    color: var(--navy);
}

.distance-card--feature {
    --accent: var(--yellow);
    background:
        radial-gradient(30rem 18rem at 100% 0%, rgba(0, 156, 219, 0.35), transparent 60%),
        linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%);
    color: var(--on-dark);
}

.distance-card--feature .distance-card__km {
    font-size: clamp(4.2rem, 9vw, 7rem);
    color: var(--yellow);
}

.distance-card--feature .distance-card__name,
.distance-card--feature .distance-card__fee-amount {
    color: var(--white);
}

.distance-card--feature .distance-card__presenter,
.distance-card--feature .distance-card__fee-label {
    color: var(--on-dark-muted);
}

.distance-card--feature .distance-card__fee {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.distance-card--feature .chip--light {
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
}

/* Product (merch) cards */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    transition: box-shadow 0.25s, transform 0.25s var(--ease);
}

.product-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.product-card__media {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    padding: 1rem;
    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-card__media .badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
}

.product-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.6rem;
    padding: 1.1rem 1.2rem 1.3rem;
}

.product-card__name {
    font-size: 1.08rem;
}

.product-card__text {
    font-size: 0.95rem;
    color: var(--ink-muted);
}

.product-card__sizes {
    font-size: 0.85rem;
    color: var(--ink-muted);
}

.product-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.6rem;
}

.product-card__price {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 900;
    font-style: italic;
    color: var(--navy);
}

/* Raffle cards */
.raffle-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.raffle-card__media {
    position: relative;
    aspect-ratio: 1;
    background: var(--surface-2);
}

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

.raffle-card__value {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    background: var(--navy-900);
    color: var(--yellow);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 900;
    font-style: italic;
}

.raffle-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.7rem;
    padding: 1.3rem;
}

.raffle-card__title {
    font-size: 1.15rem;
}

.raffle-card__facts {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.75rem;
    font-size: 0.95rem;
}

.raffle-card__facts dt {
    font-weight: 700;
    color: var(--ink-muted);
}

.raffle-card__facts dd {
    font-weight: 700;
    color: var(--navy);
}

.raffle-card .btn {
    margin-top: auto;
}

.raffle-card--wide .raffle-card__body {
    padding: 1.6rem;
}

/* Feature list (icon + text rows) */
.feature {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature > div > * + * {
    margin-top: 0.35rem;
}

/* Contact cards */
.contact-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    height: 100%;
    padding: 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.contact-card__label {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--navy);
}

.contact-card a {
    overflow-wrap: anywhere;
    font-weight: 600;
}

/* Gallery */
.gallery-item {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: var(--radius);
    background: var(--surface-2);
    cursor: zoom-in;
    aspect-ratio: 1;
}

.gallery-item--wide {
    position: relative;
    aspect-ratio: auto;
    height: 100%;
    min-height: 220px;
}

.gallery-item--wide img {
    position: absolute;
    inset: 0;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.quote-card {
    position: relative;
    height: 100%;
    padding: 2rem 1.6rem 1.6rem;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--line);
}

.quote-card::before {
    content: "\201C";
    position: absolute;
    top: -0.2rem;
    left: 1.2rem;
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1;
    color: var(--yellow);
    -webkit-text-stroke: 1px var(--navy);
}

.quote-card--placeholder {
    border-style: dashed;
    background: var(--surface);
    color: var(--ink-muted);
}

/* Profile cards (Team Retina SA) */
.profile-card {
    height: 100%;
    padding: 1.5rem;
    border: 2px dashed #b9c5dd;
    border-radius: var(--radius);
    background: var(--white);
    text-align: center;
}

.profile-card__avatar {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--navy);
}

.profile-card__avatar .icon {
    width: 2.2rem;
    height: 2.2rem;
}

/* Jump links */
.jump-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    list-style: none;
}

.jump-links a {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--navy);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
}

.jump-links a:hover {
    border-color: var(--navy);
    background: var(--navy);
    color: var(--white);
}

.sticky-side {
    position: sticky;
    top: calc(var(--nav-h) + 24px);
}

.side-nav {
    padding: 0;
    list-style: none;
    border-left: 3px solid var(--line);
}

.side-nav a {
    display: block;
    margin-left: -3px;
    padding: 0.45rem 0 0.45rem 1rem;
    border-left: 3px solid transparent;
    color: var(--ink-muted);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

.side-nav a:hover {
    border-left-color: var(--green);
    color: var(--navy);
}

.faq-group + .faq-group {
    margin-top: 3rem;
}

.faq-group__title {
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

/* Terms */
.terms-list {
    padding: 0;
    list-style: none;
    counter-reset: terms;
}

.terms-list li {
    position: relative;
    padding: 1.1rem 0 1.1rem 3.5rem;
    border-bottom: 1px solid var(--line);
    counter-increment: terms;
}

.terms-list li::before {
    content: counter(terms);
    position: absolute;
    left: 0;
    top: 1rem;
    display: grid;
    place-items: center;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    font-family: var(--font-display);
    font-weight: 800;
}

/* CTA band */
.cta-band {
    position: relative;
    overflow: hidden;
    padding-block: clamp(2.75rem, 5vw, 4rem);
    background:
        radial-gradient(40rem 20rem at 100% 0%, rgba(0, 156, 219, 0.4), transparent 60%),
        radial-gradient(30rem 18rem at 0% 100%, rgba(0, 145, 61, 0.35), transparent 60%),
        var(--navy);
    color: var(--on-dark);
}

.cta-band__title {
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    color: var(--white);
}

.cta-band__text {
    margin-top: 0.85rem;
    color: var(--on-dark-muted);
}

.cta-band__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Sponsor strip */
.sponsor-strip {
    padding-block: clamp(2.5rem, 5vw, 3.75rem) 1rem;
    background: var(--white);
}

.sponsor-strip__title {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-align: center;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.sponsor-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: 100%;
    min-height: 112px;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--white);
    text-align: center;
}

.sponsor-tile img {
    max-width: 100%;
    max-height: 58px;
    object-fit: contain;
}

.sponsor-tile__name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 900;
    font-style: italic;
    line-height: 1.15;
    text-transform: uppercase;
    color: var(--navy);
}

.sponsor-tile__role {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink-muted);
}

.sponsor-tile--headline {
    min-height: 150px;
    border: 0;
    background: linear-gradient(135deg, var(--green-700), #00a14a);
}

.sponsor-tile--headline .sponsor-tile__name {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--white);
}

.sponsor-tile--headline .sponsor-tile__role {
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--white);
}

.sponsor-tile--presenter {
    min-height: 150px;
}

.sponsor-tile--presenter .sponsor-tile__name {
    font-size: 1.5rem;
}

.sponsor-tile--dark {
    border-color: var(--navy-900);
    background: var(--navy-900);
}

.sponsor-tile--dark .sponsor-tile__role {
    color: var(--on-dark-muted);
}

/* 8. Footer ---------------------------------------------------------------- */
.site-footer {
    background: var(--navy-900);
    color: var(--on-dark-muted);
    font-size: 0.98rem;
}

.site-footer__body {
    padding-block: 2rem 3rem;
}

.site-footer__brand > * + * {
    margin-top: 1rem;
}

.site-footer__logo,
.site-footer__retina {
    display: inline-block;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    background: var(--white);
}

.site-footer__logo img,
.site-footer__retina img {
    width: 150px;
    height: auto;
}

.site-footer__title {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--yellow);
}

.site-footer__links,
.site-footer__contacts {
    padding: 0;
    list-style: none;
}

.site-footer__links li + li {
    margin-top: 0.4rem;
}

.site-footer__contacts li + li {
    margin-top: 0.7rem;
}

.site-footer__contacts span {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.site-footer a {
    color: var(--white);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.site-footer a:not(.btn):hover {
    color: var(--yellow);
    text-decoration: underline;
}

.site-footer__small {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0;
    list-style: none;
}

.social-links a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    background: var(--yellow);
    color: var(--navy-900);
}

.site-footer__legal {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.86rem;
}

.site-footer__legal-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 2rem;
    padding-block: 1.2rem;
}

/* Lightbox */
.lightbox {
    max-width: min(92vw, 1000px);
    max-height: 92vh;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
}

.lightbox::backdrop {
    background: rgba(8, 17, 46, 0.92);
}

.lightbox__img {
    max-width: 100%;
    max-height: 82vh;
    width: auto;
    margin: 0 auto;
    border-radius: var(--radius-sm);
}

.lightbox__caption {
    margin-top: 0.75rem;
    color: var(--white);
    text-align: center;
}

.lightbox__close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--navy-900);
    font-size: 1.3rem;
    cursor: pointer;
}

/* 9. Accessibility modes --------------------------------------------------- */
html[data-contrast="high"] {
    --ink: #000000;
    --ink-muted: #1c1c1c;
    --line: #000000;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --navy: #0a1a52;
    --on-dark-muted: #ffffff;
    --green-700: #005c26;
    --blue-700: #00557a;
}

html[data-contrast="high"] .hero__slides,
html[data-contrast="high"] .page-hero__bg {
    display: none;
}

html[data-contrast="high"] .hero,
html[data-contrast="high"] .page-hero,
html[data-contrast="high"] .cta-band,
html[data-contrast="high"] .distance-card--feature,
html[data-contrast="high"] .countdown {
    background: #000000;
}

html[data-contrast="high"] .hero::before,
html[data-contrast="high"] .page-hero--image::before {
    display: none;
}

html[data-contrast="high"] a:not(.btn) {
    text-decoration: underline !important;
}

html[data-contrast="high"] .card,
html[data-contrast="high"] .product-card,
html[data-contrast="high"] .raffle-card,
html[data-contrast="high"] .distance-card,
html[data-contrast="high"] .contact-card,
html[data-contrast="high"] .sponsor-tile,
html[data-contrast="high"] .table-wrap,
html[data-contrast="high"] .quote-card {
    border: 2px solid #000000;
    box-shadow: none;
}

html[data-contrast="high"] .distance-card--feature,
html[data-contrast="high"] .countdown,
html[data-contrast="high"] .card--dark {
    border: 2px solid #ffffff;
}

html[data-contrast="high"] .btn--outline,
html[data-contrast="high"] .btn--primary {
    border-color: #000000;
}

html[data-contrast="high"] .btn--ghost-light {
    border-color: #ffffff;
}

html[data-contrast="high"] .section--alt {
    border-block: 2px solid #000000;
}

html[data-contrast="high"] .swoosh {
    display: none;
}

html[data-contrast="high"] .placeholder,
html[data-contrast="high"] .profile-card {
    background: #ffffff;
    border-color: #000000;
}

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

/* 10. Responsive ------------------------------------------------------------
   Grid collapse stays within the allowed spans (12 / 6 / 3 / 2 / 1). */
@media (max-width: 1024px) {
    .masthead {
        --logo-h: 72px;
    }

    .masthead__inner {
        gap: 1rem;
        padding-block: 0.6rem;
    }

    .masthead__meta {
        margin-left: auto;
    }

    /* Without JavaScript the menu button can't work, so the links stack under the header */
    html:not(.js) .site-nav {
        position: static;
        box-shadow: none;
    }

    html:not(.js) .site-nav__inner {
        flex-direction: column;
        align-items: stretch;
        padding-block: 1rem 2rem;
    }

    html:not(.js) .site-nav__list {
        flex-direction: column;
    }

    html:not(.js) .site-nav__list a::after {
        display: none;
    }
}

/* Collapsed navigation. main.js adds .nav-collapsed whenever the links won't fit on one line
   (narrow screens, or the larger text sizes), and the menu button takes over. */
.nav-collapsed .masthead {
    position: sticky;
    top: 0;
    box-shadow: 0 6px 20px -14px rgba(8, 17, 46, 0.5);
}

.nav-collapsed .masthead__enter,
.nav-collapsed .nav-toggle {
    display: inline-flex;
}

.nav-collapsed .site-nav {
    position: fixed;
    top: var(--masthead-h, 72px);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    display: none;
    overflow-y: auto;
    background: var(--navy-900);
    box-shadow: none;
}

.nav-collapsed .site-nav.is-open {
    display: block;
}

.nav-collapsed .site-nav__inner {
    flex-direction: column;
    align-items: stretch;
    padding-block: 1rem 2rem;
}

.nav-collapsed .site-nav__list {
    flex-direction: column;
}

.nav-collapsed .site-nav__item--home {
    display: block;
}

.nav-collapsed .site-nav__list a {
    padding: 1rem 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 1.1rem;
}

.nav-collapsed .site-nav__list a::after {
    display: none;
}

.nav-collapsed .site-nav__enter {
    width: 100%;
    min-height: 52px;
    margin-top: 1rem;
    font-size: 1rem;
}

.nav-open {
    overflow: hidden;
}

@media (max-width: 960px) {
    .span-3 { grid-column: span 6; }
    .span-2 { grid-column: span 3; }
    .span-1 { grid-column: span 2; }

    /* Layout-specific collapses */
    .collapse-md.span-6,
    .collapse-md.span-3 {
        grid-column: span 12;
    }

    .sticky-side {
        position: static;
    }

    .cta-band__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .utility-bar__event {
        display: none;
    }

    .utility-bar__inner {
        justify-content: center;
    }

    .masthead__meta {
        display: none;
    }

    .masthead__actions {
        margin-left: auto;
    }
}

@media (max-width: 600px) {
    .span-6,
    .span-3 { grid-column: span 12; }
    .span-2 { grid-column: span 6; }
    .span-1 { grid-column: span 3; }

    body {
        font-size: 1.0625rem;
    }

    .masthead {
        --logo-h: 60px;
    }

    .masthead__enter {
        padding-inline: 0.9em;
    }

    .nav-toggle__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .nav-toggle {
        padding: 0.5rem;
        min-width: 44px;
        justify-content: center;
    }

    .countdown__units {
        gap: 0.4rem;
    }

    .btn-row .btn {
        flex: 1 1 100%;
    }

    .table th,
    .table td {
        padding: 0.7rem 0.8rem;
    }

    .terms-list li {
        padding-left: 3rem;
    }
}

/* Additions: home page components ----------------------------------------- */
ul.chip-row {
    padding: 0;
    list-style: none;
}

.section--dark .lead {
    color: var(--on-dark-muted);
}

.stat--light {
    background: var(--white);
    border-color: var(--line);
}

.stat--light .stat__num {
    color: var(--navy);
}

.stat--light .stat__label {
    color: var(--ink-muted);
}

.figure--pano {
    aspect-ratio: 32 / 9;
}

.promo-card {
    display: grid;
    grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.promo-card > img {
    width: 100%;
    height: 100%;
    padding: 1rem;
    object-fit: contain;
    background: var(--white);
}

.promo-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.7rem;
    padding: 1.6rem 1.6rem 1.6rem 0.5rem;
}

@media (max-width: 600px) {
    .promo-card {
        grid-template-columns: 1fr;
    }

    .promo-card > img {
        max-height: 220px;
    }

    .promo-card__body {
        padding: 0 1.4rem 1.5rem;
    }
}

.card--dark .card__price {
    color: var(--yellow);
}

.figure--contain {
    background: var(--white);
    border: 1px solid var(--line);
}

.figure--contain img {
    padding: 1rem;
    object-fit: contain;
}

/* FAQ page */
.faq-chips {
    display: none;
    margin-bottom: 2rem;
}

.contact-card--feature {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--on-dark);
}

.contact-card--feature .contact-card__label {
    font-size: 1.4rem;
    color: var(--white);
}

.contact-card--feature a {
    color: var(--yellow);
}

@media (max-width: 960px) {
    .faq-side {
        display: none;
    }

    .faq-chips {
        display: block;
    }
}

.btn-row--tight {
    margin-top: 0.25rem;
}

/* Raffles page */
.raffle-card--wide {
    display: grid;
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
}

.raffle-card--wide .raffle-card__media {
    align-self: start;
    margin: 1rem 0 1rem 1rem;
    overflow: hidden;
    border-radius: var(--radius-sm);
}

/* Numbered steps */
.steps {
    padding: 0;
    list-style: none;
    counter-reset: steps;
}

.steps li {
    position: relative;
    padding: 1rem 1rem 1rem 4rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    counter-increment: steps;
}

.steps li + li {
    margin-top: 0.6rem;
}

.steps li::before {
    content: counter(steps);
    position: absolute;
    left: 1rem;
    top: 50%;
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    margin-top: -1.1rem;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--navy-900);
    font-family: var(--font-display);
    font-weight: 900;
}

.steps strong {
    color: var(--white);
}

@media (max-width: 1100px) {
    .raffle-card--wide {
        grid-template-columns: 1fr;
    }

    .raffle-card--wide .raffle-card__media {
        margin: 0;
        border-radius: 0;
    }
}

.card--dark .lead {
    color: var(--white);
}

.placeholder--video {
    aspect-ratio: 16 / 9;
}

.placeholder--short {
    min-height: 120px;
}

.a11y-btn {
    white-space: nowrap;
}

@media (max-width: 600px) {
    .a11y-tools__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .a11y-tools {
        flex-wrap: wrap;
        justify-content: center;
    }
}

.masthead__enter {
    white-space: nowrap;
}

/* Tables become stacked cards on phones */
@media (max-width: 600px) {
    .masthead__enter {
        min-height: 44px;
        font-size: 0.82rem;
    }

    .table--stack thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .table--stack tbody,
    .table--stack tr,
    .table--stack th,
    .table--stack td {
        display: block;
        width: 100%;
    }

    .table--stack tbody tr {
        padding: 0.85rem 1rem;
        border-bottom: 1px solid var(--line);
    }

    .table--stack tbody tr:last-child {
        border-bottom: 0;
    }

    .table--stack tbody th {
        padding: 0 0 0.35rem;
        border: 0;
        font-family: var(--font-display);
        font-size: 1.05rem;
    }

    .table--stack td {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.3rem 0;
        border: 0;
        text-align: right;
    }

    .table--stack td.num {
        text-align: right;
    }

    .table--stack td::before {
        content: attr(data-label);
        flex-shrink: 0;
        font-weight: 600;
        text-align: left;
        color: var(--ink-muted);
    }
}

.gallery-item--pano {
    aspect-ratio: 2.6 / 1;
}

/* Event Rules page */
.rules-list {
    padding-left: 1.25em;
}

.rules-list li + li {
    margin-top: 0.6rem;
}

.rules-list li::marker {
    color: var(--green-700);
}

.rules-links {
    padding: 0;
    list-style: none;
}

.rules-links li + li {
    margin-top: 0.4rem;
}

.card > .btn--block {
    margin-top: 1rem;
}

.media-release-image {
    display: block;
}

@media (max-width: 900px) {
    .masthead__edition {
        display: none;
    }
}

/* Photos in distance cards */
.distance-card__media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--surface-2);
}

.distance-card--feature .distance-card__media {
    aspect-ratio: 21 / 9;
}

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

/* Cards with a photo across the top */
.card--media {
    overflow: hidden;
    padding-top: 0;
}

.card__media {
    aspect-ratio: 16 / 9;
    margin: 0 -1.6rem 1.25rem;
    overflow: hidden;
}

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

.photo-pair {
    margin-bottom: var(--gutter);
}

.contact-lines {
    padding: 0;
    list-style: none;
}

.contact-lines li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.contact-lines li + li {
    margin-top: 0.4rem;
}

.contact-lines .icon {
    color: var(--yellow);
}

/* Very small phones: tighter hero type keeps every hero the same height */
@media (max-width: 380px) {
    .hero__title-big,
    .page-hero__title {
        font-size: 1.95rem;
    }

    .hero__lead,
    .page-hero__lead {
        font-size: 1.05rem;
    }

    .hero__inner .btn--lg,
    .page-hero__inner .btn--lg {
        min-height: 50px;
        padding-block: 0.8em;
    }
}

.raffle-card__terms {
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--ink-muted);
}

/* Store product tiles fill the card edge to edge (they carry their own frame) */
.product-card__media--tile {
    padding: 0;
}

.product-card__media--tile img {
    object-fit: cover;
}

.promo-card--wide {
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
}

.promo-card .product-card__price {
    margin: 0;
}

/* Sponsor logos: the Dis-Chem lockup carries its own green, so its tile is white */
.sponsor-tile--headline:has(img) {
    background: var(--white);
    border: 1px solid var(--line);
}

.sponsor-tile--headline img {
    max-height: 104px;
}

.sponsor-tile--headline:has(img) .sponsor-tile__role,
.sponsor-tile--presenter .sponsor-tile__role {
    color: var(--ink-muted);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sponsor-tile--presenter img {
    max-height: 72px;
}

/* Official rules: numbered exactly as the PDF */
.rules-official {
    padding-left: 2.6rem;
}

.rules-official > li {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
}

.rules-official > li::marker {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--green-700);
}

.rules-official > li > * + * {
    margin-top: 0.6rem;
}

.rules-official ul {
    padding-left: 1.25rem;
}

.rules-official li li + li {
    margin-top: 0.3rem;
}

.rules-official > li:target {
    background: var(--yellow-050);
    box-shadow: -1rem 0 0 var(--yellow-050), 1rem 0 0 var(--yellow-050);
}

/* Route maps (Google My Maps embeds) */
.route-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.route-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}

.route-card__map {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--surface-2);
}

.route-card__map--large {
    aspect-ratio: 16 / 9;
}

.route-card__map iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* About page */
.winners-list {
    padding: 0;
    list-style: none;
}

.winners-list li {
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-weight: 600;
}

.section--dark .callout {
    color: var(--ink);
}

.closing-line {
    margin-top: clamp(2.5rem, 5vw, 4rem);
    text-align: center;
}

.closing-line p {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 900;
    font-style: italic;
    line-height: 1.3;
    text-transform: uppercase;
    color: var(--navy);
    text-wrap: balance;
}

/* Route map tiles (link to Google Maps) */
.route-tile {
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.route-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.route-tile img {
    width: 100%;
    height: auto;
}

/* The hidden attribute always wins over component display rules */
[hidden] {
    display: none !important;
}

/* Cookie pop-up: floats at the bottom right of the screen (clear of the hero's Enter Now button), under the open mobile menu (z-index 55).
   While it is open the page gets matching space at the bottom, so it never hides the end of the page
   or a focused element. Hidden without JavaScript (no analytics can load then). */
:root {
    --cookie-space: 0px;
}

html.js.consent-pending {
    scroll-padding-bottom: calc(var(--cookie-space) + 2rem);
}

html.js.consent-pending body {
    padding-bottom: calc(var(--cookie-space) + 1.5rem);
}

.cookie-banner {
    position: fixed;
    bottom: 1rem;
    right: max(1rem, calc((100% - 1100px) / 2)); /* lines up with the content edge; % of a fixed box ignores the scrollbar */
    z-index: 45;
    display: none;
    width: min(31rem, calc(100% - 2rem));
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: 1.25rem 1.4rem 1.35rem;
    border: 1px solid var(--line);
    border-top: 5px solid var(--yellow);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--ink);
    box-shadow: 0 24px 48px -18px rgba(8, 17, 46, 0.55), 0 4px 12px -6px rgba(8, 17, 46, 0.25);
}

html.js.consent-pending .cookie-banner {
    display: block;
    animation: cookie-in 0.35s var(--ease) both;
}

@keyframes cookie-in {
    from { opacity: 0; transform: translateY(1.5rem); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    html.js.consent-pending .cookie-banner {
        animation: none;
    }
}

.cookie-banner__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.45rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--navy);
}

.cookie-banner__title .icon {
    flex: none;
    color: var(--blue-700);
}

.cookie-banner__text {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-banner__text a {
    font-weight: 700;
    color: var(--navy);
}

.cookie-banner__actions {
    display: flex;
    gap: 0.75rem;
}

.cookie-banner__actions .btn {
    flex: 1 1 0;
}

@media (max-width: 600px) {
    .cookie-banner {
        bottom: 0.75rem;
        right: 0.75rem;
        width: calc(100% - 1.5rem);
        padding: 1.1rem 1.1rem 1.2rem;
    }
}

html[data-contrast="high"] .cookie-banner {
    border: 3px solid #000000;
    box-shadow: none;
}

@media print {
    .cookie-banner {
        display: none !important;
    }
}

/* Cookie settings form (cookies page) */
.cookie-settings .card__title:focus {
    outline: none;
}

.cookie-settings__saved {
    margin-bottom: 1.25rem;
}

.cookie-settings__saved:focus {
    outline: 3px solid var(--navy);
    outline-offset: 2px;
}

.cookie-form fieldset {
    margin: 0 0 1.25rem;
    padding: 0;
    border: 0;
}

.cookie-form legend {
    margin-bottom: 0.6rem;
    font-weight: 700;
    color: var(--navy);
}

.choice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.45rem 0;
    cursor: pointer;
}

.choice input {
    flex: none;
    width: 1.35rem;
    height: 1.35rem;
    margin: 0.1rem 0 0;
    accent-color: var(--navy);
}
