* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --sea-ink: #1E3446;
    --foam: #FBF7EE;
    --seafoam: #6FB7B0;
    --sun-gold: #E7B75F;
    --dusk-violet: #5B4A7A;
    --night: #141B2A;

    /* Semantic vars */
    --text-color: var(--sea-ink);
    --text-light: var(--foam);
    --accent: var(--sun-gold);
}

html {
    width: 100%;
    overflow-x: clip;
}
html.story-mode {
    touch-action: none;
}
html.cards-mode {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

body {
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Fraunces', serif;
    font-variation-settings: "opsz" 14, "SOFT" 50;
    font-weight: 400;
    line-height: 1.55;
    font-variant-numeric: oldstyle-nums;
    color: var(--text-color);
    background: #000;
    overscroll-behavior: none;
}

h1, h2, h3, .serif {
    font-family: 'Fraunces', serif;
    font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
    font-style: italic;
    font-weight: 460;
}

.hero-names {
    font-family: 'Great Vibes', 'Fraunces', serif;
    font-style: normal;
    font-weight: 400;
    font-size: clamp(3.8rem, 16vw, 7.4rem);
    color: var(--sea-ink);
    letter-spacing: 0.01em;
    margin: 0;
    line-height: 1.02;
    text-shadow: 0 0 26px rgba(251, 247, 238, 0.92), 0 0 8px rgba(251, 247, 238, 0.75);
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.ampersand {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: clamp(8rem, 38vw, 22rem);
    color: var(--seafoam);
    opacity: 0.35;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-6deg);
    z-index: -1;
}

.hero-date {
    font-family: 'Fraunces', serif;
    font-variation-settings: "opsz" 36;
    font-style: italic;
    font-weight: 520;
    font-size: clamp(1.25rem, 4.8vw, 1.7rem);
    color: var(--sea-ink);
    margin-top: 1rem;
    text-shadow:
        0 0 26px rgba(251, 247, 238, 0.98),
        0 0 10px rgba(251, 247, 238, 0.95),
        0 1px 2px rgba(251, 247, 238, 0.95);
}

.hero-subtitle {
    /* The film clock samples opacity directly, without a second CSS clock. */
    opacity: 0;
    transition: none;
}

.divider {
    display: flex;
    justify-content: center;
    margin: 0.8rem 0;
    color: var(--terracotta);
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.mist-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 45%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.38;
    background:
        radial-gradient(ellipse 60% 80% at 22% 18%, rgba(251, 247, 238, 0.75) 0%, transparent 72%),
        radial-gradient(ellipse 65% 70% at 78% 12%, rgba(251, 247, 238, 0.65) 0%, transparent 72%),
        linear-gradient(to bottom, rgba(251, 247, 238, 0.35) 0%, transparent 100%);
    transition: opacity 1.5s ease;
}

.night-mode .mist-overlay {
    opacity: 0.45;
    background:
        radial-gradient(ellipse 60% 80% at 22% 18%, rgba(20, 27, 42, 0.75) 0%, transparent 72%),
        radial-gradient(ellipse 65% 70% at 78% 12%, rgba(20, 27, 42, 0.65) 0%, transparent 72%),
        linear-gradient(to bottom, rgba(20, 27, 42, 0.4) 0%, transparent 100%);
}

.noise-overlay {
    display: none;
}

#video-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-image: url('media/poster.jpg?v=6');
    background-size: cover;
    background-position: center;
}

.keep-awake-video {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 2px;
    height: 2px;
    opacity: 0.02;
    pointer-events: none;
    z-index: 1;
}

.night-dim {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Navigation & Music Controls */
.ui-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 12px;
}

.glass-btn {
    display: flex;
    gap: 8px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--ink);
    transition: background 0.3s, border 0.3s, color 0.3s, opacity 0.8s;
    cursor: pointer;
    font-family: inherit;
}

.cards-mode .glass-btn {
    background: var(--night-glass-bg);
    border: 1px solid var(--night-glass-border);
    color: var(--parchment);
}

#lang-toggle a {
    color: inherit;
    text-decoration: none;
    opacity: 0.5;
    transition: opacity 0.3s;
}

#lang-toggle a.active {
    opacity: 1;
}

