/* ============================================
   Wedding Invitation - Elegant Minimal Design
   Inspired by camillemormal.com
   ============================================ */

/* Font chữ ký / tên: SFU Edwardian Script (file trong fonts/SFUEdwardianScript.TTF) */
@font-face {
    font-family: 'SFU Edwardian Script';
    src: url('fonts/SFUEdwardianScript.TTF') format('truetype'),
         local('SFU Edwardian Script'), local('SFUEdwardianScript'), local('SFU Edwardian Script Regular'), local('SFUEdwardianScriptRegular');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Font đề mục / label */
@font-face {
    font-family: 'Ganh Type';
    src: url('fonts/ganh-type-thin.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Ganh Type';
    src: url('fonts/ganh-type-regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Viaoda Libre';
    src: url('fonts/ViaodaLibre-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Coolvetica';
    src: url('fonts/Coolvetica-Rg.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* CSS Custom Properties */
:root {
    --color-bg: #F4EFE6; /* Nền trang chính (đổi màu nền toàn site tại đây) */
    --color-bg-alt: #EDE8E0; /* Nền section xen kẽ – kem ấm hơn, đỡ trống */
    --color-bg-dark: #1a1a1a;
    /* Màu chữ: xanh như phong bì #45503B (trừ tên cô dâu chú rể giữ tối) */
    --color-envelope: #45503B;
    --color-envelope-dark: #2d3326; /* Rêu đậm hơn cho menu, dễ đọc */
    --color-text: #45503B;
    --color-text-light: #5a6b4a;
    --color-text-dark: #2d2d2d; /* Dùng cho tên Thịnh & Phương Anh khi muốn không xanh */
    --color-accent: #45503B;
    --color-accent-light: #c4b5a0;
    --color-cream: #f5f0e8;
    --color-sage: #9caa97;
    --color-blush: #e8d5d0;
    --color-gold: #755819;
    
    --font-display: 'Italiana', serif;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Josefin Sans', sans-serif;
    --font-label: 'Ganh Type', var(--font-body); /* Đề mục, label */
    
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Khoảng cách giữa các section – chỉnh tại đây để giảm/tăng khoảng trống */
    --section-padding-y: 3rem;   /* padding trên/dưới mỗi section (trước: 8rem) */
    --section-padding-x: 4rem;   /* padding trái/phải (desktop) */
    --section-padding-x-mobile: 2rem;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

/* ============================================
   ENVELOPE INTRO SCREEN
   ============================================ */
.envelope-intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #2a1f1a;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s var(--transition-smooth), visibility 0.6s;
    overflow: hidden;
    backface-visibility: hidden;
}

/* Background image with blur (envelope and text stay sharp) */
.envelope-intro::after {
    content: '';
    position: absolute;
    inset: -30px;
    z-index: 0;
    background-image: url('images/envelope-bg.jpeg?v=2');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(12px);
    pointer-events: none;
}

/* Subtle overlay so envelope and text stay readable */
.envelope-intro::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.15) 50%, rgba(0,0,0,0.35) 100%);
    pointer-events: none;
}

.envelope-intro.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Names: Thịnh Phương Anh */
.envelope-names {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0;
    z-index: 2;
    transition: transform 0.6s var(--transition-smooth);
}

/* When envelope opens, names move higher */
.envelope-intro.opened .envelope-names {
    transform: translateY(-80px);
}

.envelope-name {
    font-family: 'SFU Edwardian Script', 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 400;
    font-style: italic;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4), 0 0 40px rgba(0,0,0,0.2);
    line-height: 1.2;
    letter-spacing: 0.05em;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s var(--transition-smooth) forwards;
}

/* 3D envelope: scene + wrapper (flip to show back when open)
   ========== MÀU PHONG BÌ – chỉnh tại các chỗ sau ==========
   - Mặt trước (front):     .envelope-front         → background: #45503B (xanh olive)
   - Mặt sau (back):       .envelope-back          → background: #F4EFE6 (kem)
   - Vạt trái / phải:      .left-flap, .right-flap → background: #4f5e43 (xanh đậm)
   - Vạt dưới:             .bottom-flap            → background: #4b5a3f (xanh đậm hơn)
   - Nắp trên (đóng):      .top-flap               → background: #5a6a4d
   - Nắp trên (khi mở):    .envelope-wrapper.is-open .top-flap → background: #F4EFE6
   - Chữ mặt trước:        .envelope-front màu #d5d8d2 (trong .envelope-front và .temp-box, .save-the-date, .date)
   ========================================================== */
.envelope-scene {
    perspective: 1200px;
    z-index: 2;
    margin-top: 0.5rem;
    transform-origin: center center;
}

/* Zoom in: phong bì bay vào rồi sang trang chính.
   Đổi sang zoom từ giữa: đặt transform-origin: center center; và có thể giảm scale (vd: 3.2). */
.envelope-intro.zoom-in .envelope-scene {
    transform-origin: 50% 0%;   /* Góc trên: 50% 0% | Zoom từ giữa: center center */
    transform: scale(3.5);       /* Zoom từ giữa có thể dùng scale(3.2) */
    transition: transform 1s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.envelope-intro.zoom-in .envelope-names {
    opacity: 0;
    transition: opacity 0.25s ease-out;
}

.envelope-wrapper {
    position: relative;
    width: 450px;
    height: 320px;
    transform-style: preserve-3d;
    cursor: pointer;
    user-select: none;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s;
}

.envelope-wrapper.is-open {
    transform: rotateY(180deg);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0s;
}

.envelope-front,
.envelope-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* --- MẶT TRƯỚC --- */
.envelope-front {
    background: #45503B; /* 5a6a4d */
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #d5d8d2;
}

.monogram-placeholder {
    position: relative;
    width: 160px;
    height: 130px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.monogram-placeholder svg {
    width: 100%;
    height: auto;
    fill: #d5d8d2;
}

.temp-box {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    color: #d5d8d2;
    opacity: 0.6;
    border: 1px dashed #d5d8d2;
    padding: 20px 10px;
    text-align: center;
    border-radius: 4px;
}

.event-text {
    text-align: center;
}

.save-the-date {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    letter-spacing: 4px;
    margin-bottom: 10px;
    font-weight: 500;
}

.envelope-front .date {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    letter-spacing: 3px;
}

/* --- MẶT SAU --- */
.envelope-back {
    background: #F4EFE6;
    transform: rotateY(180deg);
    z-index: 1;
}

.side-flaps-wrapper {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    filter: drop-shadow(0 0 4px rgba(0,0,0,0.25));
}

.left-flap {
    position: absolute;
    left: 0;
    width: 55%;
    height: 100%;
    background: #3D4734;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.right-flap {
    position: absolute;
    right: 0;
    width: 55%;
    height: 100%;
    background: #3D4734;
    clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

.bottom-flap-wrapper {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60%;
    z-index: 4;
    pointer-events: none;
    filter: drop-shadow(0 -2px 5px rgba(0,0,0,0.2));
}

.bottom-flap {
    width: 100%;
    height: 100%;
    background: #3D4734;
    clip-path: polygon(0 100%, 50% 0, 100% 100%);
}

.top-flap-container {
    position: absolute;
    top: 0;
    width: 100%;
    height: 63%;
    z-index: 5;
    transform-origin: top;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0s;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

.envelope-wrapper.is-open .top-flap-container {
    transform: rotateX(180deg);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.8s;
    filter: drop-shadow(0 -4px 6px rgba(0,0,0,0.1));
}

.top-flap {
    width: 100%;
    height: 100%;
    background: #45503B;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transition: background 0.4s ease 0.3s;
}

.envelope-wrapper.is-open .top-flap {
    background: #F4EFE6;
    transition: background 0.4s ease 0.8s;
}

/* --- DẤU SÁP KIM LOẠI (mặt sau) --- */
.wax-seal {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    z-index: 6;
    background-color: #b88a4d;
    box-shadow:
        0 6px 10px rgba(0,0,0,0.4),
        inset 3px 3px 6px rgba(255, 235, 180, 0.7),
        inset -3px -3px 6px rgba(0, 0, 0, 0.5),
        inset 0 0 0 5px #a67c45,
        inset 0 0 15px 5px rgba(0,0,0,0.2);
    transition: opacity 0.3s ease 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wax-seal::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.2) 0%, rgba(0,0,0,0.1) 60%);
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
    z-index: 1;
    pointer-events: none;
}

.wax-seal-initials {
    position: relative;
    z-index: 2;
    font-family: 'SFU Edwardian Script', 'Cinzel', serif;
    font-size: 20px;
    font-weight: 400;
    color: #9c723d;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.4), -1px -1px 2px rgba(0, 0, 0, 0.6);
    letter-spacing: 1px;
}

.envelope-wrapper.is-open .wax-seal {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease 0.8s;
}

/* Khi trang loading hiện (sau khi hiệu ứng mở phong bì xong): ẩn phong bì và tên */
.envelope-intro.loading-visible .envelope-names,
.envelope-intro.loading-visible .envelope-scene {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s var(--transition-smooth), visibility 0.4s;
}

/* Trang loading riêng: full màn hình, chỉ Thịnh và Phương Anh + 0% → 100% */
.envelope-loading {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s var(--transition-smooth) 0.2s;
}

.envelope-intro.loading-visible .envelope-loading {
    display: flex;
    opacity: 1;
}

.envelope-loading-names {
    font-family: 'SFU Edwardian Script', 'Cormorant Garamond', serif;
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 500;
    font-style: italic;
    font-size: 40px;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

.envelope-loading .card-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.envelope-loading .card-loading-bar {
    width: 100%;
    min-width: 280px;
    max-width: min(560px, 85vw);
    height: 10px;
    background: rgba(255,255,255,0.25);
    border-radius: 5px;
    overflow: hidden;
}

.envelope-loading .card-loading-fill {
    height: 100%;
    width: 0%;
    background: #fff;
    border-radius: 5px;
    transition: width 0.08s linear;
}

.envelope-loading .card-loading-percent {
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.95);
}

/* Envelope opening animation */
.envelope-intro.opening {
    animation: zoomOut 1.2s var(--transition-smooth) 0.8s forwards;
}

@keyframes zoomOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .envelope-decor-left {
        left: 2%;
        bottom: 5%;
    }
    
    .envelope-decor-right {
        right: 2%;
        top: 5%;
    }
    
    .envelope-names {
        margin-bottom: 0;
    }
    
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    /* Không dùng mix-blend-mode để menu hiển thị đúng màu rêu #45503B như ngày tháng */
    mix-blend-mode: normal;
}

.nav-logo {
    font-family: 'SFU Edwardian Script', var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    color: var(--color-envelope-dark);
    transition: color 0.3s ease;
}

/* Khi cuộn xuống: nav nền sáng → chữ màu rêu đậm */
.nav--scrolled .nav-logo,
.nav--scrolled .nav-links a {
    color: var(--color-envelope-dark);
}

.nav--scrolled .nav-links a::after {
    background: var(--color-envelope-dark);
}

.nav--scrolled .nav-toggle span {
    background: var(--color-envelope-dark);
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    font-family: var(--font-label);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-envelope-dark);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-envelope-dark);
    transition: width 0.3s var(--transition-smooth);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
}

.nav-toggle span {
    width: 24px;
    height: 1px;
    background: var(--color-envelope-dark);
    transition: all 0.3s var(--transition-smooth);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-bg-dark);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s var(--transition-smooth);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    list-style: none;
    text-align: center;
}

