/* ========================================
   Nicolas & Areely Wedding - Styles
   Modern Minimal Luxury Design
   ======================================== */

/* Custom Font */
@font-face {
    font-family: 'Fanttor Howery';
    src: url('assets/fonts/FanttorHowery.otf') format('opentype');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

:root {
    /* Color Palette */
    --color-cream: #f8f6f3;
    --color-warm-beige: #e8e4dc;
    --color-taupe: #d5cfc7;
    --color-sage: #2D4739;
    --color-sage-dark: #1E3228;
    --color-charcoal: #3d3d35;
    --color-gold: #b8a88a;
    --color-text: #4a4a45;
    --color-text-light: #7a7a75;

    /* Typography */
    --font-script: 'Pinyon Script', cursive;
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Josefin Sans', sans-serif;

    /* Spacing */
    --section-padding: clamp(80px, 12vw, 160px);
    --container-max: 1200px;
}

/* ========================================
   Entry Gate - Envelope Animation
   ======================================== */

.entry-gate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.entry-gate.hidden {
    display: none;
}

/* Envelope Container */
.envelope-container {
    position: relative;
    width: 100%;
    max-width: 720px;
    aspect-ratio: 16/9;
    overflow: hidden;  /* Clip any overflow from transforms */
}

/* Canvas Element - absolutely positioned to match overlay positioning */
.envelope-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    transform: scale(1.15);  /* Zoom in slightly */
}

/* SVG Overlay for positioning reference */
.overlay-guide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transform: scale(1.15);  /* Match canvas zoom */
    z-index: 15;  /* Above canvas (default 0), below trigger and input */
}

/* Clickable trigger - covers entire envelope */
.envelope-trigger {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
}

/* Enable when frames are ready */
.envelope-trigger.ready {
    opacity: 1;
    pointer-events: auto;
}

.envelope-trigger.hidden {
    display: none;
}

/* Code Input Overlay - positioned dynamically by JavaScript */
.code-input-overlay {
    position: absolute;
    /* Position set by JS based on frame coordinates and scale factor */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 20;
}

.code-input-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Input field - transparent to blend with video's field */
.gate-code-input {
    width: 200px;
    padding: 8px 12px;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 300;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 4px;
    border: none;
    background: transparent;
    color: #3a3a35;
    caret-color: var(--color-sage);
    /* Rotation set by JS */
    /* Engraved/letterpress effect */
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7),
        0 -1px 0 rgba(0, 0, 0, 0.25),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

.gate-code-input:focus {
    outline: none;
}

/* Error message */
.gate-error {
    color: #ff6b6b;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    min-height: 18px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Gate Footer */
.gate-footer {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 5;
}

.gate-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    padding: 10px 20px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.gate-footer-link:hover {
    background: rgba(255, 255, 255, 0.9);
}

.gate-footer-logo {
    width: 18px;
    height: auto;
    opacity: 0.6;
}

.gate-footer-text {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    color: var(--color-charcoal);
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.7;
}

/* Mobile adjustments for envelope */
@media (max-width: 768px) {
    .envelope-container {
        max-width: calc(100% - 32px);  /* Use max-width instead of padding for spacing */
        margin: 0 auto;  /* Center it */
    }

    .seal-button {
        width: 60px;
        height: 60px;
    }

    .seal-hint {
        font-size: 0.6rem;
        bottom: -25px;
    }

    .gate-code-input {
        width: 140px;
        padding: 5px 8px;
        font-size: 0.8rem;
        letter-spacing: 2px;
    }

    .gate-footer {
        bottom: 16px;
    }
}

@media (max-width: 480px) {
    .gate-code-input {
        width: 120px;
        padding: 4px 6px;
        font-size: 0.7rem;
        letter-spacing: 1px;
    }
}

/* Main Site Hidden State */
.main-site.hidden {
    display: none;
}

/* ========================================
   Background Video
   ======================================== */

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* Overlay to blend video with site colors */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(232, 228, 220, 0.5);
    pointer-events: none;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-weight: 300;
    color: var(--color-text);
    background-color: var(--color-cream);
    line-height: 1.7;
    letter-spacing: 0.02em;
}

/* ========================================
   Premium Paper Texture System
   Uses layered real textures for editorial feel

   Required texture files (place in assets/textures/):
   - paper-texture.webp: Seamless paper fiber texture, 512x512, grayscale
   - grain-texture.webp: Fine film grain, 256x256, grayscale

   Recommended sources:
   - textures.com (free tier available)
   - unsplash.com/s/photos/paper-texture
   - Create in Photoshop: Filter > Noise > Add Noise (2-4%, Gaussian)
   ======================================== */

/* Paper/Suede Texture Overlay */
.textured {
    position: relative;
}

.textured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    /* Paper fiber texture */
    background-image: url('assets/textures/paper-texture.webp');
    background-repeat: repeat;
    background-size: 512px 512px;
    opacity: 0.2;
    mix-blend-mode: overlay;
}

.textured::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    /* Film grain overlay */
    background-image: url('assets/textures/grain-texture.webp');
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.04;
    mix-blend-mode: overlay;
}

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

/* ========================================
   Engraved/Letterpress Text Effects
   Realistic pressed-into-texture look
   ======================================== */

.engraved {
    text-shadow:
        /* Light edge on bottom (light catching raised edge) */
        0 1px 0 rgba(255, 255, 255, 0.5),
        /* Dark edge on top (pressed shadow) */
        0 -1px 0 rgba(0, 0, 0, 0.25),
        /* Soft ambient shadow */
        0 2px 4px rgba(0, 0, 0, 0.1);
}

.engraved-light {
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7),
        0 -1px 0 rgba(0, 0, 0, 0.15),
        0 2px 3px rgba(0, 0, 0, 0.08);
}

/* For dark/textured backgrounds - deep debossed effect */
.engraved-dark {
    text-shadow:
        /* Inner shadow - text pressed into surface */
        inset 0 1px 2px rgba(0, 0, 0, 0.3),
        /* Bottom light edge - light catching lower edge */
        0 1px 0 rgba(255, 255, 255, 0.15),
        /* Top dark shadow - pressed down into material */
        0 -1px 0 rgba(0, 0, 0, 0.6),
        /* Depth shadow */
        0 -2px 3px rgba(0, 0, 0, 0.25);
}