#lang-toggle a:hover {
    opacity: 0.8;
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: url('media/poster.jpg?v=6');
    background-size: cover;
    background-position: center;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.9s ease;
}

@media (max-width: 900px) {
    #video-canvas,
    .loader {
        background-image: url('media/poster-mob.jpg?v=6');
    }
}
.loader::before {
    content: '';
    position: absolute;
    inset: 0;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1;
}

.loader-names {
    font-size: clamp(2rem, 10vw, 4rem);
    text-shadow: 0 0 20px rgba(251, 247, 238, 0.85);
}

.loader > * {
    z-index: 2;
    position: relative;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-line-container {
    width: 160px;
    height: 1px;
    background: rgba(30, 52, 70, 0.15); /* light sea-ink */
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
}

.loader-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--seafoam);
    width: 0%;
    transition: width 0.3s linear;
}

.loader-text {
    font-family: 'Fraunces', serif;
    font-style: italic;
    color: var(--sea-ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#loader-pct {
    font-size: 0.8rem;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 400;
}

/* EQ Bars for Music */
.eq-bars {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 14px;
    margin-top: 2px;
}
.eq-bar {
    width: 2px;
    background-color: currentColor;
    height: 3px;
    border-radius: 1px;
    transition: height 0.2s ease;
}
button[aria-pressed="true"] .eq-bar {
    animation: eq-bounce 1s infinite alternate ease-in-out;
}
button[aria-pressed="true"] .eq-bar:nth-child(1) { animation-delay: -0.2s; }
button[aria-pressed="true"] .eq-bar:nth-child(2) { animation-delay: -0.5s; }
button[aria-pressed="true"] .eq-bar:nth-child(3) { animation-delay: -0.1s; }
button[aria-pressed="true"] .eq-bar:nth-child(4) { animation-delay: -0.4s; }

@keyframes eq-bounce {
    0% { height: 3px; }
    100% { height: 12px; }
}

/* Forward Navigation Bottom */
.nav-controls {
    position: fixed;
    bottom: max(20px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 90;
    transition: opacity 0.6s ease;
}

.nav-btn {
    background: rgba(251, 247, 238, 0.84);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 3px solid var(--sea-ink);
    color: var(--sea-ink);
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(30, 52, 70, 0.28), 0 0 14px rgba(251, 247, 238, 0.65);
    transition: all 0.3s;
}
.cards-mode .nav-btn {
    background: rgba(251, 247, 238, 0.94);
    border: 2px solid var(--sea-ink);
    color: var(--sea-ink);
    min-width: 48px;
    height: 48px;
    padding: 0 16px;
    animation: none; /* remove breathe animation when acting as standard native scroll button */
}

.nav-forward {
    width: auto;
    min-width: 60px;
    height: 60px;
    padding: 0 14px;
    animation: breathe 3s ease-in-out infinite;
    gap: 4px;
    position: relative;
}
.nav-forward svg:first-of-type {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    stroke-width: 2.2;
}
.nav-btn-label {
    display: none;
    font-family: 'Fraunces', 'EB Garamond', 'Cormorant', serif;
    font-style: italic;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding-left: 4px;
}
.nav-forward.has-label .nav-btn-label {
    display: inline-block;
}

.nav-controls {
    transition: opacity 0.6s cubic-bezier(0.45, 0, 0.2, 1);
}
.nav-controls.hidden {
    opacity: 0;
    pointer-events: none;
}

.nav-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

.nav-btn:hover {
    background: var(--sea-ink);
    color: var(--foam);
    opacity: 1;
}
.nav-btn:focus-visible {
    outline: 2px solid var(--sun-gold);
    outline-offset: 4px;
}

.enter-label {
    font-family: 'Fraunces', 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 520;
    font-size: 1.2rem;
    letter-spacing: 0.04em;
    color: var(--sea-ink);
    text-shadow: 0 0 18px rgba(251, 247, 238, 0.95), 0 1px 3px rgba(251, 247, 238, 0.9);
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.2s ease;
    pointer-events: auto;
    cursor: pointer;
    padding: 6px 18px;
    margin-top: -2px;
    user-select: none;
    -webkit-user-select: none;
}
.enter-label.inactive {
    pointer-events: none;
    cursor: default;
}

/* Circular Progress Cue for Autoplay */
.progress-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    width: 72px;
    height: 72px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}
.nav-forward.playing-auto .progress-ring {
    opacity: 1;
}
.progress-ring circle {
    fill: transparent;
    stroke: var(--sun-gold);
    stroke-width: 1.5;
    stroke-dasharray: 180;
    stroke-dashoffset: 180;
    transition: stroke-dashoffset 0.1s linear;
}
#progress-dots {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.dot.active {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.3);
}

