/* =============================================
   TEMPLATE 035 — Romantic Wedding
   Palette: Ivory, Rose Gold, Blush, Deep Burgundy
   ============================================= */

/* Variables */
:root {
    --color-bg: #fdfbf7;
    --color-bg-alt: #f8f4ef;
    --color-bg-dark: #dcaaaa;
    --color-text: #5c4343;
    --color-text-light: #8d7272;
    --color-accent: #cfa0a6;
    --color-accent-hover: #b5848a;
    --color-gold: #dcbabf;
    --color-gold-light: #e8cdd1;
    --color-blush: #f8edea;
    --color-cream: #fdfbf7;

    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Jost', sans-serif;
    --font-accent: 'Cormorant Garamond', serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

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

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

.section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 500;
    color: var(--color-accent);
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: 1px;
}

.section-ornament {
    font-size: 1.5rem;
    color: var(--color-gold);
    margin-bottom: 1.5rem;
    text-align: center;
    opacity: 0.7;
}

/* =============================================
   SCRATCH-TO-REVEAL OVERLAY
   ============================================= */
.scratch-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scratch-overlay.fade-out {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
}

.scratch-overlay.hidden {
    display: none;
}

.scratch-overlay__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #fdfbf7 0%, #f4e8e5 100%);
    z-index: 0;
}

.scratch-overlay__bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 30%, rgba(207, 160, 166, 0.15) 0%, transparent 70%);
}

.scratch-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
    padding: 0 20px;
}

.scratch-hint {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--color-gold-light);
    letter-spacing: 1px;
    text-align: center;
    animation: floatText 3s ease-in-out infinite;
}

.scratch-subhint {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: rgba(212, 188, 139, 0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    max-width: 100%;
}

@keyframes floatText {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.scratch-card {
    position: relative;
    width: min(85vw, 65vh);
    height: min(85vw, 65vh);
    max-width: 650px;
    max-height: 650px;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(201, 169, 110, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 80px rgba(201, 169, 110, 0.08);
    cursor: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIj4KICA8Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSIxNSIgc3R5bGU9ImZpbGw6I2ZmZjtzdHJva2U6IzAwMDtzdHJva2Utd2lkdGg6MXB4OyIgLz4KPC9zdmc+'), auto;
}

#scratchCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    touch-action: none;
}

.scratch-card__content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    z-index: 1;
    text-align: center;
    padding: 20px;
}

.scratch-card__names {
    font-family: var(--font-display);
    font-size: 2.8rem;
    color: var(--color-accent);
    margin-bottom: 15px;
}

.scratch-card__date {
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: var(--color-text-light);
    letter-spacing: 5px;
    text-transform: uppercase;
}

/* =============================================
   MAIN WEDDING SITE
   ============================================= */
.wedding-site {
    display: none;
    opacity: 0;
    transition: opacity 1s ease 0.3s;
}

.wedding-site.visible {
    opacity: 1;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    min-height: 600px;
    max-height: 900px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero__bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(44, 24, 16, 0.2) 0%,
        rgba(44, 24, 16, 0.5) 50%,
        rgba(44, 24, 16, 0.85) 100%
    );
}

.hero__content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

.hero__flourish {
    font-size: 1.2rem;
    color: var(--color-gold);
    margin-bottom: 1.5rem;
    opacity: 0.8;
    letter-spacing: 8px;
}

.hero__subtitle {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 5px;
    font-size: 0.85rem;
    color: var(--color-gold-light);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.hero__title {
    font-family: var(--font-display);
    font-size: 4.5rem;
    line-height: 1.15;
    font-weight: 400;
    color: var(--color-cream);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hero__title .ampersand {
    font-size: 2.5rem;
    font-style: italic;
    color: var(--color-gold);
    font-family: var(--font-accent);
}

.hero__date {
    margin-top: 1.5rem;
    font-size: 1rem;
    letter-spacing: 4px;
    font-weight: 300;
    color: rgba(254, 249, 244, 0.85);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.scroll-indicator span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-gold-light);
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: rgba(201, 169, 110, 0.25);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: var(--color-gold);
    animation: scrollDrop 2s ease-in-out infinite;
}

@keyframes scrollDrop {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

/* =============================================
   LOVE STORY SECTION
   ============================================= */
.love-story {
    background: var(--color-cream);
}

.love-story__timeline {
    max-width: 600px;
    margin: 3rem auto 0;
}

.love-story__item {
    padding: 30px 0;
}

.love-story__year {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: 8px;
}

.love-story__item h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 12px;
}

.love-story__item p {
    font-family: var(--font-accent);
    font-size: 1rem;
    color: var(--color-text-light);
    font-style: italic;
    line-height: 1.8;
    max-width: 500px;
    margin: 0 auto;
}

.love-story__divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.love-story__divider span {
    font-size: 1.2rem;
    color: var(--color-accent);
    opacity: 0.5;
}

/* =============================================
   IMAGE BREAK
   ============================================= */
.image-break {
    padding: 0 20px;
    background: var(--color-bg);
}

.image-break__wrapper {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.image-break__wrapper::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(201, 169, 110, 0.25);
    border-radius: 12px;
    pointer-events: none;
}

.image-break img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/10;
    object-fit: cover;
}

