:root {
    --bg-paper: #fdfbf7;
    --ink-blue: #2c3e50;
    --blueprint-line: #e3f2fd;
    --accent-gold: #d4af37;
    --soft-pink: #ffe0e6;
    --deep-rose: #d81b60;
    --font-heading: 'Cinzel', serif;
    --font-hand: 'Pacifico', cursive;
    --font-body: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-paper);
    color: var(--ink-blue);
    font-family: var(--font-body);
    overflow-x: hidden;

    /* Paper Texture */
    .paper-texture {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('assets/bg.png');
        opacity: 0.1;
        pointer-events: none;
        z-index: 0;
        filter: invert(1);
        background-size: cover;
    }

    /* Grid */
    .grid-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background:
            linear-gradient(90deg, #e3f2fd 1px, transparent 1px),
            linear-gradient(#e3f2fd 1px, transparent 1px);
        background-size: 20px 20px;
        opacity: 0.4;
        pointer-events: none;
        z-index: 0;
    }

    nav {
        display: flex;
        justify-content: space-between;
        padding: 1rem 5%;
        align-items: center;
        position: relative;
        z-index: 10;
        background: rgba(253, 251, 247, 0.9);
        backdrop-filter: blur(5px);
        position: sticky;
        top: 0;
    }

    .brand {
        font-family: var(--font-heading);
        color: var(--ink-blue);
        font-weight: 700;
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .brand .icon {
        color: var(--deep-rose);
        font-size: 1.4rem;
    }

    .date-badge {
        background: white;
        border: 1px solid var(--ink-blue);
        padding: 0.4rem 0.8rem;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 600;
        box-shadow: 2px 2px 0 var(--ink-blue);
    }

    /* Hero Section */
    .hero {
        min-height: 90vh;
        /* Better on mobile */
        display: flex;
        align-items: center;
        padding: 2rem 10% 4rem;
        /* Added bottom padding */
        position: relative;
        z-index: 2;
        gap: 2rem;
    }

    .hero-content {
        flex: 1;
        z-index: 5;
    }

    .tagline {
        font-family: var(--font-hand);
        color: var(--deep-rose);
        font-size: 1.5rem;
        transform: rotate(-2deg);
        display: inline-block;
        margin-bottom: 0.5rem;
    }

    .reveal-text {
        font-family: var(--font-heading);
        font-size: clamp(2.5rem, 5vw, 4.5rem);
        /* Responsive typography */
        line-height: 1.1;
        margin: 0.5rem 0 1rem;
        color: var(--ink-blue);
    }

    .subtitle {
        font-size: 1.1rem;
        color: #546e7a;
        margin-bottom: 2rem;
        max-width: 400px;
    }

    /* CSS Tape Effect */
    .tape {
        background-color: rgba(255, 255, 255, 0.6);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
        width: 100px;
        height: 30px;
        position: absolute;
        top: -10px;
        left: 40%;
        transform: rotate(-3deg);
        z-index: 5;
        opacity: 0.7;
        backdrop-filter: blur(2px);
    }

    .love-note-card {
        background: #fff;
        padding: 1.5rem;
        border: 1px solid #ddd;
        box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.08);
        /* Softer shadow */
        position: relative;
        max-width: 100%;
        width: 350px;
        transform: rotate(1deg);
        border-radius: 2px;
    }

    .pin {
        width: 15px;
        height: 15px;
        background: var(--deep-rose);
        border-radius: 50%;
        position: absolute;
        top: -7px;
        left: 50%;
        transform: translateX(-50%);
        box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    }

    .love-note-card p {
        font-family: var(--font-hand);
        font-size: 1.2rem;
        color: #333;
        line-height: 1.4;
        text-align: center;
    }

    /* Hero Visual - Polaroids */
    .hero-visual {
        flex: 1;
        position: relative;
        height: 450px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .polaroid-frame {
        background: white;
        padding: 0.8rem 0.8rem 3rem 0.8rem;
        /* Authentic polaroid padding */
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
        position: absolute;
        transition: transform 0.3s ease;
        width: 240px;
        border-radius: 2px;
    }

    .polaroid-frame:hover {
        transform: scale(1.05) rotate(0deg) !important;
        z-index: 20;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    }

    /* Tape on Polaroids */
    .polaroid-frame::after {
        content: '';
        position: absolute;
        top: -12px;
        left: 50%;
        transform: translateX(-50%) rotate(2deg);
        width: 80px;
        height: 25px;
        background: rgba(255, 255, 255, 0.8);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        opacity: 0.8;
    }

    .sketch-img {
        width: 100%;
        height: 200px;
        /* Fixed height for consistency */
        object-fit: contain;
        /* Don't crop, fit nicely */
        background: #fafafa;
        filter: sepia(0.2) contrast(1.1);
        display: block;
        border: 1px solid #eee;
    }

    .caption {
        position: absolute;
        bottom: 0.8rem;
        left: 0;
        width: 100%;
        text-align: center;
        font-family: 'Courier New', monospace;
        font-size: 0.9rem;
        color: #444;
    }

    .p1 {
        transform: rotate(-6deg) translateX(-40px);
        z-index: 1;
    }

    .p2 {
        transform: rotate(6deg) translateX(40px) translateY(20px);
        z-index: 2;
    }

    /* Blueprint / Floor Plan */
    .blueprint-section {
        padding: 6rem 10%;
        background: white;
        position: relative;
    }

    .section-title {
        text-align: center;
        font-family: var(--font-heading);
        margin-bottom: 3rem;
        font-size: clamp(1.8rem, 4vw, 2.5rem);
    }

    .floor-plan-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 2rem;
    }

    .room-card {
        background: var(--bg-paper);
        border: 2px dashed var(--blueprint-line);
        padding: 2rem;
        border-radius: 15px;
        text-align: center;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    /* Hover sticker effect */
    .room-card::before {
        content: '♥';
        position: absolute;
        top: -20px;
        right: -20px;
        font-size: 5rem;
        color: var(--soft-pink);
        opacity: 0;
        transition: 0.3s;
        transform: rotate(20deg);
    }

    .room-card:hover::before {
        opacity: 0.3;
        top: -10px;
        right: -10px;
    }

    .room-card:hover {
        border-color: var(--accent-gold);
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    }

    .room-card .icon {
        font-size: 3rem;
        margin-bottom: 1rem;
        display: block;
    }

    .room-card h3 {
        font-family: var(--font-heading);
        margin-bottom: 0.5rem;
    }

    /* Support Section */
    .support-section {
        padding: 6rem 10%;
        text-align: center;
        background: var(--soft-pink);
    }

    .support-container {
        background: white;
        padding: 3rem 2rem;
        border-radius: 20px;
        box-shadow: 0 10px 40px rgba(216, 27, 96, 0.1);
        max-width: 600px;
        margin: 0 auto;
        position: relative;
    }

    /* Sticker on support card */
    .support-container::before {
        content: '';
        position: absolute;
        top: -15px;
        right: 20px;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: var(--accent-gold);
        opacity: 0.8;
        z-index: -1;
    }

    .rainy-day-graphic {
        font-size: 3rem;
        margin-bottom: 1rem;
        display: inline-block;
    }

    .btn-soft {
        background: var(--deep-rose);
        color: white;
        border: none;
        padding: 1rem 3rem;
        border-radius: 50px;
        font-size: 1.1rem;
        margin-top: 2rem;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 5px 15px rgba(216, 27, 96, 0.3);
        transition: 0.3s;
        width: 100%;
        /* Full width on mobile mostly */
        max-width: 300px;
    }

    .btn-soft:hover {
        transform: scale(1.05);
    }

    /* Overlay */
    .comfort-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(44, 62, 80, 0.95);
        z-index: 1000;
        display: flex;
        justify-content: center;
        align-items: center;
        transition: opacity 0.4s;
        padding: 1rem;
        /* Padding for mobile */
    }

    .comfort-overlay.hidden {
        opacity: 0;
        pointer-events: none;
    }

    .notebook-page {
        background: white;
        width: 100%;
        max-width: 500px;
        min-height: 400px;
        /* Fixed height for consistency */
        padding: 3rem 1.5rem 3rem 3rem;
        /* Adjusted for smaller screens */
        border-radius: 5px;
        position: relative;
        box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.3);
        background-image: linear-gradient(#e1f5fe 1px, transparent 1px);
        background-size: 100% 1.5em;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .holes {
        position: absolute;
        left: 10px;
        top: 0;
        bottom: 0;
        width: 25px;
        border-right: 2px solid #eee;
        background: radial-gradient(circle at 50% 1.5em, #333 4px, transparent 5px);
        background-size: 100% 3em;
    }

    .handwritten-quote {
        font-family: var(--font-hand);
        font-size: clamp(1.5rem, 4vw, 2rem);
        color: var(--ink-blue);
        text-align: center;
        line-height: 1.6;
    }

    .close-btn {
        position: absolute;
        top: 1rem;
        right: 1rem;
        color: white;
        font-size: 2.5rem;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        /* Larger touch target */
    }

    .btn-secondary {
        position: absolute;
        bottom: -60px;
        right: 0;
        left: 0;
        /* Center on mobile */
        margin: 0 auto;
        width: max-content;
        background: white;
        color: var(--ink-blue);
        border: none;
        padding: 0.8rem 2rem;
        border-radius: 30px;
        cursor: pointer;
        font-weight: 600;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    footer {
        padding: 4rem 10%;
        text-align: center;
        font-size: 0.8rem;
        font-family: monospace;
        color: #666;
        background: white;
    }

    /* ================= Mobile Responsiveness ================= */
    @media (max-width: 768px) {

        /* Navigation */
        nav {
            padding: 1rem;
        }

        .brand {
            font-size: 1rem;
        }

        /* Hero Section */
        .hero {
            flex-direction: column;
            text-align: center;
            padding-top: 2rem;
        }

        .hero-content {
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            order: 1;
            /* Content first */
        }

        .love-note-card {
            transform: rotate(1deg) scale(0.95);
            margin-top: 1rem;
        }

        .hero-visual {
            width: 100%;
            height: 350px;
            /* Reduce height for mobile */
            order: 2;
            /* Visual second */
            margin-top: 1rem;
        }

        .polaroid-frame {
            width: 180px;
            /* Smaller polaroids */
        }

        .p1 {
            transform: rotate(-5deg) translateX(-25px);
            left: 50%;
            margin-left: -90px;
        }

        .p2 {
            transform: rotate(5deg) translateX(25px) translateY(15px);
            left: 50%;
            margin-left: -90px;
        }

        /* Blueprint Section */
        .blueprint-section,
        .support-section {
            padding: 4rem 1rem;
            /* Less padding on sides */
        }

        .section-title {
            margin-bottom: 2rem;
        }

        .room-card {
            padding: 1.5rem;
        }

        /* Support Section */
        .support-container {
            padding: 2rem 1.5rem;
        }

        .rainy-day-graphic {
            font-size: 2.5rem;
        }

        /* Comfort Overlay */
        .notebook-page {
            padding: 2rem 1rem 2rem 2.5rem;
            /* Tighter padding */
            min-height: 350px;
        }

        .btn-secondary {
            bottom: -70px;
            width: 80%;
            /* Wider button on mobile */
        }

        .close-btn {
            top: 0.5rem;
            right: 0.5rem;
        }
    }

    @media (max-width: 380px) {

        /* Very small devices */
        .reveal-text {
            font-size: 2.2rem;
        }

        .polaroid-frame {
            width: 150px;
        }

        .hero-visual {
            height: 300px;
        }
    }