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

:root {
    --bg:        #F7F5F2;
    --white:     #FFFFFF;
    --black:     #131210;
    --ink:       #252220;
    --accent:    #9B6B4E;
    --accent-2:  #C49A7A;
    --gray:      #8A8278;
    --gray-l:    #C8C2BB;
    --border:    #D8D2CB;
    --border-l:  #EAE6E2;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Josefin Sans', sans-serif;
    background-color: var(--bg);
    color: var(--ink);
    overflow-x: hidden;
    font-weight: 300;
}

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gray-l); }

/* ===== PROGRESS BAR ===== */
.progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    background: var(--accent);
    width: 0%;
    z-index: 1000;
    transition: width 0.1s linear;
}

/* ===== SECTION TAG ===== */
.section-tag {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 40px;
    display: block;
}

/* ===== HORIZONTAL RULE ===== */
.horizontal-rule {
    width: 100%;
    height: 1px;
    background: var(--border);
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--white);
    padding: 80px 40px;
    overflow: hidden;
}

.hero-bg-year {
    position: absolute;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    font-size: clamp(120px, 30vw, 320px);
    color: var(--black);
    opacity: 0.025;
    letter-spacing: -0.04em;
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 900px;
    text-align: center;
}

.hero-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 7px;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 50px;
    opacity: 0;
    animation: fadeIn 0.8s ease 0.3s forwards;
}

.label-line {
    display: block;
    width: 40px;
    height: 1px;
    background: var(--border);
    flex-shrink: 0;
}

.hero-names {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 50px;
    opacity: 0;
    animation: fadeIn 1s ease 0.6s forwards;
}

.hero-name {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 100;
    font-size: clamp(52px, 12vw, 130px);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink);
    line-height: 1.05;
    display: block;
}

.hero-name--first { margin-right: 0.1em; }
.hero-name--second { margin-left: 0.1em; }

.hero-amp {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(22px, 4vw, 44px);
    color: var(--accent);
    display: block;
    line-height: 1.6;
}

.hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeIn 1s ease 1s forwards;
}

.hero-meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0 30px;
}

.hero-meta-sep {
    width: 1px;
    height: 36px;
    background: var(--border);
    flex-shrink: 0;
}

.meta-label {
    font-size: 9px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gray-l);
}

.meta-value {
    font-family: 'EB Garamond', serif;
    font-size: 17px;
    color: var(--ink);
}

.hero-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    opacity: 0;
    animation: fadeIn 1s ease 1.6s forwards;
}

.hero-down-line {
    display: block;
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, transparent, var(--accent));
    animation: lineGrow 2s ease-in-out infinite;
}

@keyframes lineGrow {
    0%, 100% { transform: scaleY(1); opacity: 0.5; }
    50% { transform: scaleY(1.2) translateY(5px); opacity: 1; }
}

/* ===== INVITATION ===== */
.invitation {
    padding: 100px 40px;
    background: var(--bg);
}

.invitation-inner {
    max-width: 720px;
    margin: 0 auto;
}

.invitation-body {
    font-family: 'EB Garamond', serif;
    font-size: clamp(18px, 2.2vw, 24px);
    line-height: 1.9;
    color: var(--ink);
}

.invitation-body p { margin-bottom: 22px; }

.invite-lead {
    font-size: clamp(20px, 2.8vw, 28px);
    color: var(--ink);
    font-weight: 500;
}

.invite-accent {
    font-style: italic;
    font-size: clamp(22px, 3vw, 32px);
    color: var(--accent);
    margin: 28px 0 !important;
}

/* ===== COUNTDOWN ===== */
.countdown-section {
    padding: 100px 40px;
    background: black;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.countdown-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent);
}

.countdown-inner {
    max-width: 860px;
    margin: 0 auto;
}

.countdown-section .section-tag {
    color: var(--accent-2);
    opacity: 0.7;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: clamp(20px, 5vw, 60px);
    flex-wrap: wrap;
    margin: 10px 0 30px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-number {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 100;
    font-size: clamp(52px, 10vw, 96px);
    letter-spacing: -0.02em;
    color: var(--white);
    line-height: 1;
}

.countdown-label {
    font-size: 9px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    margin-top: 10px;
}

.countdown-sub {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 18px;
    color: rgba(255,255,255,0.35);
}

/* ===== DETAILS ===== */
.details {
    padding: 100px 40px;
    background: var(--white);
}

.details-inner {
    max-width: 720px;
    margin: 0 auto;
}

.details-list {
    display: flex;
    flex-direction: column;
}

.detail-row {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-l);
}

.detail-row:first-of-type { border-top: 1px solid var(--border-l); }

.detail-row-label {
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gray-l);
    white-space: nowrap;
}

.detail-row-sep {
    width: 1px;
    height: 100%;
    min-height: 20px;
    background: var(--border-l);
    flex-shrink: 0;
}

