:root {
    --cream: #faf5ec;
    --cream-deep: #f0e6d6;
    --terracotta: #bd6f52;
    --terracotta-dark: #a5573c;
    --sage: #8a9878;
    --sage-dark: #6f7d5e;
    --gold: #c6a568;
    --text: #4a3f35;
    --text-muted: #8b7d6c;
    --border: #e4d9c6;
    --surface: #ffffff;
    --shadow: 0 10px 30px rgba(74, 63, 53, 0.08);
    --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
.icon-line { width: 1em; height: 1em; vertical-align: -0.15em; }
.icon-big .icon-line { width: 48px; height: 48px; color: var(--terracotta); }

.admin-link {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 5;
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.55;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: opacity 0.2s;
}
.admin-link:hover { opacity: 1; }
@media (max-width: 560px) {
    .admin-link { font-size: 10px; top: 10px; right: 10px; }
}
body {
    margin: 0;
    font-family: 'Lora', Georgia, serif;
    background: var(--cream);
    color: var(--text);
    line-height: 1.7;
}
h1, h2, h3 { margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; color: var(--terracotta-dark); }
p { margin: 0 0 12px; }
a { color: var(--terracotta-dark); }

.container { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ---------- Hero ---------- */
.hero {
    min-height: 78vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    background: radial-gradient(ellipse at top, var(--cream-deep) 0%, var(--cream) 65%);
    position: relative;
}
.hero-flourish {
    color: var(--sage);
    margin-bottom: 18px;
    animation: float 4s ease-in-out infinite;
}
.hero-flourish .icon-line { width: 28px; height: 28px; }
.hero-names {
    font-family: 'Alex Brush', cursive;
    font-size: clamp(48px, 10vw, 88px);
    color: var(--terracotta);
    line-height: 1.15;
    margin-bottom: 10px;
}
.hero-photo {
    width: min(420px, 82vw);
    border-radius: 22px;
    box-shadow: var(--shadow);
    border: 6px solid var(--surface);
    margin: 6px auto 24px;
    display: block;
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.hero-sub { font-size: 18px; color: var(--text-muted); max-width: 480px; margin: 0 auto 20px; }
.hero-date {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 12px 28px;
    font-size: 17px;
    font-weight: 600;
    color: var(--terracotta-dark);
    box-shadow: var(--shadow);
    margin-top: 8px;
}
.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 18px;
}
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 100px;
    border: 1.5px solid var(--terracotta);
    color: var(--terracotta-dark);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    background: transparent;
    transition: 0.15s;
}
.btn-outline:hover { background: var(--terracotta); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline .icon-line { width: 16px; height: 16px; }
.btn-outline-solid { background: var(--terracotta); color: #fff; }
.btn-outline-solid:hover { background: var(--terracotta-dark); }

/* ---------- Divider ---------- */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 8px auto 40px;
    color: var(--sage);
}
.divider::before, .divider::after {
    content: '';
    height: 1px;
    width: 60px;
    background: var(--border);
}
.divider .icon-line { width: 24px; height: 24px; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-title {
    font-size: 34px;
    text-align: center;
    margin-bottom: 24px;
}
.section-title .leaf { font-size: 22px; }
.section-body { font-size: 16.5px; color: var(--text); }
.section-body p { margin-bottom: 14px; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin: 28px 0;
}
.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.info-card:hover { transform: translateY(-6px); box-shadow: 0 16px 34px rgba(74, 63, 53, 0.14); }
.info-card .icon { display: block; margin: 0 auto 10px; color: var(--terracotta); }
.info-card .icon .icon-line { width: 30px; height: 30px; }
.info-card h3 { font-size: 19px; margin-bottom: 6px; }
.info-card p { color: var(--text-muted); margin: 0; font-size: 15px; }

.callout {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    margin: 20px 0;
    transition: transform 0.25s ease;
}
.callout:hover { transform: translateX(4px); }
.callout strong { color: var(--terracotta-dark); }

.deadline-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    background: var(--sage);
    color: #fff;
    border-radius: 100px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    margin: 24px auto 0;
    max-width: 460px;
    animation: pulse-soft 2.8s ease-in-out infinite;
}
@keyframes pulse-soft {
    0%, 100% { box-shadow: 0 0 0 0 rgba(138, 152, 120, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(138, 152, 120, 0); }
}

/* ---------- RSVP form ---------- */
.rsvp-section { background: var(--cream-deep); }
.rsvp-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 36px 30px;
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 7px; font-size: 15px; color: var(--text); }
.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    background: var(--cream);
    color: var(--text);
}
.form-control:focus { outline: none; border-color: var(--terracotta); background: #fff; }
.radio-row { display: flex; gap: 14px; flex-wrap: wrap; }
.radio-pill {
    flex: 1;
    min-width: 130px;
    text-align: center;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--cream);
    transition: 0.15s;
}
.radio-pill input { display: none; }
.radio-pill.checked { background: var(--terracotta); border-color: var(--terracotta); color: #fff; }
.hidden { display: none !important; }
.btn-submit {
    width: 100%;
    padding: 16px;
    background: var(--terracotta);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 17px;
    font-weight: 700;
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: 0.15s;
}
.btn-submit:hover { background: var(--terracotta-dark); }
.hp-field { position: absolute; left: -9999px; }

/* ---------- Modal (admin) ---------- */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(74, 63, 53, 0.45);
    z-index: 100;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.modal-backdrop.active { display: flex; }
.modal {
    background: var(--surface);
    border-radius: var(--radius);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 20px; }
.modal-body { padding: 22px 24px; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}
.icon-btn {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-muted);
    background: none;
    border: none;
    font-size: 16px;
}
.icon-btn:hover { background: var(--cream-deep); color: var(--text); }
.btn-edit {
    padding: 7px 14px;
    border-radius: 100px;
    border: 1px solid var(--terracotta);
    background: transparent;
    color: var(--terracotta-dark);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}
.btn-edit:hover { background: var(--terracotta); color: #fff; }
.btn-secondary-cancel {
    padding: 12px 20px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
}
.btn-secondary-cancel:hover { background: var(--cream-deep); }

.success-card {
    text-align: center;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 48px 30px;
}
.success-card .icon-big { display: block; margin-bottom: 14px; }

/* ---------- Footer ---------- */
.footer {
    text-align: center;
    padding: 50px 24px 60px;
    color: var(--text-muted);
    font-size: 15px;
}
.footer .signature {
    font-family: 'Alex Brush', cursive;
    font-size: 34px;
    color: var(--terracotta);
    display: block;
    margin-top: 8px;
}
.footer-flourish { color: var(--sage); margin-top: 18px; animation: float 4s ease-in-out infinite; }
.footer-flourish .icon-line { width: 22px; height: 22px; }

.alert { border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; font-size: 14px; }
.alert-danger { background: #fbe9e4; color: #a5573c; border: 1px solid #eecfc2; }

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.reveal.revealed { opacity: 1; transform: translateY(0); }
.info-grid.reveal, .info-card.reveal { transition-delay: 0.05s; }
.info-grid .info-card:nth-child(2) { transition-delay: 0.1s; }
.info-grid .info-card:nth-child(3) { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
    .reveal, .hero-photo, .hero-flourish, .footer-flourish, .deadline-badge { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}

@media (max-width: 560px) {
    .section { padding: 40px 0; }
    .rsvp-card { padding: 26px 20px; }
}
