/* ================================================================
   WEDDING WEBSITE — STYLESHEET
   Aesthetic: Playful hand-drawn wedding invitation

   TABLE OF CONTENTS
   1.  CSS Variables
   2.  Custom Fonts
   3.  Reset & Base
   4.  Skip Link (accessibility)
   5.  Global Page Frame
   6.  Navigation
   7.  Sections (layout & colors)
   8.  Section Content Wrapper
   9.  Paper Canvas
   10. Section 1 — Title (horizontal hero)
   11. Section 2 — Venue
   12. Section 3 — Program (horizontal timeline)
   13. Section 4 — Good to Know (cards)
   14. Section 5 — RSVP Form
   15. Section 6 — Explore
   16. Footer
   17. Shared Components (buttons)
   18. Hand-drawn Decorative Elements
   19. Animation Keyframes
   20. Responsive / Mobile
   21. Reduced Motion
================================================================ */


/* ================================================================
   1. CSS VARIABLES
================================================================ */
:root {
    /* — Light/white base color — */
    --color-light:     #FFF8E7;
    --color-light-rgb: 255, 248, 231;

    /* — Pastel palette — */
    --color-green:    #635d1f;
    --color-orange:   #d4976a;
    --color-blue:     #c5dde8;
    --color-pink:     var(--color-light);

    /* — Text — */
    --text-light:     var(--color-light);
    --text-dark:      #3a3530;
    --text-muted:     rgba(58,53,48,0.55);
    --text-muted-lt:  rgba(var(--color-light-rgb),0.70);

    /* — Typography — */
    --font-heading:   'WeddingHeader', 'Caveat', 'Segoe Script', cursive;
    --font-body:      'ModeratRustic', 'Nunito Sans', 'Segoe UI', sans-serif;

    /* — Sketch strokes — */
    --sketch-color:   #3a3530;
    --sketch-width:   1.6px;

    /* — Layout — */
    --content-max-width: 860px;
    --section-pad-v:     clamp(72px, 10vh, 120px);
    --section-pad-h:     clamp(24px, 6vw, 80px);

    /* — Nav height — */
    --nav-height: 56px;

    /* — Section backgrounds (light tints of palette) — */
    --bg-base:   var(--color-light);
    --bg-sage:   var(--color-light);
    --bg-warm:   var(--color-light);
    --bg-blue:   #ecf5f8;
    --bg-rose:   var(--color-light);

    /* — Transitions — */
    --transition:      0.35s ease;
    --transition-slow: 0.7s ease;
}


/* ================================================================
   2. CUSTOM FONTS
================================================================ */
@font-face {
    font-family: 'WeddingHeader';
    src: url('../fonts/TT Ricordi Trial Nobili.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}


/* ================================================================
   3. RESET & BASE
================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { background: transparent; }

html {
    height: 100%;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* Matte grain texture — soft-light blend mimics fine paper/photo finish */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.45;
    mix-blend-mode: soft-light;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 180px 180px;
}

/* Remove default fieldset styles so it behaves like a div */
fieldset {
    border: none;
    padding: 0;
    margin: 0;
    min-width: 0;
}


/* ================================================================
   4. SKIP LINK (keyboard / screen-reader accessibility)
================================================================ */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 9999;
    padding: 10px 20px;
    background: var(--text-dark);
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 0.9rem;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--color-green);
    outline-offset: 2px;
}


/* ================================================================
   5. PAGE WRAP
================================================================ */
#page-wrap {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-behavior: smooth;
    z-index: 0;
}


/* ================================================================
   6. NAVIGATION
================================================================ */

/* Hamburger button — hidden on desktop */
#nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1003;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
}
#nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
/* Animate to X when open */
#navbar.nav-open #nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#navbar.nav-open #nav-toggle span:nth-child(2) { opacity: 0; }
#navbar.nav-open #nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background: var(--bg-base);
    padding: 14px 32px;
    border-bottom: 1px solid rgba(58, 53, 48, 0.1);
    box-shadow: 0 2px 16px rgba(58, 53, 48, 0.06);
    height: var(--nav-height);
    transition: box-shadow 0.35s ease;
}

/* ul in center column */
#navbar ul { grid-column: 2; }