/* Fixed UI Elements */
.hero-content {
    position: fixed;
    top: 15%;
    left: 0;
    text-align: center;
    width: 100%;
    padding: 0 20px;
    z-index: 10;
    pointer-events: none;
    will-change: transform, opacity;
}

.title-card {
    display: inline-block;
    transition: none;
}

.title-card h1 {
    /* Kept for override if needed, but we use .script-title now */
}

/* (Scroll hint removed for single enter button) */

@keyframes breathe {
    0%, 100% { opacity: 0.55; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(5px); }
}

/* Chapter Overlays */
/* Viewport anchored while the film moves continuously between section anchors. */
.overlay-text {
    position: fixed;
    font-size: clamp(2rem, 7.4vw, 3.4rem);
    line-height: 1.12;
    font-weight: 450;
    font-family: 'Fraunces', serif;
    font-variation-settings: "opsz" 144, "SOFT" 100;
    font-style: italic;
    background: none;
    padding: 0;
    opacity: 0;
    transition: none; /* Opacity and 3D transform come directly from film time on the GPU compositor. */
    transform: translate3d(-50%, 14px, 0) scale3d(0.97, 0.97, 1);
    will-change: opacity, transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    pointer-events: none;
    max-width: 16ch;
    width: max-content;
    text-align: center;
    color: var(--sea-ink);
    text-shadow: 0 0 28px rgba(251, 247, 238, 0.9), 0 0 8px rgba(251, 247, 238, 0.7);
    z-index: 10;
}

@media (min-width: 768px) {
    .overlay-text { max-width: 20ch; width: auto; }
}

.overlay-text.visible {
    opacity: 1;
}

.pos-upper {
    top: 15%;
    left: 50%;
    transform: translate3d(-50%, 0, 0);
}

.dusk-text {
    color: var(--foam);
    text-shadow: 0 0 26px rgba(91, 74, 122, 0.85), 0 0 8px rgba(20, 27, 42, 0.6);
}

.large-title {
    font-size: clamp(2.6rem, 9.2vw, 4.4rem);
    font-weight: 420;
    line-height: 1.05;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    color: var(--foam);
    text-shadow: 0 0 32px rgba(231, 183, 95, 0.55), 0 2px 14px rgba(10, 16, 28, 0.9), 0 0 6px rgba(10, 16, 28, 0.85);
    top: clamp(14px, 2.8vh, 28px);
    left: 50%;
    width: 100%;
    z-index: 30;
}

html.cards-mode .hero-content,
html.cards-mode .overlay-text:not(#text-the-party) {
    visibility: hidden;
    will-change: auto;
}

