/* Palette and fonts matched to the printed invitation */
:root {
    --color-bg: #fcf2e6;
    /* invitation cream (matches the artwork background) */
    --color-text: #1f1b18;
    --color-muted: #5f5750;
    --color-lavender: #b2aecf;
    --color-lavender-deep: #6e6596;
    --color-sage: #9aaa8d;
    --color-blush: #f0c5cc;
    --color-button: #4f7556;        /* solid buttons (RSVP etc.): sage from the landscape hills */
    --color-button-hover: #628d6b;  /* solid button hover: lighter sage */
    --color-sage-deep: #3f5f45;     /* text on sage tints (tags, selected answers), readable when small */
    --color-border: #e6d9c8;
    --color-card: rgba(255, 255, 255, 0.55);
    --font-display: 'Italiana', 'Didot', 'Bodoni 72', Georgia, serif;
    /* Hero names only; CoFo Raffine comes from Adobe Fonts, so fall back to the display font */
    --font-title: 'cofo-raffine', var(--font-display);
    --font-script: 'Pinyon Script', 'Snell Roundhand', 'Brush Script MT', cursive;
    --font-body: 'Jost', 'Century Gothic', 'Segoe UI', system-ui, sans-serif;
    --max-width: 960px;
}

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

html {
    scroll-behavior: smooth;
}

/* Custom scrollbars (page and RSVP modal): slim lavender thumb on the cream background.
   Firefox and newer Chrome/Edge use the standard properties; Safari uses ::-webkit-scrollbar. */
html,
.modal {
    scrollbar-width: thin;
    scrollbar-color: var(--color-lavender) var(--color-bg);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-lavender);
    border: 3px solid var(--color-bg);
    /* cream border makes the thumb look slimmer and floating */
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-lavender-deep);
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
}

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

a {
    color: var(--color-lavender-deep);
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: normal;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Italiana only comes in one (very fine) weight, so thicken it slightly with a hairline
   outline in the text colour. Smaller headings get relatively more, as they suffer most. */
h1,
h2,
h3,
.area h4,
.nav-brand {
    -webkit-text-stroke: 0.45px currentColor;
}

h2 {
    -webkit-text-stroke-width: 0.6px;
}

/* The big hero names keep Italiana's original fine weight */
.names {
    -webkit-text-stroke-width: 0;
}

/* Keep the script "&" and other script text delicate */
.script {
    -webkit-text-stroke-width: 0;
}

strong {
    font-weight: 500;
}

.script {
    font-family: var(--font-script);
    text-transform: none;
    letter-spacing: 0;
}

/* Header / nav */
.site-header {
    position: sticky;
    top: 0;
    background: rgba(252, 242, 230, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--color-border);
    z-index: 10;
}

/* Wider than the page content so all eight links fit on one row */
.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.9rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* Initials match the hero names: CoFo Raffine with an Alex Brush "&".
   The kit only has one weight, so a hairline outline makes them a touch bolder. */
.nav-brand {
    font-family: var(--font-title);
    font-weight: 400;
    -webkit-text-stroke-width: 0.7px;
    font-size: 1.4rem;
    color: var(--color-text);
    text-decoration: none;
}

.nav-brand .script {
    font-family: 'alex-brush', var(--font-script);
    font-weight: 400;
    -webkit-text-stroke-width: 0;
}

.nav-links {
    list-style: none;
    margin: 0 0 0 auto;
    padding: 0;
    display: flex;
    gap: 1.75rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 1.75rem;
}

.nav-actions .button {
    margin: 0;
    padding: 0.45rem 1.2rem;
}

.nav-links a {
    color: var(--color-text);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.8rem;
    font-weight: 400;
}

.nav-links a:hover {
    color: var(--color-lavender-deep);
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--color-text);
    padding: 0.3rem 0.9rem;
    font: inherit;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-text);
    cursor: pointer;
}

/* Hero: laid out like the invitation */
.hero {
    position: relative;
    overflow: hidden;
    text-align: center;
}

.hero-stalk {
    position: absolute;
    top: 1rem;
    left: 0;
    width: clamp(110px, 20vw, 270px);
}

/* A mirrored copy of the stalk on the right */
.hero-stalk-right {
    left: auto;
    right: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 30rem;
    margin: 0 auto;
    padding: 4rem 1rem 0;
}

.names {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: var(--font-title);
    font-weight: 400;
    font-size: clamp(3rem, 9vw, 5.5rem);
    line-height: 1;
    margin: 0 0 2.5rem;
}