/* =============================================
   EVENT DETAILS
   ============================================= */
.event-details {
    background: var(--color-cream);
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 3rem;
}

.event-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(201, 169, 110, 0.15);
    border-radius: 16px;
    padding: 40px 24px;
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.event-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
}

.event-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-blush);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--color-accent);
}

.event-card__time {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--color-accent);
    margin-bottom: 12px;
    font-weight: 500;
}

.event-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--color-text);
}

.event-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 16px;
}

.event-card__link {
    font-size: 0.8rem;
    color: var(--color-accent);
    text-decoration: none;
    letter-spacing: 1px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.event-card__link:hover {
    color: var(--color-accent-hover);
}

/* =============================================
   COUNTDOWN
   ============================================= */
.countdown {
    background: var(--color-bg-dark);
    color: var(--color-cream);
}

.countdown .section-title {
    color: var(--color-gold-light);
}

.countdown__wrapper {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.count-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
}

.count-item span {
    font-family: var(--font-display);
    font-size: 3.5rem;
    color: var(--color-gold);
    line-height: 1;
    margin-bottom: 12px;
    font-weight: 400;
}

.count-item label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.6;
    color: var(--color-cream);
}

/* =============================================
   GALLERY
   ============================================= */
.gallery {
    background: var(--color-bg);
}

.gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 220px;
    gap: 16px;
    margin-top: 3rem;
}

.gallery__item {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.gallery__item--tall {
    grid-row: span 2;
}

.gallery__item--wide {
    grid-column: span 2;
}

.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery__item:hover img {
    transform: scale(1.06);
}

.gallery__item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(44, 24, 16, 0.2) 100%);
    pointer-events: none;
}

/* =============================================
   RSVP FORM
   ============================================= */
.rsvp {
    background: var(--color-cream);
}

.rsvp__desc {
    margin-bottom: 40px;
    color: var(--color-text-light);
    font-weight: 300;
    font-size: 1.05rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.rsvp__form {
    max-width: 500px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 48px 40px;
    border-radius: 20px;
    border: 1px solid rgba(201, 169, 110, 0.12);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
}

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

.rsvp__form input,
.rsvp__form select,
.rsvp__form textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--color-bg);
    border: 1px solid rgba(183, 110, 121, 0.15);
    border-radius: 10px;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.rsvp__form input:focus,
.rsvp__form select:focus,
.rsvp__form textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(183, 110, 121, 0.08);
}

.rsvp__form textarea {
    resize: vertical;
    min-height: 80px;
}

.rsvp__form select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23b76e79' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.rsvp__form select option {
    background: var(--color-bg);
    color: var(--color-text);
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--color-accent) 0%, #c97d87 100%);
    color: #fff;
    border: none;
    padding: 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 400;
    margin-top: 10px;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(183, 110, 121, 0.25);
}

.rsvp__success {
    display: none;
    margin-top: 30px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(201, 169, 110, 0.15);
}

.success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent) 0%, #c97d87 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.rsvp__success h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--color-accent);
    margin-bottom: 8px;
}

.rsvp__success p {
    color: var(--color-text-light);
    font-weight: 300;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
    padding: 80px 0;
    background: var(--color-bg-dark);
    border-top: 1px solid rgba(201, 169, 110, 0.1);
}

.footer__ornament {
    font-size: 1.3rem;
    color: var(--color-gold);
    opacity: 0.5;
    margin-bottom: 1.5rem;
}

.footer__names {
    font-family: var(--font-display);
    font-size: 3rem;
    font-style: italic;
    color: var(--color-gold-light);
    margin-bottom: 8px;
    font-weight: 400;
}

.footer__date {
    letter-spacing: 5px;
    color: rgba(254, 249, 244, 0.5);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.footer__tagline {
    font-family: var(--font-accent);
    font-style: italic;
    font-size: 1rem;
    color: rgba(254, 249, 244, 0.35);
}

/* =============================================
   ANIMATIONS (Scroll Reveal)
   ============================================= */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-in {
    opacity: 0;
    transition: opacity 1s ease;
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 1s ease, transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.visible {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .section {
        padding: 70px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero {
        height: auto;
        aspect-ratio: 9 / 16;
        min-height: 550px;
        max-height: none;
    }

    .hero__content {
        transform: translateY(-20px);
    }

    .hero__title {
        font-size: 3rem;
    }

    .scratch-hint {
        font-size: 1.3rem;
    }

    .events-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }

    .gallery__item--wide {
        grid-column: span 2;
    }

    .gallery__item--tall {
        grid-row: span 2;
    }

    .count-item {
        width: 70px;
    }

    .count-item span {
        font-size: 2.5rem;
    }

    .countdown__wrapper {
        gap: 20px;
    }

    .rsvp__form {
        padding: 32px 24px;
    }

    .love-story__year {
        font-size: 2rem;
    }

    .love-story__item h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 2.4rem;
    }

    .gallery__grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 150px;
    }
}
