:root {
    --deep-ocean: #0b3d5c;
    --lagoon: #1a7ba8;
    --seafoam: #5ec4c8;
    --coral-glow: #f5a072;
    --pearl: #f0f5f8;
    --sky-wash: #e3eff6;
    --deep-ink: #0a2a3d;
    --champagne: #f8e8d0;
    --muted-ocean: #2a4f68;
    --soft-teal: #6a9bb5;
    --deep-aqua: #d4eaf5;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--pearl);
    color: var(--muted-ocean);
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(1.05rem, 1.2vw, 1.2rem);
    line-height: 1.72;
    overflow-x: hidden;
    position: relative;
}

/* ---- Navigation ---- */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(24px, 4vw, 64px);
    z-index: 100;
    transition: background 600ms ease, box-shadow 600ms ease;
}

#nav.scrolled {
    background: rgba(240, 245, 248, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(11, 61, 92, 0.06);
}

.nav-wordmark {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    font-size: clamp(0.9rem, 1.4vw, 1.1rem);
    letter-spacing: 0.18em;
    color: var(--deep-ocean);
    text-transform: uppercase;
}

.nav-menu {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: clamp(0.72rem, 0.85vw, 0.88rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--deep-ocean);
    cursor: pointer;
    position: relative;
}

.nav-menu::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--seafoam);
    transition: width 400ms ease;
}

.nav-menu:hover::after {
    width: 100%;
}

/* ---- Opening Section ---- */
#opening {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.opening-wordmark {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    letter-spacing: 0.18em;
    color: var(--deep-ocean);
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeRise 1200ms cubic-bezier(0.23, 1, 0.32, 1) 300ms forwards;
}

.opening-line {
    width: 2px;
    height: 30vh;
    margin-top: 24px;
    opacity: 0;
    animation: fadeIn 600ms ease 1000ms forwards;
}

#invite-line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawLine 2000ms cubic-bezier(0.23, 1, 0.32, 1) 1200ms forwards;
}

@keyframes fadeRise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

/* ---- Watermarks ---- */
.watermark {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(8rem, 20vw, 18rem);
    color: var(--deep-ocean);
    opacity: 0.04;
    position: absolute;
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
    line-height: 1;
}

.watermark-1 {
    top: 110vh;
    left: -5vw;
}

.watermark-2 {
    top: 320vh;
    right: -5vw;
}

.watermark-3 {
    top: 520vh;
    left: 10vw;
}

/* ---- Archipelagos ---- */
.archipelago {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: clamp(80px, 10vh, 200px) 0;
    z-index: 1;
}

.archipelago-left {
    padding-left: 12vw;
    padding-right: 6vw;
}

.archipelago-right {
    padding-right: 12vw;
    padding-left: 6vw;
    justify-content: flex-end;
}

.arch-content {
    max-width: 680px;
    position: relative;
    z-index: 2;
}

.display-heading {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(2.8rem, 5.5vw, 5.2rem);
    color: var(--deep-ocean);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.body-text {
    color: var(--muted-ocean);
    max-width: 38em;
    margin-bottom: 1.2rem;
}

.caption {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: clamp(0.72rem, 0.85vw, 0.88rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--soft-teal);
    margin-top: 2rem;
}

/* ---- Reveal Animation ---- */
.reveal-item {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 800ms cubic-bezier(0.23, 1, 0.32, 1),
                transform 800ms cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Collage Fragments (torn paper beside text) ---- */
.collage-fragment {
    position: absolute;
    z-index: 1;
}

.collage-torn-1 {
    width: clamp(180px, 22vw, 350px);
    height: clamp(200px, 25vw, 400px);
    right: 10vw;
    top: 15%;
    background: linear-gradient(135deg, rgba(26, 123, 168, 0.15), rgba(245, 160, 114, 0.1));
    clip-path: polygon(5% 0%, 98% 3%, 100% 45%, 95% 97%, 2% 100%, 0% 52%);
    border-radius: 4px;
}

.collage-torn-3 {
    width: clamp(140px, 18vw, 280px);
    height: clamp(160px, 20vw, 320px);
    left: 8vw;
    top: 20%;
    background: var(--sky-wash);
    clip-path: polygon(3% 2%, 97% 0%, 100% 48%, 96% 100%, 0% 97%, 2% 50%);
}

.collage-torn-6 {
    width: clamp(160px, 20vw, 300px);
    height: clamp(180px, 22vw, 340px);
    right: 8vw;
    top: 10%;
    background: linear-gradient(180deg, var(--champagne), rgba(94, 196, 200, 0.2));
    clip-path: polygon(4% 1%, 96% 4%, 100% 50%, 97% 98%, 1% 100%, 0% 48%);
}

/* ---- Collage Gallery Zones ---- */
.collage-zone {
    position: relative;
    width: 100vw;
    height: 60vh;
    overflow: hidden;
    z-index: 1;
}

.collage-shape {
    position: absolute;
    transition: transform 400ms cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 400ms ease;
}

.collage-shape:hover {
    transform: translate(4px, -4px);
    box-shadow: 0 8px 32px rgba(11, 61, 92, 0.08);
}

/* Zone 1 shapes */
.shape-circle-1 {
    width: clamp(120px, 18vw, 300px);
    height: clamp(120px, 18vw, 300px);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--lagoon), var(--seafoam));
    opacity: 0.7;
    top: 10%;
    left: 8%;
}