.names .amp {
    /* Alex Brush comes from Adobe Fonts, so fall back to the usual script font */
    font-family: 'alex-brush', var(--font-script);
    font-weight: 400;
    font-size: 0.75em;
    line-height: 1.1;
}

.hero-detail {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 1rem;
    margin: 0 0 1.5rem;
}

/* "Reception to follow" in Tangier Light (Adobe Fonts), falling back to the usual script font */
.hero-reception {
    display: inline-block;
    margin-top: 0.35rem;
    font-family: 'tangier', var(--font-script);
    font-weight: 300;
    font-size: 1.6rem;
    text-transform: none;
    letter-spacing: 0.02em;
}

.hero-script {
    font-size: 1.9rem;
    margin: 0 0 1.25rem;
}

.countdown {
    margin: 2rem 0 0;
    color: var(--color-lavender-deep);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.85rem;
    font-weight: 400;
}

/* The hero painting */
.hero-scene {
    position: relative;
    overflow: hidden;
    width: min(100%, 1000px);
    margin: calc(-0.3 * min(100vw, 1000px)) auto 0;
}

.hero-landscape {
    width: 100%;
}

/* On wide screens, fade the painting's side edges into the page */
@media (min-width: 1000px) {
    .hero-scene {
        margin-top: -440px;
        -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
        mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
    }
}

.button {
    margin-top: 1.5rem;
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-text);
    padding: 0.7rem 1.6rem;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

/* Outline buttons hover to a soft sage (same family as the solid green buttons, but lighter so
   they stay secondary) */
.button:hover {
    background: rgba(154, 170, 141, 0.3);
    border-color: var(--color-sage-deep);
    color: var(--color-sage-deep);
}

.button:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Filled variant for the main call to action (RSVP) */
/* Sage green from the painted hills; deep enough for cream text to stay readable */
.button-solid {
    background: var(--color-button);
    color: var(--color-bg);
    border-color: var(--color-button);
}

.button-solid:hover {
    background: var(--color-button-hover);
    border-color: var(--color-button-hover);
    color: var(--color-bg);  /* keep cream text (overrides the outline-button hover colour) */
}

/* RSVP modal */
body.modal-open {
    overflow: hidden;
}

.modal {
    position: fixed;
    width: min(34rem, calc(100% - 2rem));
    max-height: calc(100vh - 2rem);
    /* dvh = the visible height, so the phone's browser bars can't push it off screen */
    max-height: calc(100dvh - 2rem);
    padding: 0;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text);
    box-shadow: 0 20px 60px rgba(31, 27, 24, 0.25);
    overflow: auto;
}

.modal::backdrop {
    background: rgba(31, 27, 24, 0.45);
    backdrop-filter: blur(3px);
}

.modal[open] {
    animation: modal-in 0.25s ease-out;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

.modal-stalk {
    position: absolute;
    top: 0.5rem;
    left: 0;
    width: 70px;
    pointer-events: none;
}

.modal-close {
    position: absolute;
    z-index: 2;
    /* keep above .modal-body, which is positioned and comes later */
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--color-muted);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.modal-close:hover {
    color: var(--color-text);
}

.modal-body {
    position: relative;
    padding: 2.5rem 2.25rem 2.25rem;
    text-align: center;
}

/* Same CoFo Raffine as the hero names, without the Italiana thickening outline */
.modal-body h2 {
    font-family: var(--font-title);
    font-weight: 400;
    -webkit-text-stroke-width: 0;
    font-size: 2.4rem;
    margin: 0 0 1.75rem;
    outline: none;
}

.rsvp-form {
    text-align: left;
}

.field {
    margin: 0 0 1.25rem;
    padding: 0;
    border: none;
}

.field label,
.field legend {
    display: block;
    margin-bottom: 0.4rem;
    padding: 0;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.optional {
    text-transform: none;
    letter-spacing: 0;
    color: var(--color-muted);
}

.field input[type='text'],
.field input[type='email'],
.field input[type='number'],
.field textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.7);
    font: inherit;
    color: var(--color-text);
    border-radius: 0;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--color-sage);
    box-shadow: 0 0 0 3px rgba(154, 170, 141, 0.45);
}

.field input[type='number'] {
    width: 6rem;
}

.choice-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Radio options styled as selectable boxes */
.choice {
    position: relative;
    margin: 0;
}