/* Post-Video Content Cards */
.scroll-section {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100svh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.content-section {
    position: relative;
    width: 100%;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(6.6rem, 15vh, 8.6rem) 20px 4rem;
    scroll-snap-align: start;
    z-index: 20;
}

.card {
    position: relative;
    background: linear-gradient(165deg, rgba(16, 30, 52, 0.56) 0%, rgba(10, 20, 38, 0.64) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(251, 247, 238, 0.28);
    border-radius: 6px;
    padding: 2.3rem 2.2rem;
    width: 100%;
    max-width: 34rem;
    margin: 0 auto;
    color: var(--foam);
    text-shadow: 0 1px 6px rgba(5, 10, 20, 0.45);
    box-shadow: 0 20px 48px rgba(5, 10, 20, 0.42);
}
@media (prefers-reduced-motion: no-preference) {
    .content-section .card {
        opacity: 0;
        transform: translate3d(0, 24px, 0);
        transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .content-section .card.card-visible {
        opacity: 1;
        transform: none;
    }
}

.card::after {
    /* Hairline inner frame */
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(231, 183, 95, 0.28);
    border-radius: 4px;
    pointer-events: none;
}

.card h2 {
    font-family: 'Fraunces', serif;
    font-variation-settings: "opsz" 144, "SOFT" 100;
    font-style: italic;
    font-weight: 460;
    font-size: clamp(2rem, 8vw, 2.85rem);
    margin-bottom: 0.25rem;
    text-align: center;
    color: #FFFFFF;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.card-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0.3rem 0 1.35rem;
}

.card-ornament-bottom {
    margin: 1.45rem 0 0.1rem;
}

.ornament-line {
    flex: 1;
    max-width: 110px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(231, 183, 95, 0.6), transparent);
}

.ornament-sprig {
    width: 92px;
    height: 28px;
    flex-shrink: 0;
    display: block;
}

.card .divider {
    margin-bottom: 1.5rem;
    color: var(--foam);
}

.card p, .card li {
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 0.85rem;
    color: rgba(251, 247, 238, 0.96);
}

.card ul {
    list-style: none;
    margin-bottom: 0.5rem;
}

.card ul li {
    position: relative;
    padding-left: 0;
}

.card ul li::before {
    display: none;
}

/* Program Timeline (Illustrated 4-column layout) */
.timeline-list {
    position: relative;
    margin: 0.25rem 0;
}
.timeline-list::before {
    content: '';
    position: absolute;
    left: calc(3.6rem + 0.65rem + 7px);
    top: 26px;
    bottom: 26px;
    width: 1px;
    border-left: 1.5px dashed rgba(231, 183, 95, 0.55);
}
.timeline-list .timeline-item {
    display: grid;
    grid-template-columns: 3.6rem 16px 64px 1fr;
    align-items: center;
    column-gap: 0.65rem;
    padding: 0.35rem 0;
    margin-bottom: 0.25rem;
}
.timeline-list .time {
    font-family: 'Fraunces', serif;
    font-variant-numeric: lining-nums tabular-nums;
    font-weight: 600;
    font-size: clamp(1.1rem, 3.8vw, 1.3rem);
    color: #FFFFFF;
    text-align: right;
}
.timeline-dot, .transport-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sun-gold);
    box-shadow: 0 0 0 3px rgba(231, 183, 95, 0.22);
    justify-self: center;
    position: relative;
    z-index: 2;
}
.timeline-illus {
    width: 64px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.timeline-illus svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
}
.timeline-list .event {
    font-style: italic;
    font-size: clamp(1.1rem, 3.8vw, 1.28rem);
    color: #FFFFFF;
}

/* Venue Card */
.venue-address {
    text-align: center;
    font-style: italic;
    font-size: 1.1rem;
    color: rgba(251, 247, 238, 0.92) !important;
    margin-bottom: 1.1rem !important;
}

/* Map Embed */
.map-container {
    margin: 1.1rem 0 1.35rem;
    border-radius: 8px;
    border: 1px solid rgba(251, 247, 238, 0.25);
    overflow: hidden;
    position: relative;
    z-index: 5;
}
.map-container iframe {
    width: 100%;
    height: 240px;
    border: 0;
    display: block;
}

/* Transport List (Illustrated 3-column layout) */
.transport-list {
    position: relative;
    margin: 0.25rem 0;
}
.transport-list::before {
    content: '';
    position: absolute;
    left: calc(66px + 0.7rem + 7px);
    top: 26px;
    bottom: 26px;
    width: 1px;
    border-left: 1.5px dashed rgba(231, 183, 95, 0.55);
}
.transport-list .transport-item {
    display: grid;
    grid-template-columns: 66px 16px 1fr;
    align-items: center;
    column-gap: 0.7rem;
    padding: 0.45rem 0;
    margin-bottom: 0.35rem;
}
.transport-illus {
    width: 66px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.transport-illus svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
}
.transport-text {
    font-style: italic;
    font-size: clamp(1rem, 3.5vw, 1.14rem);
    line-height: 1.4;
    color: #FFFFFF;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    background: rgba(251, 247, 238, 0.08);
    color: #FFFFFF;
    text-decoration: none;
    padding: 0.85rem 1.5rem;
    border-radius: 30px;
    border: 1.5px solid rgba(251, 247, 238, 0.65);
    font-family: inherit;
    font-style: italic;
    font-weight: 450;
    text-align: center;
    width: 100%;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
    cursor: pointer;
    font-size: 1.05rem;
    position: relative;
    z-index: 5;
}