.shape-pill-1 {
    width: clamp(200px, 25vw, 400px);
    height: clamp(80px, 8vw, 120px);
    border-radius: 999px;
    background: linear-gradient(90deg, var(--champagne), var(--coral-glow));
    opacity: 0.5;
    top: 35%;
    left: 30%;
    transform: rotate(2deg);
}

.shape-torn-2 {
    width: clamp(160px, 20vw, 320px);
    height: clamp(180px, 22vw, 360px);
    background: var(--sky-wash);
    clip-path: polygon(2% 4%, 95% 0%, 100% 52%, 98% 100%, 3% 96%, 0% 44%);
    opacity: 0.6;
    top: 5%;
    right: 15%;
    transform: rotate(-3deg);
}

.shape-rect-1 {
    width: clamp(100px, 14vw, 220px);
    height: clamp(140px, 18vw, 280px);
    background: linear-gradient(135deg, rgba(26, 123, 168, 0.15), rgba(245, 160, 114, 0.1));
    border-radius: 12px;
    top: 40%;
    right: 8%;
    transform: rotate(1deg);
}

.shape-circle-2 {
    width: clamp(80px, 10vw, 160px);
    height: clamp(80px, 10vw, 160px);
    border-radius: 50%;
    background: var(--seafoam);
    opacity: 0.3;
    bottom: 10%;
    left: 45%;
}

/* Zone 2 shapes */
.shape-circle-3 {
    width: clamp(140px, 20vw, 340px);
    height: clamp(140px, 20vw, 340px);
    border-radius: 50%;
    background: linear-gradient(180deg, var(--deep-aqua), var(--seafoam));
    opacity: 0.5;
    top: 8%;
    right: 10%;
}

.shape-torn-4 {
    width: clamp(180px, 22vw, 360px);
    height: clamp(200px, 24vw, 380px);
    background: var(--champagne);
    opacity: 0.4;
    clip-path: polygon(6% 2%, 94% 5%, 100% 46%, 97% 98%, 4% 100%, 0% 50%);
    top: 15%;
    left: 5%;
    transform: rotate(-2deg);
}

.shape-pill-2 {
    width: clamp(160px, 20vw, 320px);
    height: clamp(60px, 7vw, 100px);
    border-radius: 999px;
    background: linear-gradient(90deg, var(--lagoon), var(--seafoam));
    opacity: 0.4;
    bottom: 20%;
    right: 20%;
    transform: rotate(3deg);
}

.shape-rect-2 {
    width: clamp(120px, 16vw, 260px);
    height: clamp(100px, 12vw, 200px);
    background: linear-gradient(135deg, rgba(245, 160, 114, 0.2), rgba(248, 232, 208, 0.4));
    border-radius: 16px;
    bottom: 15%;
    left: 25%;
    transform: rotate(-1deg);
}

.shape-circle-4 {
    width: clamp(60px, 8vw, 120px);
    height: clamp(60px, 8vw, 120px);
    border-radius: 50%;
    background: var(--coral-glow);
    opacity: 0.3;
    top: 50%;
    left: 55%;
}

.shape-torn-5 {
    width: clamp(100px, 14vw, 200px);
    height: clamp(120px, 16vw, 240px);
    background: var(--sky-wash);
    opacity: 0.5;
    clip-path: polygon(3% 0%, 100% 4%, 97% 52%, 100% 100%, 0% 96%, 4% 48%);
    top: 5%;
    left: 42%;
    transform: rotate(2deg);
}

/* ---- Flowing Curves ---- */
.flowing-curve {
    position: absolute;
    width: 100%;
    height: 300px;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

.curve-1 {
    top: 10%;
    opacity: 0.6;
}

.curve-divider {
    width: 100%;
    padding: clamp(40px, 5vh, 80px) 0;
    position: relative;
    z-index: 1;
}

.curve-divider svg {
    width: 100%;
    height: 80px;
    display: block;
}

.curve-animate {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: flowCurve 12s linear infinite;
}

@keyframes flowCurve {
    0% { stroke-dashoffset: 2000; }
    50% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -2000; }
}

/* ---- Links ---- */
a {
    color: var(--lagoon);
    text-decoration: none;
    background-image: linear-gradient(var(--seafoam), var(--seafoam));
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0% 1px;
    transition: color 400ms ease, background-size 400ms ease;
}

a:hover {
    color: var(--seafoam);
    background-size: 100% 1px;
}

/* ---- Footer ---- */
#footer {
    background: var(--deep-ink);
    padding: clamp(60px, 8vh, 120px) clamp(24px, 6vw, 80px);
    margin-top: clamp(80px, 10vh, 200px);
}

.footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.footer-wordmark {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    letter-spacing: 0.18em;
    color: var(--pearl);
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-link {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.72rem, 0.85vw, 0.88rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--soft-teal);
    background-image: linear-gradient(var(--seafoam), var(--seafoam));
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0% 1px;
    transition: color 400ms ease, background-size 400ms ease;
}

.footer-link:hover {
    color: var(--seafoam);
    background-size: 100% 1px;
}

.footer-note {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: 0.85rem;
    color: var(--soft-teal);
    opacity: 0.6;
    margin-top: 8px;
}

/* ---- Background Pattern ---- */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ---- Mobile Responsive ---- */
@media (max-width: 768px) {
    .archipelago-left,
    .archipelago-right {
        padding-left: 6vw;
        padding-right: 6vw;
        justify-content: center;
    }

    .arch-content {
        max-width: 100%;
    }

    .collage-fragment {
        display: none;
    }

    .watermark {
        font-size: clamp(5rem, 15vw, 10rem);
    }

    .display-heading {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

    .collage-zone {
        height: 40vh;
    }
}