.mobile-nav-links li {
    margin: 2rem 0;
    overflow: hidden;
}

.mobile-nav-links a {
    font-family: var(--font-label);
    font-size: 2.5rem;
    color: var(--color-cream);
    letter-spacing: 0.1em;
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.5s var(--transition-smooth);
}

.mobile-menu.active .mobile-nav-links a {
    transform: translateY(0);
}

.mobile-menu.active .mobile-nav-links li:nth-child(1) a { transition-delay: 0.1s; }
.mobile-menu.active .mobile-nav-links li:nth-child(2) a { transition-delay: 0.15s; }
.mobile-menu.active .mobile-nav-links li:nth-child(3) a { transition-delay: 0.2s; }
.mobile-menu.active .mobile-nav-links li:nth-child(4) a { transition-delay: 0.25s; }
.mobile-menu.active .mobile-nav-links li:nth-child(5) a { transition-delay: 0.3s; }

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--color-bg);
}

.hero-content {
    text-align: center;
    z-index: 2;
    padding: 2rem;
}

.hero-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    font-size: 0.75rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--color-text-light);
    opacity: 0;
    animation: fadeIn 1s var(--transition-smooth) 0.5s forwards;
}

.hero-date-line {
    width: 60px;
    height: 1px;
    background: var(--color-accent-light);
}

.hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.hero-name {
    font-family: 'SFU Edwardian Script', var(--font-display);
    font-size: clamp(3rem, 12vw, 10rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    line-height: 1;
    color: var(--color-text-dark); /* Giữ tên cô dâu chú rể không đổi sang xanh */
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 1.2s var(--transition-smooth) forwards;
}

.hero-name-1 {
    animation-delay: 0.3s;
}

.hero-name-2 {
    animation-delay: 0.5s;
}

.hero-ampersand {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 6vw, 5rem);
    font-style: italic;
    font-weight: 300;
    color: var(--color-gold);
    opacity: 0;
    animation: fadeIn 1s var(--transition-smooth) 0.7s forwards;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.3em;
    color: var(--color-text-light);
    opacity: 0;
    animation: fadeIn 1s var(--transition-smooth) 0.9s forwards;
}

.hero-scroll {
    position: absolute;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    animation: fadeIn 1s var(--transition-smooth) 1.2s forwards;
}

.hero-scroll span {
    font-size: 0.625rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-text-light);
}

.hero-scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

/* Hero Background Shapes (ẩn – không dùng họa tiết nền) */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    display: none;
}

.hero-bg-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.hero-bg-shape-1 {
    width: 600px;
    height: 600px;
    background: var(--color-sage);
    top: -200px;
    right: -100px;
    animation: float 20s ease-in-out infinite;
}