/* Enhanced engraving for content cards with texture */
.content-card .engraved,
.content-card p,
.content-card h1,
.content-card h2,
.content-card h3,
.content-card label,
.content-card span:not(.countdown-number) {
    text-shadow:
        /* Light catching bottom edge of pressed text */
        0 1px 0 rgba(255, 255, 255, 0.18),
        /* Dark top edge - pressed into felt */
        0 -1px 0 rgba(0, 0, 0, 0.7),
        /* Soft spread shadow for depth */
        0 -1px 2px rgba(0, 0, 0, 0.3),
        /* Very subtle outer glow for material feel */
        0 0 8px rgba(0, 0, 0, 0.15);
}

/* Titles get stronger engraving */
.content-card .section-title,
.content-card .hero-names {
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.2),
        0 -1px 0 rgba(0, 0, 0, 0.8),
        0 -2px 3px rgba(0, 0, 0, 0.35),
        0 0 12px rgba(0, 0, 0, 0.2);
}

/* Subtle Content Card - Uses real texture background */
.content-card {
    background: url('assets/textures/card-background.webp') center/cover no-repeat;
    background-color: var(--color-sage); /* Fallback */
    padding: clamp(40px, 8vw, 80px) clamp(32px, 6vw, 64px);
    position: relative;
    box-shadow:
        0 1px 1px rgba(0, 0, 0, 0.08),
        0 4px 8px rgba(0, 0, 0, 0.1),
        0 16px 32px rgba(0, 0, 0, 0.12),
        0 32px 64px rgba(0, 0, 0, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.15);
    border-left-color: rgba(255, 255, 255, 0.12);
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    /* Subtle vignette for depth */
    background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.2) 100%);
}

/* Optional: very subtle grain for print feel */
.content-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    background-image: url('assets/textures/grain-texture.webp');
    background-repeat: repeat;
    background-size: 150px 150px;
    opacity: 0.03;
    mix-blend-mode: overlay;
}

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


.content-card,
.content-card .section-tagline,
.content-card .section-title,
.content-card .section-subtitle,
.content-card p,
.content-card label,
.content-card span {
    color: var(--color-cream);
}

.content-card .section-tagline,
.content-card .section-subtitle {
    color: rgba(248, 246, 243, 0.8);
}

.content-card .engraved,
.content-card p,
.content-card h1,
.content-card h2,
.content-card h3,
.content-card label,
.content-card span:not(.countdown-number) {
    text-shadow:
        0 -1px 0 rgba(0, 0, 0, 0.4),
        0 1px 0 rgba(255, 255, 255, 0.1);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 400;
}

.section-tagline {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-text-light);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--color-text-light);
    max-width: 500px;
    margin: 0 auto 48px;
}

/* Buttons */
.btn {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 16px 40px;
    border: 1px solid var(--color-sage);
    background: var(--color-sage);
    color: var(--color-cream);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background: transparent;
    color: var(--color-sage);
}

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

.btn-outline:hover {
    background: var(--color-sage);
    color: var(--color-cream);
}

.btn-light {
    background: var(--color-cream);
    border-color: var(--color-cream);
    color: var(--color-sage);
}

.btn-light:hover {
    background: transparent;
    color: var(--color-cream);
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(248, 246, 243, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(61, 61, 53, 0.1);
}

.nav-logo img {
    height: 50px;
    width: auto;
    opacity: 0.4;
    filter:
        drop-shadow(1px 1px 0px rgba(0, 0, 0, 0.5))
        drop-shadow(-1px -1px 0px rgba(255, 255, 255, 0.7))
        drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.2));
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
    align-items: center;
}

.nav-links a {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--color-text);
    transition: color 0.3s ease;
}

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

.nav-btn {
    padding: 12px 24px;
    border: 1px solid var(--color-sage);
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--color-sage);
    color: var(--color-cream) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 1px;
    background: var(--color-sage);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    background: var(--color-warm-beige);
}

.hero-content {
    max-width: 680px;
    width: calc(100% - 48px);
}

.hero-content.content-card {
    padding: clamp(100px, 15vw, 180px) clamp(50px, 8vw, 80px);
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-tagline {
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-text-light);
    margin-bottom: 40px;
}

.hero-monogram {
    width: 140px;
    height: auto;
    margin: 24px 0 32px;
}

/* Real embossed logo - no filters needed */
.content-card .hero-monogram {
    width: 160px;
}

.hero-names {
    font-family: 'Fanttor Howery', var(--font-script);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.2;
    color: var(--color-charcoal);
    margin-bottom: 24px;
    text-align: center;
}

.hero-name {
    display: block;
    white-space: nowrap;
}

.content-card .hero-names {
    color: rgba(248, 246, 243, 0.95);
    text-shadow:
        0 -2px 0 rgba(0, 0, 0, 0.6),
        0 2px 0 rgba(255, 255, 255, 0.18),
        0 -4px 5px rgba(0, 0, 0, 0.28);
}

.content-card .hero-tagline,
.content-card .hero-invite,
.content-card .hero-date,
.content-card .hero-location {
    color: rgba(248, 246, 243, 0.9);
    text-shadow:
        0 -1px 0 rgba(0, 0, 0, 0.55),
        0 1px 0 rgba(255, 255, 255, 0.15),
        0 -2px 3px rgba(0, 0, 0, 0.22);
}

.hero-and {
    display: block;
    font-size: 0.5em;
    margin: 8px 0;
}

.hero-invite {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--color-text-light);
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-date {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text);
    margin-bottom: 8px;
}

.hero-location {
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    color: var(--color-text-light);
    margin-bottom: 48px;
}

/* Countdown Section */
.countdown-section {
    position: relative;
    padding: var(--section-padding) 24px;
    background: var(--color-sage);
    color: var(--color-cream);
    text-align: center;
    overflow: hidden;
}

.countdown-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, transparent 50%);
}

