@font-face {
    font-family: 'HarryBeastDisplay';
    src: url('fonts/HarryBeastDisplay-Regular.woff2') format('woff2'),
         url('fonts/HarryBeastDisplay-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

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

:root {
    --bg:            #0d0d0d;
    --bg-hero:       #111111;
    --gold:          #c9a227;
    --gold-light:    #f0d060;
    --text:          #e8e6df;
    --text-muted:    #9e9a8e;
    --griff:         #7f0909;
    --griff-gold:    #ffc500;
    --huff:          #372e29;
    --huff-yellow:   #ecb939;
    --raven:         #0e1a40;
    --raven-bronze:  #946b2d;
    --slyt:          #1a472a;
    --slyt-silver:   #aaaaaa;
    --font-title:    'HarryBeastDisplay', serif;
    --font-body:     'sofia-pro', Georgia, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.65;
    overflow-x: hidden;
}

/* ============================================================
   INTRO — PUERTAS ANIMADAS
   ============================================================ */
#intro {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg);
}

#tsparticles {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.doors {
    position: absolute;
    inset: 0;
    display: flex;
    z-index: 1;
    pointer-events: none;
}

.door {
    flex: 1;
    transition: transform 0.85s cubic-bezier(0.7, 0, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.door-left {
    background: radial-gradient(ellipse at 85% 50%, #2a1f00 0%, #0d0d0d 70%);
    border-right: 2px solid var(--gold);
}

.door-right {
    background: radial-gradient(ellipse at 15% 50%, #2a1f00 0%, #0d0d0d 70%);
    border-left: 2px solid var(--gold);
}

.intro-center {
    position: relative;
    z-index: 2;
    text-align: center;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.intro-center.show {
    opacity: 1;
    transform: translateY(0);
}

.intro-center h1 {
    font-family: var(--font-title);
    font-size: clamp(3rem, 14vw, 6rem);
    color: var(--gold);
    line-height: 1;
    text-shadow: 0 0 40px rgba(201,162,39,0.8), 0 0 80px rgba(201,162,39,0.3);
}

.intro-center p {
    font-size: 0.85rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

#intro.opening .door-left  { transform: translateX(-100%); }
#intro.opening .door-right { transform: translateX(100%); }
#intro.done { display: none; }

/* ============================================================
   MAIN
   ============================================================ */
#main {
    opacity: 0;
    transition: opacity 0.5s ease 0.1s;
}

#main.show { opacity: 1; }

/* ============================================================
   SHARED SECTION STYLES
   ============================================================ */
section {
    padding: 4rem 1.5rem;
    width: 100%;
}

section > * {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.s-title {
    font-family: var(--font-title);
    font-size: clamp(1.3rem, 5vw, 2rem);
    color: #fff;
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-transform: uppercase;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
}

.s-title::before,
.s-title::after {
    content: '';
    flex: 0 1 90px;
    min-width: 0;
    height: 13px;
    background: url('images/header-flourish.svg') no-repeat center / contain;
}

.s-title::before {
    transform: scaleX(-1);
}

.s-rule {
    text-align: center;
    color: var(--gold);
    opacity: 0.5;
    letter-spacing: 0.4em;
    margin: 0.5rem auto 2rem;
}

/* ============================================================
   CSS STARS (hero)
   ============================================================ */
.stars-wrap {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    animation: twinkle var(--d, 3s) ease-in-out infinite var(--dl, 0s);
}

@keyframes twinkle {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50%       { opacity: 1;    transform: scale(1.8); }
}

/* ============================================================
   1. HERO
   ============================================================ */
#hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.5rem 3rem;
    max-width: 100%;
    background-color: var(--bg-hero);
    background-image:
        url('images/horizons_village.png'),
        linear-gradient(to bottom, rgb(21,17,29) 0%, rgb(50,54,87) 121.35%);
    background-size: 2000px, 100% 100%;
    background-position: 50% 101%, center bottom;
    background-repeat: no-repeat, no-repeat;
    overflow: hidden;
}

.hero-bg-img {
    position: absolute;
    inset: 0;
    background: url('images/hero-bg.jpg') center/cover no-repeat;
    opacity: 0.2;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.hero-hat { width: 100%; max-width: 340px; }

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

@media (min-width: 1200px) {
    .hero-inner {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0;
        max-width: 1200px;
        margin: 0 auto;
        width: 100%;
    }

    .hero-hat {
        flex: 0 0 50%;
        max-width: 50%;
        width: 50%;
    }

    .hero-text {
        flex: 0 0 50%;
        max-width: 50%;
        text-align: left;
        padding-left: 3rem;
    }

    .hero-name {
        font-size: clamp(3rem, 5vw, 5.5rem);
    }

    .hero-age {
        font-size: clamp(1rem, 1.5vw, 1.5rem);
    }
}

.hero-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.8;
    margin-bottom: 2rem;
}

.hero-name {
    font-family: var(--font-title);
    font-size: clamp(4rem, 18vw, 7rem);
    color: var(--gold);
    line-height: 0.6;
    text-shadow: 0 0 50px rgba(201,162,39,0.55);
    margin-bottom: 0.5rem;
}
.hero-name span{
    font-size: 5rem;
    line-height: 1;
     display: inline-block;
     animation: float 3s ease-in-out infinite;
}
@media (max-width: 768px){
    .hero-hat{
        max-width: 200px;
    }
    .hero-name {
        font-size: 4rem;
    }
    .hero-name span{
        font-size: 2.5rem;
    }
}
.hero-age {
    font-family: var(--font-title);
    font-size: clamp(1.1rem, 4.5vw, 1.8rem);
    color: var(--text);
    opacity: 0.85;
    margin-bottom: 1.25rem;
}

.hero-date {
    font-size: 0.95rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 2.5rem;
    line-height: 1.9;
}

.hero-date strong { color: var(--text); }

/* CTA button */
.btn-gold {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 1;
    visibility: visible;
    white-space: nowrap;
    display: inline-block;
    background: linear-gradient(135deg, #b8911e 0%, var(--gold-light) 50%, #b8911e 100%);
    color: #1a1200;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.9rem 2.25rem;
    border-radius: 4px;
    text-decoration: none;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    box-shadow: 0 4px 20px rgba(201,162,39,0.35);
}

.btn-gold.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(8px);
}

.btn-gold:hover, .btn-gold:active {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 8px 32px rgba(201,162,39,0.55);
}

/* House crests */
.crests {
    display: flex;
    gap: .25rem;
    justify-content: center;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.crest {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.crest-badge {
    position: relative;
    width: 70px;
}

.crest-banner {
    display: block;
    width: 100%;
}

.crest-icon {
    position: absolute;
    inset: 0;
    width: 50%;
    height: 80%;
    transform: translate(50%, 0%);
}

.crest-label {
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0.7;
}

/* ============================================================
   2. CUENTA REGRESIVA
   ============================================================ */
#cuenta {
    background-color: rgb(18,11,14);
    background-image:
        url('images/horizons_train.png'),
        linear-gradient(to bottom, rgb(18,11,14) 0%, rgb(71,64,131) 121.35%);
    background-size: 2000px, 100% 100%;
    background-position: 50% 101%, center bottom;
    background-repeat: no-repeat, no-repeat;
}

.cd-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.cd-unit {
    background: rgba(201,162,39,0.07);
    border: 1px solid rgba(201,162,39,0.18);
    border-radius: 8px;
    padding: 1.1rem 0.4rem;
    text-align: center;
}

.cd-num {
    font-family: var(--font-title);
    font-size: clamp(2rem, 9vw, 3.5rem);
    color: var(--gold);
    line-height: 1;
    display: block;
}

.cd-lbl {
    display: block;
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.cd-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1.25rem;
    font-style: italic;
}

/* ============================================================
   3. PROGRAMA
   ============================================================ */
#programa {
    background-color: rgb(17,11,14);
    background-image:
        url('images/horizons_hogwarts.png'),
        linear-gradient(to bottom, rgb(17,11,14) 0%, rgb(55,55,55) 121.35%);
    background-size: 2000px, 100% 100%;
    background-position: 50% 101%, center bottom;
    background-repeat: no-repeat, no-repeat;
}

.timeline { position: relative; margin-top: 0.5rem; }

.timeline::before {
    content: '';
    position: absolute;
    left: 1.2rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(201,162,39,0.35) 20%, rgba(201,162,39,0.35) 80%, transparent);
}

.tl-item {
    display: flex;
    gap: 1.1rem;
    padding: 0.9rem 0;
    position: relative;
}

.tl-bullet {
    flex-shrink: 0;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: rgba(201,162,39,0.09);
    border: 1px solid rgba(201,162,39,0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

.tl-body { padding-top: 0.35rem; }

.tl-time {
    font-family: var(--font-title);
    font-size: 1.1rem;
    color: var(--gold);
}

.tl-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.prog-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 1.5rem;
    font-style: italic;
    opacity: 0.75;
}

/* ============================================================
   4. UBICACIÓN
   ============================================================ */
#ubicacion {
    background-color: rgb(20,14,10);
    background-image:
        url('images/horizons_bridge.png'),
        linear-gradient(to bottom, rgb(24,21,14) 0%, rgb(76,60,38) 121.35%);
    background-size: 2000px, 100% 100%;
    background-position: 50% 101%, center bottom;
    background-repeat: no-repeat, no-repeat;
}

.map-frame {
    margin: 1.5rem auto 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(201,162,39,0.2);
    aspect-ratio: 16/9;
    background: rgba(201,162,39,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-frame iframe { width: 100%; height: 100%; border: none; display: block; }

.map-ph {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 1rem;
}

.map-ph span { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }

address {
    font-style: normal;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

address small { color: var(--text-muted); font-size: 0.82rem; }

.btn-outline {
    display: block;
    border: 1.5px solid var(--gold);
    color: var(--gold);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    transition: background 0.2s, color 0.2s;
}

.btn-outline:hover { background: var(--gold); color: #1a1200; }

/* ============================================================
   5. REGALOS
   ============================================================ */
#regalos {
    background-color: rgb(24,21,14);
    background-image:
        url('images/horizons_quidditch.png'),
        linear-gradient(to bottom, rgb(15,15,17) 0%, rgb(85,73,54) 121.35%);
    background-size: 2000px, 100% 100%;
    background-position: 50% 101%, center bottom;
    background-repeat: no-repeat, no-repeat;
}

.gifts-intro {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-style: italic;
    margin-bottom: 1.75rem;
}

.gifts-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.gifts-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(201,162,39,0.05);
    border-radius: 6px;
    border-left: 2px solid rgba(201,162,39,0.25);
    font-size: 0.9rem;
}

.gifts-list .gi { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.05rem; }

.gifts-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 1.5rem;
    font-style: italic;
    opacity: 0.75;
}

/* ============================================================
   6. FOTOS
   ============================================================ */
#fotos { background: linear-gradient(180deg, var(--bg), #0a0a0a); }

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

.photo-cell {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(201,162,39,0.05);
    border: 1px solid rgba(201,162,39,0.13);
}

.photo-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-ph {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: var(--text-muted);
    font-size: 0.65rem;
    letter-spacing: 0.05em;
}

.photo-ph span { font-size: 1.4rem; opacity: 0.35; }

/* ============================================================
   7. RSVP / WHATSAPP
   ============================================================ */
#rsvp {
    background: #0e0812;
    text-align: center;
}

.rsvp-text {
    color: var(--text-muted);
    font-size: 0.93rem;
    line-height: 1.9;
    margin-bottom: 2rem;
}

.btn-wa {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    background: #25D366;
    color: #fff;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    padding: 1rem 1.75rem;
    border-radius: 50px;
    text-decoration: none;
    letter-spacing: 0.06em;
    box-shadow: 0 4px 22px rgba(37,211,102,0.28);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-wa:hover, .btn-wa:active {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(37,211,102,0.45);
}

.btn-wa svg { width: 1.2rem; height: 1.2rem; fill: currentColor; flex-shrink: 0; }


/* ============================================================
   FOOTER
   ============================================================ */
footer {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    opacity: 0.45;
    border-top: 1px solid rgba(201,162,39,0.1);
}

footer a{
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}