.hero-bg-shape-2 {
    width: 400px;
    height: 400px;
    background: var(--color-blush);
    bottom: -100px;
    left: -100px;
    animation: float 15s ease-in-out infinite reverse;
}

.hero-bg-shape-3 {
    width: 300px;
    height: 300px;
    background: var(--color-accent-light);
    top: 50%;
    left: 20%;
    animation: float 18s ease-in-out infinite 2s;
}

/* ============================================
   QUOTE SECTION
   ============================================ */
.quote-section {
    padding: 8rem 2rem; /* Giữ kích thước ban đầu, không dùng biến section */
    background: var(--color-bg-dark);
    color: var(--color-cream);
    text-align: center;
}

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

.quote p {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-style: italic;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.quote cite {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-style: normal;
    color: var(--color-accent-light);
}

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-number {
    display: block;
    font-family: var(--font-label);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-label);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 400;
    letter-spacing: 0.1em;
}

/* ============================================
   GALLERY – track căn trái, mỗi ảnh = 1 album, click mở album full màn
   ============================================ */
.gallery-slider {
    padding: var(--section-padding-y) 0;
    background: var(--color-bg);
    overflow: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.gallery-slider .gallery-label {
    font-family: var(--font-label);
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    margin-left: 5vw;
    z-index: 2;
}

.gallery-track-wrapper {
    flex: 1;
    width: 100%;
    position: relative;
    overflow: hidden;
    cursor: grab;
    min-height: 60vh;
}

.gallery-track-wrapper:active {
    cursor: grabbing;
}

#image-track.image-track {
    display: flex;
    gap: 2.5vmin;
    position: absolute;
    left: 5vw;
    top: 50%;
    transform: translate(0%, -50%);
    user-select: none;
    will-change: transform;
    transition: opacity 0.5s ease;
}

.image-item {
    position: relative;
    cursor: pointer;
}

#image-track .image {
    width: 55vmin;
    height: 75vmin;
    object-fit: cover;
    object-position: 100% center;
    pointer-events: none;
    transition: filter 0.3s ease;
}

