:root {
    --primary: #3d4d22;
    --accent: #7a5e32;
    --bg: #faf8f5;
    --white: #ffffff;
    --text: #1a1a1a;
    --muted: #4a4a4a;
    --shadow: 0 12px 26px rgba(0, 0, 0, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Montserrat", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: "Cormorant Garamond", serif;
    line-height: 1.1;
}

.container {
    width: min(1100px, 100% - 2rem);
    margin: 0 auto;
}

.narrow {
    width: min(700px, 100% - 2rem);
}

.section {
    padding: 4.5rem 0;
}

.section-alt {
    background: var(--white);
}

.section h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--primary);
    text-align: center;
    margin-bottom: 1rem;
}

.section-text {
    text-align: center;
    color: var(--muted);
    max-width: 760px;
    margin: 0 auto 2rem;
}

.btn {
    border: 2px solid transparent;
    padding: 0.8rem 1.4rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-main {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.btn-main:hover {
    background: transparent;
    color: var(--primary);
}

.btn-gold {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

.btn-gold:hover {
    filter: brightness(1.1);
}

.btn-block {
    width: 100%;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: 0.25s ease;
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.logo {
    color: var(--white);
    text-decoration: none;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.6rem;
    font-weight: 700;
}

.nav.scrolled .logo {
    color: var(--primary);
}

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

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
}

.nav.scrolled .nav-links a {
    color: var(--text);
}

.menu-toggle {
    display: none;
    border: 0;
    background: none;
    color: var(--white);
    font-size: 1.3rem;
}

.nav.scrolled .menu-toggle {
    color: var(--primary);
}

.hero {
    min-height: 100vh;
    position: relative;
    display: grid;
    place-items: center;
    padding: 2rem;
    color: var(--white);
}

.hero-bg,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-bg {
    background: url("https://images.unsplash.com/photo-1502082553048-f009c37129b9?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.hero-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.75));
}

.hero-content {
    position: relative;
    text-align: center;
    width: min(760px, 100%);
}

.hero h1 {
    font-size: clamp(2.3rem, 7vw, 4.4rem);
    margin-bottom: 0.8rem;
}

.hero-subtitle {
    color: #d4b07a;
    font-style: italic;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.4rem;
}

.hero-date {
    margin: 1rem auto 1.8rem;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(70px, 88px));
    gap: 0.8rem;
    justify-content: center;
    margin-bottom: 1.8rem;
}

.countdown div {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 0.55rem;
}

.countdown span {
    display: block;
    font-family: "Cormorant Garamond", serif;
    color: #e6c48f;
    font-size: 2rem;
}

.countdown small {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.split {
    display: grid;
    gap: 1.5rem;
    align-items: center;
}

.check-list {
    list-style: none;
    margin-top: 1rem;
}

.check-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.check-list i {
    color: var(--accent);
}

.tree-panel {
    width: 100%;
}

.tree-visual-container {
    display: none;
}

.mobile-tree-view {
    display: grid;
    grid-template-columns: repeat(2, minmax(110px, 1fr));
    gap: 0.8rem;
    max-width: 340px;
    margin: 0 auto;
}

.mobile-member {
    background: var(--white);
    border-radius: 8px;
    padding: 0.7rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.mobile-member img {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f3ede2;
    margin-bottom: 0.45rem;
}

.mobile-member span {
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 600;
}

.gallery {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.memory-card {
    background: #fffdf8;
    border: 2px dashed #c8bea8;
    border-radius: 8px;
    overflow: hidden;
    min-height: 230px;
    display: grid;
    grid-template-rows: 1fr auto;
}

.memory-card img {
    width: 100%;
    min-height: 180px;
    object-fit: cover;
}

.memory-card figcaption {
    font-weight: 700;
    color: var(--primary);
    padding: 0.5rem 0.8rem;
    background: var(--bg);
}

.placeholder {
    display: none;
    padding: 0.7rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
}

.memory-card.is-empty img {
    display: none;
}

.memory-card.is-empty .placeholder {
    display: block;
}

.timeline {
    display: grid;
    gap: 1rem;
}

.timeline article {
    background: var(--white);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1rem 1.1rem;
}

.timeline strong {
    color: var(--primary);
}

.cards {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.product-card {
    background: var(--bg);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.product-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    box-shadow: var(--shadow);
}

.product-card h3 {
    color: var(--primary);
}

.product-card p {
    color: var(--accent);
    font-weight: 700;
    margin: 0.5rem 0 1rem;
}

.map {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map iframe {
    border: 0;
    width: 100%;
    min-height: 360px;
}

.section-confirm {
    background: var(--primary);
}

.section-confirm h2,
.section-confirm .section-text {
    color: var(--white);
}

.form {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    padding: 1rem;
}

.form label {
    display: block;
    color: var(--white);
    font-size: 0.84rem;
    margin-bottom: 0.8rem;
}

.form input,
.form select {
    width: 100%;
    margin-top: 0.3rem;
    padding: 0.7rem;
    border: 1px solid #ccc;
    background: var(--white);
}

.footer {
    background: #1a1a1a;
    color: #d0d0d0;
    text-align: center;
    padding: 2rem 1rem;
}

.footer-logo {
    font-family: "Cormorant Garamond", serif;
    color: var(--white);
    font-size: 1.7rem;
    margin-bottom: 0.2rem;
}

@media (min-width: 860px) {
    .split {
        grid-template-columns: 1.6fr 1fr;
    }

    .mobile-tree-view {
        display: none;
    }

    .tree-visual-container {
        display: flex;
        justify-content: center;
        align-items: center;
        width: min(360px, 100%);
        height: 360px;
        margin: 0 auto;
        position: relative;
    }

    .connection-lines {
        position: absolute;
        width: 100%;
        height: 100%;
        z-index: 0;
        opacity: 0.3;
        pointer-events: none;
    }

    .tree-core {
        width: 160px;
        height: 160px;
        background: var(--primary);
        border-radius: 50%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        color: var(--white);
        box-shadow: 0 10px 30px rgba(61, 77, 34, 0.3);
        z-index: 2;
        position: relative;
    }

    .tree-core h3 {
        color: var(--white);
        font-size: 1.9rem;
    }

    .tree-core p {
        color: #f0efe8;
        font-size: 0.8rem;
    }

    .tree-branch {
        position: absolute;
        width: 74px;
        height: 74px;
        border-radius: 50%;
        overflow: hidden;
        border: 3px solid var(--white);
        box-shadow: var(--shadow);
        transition: transform 0.25s ease;
        z-index: 1;
    }

    .tree-branch img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .tree-branch:hover {
        transform: scale(1.1);
        z-index: 4;
    }

    .pos-1 {
        top: 0;
        left: 50%;
        transform: translateX(-50%);
    }

    .pos-2 {
        top: 15%;
        right: 0;
    }

    .pos-3 {
        bottom: 15%;
        right: 0;
    }

    .pos-4 {
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
    }

    .pos-5 {
        bottom: 15%;
        left: 0;
    }

    .pos-6 {
        top: 15%;
        left: 0;
    }
}

@media (max-width: 900px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        background: var(--primary);
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 4.5rem 1rem 1.2rem;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: 0.25s ease;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
}