/* lang button in right column */
#lang-toggle {
    grid-column: 3;
    justify-self: end;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    color: var(--text-dark);
    background: transparent;
    border: 1.5px solid rgba(58, 53, 48, 0.25);
    border-radius: 40px;
    padding: 4px 16px;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.35s ease, background 0.35s ease, border-color 0.35s ease;
}

#lang-toggle:hover {
    opacity: 1;
    background: rgba(58, 53, 48, 0.06);
    border-color: rgba(58, 53, 48, 0.5);
}

#lang-toggle:focus-visible {
    opacity: 1;
    outline: 2px solid var(--text-dark);
    outline-offset: 3px;
}

#navbar ul {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

#navbar ul li a {
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dark);
    font-weight: 600;
    opacity: 0.55;
    transition: opacity var(--transition), transform 0.25s cubic-bezier(.4,1.4,.6,1);
    position: relative;
}

/* Sketch-style underline on hover / active */
#navbar ul li a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 10%; right: 10%;
    height: 1.5px;
    background: var(--text-dark);
    border-radius: 4px;
    transform: scaleX(0) rotate(-0.5deg);
    transform-origin: center;
    transition: transform 0.3s ease;
}

#navbar ul li a:hover::after,
#navbar ul li a.active::after {
    transform: scaleX(1) rotate(-0.5deg);
}

#navbar ul li a:hover,
#navbar ul li a:focus {
    opacity: 1;
    transform: translateY(-1px);
}

#navbar ul li a:focus-visible {
    opacity: 1;
    outline: 2px solid var(--text-dark);
    outline-offset: 3px;
    border-radius: 2px;
}

#navbar ul li a.active { opacity: 1; }


/* ================================================================
   7. SECTIONS — layout & color modifiers
================================================================ */
.section {
    position: relative;
    padding: var(--section-pad-v) var(--section-pad-h);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: auto;
    border-bottom: 1px solid rgba(58, 53, 48, 0.08);
    color: var(--text-dark);
}

/* Hero gets full viewport height */
#title.section { min-height: calc(100dvh - var(--nav-height)); }

/* Scroll hint arrow on hero */
.scroll-hint {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    color: inherit;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    animation: scrollBounce 2.2s ease-in-out infinite;
}
.scroll-hint:hover { opacity: 0.8; }

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(7px); }
}

/* Green sections: original sage green (Hero, Program, RSVP) */
.section--green,
.section--blue  { background-color: var(--color-green); color: var(--text-light); }

/* Paper-white sections (Venue, Details, Explore) */
.section--orange,
.section--pink  { background-color: var(--color-light); color: var(--text-dark); }

/* Divider tone: subtle white on green, subtle dark on paper */
.section--green,
.section--blue  { border-bottom-color: rgba(var(--color-light-rgb), 0.15); }

.frame {
    width: 100%;
    max-width: var(--content-max-width);
}


/* ================================================================
   8. SECTION CONTENT WRAPPER
================================================================ */
.section__content {
    width: 100%;
    padding: 0;
}

.section__content--center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section__title {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    margin-bottom: 24px;
    color: inherit;
    position: relative;
    display: inline-block;
}

/* When no subtitle follows, restore full spacing */
.section__title:not(:has(+ .section__subtitle)) { margin-bottom: 48px; }

/* Hand-drawn squiggly underline */
.section__title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 5%;
    width: 90%;
    height: 3px;
    background: currentColor;
    opacity: 0.25;
    border-radius: 40%;
    transform: rotate(-0.8deg);
}

.section__subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    opacity: 0.75;
    margin-top: 0;
    margin-bottom: 40px;
    letter-spacing: 0.04em;
}


/* ================================================================
   9. CONTENT CONTAINER
   .paper-canvas / .frame: centred content wrapper inside each section.
   Visual decoration removed — sections carry their own backgrounds.
================================================================ */
.paper-canvas {
    width: 100%;
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.paper-canvas p,
.section__content p {
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
}

/* Title section: left-aligned for side-by-side layout */
.paper-canvas .title-layout {
    text-align: left;
}


/* ================================================================
   10. SECTION 1 — TITLE PAGE
================================================================ */

/* Make section a full-height positioning context */
#title.section {
    height: calc(100dvh - var(--nav-height));
    padding: 0;
    align-items: stretch;
}

/* Stretch frame to fill section height */
#title .frame {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 100%;
}