.image-item:hover .image {
    filter: brightness(1.1);
}

.gallery-hint {
    margin-top: 2rem;
    margin-left: 5vw;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-light);
    opacity: 0.6;
}

.gallery-empty {
    padding: 2rem 5vw;
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.gallery-empty code {
    background: rgba(0,0,0,0.06);
    padding: 0.2em 0.4em;
    border-radius: 2px;
}

/* --- Album view full màn hình --- */
.album-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    z-index: 10000;
    overflow-y: auto;
    padding: 10vh 0;
    opacity: 0;
    display: none;
    transition: opacity 0.8s ease;
}

.album-view.is-open {
    display: block;
    opacity: 1;
}

.album-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5vh;
    padding-bottom: 10vh;
}

.album-image {
    width: 75vw;
    max-width: 780px;
    height: auto;
    display: block;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s cubic-bezier(0.2, 1, 0.3, 1), transform 1s cubic-bezier(0.2, 1, 0.3, 1);
}

.album-image.show {
    opacity: 1;
    transform: translateY(0);
}

.album-back-btn {
    position: fixed;
    top: 40px;
    left: 40px;
    z-index: 10001;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    background: none;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0 0 4px;
    font-family: inherit;
    display: none;
}

.album-back-btn.is-visible {
    display: block;
}

/* ============================================
   STORY SECTION
   ============================================ */
.story {
    padding: var(--section-padding-y) var(--section-padding-x);
    max-width: 1400px;
    margin: 0 auto;
    background: var(--color-bg-alt);
}

.story-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: start;
}

.story-text {
    padding-right: 2rem;
}

.story-lead {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 2rem;
    color: var(--color-text);
}

.story-text p {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.story-timeline {
    position: relative;
    padding-left: 3rem;
}

.story-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--color-accent-light);
}

.timeline-item {
    position: relative;
    padding: 2rem 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -3rem;
    top: 2.5rem;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    transform: translateX(-50%);
}

.timeline-item-text {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.timeline-date {
    font-size: 1rem;
    letter-spacing: 0.3em;
    color: var(--color-accent);
}

.timeline-event {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 400;
}

/* Hai ảnh polaroid đặt chéo bên cạnh mỗi mốc */
.timeline-polaroids {
    position: relative;
    width: 160px;
    height: 140px;
    flex-shrink: 0;
}

.polaroid {
    position: absolute;
    width: 100px;
    min-height: 114px;
    background: #fff;
    padding: 5px 5px 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.polaroid img {
    display: block;
    width: 100%;
    height: 88px;
    object-fit: cover;
    background: var(--color-bg);
}

.polaroid--1 {
    left: 0;
    top: 0;
    transform: rotate(-8deg);
    z-index: 1;
}

.polaroid--2 {
    left: 52px;
    top: 18px;
    transform: rotate(6deg);
    z-index: 0;
}

.polaroid img[src=""],
.polaroid img:not([src]) {
    opacity: 0.6;
}

/* ============================================
   DETAILS SECTION – Wedding Timeline + Dresscode
   ============================================ */
.details {
    padding: var(--section-padding-y) var(--section-padding-x);
    background: var(--color-bg);
}

.details-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Nhà trai / Nhà gái – kiểu thiệp (kích thước ~70% so với x2) */
.family-card {
    max-width: 900px;
    margin: 0 auto 3.5rem;
    padding: 3.5rem 3.5rem 2.8rem;
    background: var(--color-bg);
    border: 3px solid var(--color-envelope);
    border-radius: 6px;
    box-shadow: 0 6px 36px rgba(0, 0, 0, 0.07);
}

.family-block {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2.8rem;
    align-items: start;
    margin-bottom: 2.8rem;
}

.family-column {
    text-align: center;
}

.family-column--trai,
.family-column--gai {
    text-align: center;
}

.family-title {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2.2vw, 1.35rem);
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0.06em;
    color: #7A756D;
    margin-bottom: 1.4rem;
}

.family-row {
    font-size: 1.35rem;
    color: var(--color-text);
    margin-bottom: 0.7rem;
    font-weight: 1000;
}

.family-role {
    font-family: var(--font-heading);
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0.06em;
    color: #7A756D;
}

.family-name {
    font-family: var(--font-heading);
    font-weight: 1000;
    font-style: normal;
    letter-spacing: 0.06em;
    color: var(--color-text);
    text-transform: uppercase;
    -webkit-font-smoothing: antialiased;
}

.family-divider {
    width: 1px;
    min-height: 112px;
    background: var(--color-envelope);
    opacity: 0.35;
}

.family-invite {
    text-align: center;
    margin-bottom: 2.5rem;
}

.family-invite-line {
    font-family: var(--font-label);
    font-size: 1.12rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--color-envelope);
}