.field .choice {
    margin: 0;
    font-size: 0.95rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 300;
}

.choice input {
    position: absolute;
    opacity: 0;
}

.choice span {
    display: block;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.7);
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

/* Green = practical / interactive (matches the green Send RSVP button) */
.choice input:checked+span {
    background: rgba(154, 170, 141, 0.3);
    /* soft sage tint */
    border-color: var(--color-sage);
    color: var(--color-sage-deep);
    font-weight: 400;
}

.choice input:focus-visible+span {
    box-shadow: 0 0 0 3px rgba(154, 170, 141, 0.6);
}

/* Spam trap field: moved off-screen rather than display:none, which some bots detect */
.rsvp-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.rsvp-error {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-left: 2px solid #c07a86;
    background: rgba(240, 197, 204, 0.25);
    color: #7a3a47;
    font-size: 0.92rem;
}

.rsvp-submit {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
}

/* Petal toss on accepting (see petalToss in main.js) */
.petal-layer {
    position: fixed;
    inset: 0;
    z-index: 3;
    overflow: hidden;
    pointer-events: none;
}

.petal {
    position: absolute;
    border-radius: 80% 0 80% 0;
    /* soft petal / leaf shape */
    opacity: 0;
    will-change: transform, opacity;
}

.rsvp-thanks-title {
    font-size: 2.6rem;
    margin: 0.5rem 0 0.5rem;
}

.joke {
    min-height: 3em;
    margin: 1rem 0 0;
    color: var(--color-muted);
    font-style: italic;
}

/* Content sections */
.section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4.5rem 2rem;
    /* 32px side gutters so text never runs close to the screen edge */
    text-align: center;
}

/* Leave room for the sticky header when jumping to a section from the menu */
section[id] {
    scroll-margin-top: 4rem;
}

/* Section headings in Tangier Light (Adobe Fonts), a script, so no capitals or Italiana
   thickening outline; it falls back to the usual script font */
.section h2 {
    font-family: 'tangier', var(--font-script);
    font-weight: 300;
    text-transform: none;
    letter-spacing: 0;
    -webkit-text-stroke-width: 0;
    font-size: clamp(2.4rem, 5.5vw, 3.2rem);
    margin: 0 0 2rem;
}

/* Small lavender rule under each section heading */
.section h2::after {
    content: '';
    display: block;
    width: 48px;
    height: 1px;
    margin: 1rem auto 0;
    background: var(--color-lavender-deep);
}

/* Details: three open columns divided by thin lines, like an invitation insert */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 0.5rem;
}

.card {
    padding: 0.75rem 1.5rem;
}

.card+.card {
    border-left: 1px solid var(--color-lavender);
}

.card h3 {
    font-size: 1.2rem;
    margin: 0 0 0.75rem;
}

.card p {
    margin: 0;
}

/* On the Day: the timeline sits in a card framed like printed wedding stationery -
   a fine double lavender rule (border + inset outline) */
.order-card {
    position: relative;
    max-width: 45rem;
    margin: 3.5rem auto 0;
    padding: 3.25rem 2.5rem 2.75rem;
    --inset: 10px;
    /* how far the printed line sits inside the card edge */
    /* A single delicate lavender line printed just inside the edge, like stationery */
    outline: 1px solid rgba(178, 174, 207, 0.55);
    outline-offset: calc(-1 * var(--inset));
    /* A touch brighter than the page, like a card of paper resting on it... */
    background-color: rgba(255, 255, 255, 0.28);
    /* ...lifted by a very soft, warm paper shadow */
    box-shadow: 0 1px 2px rgba(60, 40, 20, 0.05), 0 12px 32px rgba(60, 40, 20, 0.07);
}

.order-card .timeline {
    margin-top: 0;
}

/* On the Day: vertical timeline */
.timeline {
    list-style: none;
    max-width: 34rem;
    margin: 2.5rem auto 0;
    padding: 0;
    text-align: left;
}

.timeline li {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 1.5rem;
}

.timeline-time {
    padding-top: 0.2rem;
    text-align: right;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--color-lavender-deep);
    white-space: nowrap;
}

.timeline-event {
    position: relative;
    padding: 0 0 1.75rem 1.5rem;
    border-left: 1px solid var(--color-lavender);
}

.timeline li:last-child .timeline-event {
    border-left-color: transparent;
    padding-bottom: 0;
}