.countdown-content {
    position: relative;
    z-index: 1;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: clamp(24px, 6vw, 80px);
    margin-bottom: 24px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-number {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 300;
    line-height: 1;
    letter-spacing: 0.05em;
}

.countdown-label {
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(248, 246, 243, 0.7);
    margin-top: 8px;
}

.countdown-text {
    font-family: var(--font-script);
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: rgba(248, 246, 243, 0.8);
}

/* Events Section */
.events {
    padding: var(--section-padding) 24px;
    background: var(--color-cream);
    text-align: center;
}

.timeline {
    max-width: 800px;
    margin: 60px auto 0;
    text-align: left;
}

.timeline-event {
    display: grid;
    grid-template-columns: 80px 1px 1fr;
    gap: 32px;
    margin-bottom: 60px;
}

.timeline-event:last-child {
    margin-bottom: 0;
}

.timeline-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 4px;
}

.timeline-month {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-light);
}

.timeline-day {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--color-charcoal);
    line-height: 1;
}

.timeline-line {
    width: 1px;
    background: var(--color-taupe);
    position: relative;
}

.timeline-line::before {
    content: '';
    position: absolute;
    top: 8px;
    left: -4px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--color-cream);
    border: 1px solid var(--color-sage);
}

.timeline-content {
    padding-bottom: 40px;
    border-bottom: 1px solid var(--color-taupe);
}

.timeline-event:last-child .timeline-content {
    border-bottom: none;
}

.event-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    color: var(--color-charcoal);
}

.event-details {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 16px;
}

.event-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.event-detail svg {
    flex-shrink: 0;
}

.event-description {
    font-size: 0.95rem;
    color: var(--color-text);
    margin-bottom: 12px;
    line-height: 1.8;
}

.event-attire {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.event-attire strong {
    font-weight: 400;
    color: var(--color-text);
}

/* Timeline within content cards */
.content-card .timeline-month {
    color: rgba(248, 246, 243, 0.7);
}

.content-card .timeline-day {
    color: var(--color-cream);
}

.content-card .timeline-line {
    background: rgba(248, 246, 243, 0.3);
}

.content-card .timeline-line::before {
    background: var(--color-sage);
    border-color: var(--color-cream);
}

.content-card .timeline-content {
    border-bottom-color: rgba(248, 246, 243, 0.2);
}

.content-card .event-title {
    color: var(--color-cream);
}

.content-card .event-detail {
    color: rgba(248, 246, 243, 0.7);
}

.content-card .event-description {
    color: rgba(248, 246, 243, 0.9);
}

.content-card .event-attire {
    color: rgba(248, 246, 243, 0.7);
}

.content-card .event-attire strong {
    color: var(--color-cream);
}

/* Accommodation Section */
.accommodation {
    padding: var(--section-padding) 24px;
    background: var(--color-warm-beige);
    text-align: center;
}

.hotels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.hotel-card {
    background: var(--color-cream);
    overflow: hidden;
}

.hotel-image {
    height: 200px;
    background: var(--color-taupe);
}

.hotel-info {
    padding: 32px;
    text-align: left;
}

.hotel-name {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 8px;
}

.hotel-distance,
.hotel-price {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 4px;
}

.hotel-code {
    font-size: 0.8rem;
    color: var(--color-text);
    margin: 16px 0;
    padding: 12px;
    background: var(--color-warm-beige);
}

.hotel-code strong {
    font-weight: 400;
    letter-spacing: 0.1em;
}

/* Registry Section */
.registry {
    padding: var(--section-padding) 24px;
    background: var(--color-sage);
    color: var(--color-cream);
    text-align: center;
}

.registry .section-tagline,
.registry .section-subtitle {
    color: rgba(248, 246, 243, 0.7);
}

.registry-monogram {
    width: 100px;
    height: auto;
    margin-bottom: 24px;
    opacity: 0.25;
    filter:
        invert(1)
        brightness(1.1)
        drop-shadow(1.5px 1.5px 0px rgba(0, 0, 0, 0.5))
        drop-shadow(-1px -1px 0px rgba(255, 255, 255, 0.4))
        drop-shadow(3px 3px 2px rgba(0, 0, 0, 0.2));
}

.registry-links {
    max-width: 400px;
    margin: 48px auto 0;
}

.registry-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(248, 246, 243, 0.2);
    text-decoration: none;
    color: var(--color-cream);
    transition: all 0.3s ease;
}

.registry-link:first-child {
    border-top: 1px solid rgba(248, 246, 243, 0.2);
}

.registry-link:hover {
    padding-left: 16px;
}

.registry-name {
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.registry-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.registry-link:hover .registry-arrow {
    transform: translateX(4px);
}

/* RSVP Section */
.rsvp {
    padding: var(--section-padding) 24px;
    background: var(--color-cream);
    text-align: center;
}

.rsvp-form {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-warm-beige);
    border: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-sage);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a4a45' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0;
}

/* Hide native checkbox */
.checkbox-label input[type="checkbox"] {
    display: none;
}

/* Custom checkbox */
.checkbox-label span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-label span::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--color-sage);
    border-radius: 4px;
    background: transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Checked state - show logo */
.checkbox-label input[type="checkbox"]:checked + span::before {
    background: url('assets/monogram.png') center/70% no-repeat;
    background-color: var(--color-sage);
    border-color: var(--color-sage);
}

.btn-submit {
    width: 100%;
    margin-top: 16px;
}

/* Form inputs within content cards */
.content-card .form-group input,
.content-card .form-group select,
.content-card .form-group textarea {
    background: rgba(248, 246, 243, 0.15);
    color: var(--color-cream);
    border: 1px solid rgba(248, 246, 243, 0.3);
}

.content-card .form-group input::placeholder,
.content-card .form-group textarea::placeholder {
    color: rgba(248, 246, 243, 0.5);
}

.content-card .form-group input:focus,
.content-card .form-group select:focus,
.content-card .form-group textarea:focus {
    border-color: var(--color-cream);
    background: rgba(248, 246, 243, 0.2);
}

.content-card .form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f8f6f3' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