.family-invite-line--sub {
    margin-top: 0.7rem;
    font-size: 0.98rem;
    letter-spacing: 0.12em;
}

.family-invite-dots {
    width: 70%;
    max-width: 392px;
    height: 0;
    border-bottom: 1px dotted var(--color-envelope);
    margin: 1rem auto 0;
    opacity: 0.7;
}

.family-couple {
    font-family: 'SFU Edwardian Script', var(--font-display);
    font-size: clamp(2.8rem, 7vw, 4.2rem);
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--color-envelope);
    text-align: center;
}

/* Tiệc cưới diễn ra lúc – kiểu thiệp (giờ to, dòng ngày | số | tháng, năm, lịch âm) */
.event-datetime-block {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 1rem;
}

.event-datetime-heading {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2.2vw, 1.35rem);
    font-weight: 800;
    font-style: italic;
    letter-spacing: 0.06em;
    color: #7A756D;
    margin-bottom: 1rem;
}

.event-datetime-time {
    font-family: 'Times New Roman', Times, serif;
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    color: var(--color-envelope);
    margin-bottom: 0.75rem;
}

.event-datetime-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.event-datetime-day,
.event-datetime-month {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--color-text-light);
}

.event-datetime-sep {
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-weight: 300;
}

.event-datetime-num {
    font-family: 'Times New Roman', Times, serif;
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: 700;
    color: var(--color-envelope);
}

.event-datetime-year {
    font-family: 'Times New Roman', Times, serif;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--color-envelope);
    margin-bottom: 0.75rem;
}

.event-datetime-lunar {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.06em;
    color: #7A756D;
    margin-bottom: 1rem;
}

/* Timeline 4 cột */
.details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.detail-card {
    text-align: center;
    padding: 2rem 1.25rem;
    background: var(--color-cream);
    border-radius: 4px;
    transition: transform 0.3s var(--transition-smooth), box-shadow 0.3s var(--transition-smooth);
}

.detail-card:hover {
    transform: translateY(-12px) scale(1.06);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.detail-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 1.25rem;
    color: var(--color-envelope);
}

.detail-icon svg {
    width: 100%;
    height: 100%;
}

.detail-time {
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--color-envelope);
    margin-bottom: 0.5rem;
}

.detail-main {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.4rem;
}

.detail-sub {
    font-size: 1rem;
    color: var(--color-text);
    font-weight: 400;
    line-height: 1.4;
}

/* Dresscode */
/* Tiệc cưới sẽ tổ chức tại (dưới timeline, trên dresscode) */
.details-venue-block {
    text-align: center;
    padding: 2.5rem 0;
    border-top: 1px solid var(--color-accent-light);
}

.details-venue-title {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.08em;
    color: var(--color-envelope);
    margin-bottom: 1.25rem;
}

.details-venue-box {
    max-width: 520px;
    margin: 0 auto 1.25rem;
    padding: 1.25rem 1.5rem;
    background: #F0EDE5;
    border-radius: 8px;
}

.details-venue-address {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text);
}

.details-venue-block .details-map-link {
    display: inline-block;
}

.dresscode-section {
    text-align: center;
    padding: 2.5rem 0;
    border-top: 1px solid var(--color-accent-light);
}