.btn .ext-icon {
    flex-shrink: 0;
    opacity: 0.9;
}

.btn:hover, .btn:focus-visible {
    background: var(--foam);
    color: var(--night);
    border-color: var(--foam);
    text-shadow: none;
}

.btn:focus-visible, .form-control:focus-visible {
    outline: 2px solid var(--sun-gold);
    outline-offset: 3px;
}

/* RSVP Form */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    font-style: italic;
    font-weight: 400;
    color: #FFFFFF;
}

.form-control {
    width: 100%;
    padding: 0.75rem 0.55rem;
    border: none;
    border-bottom: 1px solid rgba(251, 247, 238, 0.45);
    background: rgba(251, 247, 238, 0.04);
    color: #FFFFFF;
    border-radius: 4px 4px 0 0;
    font-family: inherit;
    font-size: 1rem;
    transition: border-bottom-width 0.1s, border-color 0.1s, background 0.2s;
}

textarea.form-control {
    min-height: 4.8rem;
    resize: vertical;
    line-height: 1.45;
    border: 1px solid rgba(251, 247, 238, 0.35);
    border-radius: 6px;
    padding: 0.75rem;
}

.form-control:focus {
    outline: none;
    border-bottom: 2px solid var(--sun-gold);
    background: rgba(251, 247, 238, 0.09);
}

textarea.form-control:focus {
    border: 1.5px solid var(--sun-gold);
}

.form-control::placeholder {
    color: rgba(251, 247, 238, 0.58);
    font-style: italic;
}

.btn-filled {
    background: var(--foam);
    color: var(--night);
    border-color: var(--foam);
    font-weight: 520;
    text-shadow: none;
}
.btn-filled:hover {
    background: var(--sun-gold);
    color: var(--night);
    border-color: var(--sun-gold);
}

.btn[disabled] {
    opacity: 0.65;
    cursor: wait;
}

.rsvp-error {
    display: none;
    margin-bottom: 1rem;
    padding: 0.75rem 0.95rem;
    border-radius: 6px;
    border: 1px solid rgba(242, 139, 130, 0.65);
    background: rgba(120, 28, 28, 0.45);
    color: #FFE9E6;
    font-size: 0.95rem;
}

.rsvp-reset-btn {
    margin-top: 1.25rem;
    background: transparent;
    border: none;
    color: rgba(251, 247, 238, 0.78);
    font-family: inherit;
    font-style: italic;
    font-size: 0.95rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.rsvp-reset-btn:hover {
    color: var(--sun-gold);
}

.friday-saved-hint {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.88rem;
    font-style: italic;
    color: var(--sun-gold);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.friday-saved-hint.visible {
    opacity: 1;
}

#rsvp-success h3 {
    font-style: italic;
    font-size: clamp(2rem, 8vw, 3rem);
    color: var(--sun-gold);
    margin-bottom: 1rem;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #FFFFFF;
}

#rsvp-success {
    display: none;
    text-align: center;
    padding: 2rem 0;
}

#rsvp-success h3 {
    color: var(--accent);
    margin-bottom: 1rem;
}

/* FAQ Accordion */
details {
    border-bottom: 1px solid rgba(251, 247, 238, 0.22);
    margin-bottom: 0;
}

summary {
    padding: 1.15rem 0;
    font-family: 'Fraunces', serif;
    font-variation-settings: "opsz" 36;
    font-weight: 480;
    font-style: italic;
    font-size: 1.18rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #FFFFFF;
}

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

summary::after {
    content: '+';
    color: var(--sun-gold);
    font-size: 1.5rem;
    font-style: normal;
    font-weight: 300;
    transition: transform 0.4s cubic-bezier(0.45, 0, 0.2, 1);
}

details[open] summary::after {
    transform: rotate(45deg);
}

.details-content {
    padding: 0 0.8rem 1.15rem;
    color: rgba(251, 247, 238, 0.9);
    line-height: 1.55;
    font-family: 'Fraunces', serif;
    font-variation-settings: "opsz" 14, "SOFT" 50;
    font-style: normal;
    font-weight: 400;
}

.details-content input[type="number"] {
    width: 68px;
    padding: 4px 8px;
    margin-left: 10px;
    background: rgba(251, 247, 238, 0.08);
    border: none;
    border-bottom: 1px solid rgba(251, 247, 238, 0.55);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 1rem;
    border-radius: 4px 4px 0 0;
}