.detail-row-value {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.detail-row-value strong {
    font-family: 'EB Garamond', serif;
    font-weight: 500;
    font-size: 19px;
    color: var(--ink);
}

.detail-row-value span {
    font-size: 12px;
    color: var(--gray);
}

.photo {
    background: black;
    display: flex;
    justify-content: center;
}

.photo img {
    width: 100%;
    max-width: 720px;
}

/* ===== TIMELINE ===== */
.timeline-section {
    padding: 100px 40px;
    background: var(--bg);
}

.timeline-inner {
    max-width: 620px;
    margin: 0 auto;
}

.timeline {
    position: relative;
    padding-left: 80px;
    border-left: 1px solid var(--border);
    margin-top: 10px;
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 40px;
}

.timeline-item:last-child { margin-bottom: 0; }

.tl-time {
    position: absolute;
    left: -80px;
    top: 0;
    width: 60px;
    text-align: right;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 14px;
    letter-spacing: 1px;
    color: var(--accent);
    padding-top: 4px;
}

.tl-dot {
    position: absolute;
    left: -5px;
    top: 6px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--accent);
    flex-shrink: 0;
}

.tl-body {
    padding-left: 20px;
}

.tl-body h4 {
    font-family: 'EB Garamond', serif;
    font-size: 20px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 4px;
}

.tl-body p {
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--gray);
    line-height: 1.6;
}

/* ===== GIFTS ===== */
.gifts-section {
    padding: 100px 40px;
    background: var(--white);
}

.gifts-inner {
    max-width: 680px;
    margin: 0 auto;
}

.gifts-body { }

.gifts-lead {
    font-family: 'Playfair Display', serif;
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 400;
    color: var(--ink);
    line-height: 1.5;
    margin-bottom: 0;
}

.gifts-lead em {
    color: var(--accent);
}

.gifts-text {
    font-family: 'EB Garamond', serif;
    font-size: clamp(17px, 2vw, 20px);
    line-height: 1.9;
    color: var(--gray);
}

/* ===== RSVP ===== */
.rsvp-section {
    padding: 100px 40px;
    background: var(--bg);
}

.rsvp-inner {
    max-width: 560px;
    margin: 0 auto;
}

.rsvp-title {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 100;
    font-size: clamp(32px, 6vw, 52px);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    line-height: 1.2;
    margin-bottom: 12px;
}

.rsvp-deadline {
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--gray-l);
    margin-bottom: 48px;
}

.rsvp-form { }

.form-group { margin-bottom: 30px; }

.form-group > label {
    display: block;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 12px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0 0 12px 0;
    font-family: 'EB Garamond', serif;
    font-size: 18px;
    color: var(--ink);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    outline: none;
    transition: border-color 0.3s ease;
    appearance: none;
}

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

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-l);
    font-style: italic;
}

.form-group textarea {
    resize: none;
    min-height: 90px;
    line-height: 1.7;
}

.radio-group {
    display: flex;
    gap: 16px;
}

.radio-option { flex: 1; }

.radio-option input {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
}

.radio-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gray);
    background: transparent;
    height: 100%;
}

.radio-option input:checked + label {
    border-color: var(--ink);
    color: var(--ink);
    background: var(--ink);
    color: var(--white);
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 18px;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--white);
    background: var(--ink);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 36px;
    position: relative;
    overflow: hidden;
}

.submit-btn::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--accent);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.submit-btn:hover::after { transform: translateX(0); }
.submit-btn:hover { box-shadow: 0 4px 20px rgba(155, 107, 78, 0.3); }
.submit-btn span, .submit-btn { isolation: isolate; }
.submit-btn > * { position: relative; z-index: 1; }

.form-success {
    display: none;
    padding: 60px 0;
    text-align: center;
}

.form-success.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

.success-title {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 36px;
    color: var(--accent);
    margin-bottom: 12px;
}

.form-success p:last-child {
    font-family: 'EB Garamond', serif;
    font-size: 18px;
    color: var(--gray);
}

/* ===== FOOTER ===== */
footer {
    background: var(--black);
    padding: 60px 40px;
}

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

.footer-names {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 100;
    font-size: clamp(32px, 7vw, 68px);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.9);
}

.footer-date {
    font-family: 'EB Garamond', serif;
    font-size: 16px;
    color: rgba(255,255,255,0.3);
    letter-spacing: 4px;
}

.footer-line {
    width: 40px;
    height: 1px;
    background: var(--accent);
    opacity: 0.5;
}

.footer-note {
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.2);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .hero { padding: 80px 24px; }
    .hero-meta { row-gap: 20px; }
    .hero-meta-item { padding: 0 16px; }
    .hero-meta-sep { display: none; }

    .invitation { padding: 70px 24px; }
    .countdown-section { padding: 70px 24px; }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .detail-row-sep { display: none; }
    .detail-row-value { text-align: left; }

    .timeline-section { padding: 70px 24px; }
    .timeline { padding-left: 60px; }
    .tl-time { left: -60px; width: 50px; font-size: 12px; padding-top: 5px }

    .gifts-section { padding: 70px 24px; }
    .rsvp-section  { padding: 70px 24px; }
    footer { padding: 50px 24px; }
}