/* Title layout fills frame and is the positioning context */
.title-layout {
    position: relative;
    flex: 1;
    display: block;
    width: 100%;
}

.hero-image {
    flex: 1 1 0;
    min-width: 0;
    max-height: clamp(260px, 68vh, 640px);
    overflow: hidden;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    transition: transform 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image:hover { transform: scale(1.03); }

.hero-image img {
    width: 100%;
    height: auto;
    max-height: inherit;
    object-fit: contain;
}

/* Text block: positioned at ~38% from top */
.title-text {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    padding: 0 clamp(24px, 6vw, 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Vase: sized by viewport height, anchored to bottom */
.title-vase {
    position: absolute;
    bottom: 4vh;
    left: 50%;
    transform: translateX(-50%);
    height: clamp(160px, 38vh, 420px);
    width: auto;
    display: block;
}

/* Grapes decorations — title section */
.grapes {
    position: absolute;
    top: 0;
    width: clamp(80px, 12vw, 160px);
    height: auto;
    pointer-events: none;
    opacity: 1;
}
.grapes--left  { left: 0; }
.grapes--right { right: 0; transform: scaleX(-1); }

.names {
    font-family: var(--font-heading);
    font-size: clamp(3.6rem, 7vw, 7.5rem);
    font-weight: 400;
    color: inherit;
    line-height: 1.1;
    margin-bottom: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.names span:not(.names__amp) { flex: 1; }
.names span:first-child       { text-align: right; }
.names span:last-child        { text-align: left; }
.names__amp                   { flex: 0; padding: 0 0.2em; }

.tagline {
    font-family: var(--font-body);
    font-size: 1rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    opacity: 0.55;
    margin-bottom: 24px;
}

.date-display {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.5vw, 3rem);
    color: inherit;
    margin-bottom: 16px;
    opacity: 0.85;
    white-space: nowrap;
}


/* ================================================================
   11. SECTION 2 — VENUE
================================================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px;
}

.info-block {
    text-align: center;
    color: inherit;
}

.info-block__icon {
    font-size: 1.8rem;
    display: block;
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
}

.info-block h3 {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3vw, 1.85rem);
    font-weight: 400;
    margin-bottom: 12px;
}

.info-block p {
    font-size: 1rem;
    line-height: 1.8;
    opacity: 0.78;
}


/* ================================================================
   12. SECTION 3 — PROGRAM (vertical alternating timeline)
================================================================ */
.timeline-v {
    position: relative;
    width: 100%;
    padding: 8px 0;
}

/* Vertical centre line */
.timeline-v::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0; bottom: 0;
    width: 1.5px;
    background: var(--text-dark);
    opacity: 0.18;
    transform: translateX(-50%);
}

.tl-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.tl-item:last-child { margin-bottom: 0; }

/* Connector line touches the centre line at the icon's vertical centre (27px) */
.tl-item__dot {
    position: absolute;
    top: 27px;
    transform: translateY(-50%);
    width: 22px; height: 1.5px;
    border-radius: 1px;
    background: var(--text-dark);
    opacity: 0.35;
    z-index: 2;
}

/* Left: line's right edge meets the centre line */
.tl-item--left .tl-item__dot {
    right: calc(50% - 1px);
    left: auto;
}

/* Right: line's left edge starts at the centre line */
.tl-item--right .tl-item__dot {
    left: calc(50% - 1px);
}

/* LEFT items: column near centre, right-aligned */
.tl-item--left {
    padding-right: calc(50% + 20px);
    justify-content: flex-end;
}

/* RIGHT items: column near centre, left-aligned */
.tl-item--right {
    padding-left: calc(50% + 20px);
    justify-content: flex-start;
}

/* Column: text row on top, icon below */
.tl-item__col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tl-item--left .tl-item__col  { align-items: flex-end;   text-align: right; }
.tl-item--right .tl-item__col { align-items: flex-start; text-align: left;  }

/* Time + event on one line */
.tl-item--left  .tl-text-row { justify-content: flex-end; }
.tl-item--right .tl-text-row { justify-content: flex-start; }

.tl-text-row {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
}

.tl-item__icon {
    flex-shrink: 0;
    width: clamp(64px, 9vw, 160px);
    height: clamp(64px, 9vw, 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.68;
}

.tl-item__icon svg,
.tl-item__icon img { width: 100%; height: 100%; object-fit: contain; filter: brightness(0) invert(1); }


/* Keep .tl-item__text in case it's referenced elsewhere */
.tl-item__text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.tl-item__time,
.tl-item__event {
    display: block;
    font-family: var(--font-body);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.4;
    opacity: 0.85;
}

.tl-item__time {
    opacity: 0.55;
    flex-shrink: 0;
}


/* ================================================================
   13. SECTION 4 — GOOD TO KNOW (cards)
================================================================ */
/* Mobile (base) */
.details-hero {
    position: absolute;
    top: 24px;
    right: 24px;
    bottom: auto;
    left: auto;
    width: 100px;
    transform: none;
    opacity: 0.82;
    pointer-events: none;
    transform: translate(30px, -40px);
}

/* Desktop (> 860px) */
@media (min-width: 861px) {
    .details-hero {
        top: 24px;
        right: 24px;
        bottom: auto;
        left: auto;
        width: 180px;
        transform: translate(150px, -30px);
    }
}

/* ----------------------------------------------------------------
   Info section leaves decoration
---------------------------------------------------------------- */
/* Mobile (base) */
.info-leaves {
    position: absolute;
    top: 16px;
    height: clamp(80px, 18vw, 140px);
    width: auto;
    pointer-events: none;
    opacity: 1;
}
.info-leaves--left  { left: 0;  top: 36px; transform-origin: top left;  transform: rotate(90deg) translateY(-100%); }
.info-leaves--right { right: 0; top: 16px; transform-origin: top right; transform: scaleX(-1) rotate(90deg) translateY(-100%); }

/* Desktop (> 860px) */
@media (min-width: 861px) {
    .info-leaves {
        height: clamp(100px, 12vw, 180px);
    }
    .info-leaves--left  { left: 0;  top: 20px; transform-origin: top left;  transform: rotate(90deg) translateY(-100%); }
    .info-leaves--right { right: 0; top: 86px; transform-origin: top right; transform: scaleX(-1) rotate(90deg) translateY(-100%); }
}

/* Small mobile (≤ 540px) */
@media (max-width: 540px) {
    .info-leaves {
        height: clamp(60px, 20vw, 110px);
    }
    .info-leaves--left  { left: 0;  top: 12px; transform-origin: top left;  transform: rotate(90deg) translateY(-100%); }
    .info-leaves--right { right: 0; top: 48px; transform-origin: top right; transform: scaleX(-1) rotate(90deg) translateY(-100%); }
}

.details-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto 32px;
}

.details-item {
    text-align: center;
}

.details-item h3 {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 3.5vw, 1.85rem);
    font-weight: 400;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.details-item p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-dark);
    opacity: 0.72;
}

