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

:root {
    --bg:        #ffffff;
    --bg-alt:    #f0f5f2;
    --text:      #1c1c1c;
    --text-muted:#777;
    --accent:    #2e8b57;
    --border:    #d4e3da;

    --font: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    font-weight: 300;
    color: var(--text);
    background: var(--bg);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}


/* ─── Nav ─── */
.nav {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 100;
    padding: 1rem 3rem;
    display: flex;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: background 0.4s, border-color 0.4s, opacity 0.4s ease;
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    opacity: 1;
    pointer-events: auto;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.55;
    transition: opacity 0.2s;
}

.nav-links a:hover { opacity: 1; }

.nav-heart { display: block; flex-shrink: 0; align-self: center; }

.nav-couple-name {
    position: absolute;
    inset-inline: 0;
    text-align: center;
    font-family: var(--font);
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--text);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.nav-couple-name.visible {
    opacity: 1;
    pointer-events: auto;
}



/* ─── Hero ─── */
.hero {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero-image-container {
    position: relative;
    width: min(100%, calc(100svh * 1779 / 2000));
    aspect-ratio: 1779 / 2000;
    container-type: inline-size;
    will-change: opacity;
}

/* Multi-directional fade: sides light, bottom strongest */
.hero-image-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, transparent 40%, rgba(255,255,255,0.85) 72%, white 90%),
        linear-gradient(to right,  rgba(255,255,255,0.8) 0%, transparent 18%, transparent 82%, rgba(255,255,255,0.8) 100%),
        linear-gradient(to bottom, rgba(255,255,255,0.85) 0%, transparent 25%);
    z-index: 1;
    pointer-events: none;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.hero-content {
    position: absolute;
    top: 78%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    padding: 2rem;
}

.hero-pre {
    font-family: var(--font);
    font-size: clamp(0.9rem, 5cqw, 2rem);
    letter-spacing: 0.05em;
    color: var(--text);
}

.hero-names {
    font-family: 'Josefin Sans', sans-serif;
    font-size: clamp(0.9rem, 9cqw, 3.8rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    line-height: 1;
    white-space: nowrap;
}

.name-first { color: #307b52; }
.name-amp   { color: var(--text); margin: 0 0.2em; font-weight: 200; }
.name-second { color: #aa544a; }

.hero-date {
    font-family: var(--font);
    font-size: clamp(0.6rem, 3.5cqw, 1.4rem);
    letter-spacing: 0.05em;
    color: var(--text);
    margin-top: 0.3rem;
}

.hero-line {
    width: 36px;
    height: 1px;
    background: var(--accent);
    opacity: 0.5;
    margin: 0.4rem 0;
}

.scroll-down {
    margin-top: 2.5rem;
    color: var(--text-muted);
    opacity: 0.45;
    transition: opacity 0.2s;
    animation: bounce 2.2s ease-in-out infinite;
}

.scroll-down:hover { opacity: 0.9; }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(7px); }
}


/* ─── Sections ─── */
.section {
    padding: 7rem 2rem;
    scroll-margin-top: 60px;
}

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

.section-title {
    font-family: var(--font);
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 400;
    text-align: center;
    margin-bottom: 0.6rem;
}

.timeline {
    max-width: 420px;
    margin: 2rem auto 0;
    display: flex;
    flex-direction: column;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-time {
    font-family: var(--font);
    font-size: 1rem;
    color: #307b52;
    letter-spacing: 0.05em;
    min-width: 3.5rem;
    text-align: right;
    flex-shrink: 0;
}

.timeline-event {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.4;
    padding-left: 1.5rem;
    border-left: 1px solid var(--border);
}

.map-wrap {
    max-width: 340px;
    margin: 1.5rem auto 0;
    border: 1px solid var(--border);
    overflow: hidden;
    aspect-ratio: 1;
}

.map-wrap iframe {
    width: 100%;
    height: 100%;
}

.subsection-title {
    font-family: var(--font);
    font-size: 2rem;
    font-weight: 400;
    color: var(--text);
    text-align: center;
    margin-top: 3rem;
    margin-bottom: 1rem;
    letter-spacing: 0.08em;
}

.subsection-title.red {
    color: #aa544a;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.8rem;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}


/* ─── Info cards ─── */
.info-grid {
    margin-top: 2.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.5rem;
    max-width: 860px;
    margin: 3.5rem auto 0;
}

.info-card {
    padding: 2.5rem 2rem;
    text-align: center;
    border: 1px solid var(--border);
    transition: border-color 0.3s, transform 0.3s;
}

.info-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.info-icon {
    color: var(--accent);
    margin-bottom: 1.2rem;
    display: flex;
    justify-content: center;
    opacity: 0.7;
}

.info-card h3 {
    font-family: var(--font);
    font-size: 1.65rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.info-card p {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.9;
}

.card-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--border);
    transition: text-decoration-color 0.2s;
}

.card-link:hover {
    text-decoration-color: var(--text-muted);
}


/* ─── Gallery ─── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 270px;
    gap: 0.6rem;
    max-width: 980px;
    margin: 3.5rem auto 0;
}

.gallery-item {
    overflow: hidden;
}

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

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

.gallery-item.tall {
    grid-row: span 2;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.photo-placeholder:hover {
    background: #c4d6cc;
}

/* Reveal stagger for gallery items */
.gallery-item:nth-child(2) { transition-delay: 0.05s; }
.gallery-item:nth-child(3) { transition-delay: 0.1s; }
.gallery-item:nth-child(4) { transition-delay: 0.15s; }
.gallery-item:nth-child(5) { transition-delay: 0.2s; }


/* ─── RSVP Form ─── */
.rsvp-form {
    max-width: 540px;
    margin: 2.5rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.form-group > label,
.group-label {
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.form-group input[type="text"] {
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 0.55rem 0;
    font-family: var(--font);
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--text);
    background: transparent;
    outline: none;
    transition: border-color 0.25s;
    width: 100%;
}

.form-group input[type="text"]:focus {
    border-color: var(--accent);
}

.form-group input[type="text"]::placeholder {
    color: var(--border);
}

.form-group textarea {
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 0.55rem 0;
    font-family: var(--font);
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--text);
    background: transparent;
    outline: none;
    transition: border-color 0.25s;
    width: 100%;
    resize: none;
}

.form-group textarea:focus {
    border-color: var(--accent);
}

.form-group textarea::placeholder {
    color: var(--border);
}

/* Radio buttons */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding-top: 0.2rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 17px;
    height: 17px;
    border: 1px solid var(--border);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.2s;
}

.radio-custom::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--accent);
    transform: scale(0);
    transition: transform 0.15s ease;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: var(--accent);
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    transform: scale(1);
}