/* Dot on the line for each event */
.timeline-event::before {
    content: '';
    position: absolute;
    left: -0.35rem;
    top: 0.35rem;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: #fdf6ed;
    /* matches the order card (page cream + 28% white) so the hollow dots blend in */
    border: 1px solid var(--color-lavender-deep);
}

/* Main moments get a filled dot and larger heading */
.timeline-highlight .timeline-event::before {
    background: var(--color-blush);
    border-color: #d99aa5;
    width: 0.9rem;
    height: 0.9rem;
    left: -0.45rem;
    top: 0.3rem;
}

.timeline-event h3 {
    font-size: 1rem;
    margin: 0 0 0.2rem;
}

.timeline-event p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--color-muted);
}

/* Groups in the Travel and Good to Know sections: open, no boxes
   (only the shuttle is framed, so it stands out) */
.travel-card {
    margin-top: 4rem;
    text-align: left;
}

/* Sprig divider between travel groups: ── sprig ── */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin: 4.5rem auto;
    max-width: 30rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-lavender);
}

.divider img {
    width: 130px;
    flex-shrink: 0;
}

/* Between two sections, their own padding already provides the space */
.section-divider {
    margin: 0 auto;
    padding: 0 2rem;
}

.section > h2 + .travel-card,
.divider+.travel-card {
    margin-top: 0;
}

#good-to-know .travel-card {
    margin-top: 0;
}

/* Section-style headings inside a travel card stay centred like the section ones */
.travel-card > h2 {
    text-align: center;
}

.travel-card[id] {
    scroll-margin-top: 5rem;
}

/* Jump links at the top of the Travel section */
.subnav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.75rem;
    margin-top: 1.5rem;
}

.subnav a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid var(--color-lavender);
}

.subnav a:hover {
    color: var(--color-lavender-deep);
    border-bottom-color: var(--color-lavender-deep);
}

/* Getting to Queenstown and Where to Stay: centred heading, short tips in a grid */
.getting-there h3,
.visas h3,
.where-to-stay h3 {
    font-size: 1.35rem;
    margin: 0 0 1.75rem;
    text-align: center;
}

/* Four tips: a 2 x 2 grid reads better than 3 + 1 */
.where-to-stay .tips {
    grid-template-columns: repeat(2, 1fr);
}

.stay-lead {
    max-width: 38rem;
    margin: -0.75rem auto 2rem;
    text-align: center;
}

/* Areas: soft borderless cards to compare side by side, each tagged with
   how it connects to the shuttle */
.areas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.area {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.25rem 1.25rem;
    background: var(--color-card);
    /* Crisp, neutral shadow so the cards lift off the cream */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.09);
}

/* The recommended area: blush line along the top (plus the same shadow) and a label */
.area-pick {
    box-shadow: inset 0 2px 0 var(--color-blush),
        0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.09);
}

.area-badge {
    margin-bottom: 0.4rem;
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #a8566a;
}

.area h4 {
    font-family: var(--font-display);
    font-weight: normal;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.5rem;
}

.area p {
    margin: 0 0 1rem;
    font-size: 0.95rem;
}

.tag {
    margin-top: auto;
    align-self: flex-start;
    padding: 0.25rem 0.7rem;
    background: rgba(154, 170, 141, 0.3);
    color: var(--color-sage-deep);
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem 2rem;
}

.tip h4 {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-lavender-deep);
}

.tip p {
    margin: 0;
}

/* Shuttle: the one framed block on the page, details beside a map */
.shuttle-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--color-card);
    border: 1px solid var(--color-border);
}

.shuttle-info {
    padding: 2rem;
}

.shuttle-intro,
.shuttle-note {
    margin: 0 0 1.5rem;
}

.shuttle-note {
    color: var(--color-muted);
    font-style: italic;
}

/* Two-stop route drawn as a small timeline */
.route {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
}

.route li {
    position: relative;
    padding: 0 0 1.25rem 1.75rem;
    border-left: 1px solid var(--color-sage);
    margin-left: 0.4rem;
}

.route li:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.route li::before {
    content: '';
    position: absolute;
    left: -0.4rem;
    top: 0.3rem;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background: var(--color-sage);
    border: 2px solid var(--color-bg);
}

.route-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-sage-deep);
}

.route-arrow,
.route-time {
    display: block;
}

.route-time {
    color: var(--color-muted);
    font-size: 0.9rem;
}

.shuttle-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.shuttle-actions .button {
    margin: 0;
    text-decoration: none;
    display: inline-block;
}