/* Custom checkbox for content cards (cream theme) */
.content-card .checkbox-label span::before {
    border-color: rgba(248, 246, 243, 0.4);
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.content-card .checkbox-label input[type="checkbox"]:checked + span::before {
    background: url('assets/monogram.png') center/55% no-repeat;
    background-color: var(--color-cream);
    border-color: var(--color-cream);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* RSVP Code Entry & Confirmation */
.rsvp-step {
    text-align: center;
}

.rsvp-instruction {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--color-cream);
    margin-bottom: 24px;
    opacity: 0.9;
}

.rsvp-greeting {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--color-cream);
    margin-bottom: 24px;
    text-align: center;
}

.form-error {
    color: #ffb4b4;
    font-size: 0.9rem;
    margin-top: -8px;
    margin-bottom: 16px;
    text-align: center;
}

#inviteCode {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 1.2rem;
}

/* Confirmation screen - embossed monogram like hero */
.confirmation-monogram {
    width: 120px;
    height: auto;
    margin-bottom: 24px;
    /* No filters - using pre-made embossed image like hero */
}

.confirmation-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    color: var(--color-cream);
    margin-bottom: 16px;
}

.confirmation-message {
    font-size: 1rem;
    color: rgba(248, 246, 243, 0.85);
    line-height: 1.8;
}

/* Hotel cards within content cards */
.content-card .hotel-card {
    background: rgba(248, 246, 243, 0.1);
}

.content-card .hotel-card .hotel-info {
    padding: 24px;
}

.content-card .hotel-card .hotel-name {
    color: var(--color-cream);
}

.content-card .hotel-card .hotel-distance,
.content-card .hotel-card .hotel-price {
    color: rgba(248, 246, 243, 0.7);
}

.content-card .hotel-card .hotel-code {
    background: rgba(248, 246, 243, 0.1);
    color: var(--color-cream);
}

/* Footer */
.footer {
    padding: 80px 24px;
    background: var(--color-sage);
    color: var(--color-cream);
    text-align: center;
}

.footer-monogram {
    width: 80px;
    height: auto;
    margin-bottom: 24px;
    opacity: 0.25;
    filter:
        invert(1)
        brightness(1.1)
        drop-shadow(1.5px 1.5px 0px rgba(0, 0, 0, 0.5))
        drop-shadow(-1px -1px 0px rgba(255, 255, 255, 0.4))
        drop-shadow(3px 3px 2px rgba(0, 0, 0, 0.2));
}

.footer-names {
    font-family: 'Fanttor Howery', var(--font-script);
    font-size: 2.5rem;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 8px;
    text-shadow:
        0 -2px 0 rgba(0, 0, 0, 0.45),
        0 2px 0 rgba(255, 255, 255, 0.12),
        0 -3px 3px rgba(0, 0, 0, 0.18);
}

.footer-date {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: rgba(248, 246, 243, 0.6);
    margin-bottom: 40px;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.footer-nav a {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(248, 246, 243, 0.6);
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--color-cream);
}

.footer-credit {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: rgba(248, 246, 243, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--color-cream);
        padding: 24px;
        gap: 24px;
        border-bottom: 1px solid var(--color-taupe);
    }

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

    .nav-toggle {
        display: flex;
    }

    .timeline-event {
        grid-template-columns: 60px 1px 1fr;
        gap: 16px;
    }

    .timeline-day {
        font-size: 2rem;
    }

    .event-details {
        flex-direction: column;
        gap: 12px;
    }

    .hotels-grid {
        grid-template-columns: 1fr;
    }

    .footer-nav {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .nav {
        padding: 16px 20px;
    }

    .nav-logo img {
        height: 40px;
    }

    .countdown {
        gap: 16px;
    }

    .countdown-number {
        font-size: 2rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Floating Rings Animation
   ======================================== */

.rings-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.ring-pair {
    position: absolute;
    width: 30px;
    height: 30px;
    opacity: 0;
    animation: ringFloat linear infinite;
    background: url('assets/rings.png') center/contain no-repeat;
    filter: opacity(0.4);
}

/* Hide the old CSS rings - now using image */
.ring-pair .ring {
    display: none;
}

@keyframes ringFloat {
    0% {
        opacity: 0;
        transform: translateY(-30px) translateX(0) rotate(0deg) scale(0.9);
    }
    10% {
        opacity: 0.6;
    }
    50% {
        transform: translateY(50vh) translateX(var(--drift, 30px)) rotate(90deg) scale(1);
    }
    90% {
        opacity: 0.5;
    }
    100% {
        opacity: 0;
        transform: translateY(105vh) translateX(calc(var(--drift, 30px) * 1.2)) rotate(180deg) scale(0.8);
    }
}

/* Ring size variations */
.ring-pair.small {
    transform: scale(0.7);
}

.ring-pair.large {
    transform: scale(1.3);
}

.hero-content > * {
    animation: fadeInUp 0.8s ease forwards;
}

.hero-tagline { animation-delay: 0.1s; }
.hero-monogram { animation-delay: 0.2s; }
.hero-names { animation-delay: 0.3s; }
.hero-invite { animation-delay: 0.4s; }
.hero-date { animation-delay: 0.5s; }
.hero-location { animation-delay: 0.6s; }
.hero .btn { animation-delay: 0.7s; }

/* ========================================
   2D Canvas - Stacked Cards Layout
   ======================================== */

/* Prevent body scroll - canvas handles everything */
html.canvas-mode,
html.canvas-mode body {
    overflow: hidden;
    height: 100%;
    width: 100%;
}

/* Canvas Container - Full viewport, scrollable */
.canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background: transparent;
    cursor: grab;
}


.canvas-container:active {
    cursor: grabbing;
}

/* Canvas World - dynamically sized by JS based on card positions */
.canvas-world {
    position: relative;
    width: 100vw;
    height: 100vh;
    transform-origin: center center;
    transition: transform 0.3s ease;
}

/* Stack Card Base - More square proportions */
.stack-card {
    position: absolute;
    width: clamp(260px, 22vw, 340px);
    min-height: clamp(260px, 22vw, 340px);
    max-height: none;
    aspect-ratio: 1 / 1.1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(248, 246, 243, 0.3) transparent;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.4s ease,
                box-shadow 0.4s ease;
    cursor: pointer;
    will-change: transform, opacity, box-shadow, width;
}

.stack-card::-webkit-scrollbar {
    width: 6px;
}

.stack-card::-webkit-scrollbar-track {
    background: transparent;
}

.stack-card::-webkit-scrollbar-thumb {
    background: rgba(248, 246, 243, 0.3);
    border-radius: 3px;
}

/* Card Inner - preserves existing content-card styling */
.card-inner {
    min-height: 100%;
}

/* ========================================
   Structured Grid-Based Positions
   Cards aligned to hero's corners
   creating an underlying grid composition
   ======================================== */

/* Hero - Center, prominent invitation (larger, slightly taller) */
.card-hero {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 60;
    width: clamp(300px, 28vw, 400px);
    aspect-ratio: 1 / 1.25;
}

/* Grid offset values - cards at corners with spacing */
/* Wider horizontal spread, more vertical gap between rows */

/* Story - Top Left corner */
.card-story {
    top: 50%;
    left: 50%;
    transform: translate(-135%, -105%);
    z-index: 45;
}

/* Accommodation - Top Right corner */
.card-accommodation {
    top: 50%;
    left: 50%;
    transform: translate(35%, -105%);
    z-index: 40;
}

/* Events - Bottom Left corner */
.card-events {
    top: 50%;
    left: 50%;
    transform: translate(-135%, 15%);
    z-index: 35;
}

/* RSVP - Bottom Right corner */
.card-rsvp {
    top: 50%;
    left: 50%;
    transform: translate(35%, 15%);
    z-index: 50;
}

/* Registry - Bottom Center (5th card, below hero) */
.card-registry {
    top: 50%;
    left: 50%;
    transform: translate(-50%, 70%);
    z-index: 30;
}

/* ========================================
   Active/Focused Card State
   Card scales up in place, view centers on it
   ======================================== */

.stack-card.active {
    z-index: 200 !important;
    cursor: default;
    /* Scale up to hero size while staying in position */
    width: clamp(300px, 28vw, 400px);
    aspect-ratio: 1 / 1.25;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.3),
        0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Hero card stays the same size when active */
.stack-card.card-hero.active {
    width: clamp(300px, 28vw, 400px);
}

/* Non-active cards stay visible but slightly recede */
.stack-card:not(.active) {
    opacity: 0.9;
    filter: brightness(0.97);
}

/* Hover effect for non-active cards */
.stack-card:not(.active):hover {
    opacity: 1;
    filter: brightness(1);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.18),
        0 10px 20px rgba(0, 0, 0, 0.12);
}