.dresscode-heading {
    font-family: var(--font-label);
    font-size: 0.85rem;
    letter-spacing: 0.35em;
    color: var(--color-text);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.dresscode-intro {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
    font-weight: 300;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.dresscode-palette {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.dresscode-swatch {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Phần 3: Lưu ý */
.details-map-link {
    font-family: var(--font-label);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--color-envelope);
    text-decoration: none;
    border-bottom: 1px solid var(--color-envelope);
    padding-bottom: 0.2em;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.details-map-link:hover {
    color: var(--color-envelope-dark);
    border-color: var(--color-envelope-dark);
}

/* ============================================
   COUNTDOWN SECTION
   ============================================ */
.countdown-section {
    padding: var(--section-padding-y) var(--section-padding-x-mobile);
    background: var(--color-bg-alt);
    color: var(--color-text);
    text-align: center;
}

.countdown-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.2em;
    margin-bottom: 3rem;
}

.countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 2rem;
}

.countdown-number {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.countdown-label {
    font-family: var(--font-label);
    font-size: 0.625rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    opacity: 0.8;
}

.countdown-separator {
    font-family: var(--font-display);
    font-size: 3rem;
    opacity: 0.3;
    align-self: flex-start;
    margin-top: 1rem;
}

/* ============================================
   VENUE SECTION
   ============================================ */
.venue {
    padding: var(--section-padding-y) var(--section-padding-x);
    max-width: 1400px;
    margin: 0 auto;
    background: var(--color-bg);
}

.venue-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Venue: cột trái = nội dung, cột phải = bản đồ */
.venue-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.venue-map {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 2px;
    background: var(--color-bg);
}

.venue-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 280px;
}

.venue-title {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 2.5vw, 1.45rem);
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.06em;
    color: #7A756D;
    margin-bottom: 1.25rem;
}

.venue-address-plain {
    font-family: var(--font-body);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.6;
    color: #5C5C5C;
    margin-bottom: 1.25rem;
}

.venue-map-link {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: #5C5C5C;
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

.venue-map-link:hover {
    opacity: 0.8;
}

.venue-name {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.venue-address {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--color-text-light);
}

.venue-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text-light);
    font-weight: 300;
    margin-bottom: 2rem;
}

.venue-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent);
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-accent);
    transition: all 0.3s var(--transition-smooth);
}

.venue-link:hover {
    gap: 1.25rem;
}

.venue-link svg {
    width: 16px;
    height: 16px;
}

.venue-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 2px;
}

.venue-placeholder {
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.venue-placeholder::before {
    content: '';
    position: absolute;
    inset: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.venue-placeholder-content {
    text-align: center;
    font-family: var(--font-display);
    color: var(--color-text);
}

.venue-placeholder-content span {
    display: block;
}

.venue-placeholder-content span:first-child {
    font-size: 1.5rem;
    letter-spacing: 0.2em;
    margin-bottom: 0.5rem;
}

.venue-placeholder-content span:last-child {
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    opacity: 0.7;
}

/* ============================================
   HỘP MỪNG CƯỚI (thay RSVP)
   ============================================ */
.gift-box-section {
    padding: var(--section-padding-y) var(--section-padding-x) 0;
    background: var(--color-bg);
    color: var(--color-text);
}

.gift-box-section .section-number {
    color: var(--color-envelope);
}

.gift-box-content {
    text-align: center;
    padding: 2rem 0 2.5rem;
}

.gift-box-trigger {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s var(--transition-smooth);
}

.gift-box-trigger:hover {
    transform: scale(1.02);
}

.gift-box-visual {
    position: relative;
    display: block;
}

.gift-box-logo {
    display: block;
    width: 180px;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    pointer-events: none;
}

.gift-box-hint {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* Modal Hộp Mừng Cưới */
.gift-box-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gift-box-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.gift-box-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.gift-box-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow: auto;
    background: #F5F0E8;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.gift-box-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--color-envelope);
    color: #fff;
    border-radius: 8px 8px 0 0;
}

.gift-box-modal-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-style: italic;
    font-weight: 400;
    margin: 0;
}

.gift-box-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.gift-box-modal-close:hover {
    opacity: 0.85;
}

.gift-box-modal-body {
    padding: 2rem 1.5rem;
}

.gift-box-banks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.gift-box-bank {
    text-align: center;
}

.gift-box-bank-label {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-envelope);
    margin-bottom: 1rem;
}