.shuttle-map {
    min-height: 320px;
    border-left: 1px solid var(--color-border);
}

.shuttle-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 320px;
    border: 0;
    /* Soften Google's colours slightly so the map sits with the watercolour palette */
    filter: saturate(0.7) sepia(0.12);
}

/* Contact: email and phone side by side, divided by a thin lavender line like The Details */
.contact-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 2.5rem;
    color: var(--color-text);
    text-decoration: none;
    font-size: 1.1rem;
}

.contact-item+.contact-item {
    border-left: 1px solid var(--color-lavender);
}

.contact-item:hover {
    color: var(--color-lavender-deep);
}

.contact-label {
    margin-bottom: 0.3rem;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-lavender-deep);
}

/* Footer: closing message between two swaying flower sprays */
.site-footer {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: clamp(260px, 32vw, 380px);
    padding: 3rem 1rem;
    text-align: center;
}

.footer-message {
    position: relative;
    z-index: 1;
    max-width: 36rem;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    line-height: 1.3;
    margin: 0 0 0.75rem;
}

.footer-date {
    position: relative;
    z-index: 1;
    margin: 0;
    line-height: 2;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--color-muted);
}

.footer-spray {
    position: absolute;
    bottom: 0;
    height: clamp(220px, 30vw, 360px);
    /* Stems fade out at the bottom instead of stopping at a hard edge */
    -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent);
    mask-image: linear-gradient(to bottom, #000 80%, transparent);
    pointer-events: none;
}

.footer-spray-left {
    left: 0;
    transform-origin: 15% 100%;
    animation: spray-sway-left 8s ease-in-out infinite;
}

.footer-spray-right {
    right: 0;
    transform-origin: 85% 100%;
    animation: spray-sway-right 9.5s ease-in-out -3s infinite;
}

@keyframes spray-sway-left {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(2.5deg);
    }
}

@keyframes spray-sway-right {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(-2.5deg);
    }
}

.not-found {
    text-align: center;
}

/* ---------- Load and scroll animations ---------- */
/* Each .enter element fades up after its own delay (--d, set inline in the HTML),
   so the hero builds one piece at a time. */
.enter {
    animation: fade-up 1s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s) both;
}

/* Softer, slower variant for the names: also comes into focus from a slight blur */
.enter-soft {
    animation-name: fade-up-soft;
    animation-duration: 1.4s;
}

.enter-down {
    animation: slide-down 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.enter-rise {
    animation: rise 1.8s cubic-bezier(0.22, 1, 0.36, 1) 1.1s both;
}

/* The lavender stalk drops in from above, settles, then keeps swaying gently */
.hero-stalk {
    transform-origin: 0% 100%;
    animation:
        stalk-drop 1.6s cubic-bezier(0.34, 1.3, 0.64, 1) 0.3s both,
        stalk-sway 7s ease-in-out 1.9s infinite;
}

/* The right stalk mirrors the left one's drop and sway, pivoting on its own base */
.hero-stalk-right {
    transform-origin: 100% 100%;
    animation-name: stalk-drop-right, stalk-sway-right;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
}

@keyframes fade-up-soft {
    from {
        opacity: 0;
        transform: translateY(14px);
        filter: blur(6px);
    }
}

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
}

@keyframes stalk-drop {
    from {
        opacity: 0;
        transform: translateY(-120px) rotate(-14deg);
    }

    40% {
        opacity: 1;
    }
}

@keyframes stalk-sway {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(2.5deg);
    }
}

@keyframes stalk-drop-right {
    from {
        opacity: 0;
        transform: translateY(-120px) rotate(14deg);
    }

    40% {
        opacity: 1;
    }
}

@keyframes stalk-sway-right {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(-2.5deg);
    }
}

/* Scroll reveal: main.js adds .is-visible when a .reveal section scrolls into view.
   Only hidden when JS is running (html.js), so content never gets stuck invisible. */
.js .reveal>*,
.js .reveal .card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s ease-out, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.js .reveal.is-visible>*,
.js .reveal.is-visible .card {
    opacity: 1;
    transform: none;
}

.js .reveal.is-visible> :nth-child(2) {
    transition-delay: 0.15s;
}

.js .reveal.is-visible> :nth-child(3) {
    transition-delay: 0.3s;
}

/* Detail cards follow one after another */
.js .reveal.is-visible .card:nth-child(1) {
    transition-delay: 0.3s;
}

