:root {
    --bg: #F0E6D2;
    --text: #3D2E1F;
    --text-secondary: #6B5B4E;
    --comp-1: #EDE4D0;
    --comp-2: #D4C4A8;
    --divider: #8B7355;
    --sticker-red: #C0392B;
    --sticker-navy: #2C3E6B;
    --sticker-teal: #1A9E8C;
    --brass: #B8952A;
    --brass-hover: #D4B84A;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Travel stickers */
.sticker {
    position: absolute;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
    color: #FFFFFF;
    transform: rotate(var(--sticker-rotate, 0deg));
    z-index: 5;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

.sticker-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid currentColor;
}

.sticker-rect {
    padding: 6px 12px;
    border-radius: 4px;
    border: 2px solid currentColor;
}

.sticker-red { background-color: var(--sticker-red); border-color: var(--sticker-red); }
.sticker-navy { background-color: var(--sticker-navy); border-color: var(--sticker-navy); }
.sticker-teal { background-color: var(--sticker-teal); border-color: var(--sticker-teal); }

.sticker-s1 { top: 8vh; right: 12vw; }
.sticker-s2 { top: 14vh; left: 8vw; }
.sticker-s3 { top: 140vh; right: 6vw; }
.sticker-s4 { top: 200vh; left: 4vw; }
.sticker-s5 { top: 320vh; right: 8vw; }
.sticker-s6 { top: 380vh; left: 6vw; }
.sticker-s7 { top: 260vh; left: 20vw; }
.sticker-s8 { top: 420vh; right: 14vw; }

.sticker-big {
    position: relative;
    width: 140px;
    height: 80px;
    margin: 30px auto;
    font-size: 11px;
    border-radius: 6px;
    padding: 12px;
}

.sticker-final {
    position: relative;
    margin-top: 30px;
    display: inline-flex;
    font-size: 10px;
}

/* Sections */
.section {
    position: relative;
    z-index: 2;
}

/* Section 1: Trunk Opens */
.section-open {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.open-content {
    text-align: center;
}

.open-title {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    font-size: 28px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text);
    margin-bottom: 16px;
    opacity: 0;
    animation: fade-in 1s ease 0.5s forwards;
}

.trunk-line {
    width: 0;
    height: 2px;
    background-color: var(--divider);
    margin: 0 auto 16px;
    animation: trunk-open 1s ease 0.2s forwards;
}

@keyframes trunk-open {
    to { width: 80vw; }
}

@keyframes fade-in {
    to { opacity: 1; }
}

.open-subtitle {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: 15px;
    color: var(--text-secondary);
    opacity: 0;
    animation: fade-in 1s ease 1.2s forwards;
}

/* Compartment Grid */
.compartment-grid {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    gap: 2px;
}

.base-grid {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "main side1"
        "main side2";
}

.main-pocket { grid-area: main; background-color: var(--comp-1); }
.side-pocket-1 { grid-area: side1; background-color: var(--comp-2); }
.side-pocket-2 { grid-area: side2; background-color: var(--comp-1); }

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

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

.main-pocket-top { background-color: var(--comp-1); }

/* Compartments */
.compartment {
    padding: 28px 24px;
    position: relative;
    border: 1px solid var(--divider);
}

.comp-equal {
    background-color: var(--comp-2);
}

.comp-equal:nth-child(2) {
    background-color: var(--comp-1);
}

/* Tag labels */
.tag-label {
    display: inline-block;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    background-color: var(--bg);
    padding: 2px 10px 2px 8px;
    border-radius: 0 8px 8px 0;
    border: 1px solid var(--divider);
    position: absolute;
    top: 8px;
    left: -1px;
}

.comp-heading {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text);
    margin-top: 20px;
    margin-bottom: 12px;
}

.comp-text {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 12px;
}

/* Straps */
.strap {
    max-width: 960px;
    margin: 0 auto;
    position: relative;
}

.strap-horizontal {
    height: 8px;
    background-color: var(--text-secondary);
    border-radius: 4px;
    margin: -1px auto 0;
    width: 80%;
}

/* Brass clasps */
.clasp-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.brass-clasp {
    display: inline-block;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text);
    background-color: var(--brass);
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.brass-clasp:hover {
    background-color: var(--brass-hover);
    box-shadow: inset 0 -1px 3px rgba(0,0,0,0.2);
}

/* Section 3: Middle */
.section-middle {
    min-height: 140vh;
    padding: 60px 0;
    position: relative;
}

.map-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        repeating-linear-gradient(to right, transparent, transparent 119px, var(--comp-2) 119px, var(--comp-2) 120px),
        repeating-linear-gradient(to bottom, transparent, transparent 119px, var(--comp-2) 119px, var(--comp-2) 120px);
    opacity: 0.3;
}

.customs-stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    opacity: 0.15;
    z-index: 0;
}

.stamp-ring {
    stroke-dasharray: 452;
    stroke-dashoffset: 452;
}

.stamp-ring.drawn {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.5s ease;
}

.section-middle .compartment-grid {
    position: relative;
    z-index: 1;
}

/* Section 4: Top */
.section-top {
    min-height: 120vh;
    padding: 60px 0;
}

/* Section 5: Close */
.section-close {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-content {
    text-align: center;
}

#trunk-line-close {
    animation: trunk-close 1s ease forwards;
    animation-play-state: paused;
    width: 80vw;
}

@keyframes trunk-close {
    from { width: 80vw; }
    to { width: 0; }
}

#trunk-line-close.animate {
    animation-play-state: running;
}

.close-text {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Fade-in */
[data-fade] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-fade].visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile */
@media (max-width: 768px) {
    .base-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "main"
            "side1"
            "side2";
    }

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

    .sticker {
        display: none;
    }

    .sticker-big,
    .sticker-final {
        display: flex;
    }

    .compartment-grid {
        padding: 20px 16px;
    }

    .strap-horizontal {
        width: 90%;
    }
}