.details-sign {
    font-size: 1rem;
    font-style: italic;
    opacity: 0.65;
    margin-top: 8px;
}


/* ================================================================
   14. SECTION 5 — RSVP FORM
================================================================ */
.rsvp-form {
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

/* Fieldset that replaces the radio group wrapper div */
fieldset.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

fieldset.form-group legend {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    color: inherit;
    opacity: 0.85;
    padding: 0;
    /* float + clear is the cross-browser way to make legend full-width in a flex container */
    float: left;
    width: 100%;
}

fieldset.form-group legend + * {
    clear: left;
}

.form-group > label {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    color: inherit;
    opacity: 0.85;
}

.form-group > label .optional {
    font-size: 0.78rem;
    opacity: 0.55;
    letter-spacing: 0.04em;
    font-family: var(--font-body);
}

.form-group input[type="text"] {
    padding: 12px 18px;
    border: 1.5px solid rgba(58, 53, 48, 0.22);
    border-radius: 28px;
    background: rgba(58, 53, 48, 0.03);
    color: var(--text-dark);
    font-family: var(--font-body);
    font-size: 0.92rem;
    outline: none;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.form-group input[type="text"]::placeholder {
    color: rgba(58, 53, 48, 0.35);
}

.form-group input[type="text"]:focus-visible {
    border-color: rgba(58, 53, 48, 0.45);
    background: rgba(58, 53, 48, 0.04);
    box-shadow: 0 0 0 3px rgba(58, 53, 48, 0.06);
    outline: 2px solid rgba(58, 53, 48, 0.3);
    outline-offset: 2px;
}

.radio-group {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.86rem;
    color: var(--text-dark);
    padding: 10px 24px;
    border: 1.5px solid rgba(58, 53, 48, 0.22);
    border-radius: 40px;
    transition: background var(--transition), border-color var(--transition), transform 0.2s ease;
}

.radio-label:hover {
    background: rgba(58, 53, 48, 0.05);
    border-color: rgba(58, 53, 48, 0.4);
    transform: translateY(-1px);
}

.radio-label:focus-within {
    outline: 2px solid rgba(58, 53, 48, 0.3);
    outline-offset: 2px;
    background: rgba(58, 53, 48, 0.05);
}

.radio-label input[type="radio"] { accent-color: var(--color-green); }

.radio-label:has(input[type="radio"]:checked) {
    background: rgba(58, 53, 48, 0.1);
    border-color: rgba(58, 53, 48, 0.55);
    font-weight: 600;
}
.section--green .radio-label:has(input[type="radio"]:checked) {
    background: rgba(var(--color-light-rgb), 0.22);
    border-color: rgba(var(--color-light-rgb), 0.9);
}

.form-success {
    display: none;
    background: rgba(163, 184, 108, 0.12);
    border-radius: 16px;
    padding: 20px 24px;
    color: var(--text-dark);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    text-align: center;
    border: 1.5px solid rgba(163, 184, 108, 0.25);
}

.form-error {
    background: rgba(180, 60, 60, 0.15);
    border-color: rgba(180, 60, 60, 0.2);
}


/* ================================================================
   15. SECTION 6 — EXPLORE
================================================================ */
.rec-category {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 400;
    color: inherit;
    margin: 40px 0 20px;
}

.rec-category:first-of-type { margin-top: 0; }

.rec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 22px;
}

.rec-card {
    background: rgba(58, 53, 48, 0.03);
    border-radius: 14px;
    padding: 24px 22px;
    border: 1.5px solid rgba(58, 53, 48, 0.1);
    transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
    text-align: left;
}

.rec-card:hover {
    transform: translateY(-3px);
    background: rgba(58, 53, 48, 0.05);
    box-shadow: 0 8px 24px rgba(58, 53, 48, 0.07);
}

.rec-card img {
    width: 100%; height: 130px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 14px;
}

.rec-card h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 400;
    color: inherit;
    margin-bottom: 8px;
}