/* Animating class for smooth transitions */
.stack-card.animating {
    z-index: 150 !important;
}

/* ========================================
   Zoom Controls
   ======================================== */

.zoom-controls {
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(248, 246, 243, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.zoom-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--color-sage);
    font-size: 1.2rem;
    font-weight: 300;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.zoom-btn:hover {
    background: var(--color-sage);
    color: var(--color-cream);
}

.zoom-btn.zoom-reset {
    font-size: 1rem;
}

/* ========================================
   Canvas Navigation
   ======================================== */

.canvas-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding: 12px 28px;
    background: rgba(248, 246, 243, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    max-width: calc(100vw - 40px);
}

.canvas-nav .nav-logo img {
    height: 32px;
    width: auto;
    opacity: 0.9;
    filter:
        brightness(0) saturate(100%)
        invert(24%) sepia(15%) saturate(1000%) hue-rotate(95deg) brightness(95%);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.nav-item {
    display: block;
    padding: 8px 14px;
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--color-text);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-item:hover {
    color: var(--color-sage);
    background: rgba(45, 71, 57, 0.08);
}

.nav-item.active {
    background: url('assets/textures/card-background.webp') center/cover;
    color: var(--color-cream);
}

.canvas-nav .nav-toggle {
    display: none;
}

/* ========================================
   Canvas Footer
   ======================================== */

.canvas-footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    background: rgba(248, 246, 243, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 30px;
}

.canvas-footer .footer-logo {
    height: 24px;
    width: auto;
    opacity: 0.7;
    filter:
        brightness(0) saturate(100%)
        invert(24%) sepia(15%) saturate(1000%) hue-rotate(95deg) brightness(95%);
}

.canvas-footer .footer-text {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-light);
    margin: 0;
}

/* ========================================
   Story Card Content
   ======================================== */

.story-content {
    margin-top: 32px;
}

.story-chapter {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(248, 246, 243, 0.2);
}

.story-chapter:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.story-date {
    display: inline-block;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(248, 246, 243, 0.6);
    margin-bottom: 8px;
}

.story-heading {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--color-cream);
    margin-bottom: 12px;
}

.story-text {
    font-size: 0.9rem;
    line-height: 1.8;
    color: rgba(248, 246, 243, 0.85);
}

/* ========================================
   Card Countdown (inside events card)
   ======================================== */

.card-countdown {
    text-align: center;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(248, 246, 243, 0.2);
}

.card-countdown .countdown {
    display: flex;
    justify-content: center;
    gap: clamp(8px, 2vw, 16px);
    margin-bottom: 6px;
}

.card-countdown .countdown-number {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
}

.card-countdown .countdown-label {
    font-size: 0.45rem;
    color: rgba(248, 246, 243, 0.6);
}

.card-countdown .countdown-text {
    font-family: var(--font-script);
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    color: rgba(248, 246, 243, 0.7);
}

/* Compact timeline for square cards */
.stack-card .timeline {
    margin-top: 12px;
}