/* Submit */
.form-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 0.5rem;
}

.btn-submit {
    align-self: flex-start;
    padding: 0.85rem 3rem;
    background: var(--text);
    color: #fff;
    border: none;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.17em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s, transform 0.1s;
}

.btn-submit:hover   { background: var(--accent); }
.btn-submit:active  { transform: scale(0.98); }
.btn-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.form-message {
    font-size: 0.85rem;
    min-height: 1.4rem;
    color: var(--accent);
}

.form-message.error {
    color: #b04040;
}


/* ─── FAQ ─── */
.faq-list {
    max-width: 680px;
    margin: 3rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.faq-group {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.faq-group-title {
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    text-align: center;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border);
}

.faq-item {
    text-align: center;
}

.faq-q {
    font-family: var(--font);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.faq-a {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ─── Footer ─── */
.footer {
    padding: 3.5rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-names {
    font-family: var(--font);
    font-size: 1.3rem;
    font-weight: 400;
}

.footer-sub {
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 0.5rem;
}


/* ─── Animations ─── */
.fade-in {
    opacity: 0;
    transform: translateY(18px);
    animation: fadeUp 0.9s ease forwards;
}

.hero-content .fade-in:nth-child(1) { animation-delay: 0.15s; }
.hero-content .fade-in:nth-child(2) { animation-delay: 0.35s; }
.hero-content .fade-in:nth-child(3) { animation-delay: 0.55s; }
.hero-content .fade-in:nth-child(4) { animation-delay: 0.65s; }
.hero-content .fade-in:nth-child(5) { animation-delay: 0.85s; }

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

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

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


/* ─── Responsive ─── */
@media (max-width: 700px) {
    /* Nav */
    .nav {
        padding: 0.5rem 1.4rem;
        flex-direction: column;
        align-items: center;
        gap: 0.2rem;
    }
    .nav-couple-name {
        position: static;
        width: 100%;
        text-align: center;
        font-size: 0.95rem;
        max-height: 0;
        overflow: hidden;
        transition: opacity 0.5s ease, max-height 0.5s ease;
    }
    .nav-couple-name.visible {
        max-height: 2rem;
    }
    .nav-links {
        justify-content: center;
    }

    /* Hero */
    .hero-content {
        top: 88%;
        gap: 0.4rem;
        padding: 0.5rem;
    }
    .hero-names { font-size: clamp(0.8rem, 7cqw, 3rem); }
    .hero-pre,
    .hero-date  { font-size: clamp(0.85rem, 4.5cqw, 1.4rem); }

    /* Sections */
    .section { padding: 4rem 1.2rem; }
    .section-title { font-size: clamp(1.6rem, 6vw, 2.2rem); }
    .subsection-title { font-size: 1.3rem; }

    /* Info cards */
    .info-grid { gap: 1rem; }
    .info-card { padding: 1.8rem 1.2rem; }
    .info-card h3 { font-size: 1.2rem; }
    .info-card p { font-size: 1.1rem; }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 160px;
    }
    .gallery-item.tall { grid-row: span 1; }

    /* RSVP */
    .btn-submit { width: 100%; text-align: center; }
    .rsvp-form { gap: 1.6rem; }
}

@media (max-width: 400px) {
    .nav-links { gap: 1.2rem; }
    .nav-links a { font-size: 0.85rem; }
    .hero-names { font-size: clamp(1.6rem, 9vw, 2.4rem); }
}