.rec-card p {
    font-size: 0.95rem;
    opacity: 0.75;
    line-height: 1.7;
    margin-bottom: 14px;
}

.rec-link {
    font-family: var(--font-body);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: inherit;
    text-decoration: underline;
    text-decoration-style: wavy;
    text-underline-offset: 3px;
    opacity: 0.65;
    transition: opacity var(--transition);
    /* <span> doesn't have pointer cursor by default */
    cursor: default;
}

/* When rec-link IS an <a> element */
a.rec-link { cursor: pointer; }
a.rec-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 2px;
}

.rec-link:hover { opacity: 1; }


/* ================================================================
   16. FOOTER
================================================================ */
.footer {
    background: #2c2822;
    color: rgba(var(--color-light-rgb),0.7);
    text-align: center;
    padding: 28px 16px;
    font-size: 0.875rem;
    letter-spacing: 0.08em;
}


/* ================================================================
   17. SHARED COMPONENTS
================================================================ */

/* Pill-shaped vintage label buttons */
.btn {
    display: inline-block;
    margin-top: 16px;
    padding: 11px 32px;
    border: 1.5px solid currentColor;
    border-radius: 40px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: inherit;
    background: transparent;
    cursor: pointer;
    transition: background var(--transition), transform 0.25s ease, box-shadow var(--transition);
    position: relative;
    opacity: 0.85;
}

.btn:hover {
    background: rgba(58, 53, 48, 0.07);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(58, 53, 48, 0.08);
    opacity: 1;
}

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

.btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.btn--submit {
    width: 100%;
    padding: 14px;
    background: rgba(58, 53, 48, 0.05);
    border-color: rgba(58, 53, 48, 0.2);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    text-transform: none;
}

.btn--submit:hover { background: rgba(58, 53, 48, 0.1); }

/* Font utility classes */
.headline-font {
    font-family: var(--font-heading);
    font-weight: 400;
}

.body-font {
    font-family: var(--font-body);
    font-weight: 400;
}

