:root {
    --brand-navy: #1c4f9c;
    --brand-coral: #f1828d;
    --brand-silver: #d7d9e1;

    --bg-color: #f4f6fb;
    --bg-secondary: #ffffff;
    --text-primary: #1d2a44;
    --text-secondary: #566380;
    --accent: #f1828d;
    --accent-hover: #d96a77;
    --panel-border: rgba(28, 79, 156, 0.16);
    --nav-bg: rgba(244, 246, 251, 0.78);
    --glass-bg: rgba(255, 255, 255, 0.65);
    --shadow-color: rgba(28, 79, 156, 0.2);
    --texture-line: rgba(28, 79, 156, 0.06);
}

:root[data-theme="dark"] {
    --bg-color: #0d1730;
    --bg-secondary: #131f3d;
    --text-primary: #edf2ff;
    --text-secondary: #b5c0db;
    --accent: #ff9ba4;
    --accent-hover: #ffb4bb;
    --panel-border: rgba(215, 217, 225, 0.2);
    --nav-bg: rgba(13, 23, 48, 0.76);
    --glass-bg: rgba(19, 31, 61, 0.62);
    --shadow-color: rgba(0, 0, 0, 0.45);
    --texture-line: rgba(215, 217, 225, 0.08);
}

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

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 20%, rgba(241, 130, 141, 0.38), transparent 35%),
        radial-gradient(circle at 85% 15%, rgba(28, 79, 156, 0.35), transparent 38%),
        radial-gradient(circle at 75% 78%, rgba(215, 217, 225, 0.45), transparent 42%),
        linear-gradient(130deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
    animation: gradientDrift 16s ease-in-out infinite alternate;
}

.animated-bg::before,
.animated-bg::after {
    content: "";
    position: absolute;
    inset: -20%;
}

.animated-bg::before {
    background:
        repeating-linear-gradient(35deg,
            transparent 0,
            transparent 10px,
            var(--texture-line) 10px,
            var(--texture-line) 12px);
    opacity: 0.6;
    animation: textureSlide 25s linear infinite;
}

.animated-bg::after {
    background:
        radial-gradient(circle at 20% 40%, rgba(255, 255, 255, 0.18), transparent 35%),
        radial-gradient(circle at 80% 60%, rgba(28, 79, 156, 0.15), transparent 40%);
    mix-blend-mode: soft-light;
    opacity: 0.7;
}

.ambient-blob {
    position: absolute;
    width: var(--size);
    height: var(--size);
    left: var(--x);
    top: var(--y);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.5), rgba(241, 130, 141, 0.22));
    filter: blur(1px);
    opacity: 0.65;
    animation: ambientFloat var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes ambientFloat {
    0% {
        transform: translate3d(0, 0, 0) scale(0.95);
    }

    50% {
        transform: translate3d(20px, -30px, 0) scale(1.05);
    }

    100% {
        transform: translate3d(-10px, -60px, 0) scale(0.98);
    }
}

@keyframes gradientDrift {
    0% {
        transform: scale(1) translateY(0);
        filter: hue-rotate(0deg);
    }

    100% {
        transform: scale(1.1) translateY(-2%);
        filter: hue-rotate(-10deg);
    }
}

@keyframes textureSlide {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(120px);
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 100;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--panel-border);
}

.nav-content {
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-wrap {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--brand-silver);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.logo {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 23px;
    font-style: italic;
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    padding-top: 70px;
}

.hero-badge {
    margin-bottom: 24px;
}

.hero-badge img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--brand-silver);
    box-shadow: 0 20px 45px var(--shadow-color);
}

.script-title {
    font-family: 'Caveat', cursive;
    color: var(--accent);
    font-size: clamp(3rem, 6vw, 5rem);
    transform: rotate(-3deg);
    margin-bottom: -10px;
    position: relative;
    z-index: 1;
}

.main-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.subtitle {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 20px auto 40px auto;
    font-weight: 600;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(120deg, var(--accent), #ffb5bc);
    color: #1c2440;
    padding: 16px 36px;
    border-radius: 980px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(241, 130, 141, 0.35);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: scale(1.05) translateY(-3px);
    background: linear-gradient(120deg, var(--accent-hover), #ffd0d5);
    box-shadow: 0 14px 30px rgba(241, 130, 141, 0.4);
}

/* Gallery Section */
.gallery-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 20px;
    background: var(--glass-bg);
    border-radius: 40px;
    border: 1px solid var(--panel-border);
    box-shadow: 0 20px 45px var(--shadow-color);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.section-title p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--bg-secondary);
    aspect-ratio: 4 / 5;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.45),
        0 10px 26px rgba(8, 17, 36, 0.2),
        0 0 28px rgba(241, 130, 141, 0.26);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.35s ease;
}

.gallery-item::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 18px;
    background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.28), rgba(28, 79, 156, 0.08));
    filter: blur(10px);
    opacity: 0.75;
    z-index: -1;
    transition: opacity 0.35s ease;
}

.gallery-item:hover {
    transform: translateY(-8px) rotate(1deg);
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 35px rgba(8, 17, 36, 0.25);
}