.js .reveal.is-visible .card:nth-child(2) {
    transition-delay: 0.45s;
}

.js .reveal.is-visible .card:nth-child(3) {
    transition-delay: 0.6s;
}

/* Respect the "reduce motion" accessibility setting: show everything straight away */
@media (prefers-reduced-motion: reduce) {

    .enter,
    .enter-down,
    .enter-rise,
    .hero-stalk,
    .footer-spray,
    .modal[open] {
        animation: none;
    }

    .js .reveal>*,
    .js .reveal .card {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Collapse the menu into the Menu button before the eight links run into the logo */
@media (max-width: 1180px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        order: 3;
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        margin: 0;
        padding-top: 1rem;
    }

    .nav-actions {
        margin-left: auto;
    }

    .nav-links.open {
        display: flex;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .modal-body {
        padding: 2.5rem 1.25rem 1.5rem;
    }

    .choice-group {
        grid-template-columns: 1fr;
    }

    .shuttle-card,
    .where-to-stay .tips {
        grid-template-columns: 1fr;
    }

    .shuttle-info {
        padding: 1.5rem 1.25rem;
    }

    /* Details columns stack, separated by space only (no dividing lines) */
    .cards {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .card {
        padding: 0;
    }

    .card+.card {
        border-left: none;
    }

    .shuttle-map {
        border-left: none;
        border-top: 1px solid var(--color-border);
    }

    /* Hero on phones: compact so the mountains fit on the first screen */
    .hero-content {
        padding: 3rem 1rem 0;
    }

    /* Lavender stalk on phones: a touch smaller and tucked higher so it clears the names */
    .hero-stalk {
        top: 0.25rem;
        width: clamp(90px, 25vw, 112px);
    }

    /* Tighter spacing so the painting sits higher without sliding under the text.
       Names scale with screen height: slightly smaller on short phones, full size (3rem) from
       about 740px tall */
    .names {
        margin-bottom: 1.5rem;
        font-size: clamp(2.5rem, 6.5svh, 3rem);
    }

    .hero-detail {
        margin-bottom: 1rem;
    }

    /* The hero fills exactly one screen (below the ~69px header), with the painting pinned to
       the bottom. On taller phones there's simply more cream sky above the mountains; on shorter
       ones the empty sky at the top of the image is trimmed instead of the lake at the bottom. */
    .hero {
        display: flex;
        flex-direction: column;
        /* Exactly one screen below the 69px header (svh = visible height with the phone's browser
           bars), so the painting has to trim its empty sky to fit... */
        height: calc(100vh - 69px);
        height: calc(100svh - 69px);
        /* ...but on very short screens, grow rather than cut into the text or mountains
           (about the text's height plus the mountains' minimum) */
        min-height: calc(24.5rem + 52vw);
    }

    /* On long phones the spare height goes around the text (centred above the painting),
       rather than all piling up as a gap between the text and the mountains */
    .hero-content {
        flex: 8 0 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding-bottom: 1rem;
    }

    .hero-scene {
        /* Starts at just the mountains' height; almost all spare room (8:1) goes to the text
           (the text's share centres it lower on long phones, the rest becomes extra sky) */
        flex: 1 1 52vw;
        min-height: 52vw;  /* never trim into the mountains themselves (they start ~40% down the image) */
        margin: 0 auto;
        display: flex;
        align-items: flex-end;  /* painting sits on the bottom; any excess sky is clipped at the top */
    }

    .hero-landscape {
        flex-shrink: 0;
    }

    /* Order-of-the-day card: slimmer padding and time column so the timeline keeps its room */
    /* The card frames the timeline itself, so on phones it can sit closer to the screen edge
       than other sections, giving the event text more room */
    #on-the-day {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    #on-the-day > h2,
    #on-the-day > p {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .order-card {
        padding: 2.75rem 1rem 2rem;
        --inset: 7px;
    }

    .order-card .timeline li {
        grid-template-columns: 4rem 1fr;
        gap: 0.9rem;
    }

    .order-card .timeline-time {
        font-size: 0.72rem;
    }

    /* Contact details stack, divided by a short horizontal rule */
    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .contact-item {
        padding: 1rem 0;
    }

    .contact-item+.contact-item {
        border-left: none;
        border-top: 1px solid var(--color-lavender);
    }

    /* Keep the footer text clear of the flower sprays */
    .site-footer {
        padding-inline: 72px;
    }

    .footer-spray {
        height: 200px;
    }
}