.stack-card .timeline-event {
    grid-template-columns: 40px 1px 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.stack-card .timeline-day {
    font-size: 1.4rem;
}

.stack-card .timeline-month {
    font-size: 0.5rem;
}

.stack-card .event-title {
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.stack-card .event-description {
    font-size: 0.7rem;
    line-height: 1.5;
    margin-bottom: 4px;
}

.stack-card .event-attire {
    font-size: 0.6rem;
}

.stack-card .event-details {
    gap: 8px;
    margin-bottom: 6px;
}

.stack-card .event-detail {
    font-size: 0.65rem;
}

.stack-card .event-detail svg {
    width: 12px;
    height: 12px;
}

.stack-card .timeline-content {
    padding-bottom: 12px;
}

/* ========================================
   Registry in Stack Card
   ======================================== */

.stack-card .registry-monogram {
    display: block;
    margin: 0 auto 12px;
    width: 50px;
}

.stack-card .registry-links {
    margin-top: 12px;
}

.stack-card .registry-link {
    padding: 10px 0;
}

.stack-card .registry-name {
    font-size: 0.65rem;
}

.stack-card .registry-arrow {
    font-size: 1rem;
}

/* ========================================
   Compact Form for Stack Card
   ======================================== */

.stack-card .form-group {
    margin-bottom: 10px;
}

.stack-card .form-group label {
    font-size: 0.55rem;
    margin-bottom: 4px;
}

.stack-card .form-group input,
.stack-card .form-group select,
.stack-card .form-group textarea {
    padding: 8px 10px;
    font-size: 0.75rem;
}

.stack-card .form-group textarea {
    min-height: 50px;
}

.stack-card .checkbox-group {
    gap: 8px;
}

.stack-card .checkbox-label {
    font-size: 0.75rem;
    gap: 8px;
}

.stack-card .checkbox-label span::before {
    width: 16px;
    height: 16px;
}

/* ========================================
   Compact Hotels Grid for Stack Card
   ======================================== */

.stack-card .hotels-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
}

.stack-card .hotel-image {
    height: 70px;
}

.stack-card .hotel-info {
    padding: 10px;
}

.stack-card .hotel-name {
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.stack-card .hotel-distance,
.stack-card .hotel-price {
    font-size: 0.65rem;
}

.stack-card .hotel-code {
    font-size: 0.6rem;
    padding: 6px;
    margin: 6px 0;
}

/* ========================================
   Story Card Compact
   ======================================== */

.stack-card .story-content {
    margin-top: 12px;
}

.stack-card .story-chapter {
    margin-bottom: 12px;
    padding-bottom: 10px;
}

.stack-card .story-date {
    font-size: 0.5rem;
    margin-bottom: 4px;
}

.stack-card .story-heading {
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.stack-card .story-text {
    font-size: 0.7rem;
    line-height: 1.6;
}

/* ========================================
   Card Adjustments for Square Grid Layout
   ======================================== */

/* Compact padding for square cards */
.stack-card .card-inner {
    padding: clamp(20px, 3vw, 32px);
    display: flex;
    flex-direction: column;
}

.stack-card.card-hero .card-inner {
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: clamp(28px, 4vw, 44px) clamp(20px, 3vw, 32px);
}

.stack-card .hero-tagline {
    margin-bottom: 12px;
    font-size: 0.6rem;
}

.stack-card .hero-names {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 12px;
}

.stack-card .hero-monogram {
    margin: 8px 0 12px;
    width: 60px;
}

.stack-card .hero-invite {
    margin-bottom: 12px;
    font-size: 0.85rem;
    line-height: 1.6;
}

.stack-card .hero-date {
    font-size: 0.7rem;
    margin-bottom: 4px;
}

.stack-card .hero-location {
    margin-bottom: 16px;
    font-size: 0.65rem;
}

.stack-card .btn {
    padding: 10px 24px;
    font-size: 0.6rem;
}

/* Compact section titles for square cards */
.stack-card .section-title {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    margin-bottom: 8px;
}

.stack-card .section-tagline {
    font-size: 0.6rem;
    margin-bottom: 8px;
}

.stack-card .section-subtitle {
    font-size: 0.75rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* ========================================
   Entrance Animation
   ======================================== */

@keyframes cardFocusIn {
    0% {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    100% {
        box-shadow:
            0 30px 60px rgba(0, 0, 0, 0.3),
            0 15px 30px rgba(0, 0, 0, 0.2);
    }
}

.stack-card.entering {
    animation: cardFocusIn 0.4s ease-out forwards;
}

/* ========================================
   Mobile Canvas Layout - Same Canvas Experience
   Touch-based pan and pinch-to-zoom
   ======================================== */

@media (max-width: 768px) {
    /* Keep canvas mode - just adjust sizes and UI */
    .canvas-container {
        overflow: auto;
        cursor: grab;
        /* Prevent browser bounce/overscroll on iOS */
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .canvas-container:active {
        cursor: grabbing;
    }

    /* Canvas world stays as is - no flex column override */
    .canvas-world {
        /* Keep relative positioning and transforms */
        touch-action: none; /* We handle touch gestures manually */
    }

    /* Cards stay absolutely positioned - just slightly larger for mobile */
    .stack-card {
        width: clamp(240px, 60vw, 320px);
        min-height: clamp(240px, 60vw, 320px);
    }

    /* Hero card slightly larger on mobile */
    .card-hero {
        width: clamp(280px, 70vw, 360px);
    }

    .stack-card.active {
        width: clamp(280px, 70vw, 360px);
    }

    .stack-card.card-hero.active {
        width: clamp(280px, 70vw, 360px);
    }

    /* Zoom controls - position for thumb reach */
    .zoom-controls {
        bottom: 90px;
        right: 16px;
        padding: 6px;
    }

    .zoom-btn {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }

    /* Navigation adjustments */
    .canvas-nav {
        top: 10px;
        padding: 10px 16px;
        gap: 12px;
    }

    .canvas-nav .nav-logo img {
        height: 28px;
    }

    .nav-menu {
        display: none;
    }

    .canvas-nav.expanded .nav-menu {
        display: flex;
        flex-direction: column;
        gap: 4px;
        width: 100%;
    }

    .canvas-nav.expanded .nav-item {
        text-align: center;
        padding: 10px 16px;
    }

    .canvas-nav .nav-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
    }

    .canvas-nav .nav-toggle span {
        display: block;
        width: 20px;
        height: 1px;
        background: var(--color-sage);
        transition: all 0.3s ease;
    }

    .canvas-nav.expanded {
        flex-direction: column;
        border-radius: 20px;
        padding: 16px;
    }

    /* Footer adjustments */
    .canvas-footer {
        bottom: 10px;
        padding: 8px 16px;
        gap: 8px;
    }

    .canvas-footer .footer-logo {
        height: 20px;
    }

    .canvas-footer .footer-text {
        font-size: 0.6rem;
    }

    /* Hero card inner padding for mobile */
    .stack-card.card-hero .card-inner {
        padding: clamp(40px, 8vw, 60px) clamp(20px, 4vw, 32px);
    }
}

@media (max-width: 480px) {
    /* Even smaller cards for very small screens */
    .stack-card {
        width: clamp(200px, 55vw, 280px);
        min-height: clamp(200px, 55vw, 280px);
    }

    .card-hero {
        width: clamp(240px, 65vw, 320px);
    }

    .stack-card.active,
    .stack-card.card-hero.active {
        width: clamp(240px, 65vw, 320px);
    }

    .card-countdown .countdown {
        gap: 8px;
    }

    .card-countdown .countdown-number {
        font-size: 1.2rem;
    }

    /* Larger touch targets for zoom */
    .zoom-btn {
        width: 44px;
        height: 44px;
    }
}

/* ========================================
   MOBILE ACCORDION LAYOUT
   ======================================== */

/* Hide accordion headers on desktop */
.accordion-header {
    display: none;
}

/* Mobile Accordion Styles */
@media (max-width: 768px) {
    /* Override canvas-mode overflow hidden for mobile accordion */
    html.canvas-mode,
    html.canvas-mode body {
        overflow: auto !important;
        height: auto !important;
    }

    /* Hide canvas layout elements on mobile (keep video background) */
    .canvas-container,
    .canvas-world,
    .zoom-controls {
        display: none !important;
    }

    /* Keep video background visible on mobile */
    .video-background {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
    }

    /* Main site becomes scrollable on mobile */
    .main-site.accordion-mode {
        position: relative;
        min-height: 100vh;
        overflow-y: auto;
        background: transparent;
    }

    /* Show mobile accordion container */
    .main-site.accordion-mode .mobile-accordion {
        display: block;
    }

    /* Mobile accordion wrapper - more padding to show video background */
    .mobile-accordion {
        display: none;
        padding: 40px;
        padding-top: 70px;
        padding-bottom: 80px;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Hero section - always visible, not collapsible */
    .mobile-accordion .accordion-hero {
        background: url('assets/textures/card-background.webp') center/cover no-repeat;
        background-color: var(--color-sage); /* Fallback */
        border-radius: 14px;
        padding: 20px 16px;
        margin-bottom: 16px;
        box-shadow:
            0 2px 8px rgba(0,0,0,0.1),
            0 8px 24px rgba(0,0,0,0.12);
        text-align: center;
        position: relative;
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    /* Vignette effect for hero */
    .mobile-accordion .accordion-hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        pointer-events: none;
        z-index: 1;
        border-radius: 14px;
        background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.15) 100%);
    }

    .mobile-accordion .accordion-hero > * {
        position: relative;
        z-index: 2;
    }

    .mobile-accordion .accordion-hero .hero-names {
        font-size: 1.3rem;
        margin-bottom: 12px;
        color: var(--color-cream);
        text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    .mobile-accordion .accordion-hero .hero-monogram {
        width: 60px;
        height: auto;
        margin: 12px auto;
    }

    .mobile-accordion .accordion-hero .hero-date {
        font-size: 0.95rem;
        margin-bottom: 6px;
        color: rgba(248, 246, 243, 0.9);
        text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    .mobile-accordion .accordion-hero .hero-venue,
    .mobile-accordion .accordion-hero p {
        color: rgba(248, 246, 243, 0.85);
        text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    /* Accordion items - match desktop card texture */
    .mobile-accordion .accordion-item {
        background: url('assets/textures/card-background.webp') center/cover no-repeat;
        background-color: var(--color-sage); /* Fallback */
        border-radius: 10px;
        margin-bottom: 14px;
        overflow: hidden;
        box-shadow:
            0 2px 8px rgba(0,0,0,0.1),
            0 8px 24px rgba(0,0,0,0.12);
        position: relative;
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    /* Vignette effect for accordion items */
    .mobile-accordion .accordion-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        pointer-events: none;
        z-index: 1;
        border-radius: 12px;
        background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.15) 100%);
    }

    /* Accordion header button */
    .mobile-accordion .accordion-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 14px 16px;
        background: transparent;
        border: none;
        cursor: pointer;
        font-family: var(--font-serif);
        font-size: 1rem;
        color: var(--color-cream);
        text-align: left;
        transition: background 0.2s ease;
        position: relative;
        z-index: 2;
        text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    .mobile-accordion .accordion-header:hover {
        background: rgba(255,255,255,0.05);
    }

    .mobile-accordion .accordion-header:active {
        background: rgba(255,255,255,0.08);
    }

    /* Accordion icon (chevron) - cream color to match text */
    .mobile-accordion .accordion-icon {
        width: 20px;
        height: 20px;
        position: relative;
        transition: transform 0.3s ease;
    }

    .mobile-accordion .accordion-icon::before,
    .mobile-accordion .accordion-icon::after {
        content: '';
        position: absolute;
        background: var(--color-cream);
        border-radius: 2px;
    }

    .mobile-accordion .accordion-icon::before {
        width: 10px;
        height: 2px;
        top: 50%;
        left: 2px;
        transform: translateY(-50%) rotate(45deg);
    }

    .mobile-accordion .accordion-icon::after {
        width: 10px;
        height: 2px;
        top: 50%;
        right: 2px;
        transform: translateY(-50%) rotate(-45deg);
    }

    /* Expanded state - rotate chevron */
    .mobile-accordion .accordion-item.expanded .accordion-icon {
        transform: rotate(180deg);
    }

    /* Accordion content */
    .mobile-accordion .accordion-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out;
        position: relative;
        z-index: 2;
    }

    .mobile-accordion .accordion-item.expanded .accordion-content {
        max-height: 2000px; /* Large enough for any content */
        transition: max-height 0.5s ease-in;
    }

    .mobile-accordion .accordion-content-inner {
        padding: 0 16px 20px;
    }

    /* Cream text colors for all accordion content - match desktop cards */
    .mobile-accordion .accordion-item,
    .mobile-accordion .accordion-item p,
    .mobile-accordion .accordion-item span,
    .mobile-accordion .accordion-item label,
    .mobile-accordion .accordion-item li {
        color: var(--color-cream);
    }

    .mobile-accordion .accordion-item .section-tagline,
    .mobile-accordion .accordion-item .section-subtitle {
        color: rgba(248, 246, 243, 0.8);
    }

    /* Text shadow for engraved look */
    .mobile-accordion .accordion-item p,
    .mobile-accordion .accordion-item h1,
    .mobile-accordion .accordion-item h2,
    .mobile-accordion .accordion-item h3,
    .mobile-accordion .accordion-item label,
    .mobile-accordion .accordion-item span:not(.countdown-number) {
        text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    /* Style adjustments for accordion content */
    .mobile-accordion .section-tagline {
        font-size: 0.75rem;
        margin-bottom: 4px;
    }

    .mobile-accordion .section-title {
        font-size: 1.3rem;
        margin-bottom: 16px;
        color: var(--color-cream);
    }

    /* Timeline adjustments for mobile accordion */
    .mobile-accordion .timeline-event {
        padding-left: 0;
    }

    .mobile-accordion .timeline-date {
        position: relative;
        margin-bottom: 8px;
        color: var(--color-cream);
    }

    /* Form adjustments */
    .mobile-accordion .rsvp-form .form-group {
        margin-bottom: 16px;
    }

    /* Form inputs styling for dark green textured background */
    .mobile-accordion .form-group input,
    .mobile-accordion .form-group select,
    .mobile-accordion .form-group textarea,
    .mobile-accordion .rsvp-form input,
    .mobile-accordion .rsvp-form select,
    .mobile-accordion .rsvp-form textarea {
        font-size: 16px; /* Prevent iOS zoom */
        background: rgba(248, 246, 243, 0.15);
        color: var(--color-cream);
        border: 1px solid rgba(248, 246, 243, 0.3);
        border-radius: 8px;
        padding: 12px 16px;
    }

    .mobile-accordion .form-group input::placeholder,
    .mobile-accordion .form-group textarea::placeholder,
    .mobile-accordion .rsvp-form input::placeholder,
    .mobile-accordion .rsvp-form textarea::placeholder {
        color: rgba(248, 246, 243, 0.5);
    }

    .mobile-accordion .form-group input:focus,
    .mobile-accordion .form-group select:focus,
    .mobile-accordion .form-group textarea:focus,
    .mobile-accordion .rsvp-form input:focus,
    .mobile-accordion .rsvp-form select:focus,
    .mobile-accordion .rsvp-form textarea:focus {
        border-color: var(--color-cream);
        background: rgba(248, 246, 243, 0.2);
        outline: none;
    }

    /* Custom checkbox for mobile accordion (cream theme) */
    .mobile-accordion .checkbox-label span::before {
        border-color: rgba(248, 246, 243, 0.4);
    }

    .mobile-accordion .checkbox-label input[type="checkbox"]:checked + span::before {
        background-color: var(--color-cream);
        border-color: var(--color-cream);
    }

    /* Hotels grid for mobile */
    .mobile-accordion .hotels-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Hotel cards styling for dark background */
    .mobile-accordion .hotel-card {
        background: rgba(248, 246, 243, 0.1);
        border: 1px solid rgba(248, 246, 243, 0.2);
    }

    .mobile-accordion .hotel-card h4,
    .mobile-accordion .hotel-card p {
        color: var(--color-cream);
    }

    /* Links styling for dark background */
    .mobile-accordion a {
        color: var(--color-cream);
        text-decoration: underline;
        text-decoration-color: rgba(248, 246, 243, 0.4);
    }

    .mobile-accordion a:hover {
        text-decoration-color: var(--color-cream);
    }

    /* Button styling for mobile accordion */
    .mobile-accordion .btn,
    .mobile-accordion button[type="submit"] {
        background: var(--color-cream);
        color: var(--color-sage);
        border: none;
        font-weight: 500;
    }

    .mobile-accordion .btn:hover,
    .mobile-accordion button[type="submit"]:hover {
        background: rgba(248, 246, 243, 0.9);
    }

    /* Hide rings animation on mobile */
    .rings-container {
        display: none !important;
    }

    /* Mobile navigation adjustments - override all base and other media query styles */
    .canvas-nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: auto !important;
        width: 100% !important;
        transform: none !important;
        background: rgba(255, 253, 250, 0.95) !important;
        z-index: 1000 !important;
        padding: 10px 0 !important;
        border-radius: 0 !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        box-sizing: border-box !important;
        gap: 0 !important;
        max-width: 100% !important;
        backdrop-filter: none !important;
    }

    .canvas-nav .nav-logo {
        margin: 0 !important;
        padding: 0 !important;
    }

    .canvas-nav .nav-logo img {
        height: 28px !important;
        width: auto !important;
    }

    .canvas-nav .nav-menu {
        display: none !important;
    }

    .canvas-nav .nav-toggle {
        display: none !important;
    }

    /* Ensure expanded state doesn't break mobile layout */
    .canvas-nav.expanded {
        flex-direction: row !important;
        border-radius: 0 !important;
        padding: 10px 0 !important;
    }

    /* Footer adjustments */
    .canvas-footer {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: auto !important;
        width: 100% !important;
        transform: none !important;
        background: rgba(255, 253, 250, 0.95) !important;
        padding: 8px 12px !important;
        border-radius: 0 !important;
        box-shadow: 0 -1px 4px rgba(0,0,0,0.06) !important;
        z-index: 1000 !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
        box-sizing: border-box !important;
        backdrop-filter: none !important;
    }

    .canvas-footer .footer-logo-link {
        display: flex !important;
        align-items: center !important;
    }

    .canvas-footer .footer-logo {
        height: 20px !important;
        width: auto !important;
    }

    .canvas-footer .footer-text {
        font-size: 0.6rem !important;
        color: var(--color-charcoal) !important;
        margin: 0 !important;
        opacity: 0.7 !important;
    }
}