.location-font {
    font-family: var(--font-heading);
    font-weight: 400;
    letter-spacing: 0.03em;
}


/* ================================================================
   18. HAND-DRAWN DECORATIVE DOODLES
================================================================ */
.doodle {
    position: absolute;
    pointer-events: none;
    opacity: 0.18;
    z-index: 2;
}

.doodle svg {
    stroke: var(--sketch-color);
    stroke-width: var(--sketch-width);
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Green sections: light doodles */
.section--green .doodle,
.section--blue  .doodle { opacity: 0.14; }
.section--green .doodle svg,
.section--blue  .doodle svg { stroke: var(--text-light); }

/* Paper sections: dark doodles */
.section--orange .doodle,
.section--pink   .doodle { opacity: 0.12; }

/* Position helpers */
.doodle--top-right    { top: 12%; right: 8%; }
.doodle--top-left     { top: 10%; left: 6%; }
.doodle--bottom-right { bottom: 12%; right: 7%; }
.doodle--bottom-left  { bottom: 10%; left: 6%; }

/* Playful rotations */
.doodle--tilt-cw  { transform: rotate(8deg); }
.doodle--tilt-ccw { transform: rotate(-6deg); }

/* Floating animation */
.doodle--float         { animation: gentleFloat 6s ease-in-out infinite; }
.doodle--float-delayed { animation: gentleFloat 7s ease-in-out 1.5s infinite; }


/* ================================================================
   19a. GREEN-SECTION OVERRIDES
   Restore light-coloured styles for elements on the sage green bg.
================================================================ */

/* Buttons on green */
.section--green .btn,
.section--blue  .btn {
    color: var(--text-light);
    border-color: rgba(var(--color-light-rgb), 0.45);
}
.section--green .btn:hover,
.section--blue  .btn:hover {
    background: rgba(var(--color-light-rgb), 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.section--green .btn--submit,
.section--blue  .btn--submit {
    background: rgba(var(--color-light-rgb), 0.1);
    border-color: rgba(var(--color-light-rgb), 0.3);
}
.section--green .btn--submit:hover,
.section--blue  .btn--submit:hover { background: rgba(var(--color-light-rgb), 0.22); }

/* Form inputs on green (RSVP) */
.section--green .form-group input[type="text"] {
    border-color: rgba(var(--color-light-rgb), 0.35);
    background: rgba(var(--color-light-rgb), 0.1);
    color: var(--text-light);
}
.section--green .form-group input[type="text"]::placeholder { color: rgba(var(--color-light-rgb), 0.45); }
.section--green .form-group input[type="text"]:focus-visible {
    border-color: rgba(var(--color-light-rgb), 0.8);
    background: rgba(var(--color-light-rgb), 0.18);
    outline-color: rgba(var(--color-light-rgb), 0.6);
}
.section--green .form-group > label,
.section--green fieldset.form-group legend { color: var(--text-light); opacity: 0.85; }
.section--green .radio-label {
    color: var(--text-light);
    border-color: rgba(var(--color-light-rgb), 0.35);
}
.section--green .radio-label:hover {
    background: rgba(var(--color-light-rgb), 0.12);
    border-color: rgba(var(--color-light-rgb), 0.7);
}
.section--green .radio-label input[type="radio"] { accent-color: var(--color-light); }
.section--green .form-success {
    background: rgba(var(--color-light-rgb), 0.18);
    border-color: rgba(var(--color-light-rgb), 0.2);
    color: var(--text-light);
}

/* Timeline on green (Program, section--blue) */
.section--blue .timeline-v::before { background: var(--text-light); opacity: 0.25; }
.section--blue .tl-item__dot        { background: var(--text-light); opacity: 0.45; }


/* ================================================================
   19. ANIMATION KEYFRAMES
================================================================ */

/* Gentle vertical float */
@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

/* Fade in from below — used by scroll observer */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ================================================================
   20. RESPONSIVE / MOBILE
================================================================ */

/* ---- Tablet (≤860px) ---- */
@media (max-width: 860px) {

    :root {
        --nav-height: 56px;
        --section-pad-v: clamp(56px, 8vh, 96px);
    }

    .paper-canvas .title-layout { text-align: center; }

    .hero-image { flex: 0 0 auto; width: clamp(160px, 50vw, 260px); height: auto; max-height: none; }

    /* Grids — single column */
    .info-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .rec-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    /* Timeline — reduce icon size on tablet */
    .tl-item__icon { width: clamp(56px, 6vw, 96px); height: clamp(56px, 6vw, 96px); }
    .tl-item { margin-bottom: 10px; }

    /* Nav — smaller */
    #navbar ul { gap: 8px 16px; }
    #navbar ul li a { font-size: 0.75rem; letter-spacing: 0.1em; }

    .doodle svg { width: 40px; height: 40px; }

}

/* ---- Mobile (≤540px) ---- */
@media (max-width: 540px) {

    :root {
        --nav-height:      52px;
        --section-pad-v:   clamp(36px, 6vh, 60px);
        --section-pad-h:   20px;
    }

    /* Navbar — single row with hamburger */
    #navbar {
        padding: 0 16px;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: var(--nav-height);
        min-height: var(--nav-height);
    }

    /* Hamburger button — shown on mobile, in normal flex flow */
    #nav-toggle {
        display: flex;
        position: static;
        flex: 0 0 auto;
        z-index: 1005;
    }

    /* Nav menu — hidden by default, drops down when open */
    /* Use #navbar ul (same specificity as base rule) so this override wins */
    #navbar ul {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--color-light);
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 8px 0 16px;
        border-bottom: 1px solid rgba(58, 53, 48, 0.1);
        box-shadow: 0 8px 24px rgba(58, 53, 48, 0.08);
        z-index: 1000;
    }
    #navbar.nav-open ul { display: flex; }

    #navbar ul li a {
        font-size: 0.82rem;
        letter-spacing: 0.08em;
        padding: 10px 24px;
        display: block;
        width: 100%;
        text-align: center;
        opacity: 0.65;
    }
    #navbar ul li a:hover,
    #navbar ul li a.active { opacity: 1; }

    /* Language toggle — right side of nav bar */
    #lang-toggle {
        position: static;
        flex: 0 0 auto;
        margin: 0;
        font-size: 0.78rem;
        padding: 4px 12px;
    }

    /* Typography — scale down */
    .names                       { font-size: clamp(2.8rem, 11vw, 4.2rem); flex-wrap: wrap; justify-content: center; }
    .names span:not(.names__amp) { flex: none; text-align: center; }
    .names__amp                  { flex: none; }
    .section__title  { font-size: clamp(2rem, 6vw, 2.4rem); margin-bottom: 24px; }
    .section__subtitle { margin-top: -18px; margin-bottom: 24px; font-size: 0.9rem; }
    .tagline         { font-size: 0.7rem; letter-spacing: 0.2em; margin-bottom: 16px; }
    .date-display    { font-size: clamp(1.2rem, 4vw, 1.6rem); margin-bottom: 16px; }

    .hero-image { flex: 0 0 auto; width: clamp(130px, 48vw, 200px); height: auto; max-height: none; }

    /* Info blocks */
    .info-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .info-block h3 { font-size: clamp(1.8rem, 4.5vw, 2rem); }
    .info-block p  { font-size: clamp(1.1rem, 3vw, 1.4rem); }

    /* Timeline — large icons & text, zero gap between items */
    .tl-item__icon  { width: 90px; height: 90px; }
    .tl-item__dot   { top: 40px; width: 30px; }
    .tl-item        { margin-bottom: 0; }
    .tl-item__col   { gap: 0; }
    .tl-item--left  { padding-right: calc(50% + 24px); justify-content: flex-end; }
    .tl-item--right { padding-left:  calc(50% + 24px); justify-content: flex-start; }
    .tl-item__time,
    .tl-item__event { font-size: 0.78rem; letter-spacing: 0.07em; }
    #program.section { padding-top: 24px; padding-bottom: 24px; }

    /* Rec grid — single column */
    .rec-grid     { grid-template-columns: 1fr; gap: 12px; }
    .rec-card     { padding: 16px 14px; }
    .rec-card h4  { font-size: 1.1rem; }
    .rec-category { font-size: 1.2rem; margin: 24px 0 12px; }

    /* RSVP */
    .rsvp-form   { max-width: 100%; }
    .radio-group { flex-direction: column; }
    .radio-label { padding: 8px 16px; font-size: 0.8rem; }

    /* Buttons */
    .btn { padding: 9px 20px; font-size: 0.8rem; letter-spacing: 0.08em; }

    /* Doodles hidden on mobile */
    .doodle { display: none; }

    /* Footer */
    .footer { padding: 18px 10px; font-size: 0.68rem; }
}