.gift-box-qr {
    width: 160px;
    height: 160px;
    margin: 0 auto 1rem;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gift-box-qr img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gift-box-qr-placeholder {
    display: none;
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.gift-box-bank-name,
.gift-box-bank-account,
.gift-box-bank-holder {
    font-size: 0.9rem;
    color: var(--color-text);
    margin: 0.25rem 0;
}

.gift-box-modal-thanks {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-style: italic;
    color: var(--color-text);
    margin: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: var(--section-padding-y) var(--section-padding-x-mobile);
    background: var(--color-bg-alt);
    text-align: center;
}

.footer-content {
    margin-bottom: 3rem;
}

.footer-names {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.footer-heart {
    color: var(--color-blush);
    animation: heartbeat 1.5s ease-in-out infinite;
}

.footer-date {
    font-size: 0.75rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.footer-message {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-style: italic;
    color: var(--color-text-light);
}

.footer-decoration {
    display: flex;
    justify-content: center;
}

.footer-line {
    width: 100px;
    height: 1px;
    background: var(--color-accent-light);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 1;
        transform: scaleY(1);
    }
    50% {
        opacity: 0.5;
        transform: scaleY(0.8);
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(30px, 30px);
    }
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 1s var(--transition-smooth);
}

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

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .nav {
        padding: 1.5rem 2rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .story-content {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    
    .story-text {
        padding-right: 0;
    }
    
    .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .venue-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .venue-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .family-card {
        padding: 3rem 2rem;
    }
    
    .family-block {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 3rem;
    }
    
    .family-title {
        font-size: 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    .family-row {
        font-size: 1.25rem;
    }
    
    .family-divider {
        width: 60%;
        min-width: 80px;
        min-height: 1px;
        height: 1px;
        margin: 0 auto;
    }
    
    .family-column--trai,
    .family-column--gai {
        text-align: center;
    }
    
    .family-invite {
        margin-bottom: 2.5rem;
    }
    
    .family-invite-line {
        font-size: 1rem;
        letter-spacing: 0.15em;
    }
    
    .family-invite-line--sub {
        font-size: 0.85rem;
    }
    
    .family-couple {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }
    
    .hero-date {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-date-line {
        display: none;
    }
    
    .gallery-slider {
        min-height: 80vh;
        padding: 3rem 0 4rem;
    }
    
    .gallery-slider .gallery-label {
        padding: 0 1rem;
        text-align: center;
    }
    
    .story {
        padding: var(--section-padding-y) var(--section-padding-x-mobile);
    }
    
    .details {
        padding: var(--section-padding-y) var(--section-padding-x-mobile);
    }
    
    .details-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .detail-card {
        padding: 1.5rem 1rem;
    }
    
    .countdown-item {
        padding: 0 1rem;
    }
    
    .countdown-separator {
        display: none;
    }
    
    .venue {
        padding: var(--section-padding-y) var(--section-padding-x-mobile);
    }
    
    .gift-box-section {
        padding: var(--section-padding-y) var(--section-padding-x-mobile) 0;
    }
    
    .gift-box-banks {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav {
        padding: 1rem;
    }
    
    .hero-title {
        gap: 0.25rem;
    }
    
    .story-timeline {
        padding-left: 2rem;
    }
    
    .timeline-item::before {
        left: -2rem;
    }
    
    .timeline-polaroids {
        width: 130px;
        height: 115px;
    }
    
    .polaroid {
        width: 78px;
        min-height: 90px;
        padding: 4px 4px 12px;
    }
    
    .polaroid img {
        height: 68px;
    }
    
    .polaroid--2 {
        left: 40px;
        top: 14px;
    }
    
    .dresscode-swatch {
        width: 2rem;
        height: 2rem;
    }
    
    .countdown {
        gap: 0.5rem;
    }
    
    .countdown-item {
        padding: 0.5rem;
    }
}

/* ============================================
   MAIN CONTENT INITIAL STATE
   ============================================ */
.main-content {
    opacity: 0;
    transition: opacity 0.8s var(--transition-smooth);
}

.main-content.visible {
    opacity: 1;
}