.gallery-item:hover::before {
    opacity: 0.25;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.postcard-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(7, 12, 24, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 400;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.postcard-modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.postcard-shell {
    width: min(1050px, 100%);
    min-height: min(650px, 85vh);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(241, 130, 141, 0.12));
    box-shadow: 0 28px 50px rgba(0, 0, 0, 0.35);
    position: relative;
}

:root[data-theme="dark"] .postcard-shell {
    background:
        linear-gradient(145deg, rgba(18, 31, 60, 0.95), rgba(241, 130, 141, 0.14));
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    background: rgba(12, 20, 40, 0.72);
    color: #ffffff;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 8px 14px;
    cursor: pointer;
    transition: transform 0.25s ease, background-color 0.25s ease;
    z-index: 2;
}

.modal-close:hover {
    transform: translateY(-2px);
    background: rgba(12, 20, 40, 0.9);
}

.postcard-copy {
    padding: clamp(30px, 4vw, 44px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        linear-gradient(165deg, rgba(255, 255, 255, 0.82), rgba(215, 217, 225, 0.65));
    border-right: 1px dashed rgba(28, 79, 156, 0.3);
}

:root[data-theme="dark"] .postcard-copy {
    background:
        linear-gradient(165deg, rgba(15, 27, 52, 0.9), rgba(24, 39, 72, 0.72));
    border-right-color: rgba(215, 217, 225, 0.26);
}

.postcard-kicker {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 12px;
}

#postcard-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 3.8vw, 3.1rem);
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 16px;
}

#postcard-description {
    color: var(--text-secondary);
    font-size: clamp(1rem, 1.6vw, 1.18rem);
    margin-bottom: 20px;
    max-width: 42ch;
}

.postcard-file {
    font-size: 0.82rem;
    color: var(--text-secondary);
    opacity: 0.82;
    margin-bottom: 18px;
    word-break: break-word;
}

.postcard-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.postcard-meta span {
    border-radius: 999px;
    border: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-primary);
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 700;
}

:root[data-theme="dark"] .postcard-meta span {
    background: rgba(8, 15, 32, 0.6);
}

.postcard-photo-wrap {
    background: #0f1f43;
    min-height: 100%;
}

.postcard-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Footer Section */
footer {
    background-color: transparent;
    padding: 80px 20px;
    text-align: center;
    margin-top: 40px;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.logo-footer {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    font-style: italic;
    margin-bottom: 15px;
    color: var(--accent);
}

.footer-mark {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--brand-silver);
    box-shadow: 0 14px 34px var(--shadow-color);
    margin-bottom: 18px;
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.contact-form-wrap {
    width: min(860px, 100%);
    margin: 28px auto 0 auto;
    padding: clamp(14px, 2.6vw, 24px);
    border-radius: 18px;
    border: 1px solid var(--panel-border);
    background: var(--glass-bg);
    box-shadow: 0 14px 28px var(--shadow-color);
    text-align: left;
}

.contact-form-wrap h4 {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    margin-bottom: 6px;
}

.contact-form-note {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.contact-form-wrap iframe {
    width: 100%;
    min-height: 620px;
    border: 0;
    border-radius: 12px;
    background: #ffffff;
}

.contact-form-link-row {
    margin-top: 12px;
}

.contact-form-link-row a {
    color: var(--brand-navy);
    font-weight: 700;
    text-decoration: none;
}

.contact-form-link-row a:hover {
    color: var(--accent);
}

.copyright {
    margin-top: 30px;
    font-size: 0.9rem;
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.165, 0.84, 0.44, 1), transform 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item.reveal {
    transition-delay: 0.1s;
}

@media (prefers-reduced-motion: reduce) {
    .animated-bg,
    .animated-bg::before,
    .ambient-blob,
    .reveal,
    .cta-button,
    .gallery-item,
    .gallery-item img,
    .postcard-modal,
    .gallery-item::before {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: flex;
        gap: 14px;
        flex-wrap: nowrap;
        flex-shrink: 0;
    }

    .nav-links a {
        font-size: 0.93rem;
    }

    .nav-content {
        padding: 0 12px;
        gap: 10px;
    }

    .logo {
        font-size: 0.98rem;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .main-title {
        font-size: 3rem;
    }

    .script-title {
        font-size: 3rem;
    }

    .gallery-section {
        border-radius: 20px;
        padding: 50px 15px;
    }

    .hero-badge img {
        width: 96px;
        height: 96px;
    }

    .postcard-modal {
        padding: 14px;
    }

    .postcard-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .postcard-copy {
        order: 2;
        border-right: none;
        border-top: 1px dashed rgba(28, 79, 156, 0.3);
    }

    :root[data-theme="dark"] .postcard-copy {
        border-top-color: rgba(215, 217, 225, 0.24);
    }

    .postcard-photo-wrap {
        order: 1;
        max-height: 45vh;
    }

    .contact-form-wrap {
        padding: 14px;
    }

    .contact-form-wrap iframe {
        min-height: 560px;
    }
}

@media (max-width: 420px) {
    .logo {
        display: none;
    }

    .nav-links {
        gap: 10px;
    }

    .nav-links a {
        font-size: 0.88rem;
    }
}