/* ---- Very small screens (≤380px) ---- */
@media (max-width: 380px) {
    .names          { font-size: 2.4rem; }
    .section__title { font-size: 1.6rem; }
    .hero-image     { flex: 0 0 auto; width: clamp(100px, 44vw, 160px); height: auto; max-height: none; }

    #navbar ul li a { font-size: 0.62rem; letter-spacing: 0.04em; }
    #navbar ul      { gap: 3px 8px; }
}


/* ================================================================
   21. REDUCED MOTION
   Disables all animations and transitions for users who have
   requested reduced motion in their OS/browser settings.
   Covers WCAG 2.1 SC 2.3.3 (AAA) and general best practice.
================================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }

    /* Also disable smooth scroll — fast camera panning can trigger motion sickness */
    html { scroll-behavior: auto; }

    /* Keep fade-in elements visible — no invisible flash */
    .fade-in { opacity: 1; transform: none; }
}


/* ================================================================
   TIMELINE TEXT ADJUSTMENTS
   Use transform to nudge each text row (translateX / translateY).
   Values apply per breakpoint (desktop / mobile).
================================================================ */

/* ---- DESKTOP (all screens above 540px) ---- */

#tl-text-cocktail { transform: translateX(-20px) translateY(-25px); }
#tl-text-rings    { transform: translateX(15px) translateY(-40px); }
#tl-text-camera   { transform: translateX(-20px) translateY(-40px); }
#tl-text-dinner   { transform: translateX(25px) translateY(-40px); }
#tl-text-cake     { transform: translateX(-30px) translateY(-50px); }
#tl-text-party    { transform: translateX(25px) translateY(-50px); }

