/* ==========================================================================
   Variables
   ========================================================================== */
:root {
    --color-white: #ffffff;
    --color-black: #000000;
    --color-cream: #faf8f5;
    --color-text: #1a1a1a;
    --color-text-soft: #6b6b6b;
    --color-gold: #b8956a;
    --color-gold-light: #d4c4a8;
    --color-border: #eee8e0;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --radius: 16px;
    --radius-sm: 10px;
}

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

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: var(--delay, 0s);
}

@keyframes pulseDown {
    0%   { transform: translateY(0); opacity: 0.4; }
    50%  { transform: translateY(8px); opacity: 1; }
    100% { transform: translateY(0); opacity: 0.4; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes kenBurns {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.06); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   Photo Sections
   ========================================================================== */
.photo-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.photo-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: kenBurns 28s ease-in-out infinite;
}

.photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.15) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.9) 100%
    );
    z-index: 1;
}

/* --- Hero --- */
.hero-section {
    height: 100svh;
    min-height: 600px;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--color-white);
    padding: 0 1.5rem;
}

.hero-content h1 {
    font-size: clamp(2.4rem, 9vw, 4.5rem);
    font-weight: 400;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
}

.hero-content .subtitle {
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-family: var(--font-heading);
    letter-spacing: 4px;
    color: var(--color-white);
}

/* Hero bottom — invite text + arrow */
.hero-bottom {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--color-white);
}

.hero-invite {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3.5px;
    opacity: 0.8;
}

.scroll-indicator {
    width: 20px;
    height: 20px;
    opacity: 0.5;
    animation: pulseDown 2.5s infinite ease-in-out;
}

/* --- Quote --- */
.quote-section {
    height: 50vh;
    min-height: 300px;
}

.quote-section .photo-bg {
    animation-duration: 35s;
    background-position: center 30%;
}

.quote-content {
    position: relative;
    z-index: 2;
    color: var(--color-white);
    padding: 0 2rem;
    max-width: 550px;
}

.quote-text {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    line-height: 1.6;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* --- Thank You --- */
.thank-you-section {
    height: 50vh;
    min-height: 300px;
}

.thank-you-section .photo-bg {
    animation-duration: 35s;
    animation-delay: -10s;
}

.thank-you-content {
    position: relative;
    z-index: 2;
    color: var(--color-white);
    padding: 0 2rem;
}

.thank-you-content h2 {
    font-size: clamp(1.8rem, 6vw, 3rem);
    margin-bottom: 0.8rem;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.thank-you-content p {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: clamp(0.95rem, 3vw, 1.2rem);
    opacity: 0.9;
}

/* ==========================================================================
   Content Sections
   ========================================================================== */
.content-section {
    position: relative;
    background-color: var(--color-cream);
}

/* ==========================================================================
   Parents
   ========================================================================== */
#parents {
    padding: 4.5rem 0;
}

.section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-text-soft);
    margin-bottom: 1.5rem;
}

.parents-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

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

.parent-names {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--color-text);
}

.surname {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 0.2rem;
    color: var(--color-text);
}

.amp-divider {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--color-gold);
    line-height: 1;
}

.ornament-divider {
    margin: 2.5rem auto;
    text-align: center;
    color: var(--color-gold-light);
}

.godparents-block .section-label { margin-top: 0; }
.godparents-block .surname { font-size: 1.35rem; }

/* ==========================================================================
   Events — vertical timeline
   ========================================================================== */
.events-section {
    padding: 4rem 0 4.5rem;
}

.section-title {
    text-align: center;
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 2.5rem;
    color: var(--color-text);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 5.5rem;
}

/* Vertical line */
.timeline::before {
    content: '';
    position: absolute;
    left: 4.2rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 1px;
    background: var(--color-border);
}

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

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

/* Time label — left of the line */
.timeline-time {
    position: absolute;
    left: -5.5rem;
    top: 1rem;
    width: 3.5rem;
    text-align: right;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--color-gold);
}

/* Dot on the line */
.timeline-dot {
    position: absolute;
    left: -1.55rem;
    top: 1.25rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-gold);
    box-shadow: 0 0 0 3px var(--color-cream), 0 0 0 4px var(--color-border);
    z-index: 1;
}

/* Card */
.timeline-card {
    flex: 1;
    background: var(--color-white);
    border-radius: var(--radius-sm);
    padding: 1.2rem 1.3rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--color-border);
    transition: box-shadow 0.3s ease;
}

.timeline-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.timeline-card h3 {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
    color: var(--color-text);
}

.timeline-venue {
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--color-text);
    font-weight: 400;
}

.timeline-address {
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--color-text-soft);
    margin-bottom: 0.6rem;
}

.timeline-salon {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-gold);
    margin-bottom: 0.6rem;
}

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-gold);
    text-decoration: none;
    transition: opacity 0.2s;
}

.map-link:hover {
    opacity: 0.7;
}

.map-link svg {
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   RSVP
   ========================================================================== */
.rsvp-section {
    padding: 0 0 4.5rem;
}

.rsvp-card {
    max-width: 100%;
    text-align: center;
    background: var(--color-white);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 2rem 1.5rem 1.8rem;
}

.rsvp-card h2 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.rsvp-text {
    margin-bottom: 1.5rem;
    color: var(--color-text-soft);
    font-size: 0.88rem;
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--color-text-soft);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: var(--color-cream);
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: var(--color-text);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    -webkit-appearance: none;
    appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.2rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(184, 149, 106, 0.1);
}

.btn-row {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.3rem;
}

.submit-btn,
.decline-btn {
    flex: 1;
    padding: 0.9rem;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: background 0.3s ease, opacity 0.3s ease;
}

.submit-btn {
    background: var(--color-text);
    color: var(--color-white);
}

.submit-btn:hover {
    background: var(--color-black);
}

.decline-btn {
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text-soft);
}

.decline-btn:hover {
    border-color: var(--color-text-soft);
}

.submit-btn:active,
.decline-btn:active {
    transform: scale(0.98);
}

/* HTMX */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-block; }
.htmx-request.htmx-indicator { display: inline-block; }
.htmx-request .btn-text { display: none; }

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-white);
    animation: spin 0.8s linear infinite;
}

/* RSVP Success */
.success-box {
    text-align: center;
}

.success-animate {
    animation: fadeInSmooth 0.5s ease both;
}

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

.success-box .success-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem auto;
    color: #5a9a6a;
    overflow: hidden;
}

.success-box .success-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Prevent iOS auto-zoom on input focus */
input[type="text"], input[type="email"], textarea {
    font-size: 16px;
}

/* ==========================================================================
   Desktop (768px+)
   ========================================================================== */
@media (min-width: 768px) {
    .container {
        max-width: 640px;
    }

    .parents-row {
        flex-direction: row;
        justify-content: center;
        gap: 2.5rem;
    }

    .amp-divider { align-self: center; }

    .quote-text { font-size: 1.7rem; }

    .timeline { padding-left: 6.5rem; }
    .timeline::before { left: 5rem; }
    .timeline-time { left: -6.5rem; width: 4.2rem; font-size: 1.1rem; }
    .timeline-dot { left: -1.8rem; }
}