/* Footer credit */
.site-footer {
    position: relative;
    z-index: 20;
    text-align: center;
    padding: 0.5rem 1rem calc(1.8rem + env(safe-area-inset-bottom, 0px));
    scroll-snap-align: end;
    font-size: 0.78rem;
    font-style: italic;
    letter-spacing: 0.02em;
    color: rgba(251, 247, 238, 0.62);
    text-shadow: 0 1px 6px rgba(5, 10, 20, 0.7);
}

.site-footer a {
    color: rgba(251, 247, 238, 0.82);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(231, 183, 95, 0.45);
    transition: color 0.2s, text-decoration-color 0.2s;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: var(--sun-gold);
    text-decoration-color: var(--sun-gold);
}

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    html, html.cards-mode {
        scroll-behavior: auto;
        scroll-snap-type: none;
    }
    .title-card, .overlay-text {
        transition: none;
    }
    .nav-forward, .eq-bar {
        animation: none !important;
    }
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
    .overlay-text {
        padding: 1rem 1.2rem;
    }
    .overlay-text.large-title {
        padding: 0.25rem 1rem;
    }
    .card {
        padding: 1.65rem 1.35rem;
    }
    .timeline-list::before {
        left: calc(3.2rem + 0.5rem + 7px);
    }
    .timeline-list .timeline-item {
        grid-template-columns: 3.2rem 16px 56px 1fr;
        column-gap: 0.5rem;
    }
    .timeline-illus {
        width: 56px;
        height: 48px;
    }
    .transport-list::before {
        left: calc(56px + 0.55rem + 7px);
    }
    .transport-list .transport-item {
        grid-template-columns: 56px 16px 1fr;
        column-gap: 0.55rem;
    }
    .transport-illus {
        width: 56px;
        height: 46px;
    }
    #progress-dots {
        display: none; /* Hide dots on mobile to save space */
    }
}

@media (max-width: 640px) {
    .ui-controls {
        top: calc(14px + env(safe-area-inset-top, 0px));
        right: 14px;
        gap: 10px;
    }
    .overlay-text.large-title {
        top: calc(54px + env(safe-area-inset-top, 0px));
        padding: 0 1rem;
        font-size: clamp(2.35rem, 8.6vw, 3rem);
    }
    .content-section {
        padding: clamp(9rem, 18vh, 10rem) 20px 4rem;
    }
}

/* --- review fixes --- */
/* Sunset line: the daytime mist is still light at stop5, so the halo carries the contrast */
.dusk-text {
    color: var(--foam);
    text-shadow:
        0 0 3px rgba(20, 27, 42, 0.9),
        0 0 14px rgba(20, 27, 42, 0.85),
        0 2px 34px rgba(91, 74, 122, 0.95);
}

/* "La nostra avventura" shares the story lines' position as the hero names fade. */
.hero-subtitle {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(90vw, 24ch);
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
    font-weight: 450;
    font-size: clamp(1.7rem, 6.6vw, 2.8rem);
    line-height: 1.15;
    color: var(--sea-ink);
    text-shadow: 0 0 28px rgba(251, 247, 238, 0.95), 0 0 10px rgba(251, 247, 238, 0.85);
    margin-top: 0;
}

/* Guided button over the night scene: a foam pill so it reads on dark */
.cards-mode .nav-btn {
    background: rgba(251, 247, 238, 0.94);
    border: 2px solid var(--sea-ink);
    color: var(--sea-ink);
    box-shadow: 0 8px 24px rgba(20, 27, 42, 0.45);
}

/* "La nostra avventura" now lives on the landing: in the normal flow, right under the dateline
   (overrides the earlier absolute placement that put it on top of the names). */
#hero-subtitle.hero-subtitle {
    position: static;
    transform: none;
    left: auto;
    top: auto;
    margin-top: 0.9rem;
}


/* JS drives every story step and the guided card flow; CSS scroll snapping only fights it on
   iOS Safari (it re-snaps after programmatic scrolls and pulled the page back to "La festa"). */
html, html.cards-mode { scroll-snap-type: none !important; }
.scroll-section, .content-section { scroll-snap-align: none !important; scroll-snap-stop: normal !important; }