/* ---- MOBILE (≤540px) ---- */
@media (max-width: 540px) {
    #tl-text-cocktail { transform: translateX(-10px) translateY(-15px); }
    #tl-text-rings    { transform: translateY(-25px); }
    #tl-text-camera   { transform: translateX(-20px) translateY(-15px); }
    #tl-text-dinner   { transform: translateY(-20px); }
    #tl-text-cake     { transform: translateY(-30px) translateX(-25px); }
    #tl-text-party    { transform: translateX(15px) translateY(-20px); }
}


/* ================================================================
   TIMELINE IMAGE ADJUSTMENTS
   Edit width/height to resize, transform to reposition.
   Values apply per breakpoint (desktop / mobile).
================================================================ */

/* ---- DESKTOP (all screens above 540px) ---- */

#tl-img-cocktail {
    width: 100%;
    height: 100%;
    transform: translateX(-15px) translateY(-40px);
}

#tl-img-rings {
    width: 100%;
    height: 100%;
    transform: translateX(15px) translateY(-50px);
}

#tl-img-camera {
    width: 90%;
    height: 90%;
    transform: translateX(-15px) translateY(-50px);
}

#tl-img-dinner {
    width: 100%;
    height: 100%;
    transform: translateX(15px) translateY(-50px);
}

#tl-img-cake {
    width: 120%;
    height: 120%;
    transform: translateX(-15px) translateY(-40px);
}

#tl-img-party {
    width: 100%;
    height: 100%;
    transform: translateX(15px) translateY(-50px);
}

/* ---- MOBILE (≤540px) ---- */
@media (max-width: 540px) {

    #tl-img-cocktail {
        width: 100%;
        height: 100%;
        transform: translateX(-15px) translateY(-15px);
    }

    #tl-img-rings {
        width: 100%;
        height: 100%;
        transform: translateX(15px) translateY(-30px);
    }

    #tl-img-camera {
        width: 100%;
        height: 100%;
        transform: translateX(-15px) translateY(-20px);
    }

    #tl-img-dinner {
        width: 100%;
        height: 100%;
        transform: translateX(15px) translateY(-20px);
    }

    #tl-img-cake {
        width: 150%;
        height: 150%;
        transform: translateY(-10px) translateX(-15px);
    }

    #tl-img-party {
        width: 100%;
        height: 100%;
        transform: translateX(15px) translateY(-20px);
    }

}
