/* =====================================================
   F & G - Romantic Ottawa Map
   Color Palette: Deep Burgundy/Wine Theme
   ===================================================== */

:root {
    /* Primary Colors */
    --burgundy-dark: #4a1c24;
    --burgundy: #722f37;
    --burgundy-light: #8b3a44;
    --wine: #59343b;

    /* Accent Colors */
    --rose: #e8a4b8;
    --rose-light: #f5d5de;
    --cream: #fff8f0;
    --gold: #d4a574;

    /* Neutrals */
    --text-dark: #2d1f21;
    --text-light: #fff8f0;

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Lato', -apple-system, sans-serif;

    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--burgundy-dark);
    color: var(--text-light);
    overflow-x: hidden;
    min-height: 100vh;
}

/* =====================================================
   INTRO SECTION - Opening Animation
   ===================================================== */

.intro-section {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--burgundy-dark) 0%, var(--burgundy) 50%, var(--wine) 100%);
    z-index: 100;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.intro-section.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro-content {
    text-align: center;
    z-index: 10;
}

/* Initials SVG Animation */
.initials-container {
    margin-bottom: 2rem;
}

.initials-svg {
    width: min(400px, 90vw);
    height: auto;
    overflow: visible;
}

.letter {
    font-family: var(--font-display);
    font-size: 100px;
    font-weight: 600;
    fill: var(--cream);
    opacity: 0;
    animation: fadeInLetter 1.2s ease-out forwards;
}

.letter-f {
    animation-delay: 0.3s;
}

.letter-g {
    animation-delay: 0.6s;
}

@keyframes fadeInLetter {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Heart Animation */
.heart-group {
    opacity: 0;
    animation: heartBeat 1.5s ease-out 0.9s forwards;
}

.heart {
    transform-origin: center;
}

@keyframes heartBeat {
    0% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        opacity: 1;
        transform: scale(1.3);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Tagline */
.tagline {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--rose-light);
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 1.4s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enter Button */
.enter-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--burgundy-dark);
    background: linear-gradient(135deg, var(--cream) 0%, var(--rose-light) 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 1.8s forwards, pulse 2s ease-in-out 2.6s infinite;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.enter-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(232, 164, 184, 0.4);
    background: linear-gradient(135deg, var(--rose-light) 0%, var(--rose) 100%);
}

.enter-button .arrow-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.enter-button:hover .arrow-icon {
    transform: translateX(5px);
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    50% {
        box-shadow: 0 4px 30px rgba(232, 164, 184, 0.5);
    }
}

/* Floating Hearts Background */
.floating-hearts {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.floating-heart {
    position: absolute;
    bottom: -50px;
    left: var(--left);
    font-size: 1.5rem;
    color: var(--rose);
    opacity: 0.3;
    animation: floatUp 8s ease-in-out var(--delay) infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.3;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* =====================================================
   MAP SECTION
   ===================================================== */

.map-section {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: var(--burgundy-dark);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-out 0.3s, visibility 0.8s ease-out 0.3s;
}

.map-section.visible {
    opacity: 1;
    visibility: visible;
}

.map-header {
    padding: 1.5rem 2rem;
    text-align: center;
    background: linear-gradient(180deg, var(--burgundy-dark) 0%, transparent 100%);
    position: relative;
    z-index: 10;
}

.map-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 500;
    color: var(--cream);
    margin-bottom: 0.5rem;
}

.map-header p {
    font-size: 0.95rem;
    color: var(--rose-light);
    font-weight: 300;
    letter-spacing: 0.05em;
}

.map-container {
    flex: 1;
    width: 100%;
    z-index: 1;
}

/* Tint map tiles to match burgundy theme */
.leaflet-tile-pane {
    filter: sepia(30%) hue-rotate(-15deg) saturate(90%) brightness(85%);
}

/* Back Button */
.back-button {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--cream);
    background: rgba(74, 28, 36, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--rose);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 1000;
}

.back-button svg {
    width: 18px;
    height: 18px;
}

.back-button:hover {
    background: var(--burgundy);
    transform: translateX(-3px);
}

/* =====================================================
   LEAFLET CUSTOM STYLES
   ===================================================== */

/* Custom Marker */
.custom-marker {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #ff2d55;
    filter: drop-shadow(0 2px 6px rgba(255, 45, 85, 0.4));
    transition: transform 0.3s ease, filter 0.3s ease;
    cursor: pointer;
}

.custom-marker:hover {
    transform: scale(1.3);
    filter: drop-shadow(0 4px 8px rgba(232, 164, 184, 0.5));
}

/* Custom Popup */
.leaflet-popup-content-wrapper {
    background: linear-gradient(135deg, var(--burgundy-dark) 0%, var(--wine) 100%);
    border-radius: 16px;
    border: 1px solid var(--rose);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0;
    min-width: 250px;
}

.leaflet-popup-tip {
    background: var(--wine);
    border: 1px solid var(--rose);
}

.leaflet-popup-close-button {
    color: var(--cream) !important;
    font-size: 20px !important;
    padding: 8px 10px !important;
}

.leaflet-popup-close-button:hover {
    color: var(--rose) !important;
}

/* Popup Content */
.popup-content {
    text-align: center;
}

.popup-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.popup-text {
    padding: 1rem;
}

.popup-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--cream);
    margin-bottom: 0.5rem;
}

.popup-description {
    font-size: 0.85rem;
    color: var(--rose-light);
    font-weight: 300;
    line-height: 1.5;
}

/* Map Controls */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

.leaflet-control-zoom a {
    background: var(--burgundy) !important;
    color: var(--cream) !important;
    border: 1px solid var(--rose) !important;
    transition: var(--transition-smooth);
}

.leaflet-control-zoom a:hover {
    background: var(--burgundy-light) !important;
}

.leaflet-control-zoom-in {
    border-radius: 8px 8px 0 0 !important;
}

.leaflet-control-zoom-out {
    border-radius: 0 0 8px 8px !important;
}

/* Attribution */
.leaflet-control-attribution {
    background: rgba(74, 28, 36, 0.8) !important;
    color: var(--rose-light) !important;
    font-size: 10px;
}

.leaflet-control-attribution a {
    color: var(--rose) !important;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 768px) {
    .initials-svg {
        width: 300px;
    }

    .letter {
        font-size: 80px;
    }

    .tagline {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .enter-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    .map-header h1 {
        font-size: 1.5rem;
    }

    .map-header p {
        font-size: 0.85rem;
    }

    .back-button {
        bottom: 1.5rem;
        left: 1rem;
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .popup-image {
        height: 120px;
    }

    .leaflet-popup-content {
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .initials-svg {
        width: 260px;
    }

    .letter {
        font-size: 65px;
    }

    .heart-group {
        transform: translate(175, 75) scale(0.8);
    }

    .map-header {
        padding: 1rem;
    }
}