/* =========================================================
   WEDDING LANDING PAGE — styles.css
   ---------------------------------------------------------
   Estrategia: mobile-first, minimalista, mucho espacio
   en blanco, tipografía refinada.

   Para modificar la apariencia (colores, fuentes, imagen
   del hero) tocá únicamente las variables en :root.
   ========================================================= */

/* ---------- 1. CUSTOM PROPERTIES (tokens de diseño) ---------- */
:root {
    /* Paleta */
    --color-bg: #73896e; /* verde sage (background principal) */
    --color-bg-soft: #81997b; /* variante suave del verde */
    --color-cream: #eeefda; /* crema para tipografía y tarjetas */
    --color-cream-soft: #ebe3d5;
    --color-accent: #eeefda; /* dorado/beige para detalles */
    --color-dark: #344c3d; /* texto oscuro para contrastes */

    /* Tipografías
     Títulos: TAN Meringue (si la cargás vos en /fonts),
              con fallback a Cormorant Garamond. */
    --font-title:
        "TAN Meringue", "Cormorant Garamond", "Playfair Display", serif;
    --font-body: "Montserrat", "Helvetica Neue", Arial, sans-serif;

    /* Escala tipográfica (mobile-first) */
    --fs-xs: 0.75rem;
    --fs-sm: 0.875rem;
    --fs-base: 1rem;
    --fs-md: 1.125rem;
    --fs-lg: 1.5rem;
    --fs-xl: 2rem;
    --fs-2xl: 2.75rem;
    --fs-3xl: 3.5rem;

    /* Espaciado */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;

    /* Layout */
    --container: 72rem;
    --radius: 2px;

    /* Imagen del Hero
     Reemplazá el archivo en /assets/hero.jpg o cambiá la URL. */
    --hero-image: url("../assets/hero.jpg");

    /* Transiciones */
    --transition: 300ms ease;
}

/* ---------- 2. FUENTE CUSTOM (TAN Meringue) ----------
   Archivos en /assets/fonts/.
   Se declaran en orden de preferencia: el navegador usa el
   primer formato que soporte (.woff2 es el más liviano). */
@font-face {
    font-family: "TAN Meringue";
    src:
        url("../assets/fonts/TAN MERINGUE.woff2") format("woff2"),
        url("../assets/fonts/TAN MERINGUE.ttf") format("truetype"),
        url("../assets/fonts/TAN MERINGUE.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ---------- 3. RESET / BASE ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: 1.65;
    color: var(--color-cream);
    background-color: var(--color-bg);
    font-weight: 300;
    letter-spacing: 0.02em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: opacity var(--transition);
}

a:hover {
    opacity: 0.75;
}

/* ---------- 4. TIPOGRAFÍA COMPARTIDA ---------- */
h1,
h2,
h3 {
    font-family: var(--font-title);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: 0.01em;
}

/* Títulos de sección (h2): en Montserrat para no saturar con
   TAN Meringue. Uso uppercase + tracking amplio + peso ligero
   para lograr un look editorial/tipo invitación, manteniendo
   el contraste con los títulos gigantes del hero y el countdown. */
.section__title {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1.375rem, 3.2vw, 1.875rem);
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--color-cream);
    position: relative;
}

/* línea decorativa debajo de cada título */
.section__title::after {
    content: "";
    display: block;
    width: 40px;
    height: 1px;
    background-color: var(--color-accent);
    margin: var(--space-md) auto 0;
}

/* ---------- 5. LAYOUT HELPERS ---------- */
main > section {
    padding: var(--space-xl) var(--space-md);
    max-width: var(--container);
    margin-inline: auto;
}

/* ---------- 6. HERO ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh; /* mejor en móviles modernos */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-cream);
    padding: var(--space-lg) var(--space-md);
    overflow: hidden;
    isolation: isolate; /* mantiene el parallax dentro del hero */
}

/* Background en pseudo-elemento para permitir parallax sin
   arrastrar el contenido. El JS setea --parallax-y y --parallax-scale. */
.hero::before {
    content: "";
    position: absolute;
    inset: -5% -5% -10% -5%; /* overshoot para que no se vean bordes al translate */
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: translate3d(0, var(--parallax-y, 0px), 0)
        scale(var(--parallax-scale, 1.05));
    will-change: transform;
    z-index: -1;
}

/* overlay para dar legibilidad al texto sobre la foto */
.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(46, 58, 42, 0.45) 0%,
        rgba(115, 137, 110, 0.55) 100%
    );
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero__tagline {
    font-family: var(--font-body);
    font-weight: 300;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    font-size: var(--fs-xs);
    margin-bottom: var(--space-md);
    opacity: 0.9;
}

/* Nombres del hero: apilados en 2 líneas, minúscula, gigantes.
   El "&" va pegado al segundo nombre (misma línea visual). */
.hero__names {
    /* Tamaño fluido: crece con el viewport, con tope razonable en desktop.
     Ajustá los 3 valores del clamp para cambiar la escala global:
       - 3.5rem  → mínimo (mobile chico)
       - 14vw    → cuánto crece con el ancho del viewport
       - 9rem    → tope máximo (desktop) */
    font-size: clamp(3.5rem, 14vw, 9rem);

    /* Espaciado entre las dos líneas.
     TAN Meringue tiene ascendentes/descendentes largos (tildes, f, &),
     así que un line-height de 1.1 evita que se superpongan. */
    line-height: 1.1;

    font-weight: 400;
    text-transform: lowercase;
    letter-spacing: -0.005em;
    margin-bottom: var(--space-lg);
}

.hero__name {
    display: block;
    white-space: nowrap;
}

.hero__amp {
    /* Mismo color y tamaño que los nombres, sin cursiva */
    display: inline;
    font-size: 1em;
    font-style: normal;
    color: inherit;
    margin: 0;
}

.hero__date {
    font-family: var(--font-body);
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-size: var(--fs-sm);
    margin-top: var(--space-md);
}

/* Botón RSVP del hero: separa bien de la fecha y queda
   centrado en el flujo flex del hero__content. */
.hero__rsvp {
    margin-top: var(--space-lg);
}

/* ---------- 7. COUNTDOWN ---------- */
.countdown {
    text-align: center;
}

/* Los 4 números en línea con ":" como separador (estilo reloj).
   Sin bordes, sin cajas, sin labels — puro ritmo tipográfico.
   --cd-gap se reutiliza para calcular el centrado del ":". */
.countdown__grid {
    --cd-gap: clamp(2.25rem, 7vw, 4rem);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--cd-gap);
}

.countdown__number {
    font-family: var(--font-title);
    font-size: clamp(2.5rem, 9vw, 5rem);
    line-height: 1;
    color: var(--color-cream);
    position: relative;
}

/* Separador ":" centrado exactamente en el medio del gap.
   Técnica: left = ancho del número (100%) + mitad del gap;
   luego translate(-50%) para alinear el propio ":" en su centro. */
.countdown__number:not(:last-child)::after {
    content: ":";
    position: absolute;
    left: calc(100% + var(--cd-gap) / 2);
    top: 50%;
    transform: translate(-50%, -55%);
    color: var(--color-accent);
    opacity: 0.65;
    line-height: 1;
    pointer-events: none;
}

/* ---------- 8. EVENTS (Ceremonia & Fiesta unificadas) ---------- */
.events__grid {
    display: flex;
    justify-content: center;
}

.event-card {
    text-align: center;
    padding: var(--space-lg) var(--space-md);
    border: 1px solid rgba(245, 239, 230, 0.25);
    border-radius: var(--radius);
    background-color: rgba(245, 239, 230, 0.04);
    transition:
        transform var(--transition),
        background-color var(--transition);
    max-width: 480px;
    width: 100%;
}

/* Horario de llegada: mismo tamaño que la dirección,
   con la hora apenas marcada por peso (no por color). */
.event-card__arrival {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: var(--fs-sm);
    line-height: 1.5;
    margin-bottom: var(--space-md);
    opacity: 0.9;
}

.event-card__arrival-time {
    font-weight: 500;
    opacity: 1;
}

.event-card:hover {
    transform: translateY(-4px);
    background-color: rgba(245, 239, 230, 0.08);
}

.event-card__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-md);
    color: var(--color-accent);
}

.event-card__icon svg {
    width: 100%;
    height: 100%;
}

/* =========================================================
   Todo el bloque usa Montserrat. La jerarquía se construye
   con PESOS (500 > 400 > 300), no con cambio de tipografía
   ni de tamaño, para un resultado más armónico.
   ========================================================= */

/* Nombre del lugar: apenas más pesado que el resto */
.event-card__place {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: var(--fs-md);
    letter-spacing: 0.04em;
    line-height: 1.3;
    color: var(--color-cream);
    margin-bottom: var(--space-xs);
}

/* Dirección: peso ligero, en el mismo tamaño que el resto */
.event-card__address {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: var(--fs-sm);
    line-height: 1.5;
    margin-bottom: var(--space-md);
    opacity: 0.9;
}

.event-card__address {
    opacity: 0.85;
    margin-bottom: var(--space-md);
}

/* ---------- 9. BOTONES ---------- */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--fs-xs);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    padding: 0.9rem 2rem;
    border-radius: var(--radius);
    transition: all var(--transition);
    cursor: pointer;
    border: 1px solid var(--color-cream);
}

.btn--ghost {
    color: var(--color-cream);
    background: transparent;
}

.btn--ghost:hover {
    background-color: var(--color-cream);
    color: var(--color-bg);
    opacity: 1;
}

.btn--solid {
    background-color: var(--color-cream);
    color: var(--color-bg);
    border-color: var(--color-cream);
    padding: 1rem 2.5rem;
}

.btn--solid:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    opacity: 1;
}

/* ---------- 9.5 FAQ ---------- */
.faq__list {
    max-width: 640px;
    margin: 0 auto;
}

.faq__item {
    border-bottom: 1px solid rgba(245, 239, 230, 0.18);
}

.faq__item:first-child {
    border-top: 1px solid rgba(245, 239, 230, 0.18);
}

/* Pregunta (summary clickeable). Quitamos el marker
   default del navegador y usamos uno custom (.faq__icon). */
.faq__question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-xs);
    cursor: pointer;
    list-style: none;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--fs-base);
    color: var(--color-cream);
    transition: color var(--transition);
    user-select: none;
}

.faq__question::-webkit-details-marker { display: none; }
.faq__question::marker { content: ""; }

.faq__question:hover,
.faq__item[open] .faq__question {
    color: var(--color-accent);
}

.faq__question-text {
    flex: 1;
    line-height: 1.4;
}

/* Icono "+": barras horizontal + vertical.
   Al abrir, la vertical rota y desaparece → queda "−". */
.faq__icon {
    position: relative;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.faq__icon::before,
.faq__icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background-color: currentColor;
    transition:
        transform 300ms ease,
        opacity 300ms ease;
}

.faq__icon::before {
    width: 14px;
    height: 1px;
    transform: translate(-50%, -50%);
}

.faq__icon::after {
    width: 1px;
    height: 14px;
    transform: translate(-50%, -50%);
}

.faq__item[open] .faq__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

/* Respuesta: aparece con un fade-in suave al abrir.
   (El <details> nativo cierra instantáneo, sin animación,
   para mantener el código simple y accesible.) */
.faq__answer {
    padding: 0 var(--space-xs) var(--space-md);
    font-size: var(--fs-sm);
    line-height: 1.7;
    opacity: 0.9;
    max-width: 580px;
    animation: faq-fade-in 400ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.faq__answer p { margin: 0; }

@keyframes faq-fade-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

/* ---------- 10. RSVP ---------- */
.rsvp {
    text-align: center;
    background-color: var(--color-bg-soft);
    max-width: none !important; /* override para hacer banda full-width */
    padding-left: var(--space-md);
    padding-right: var(--space-md);
}

.rsvp__text {
    max-width: 500px;
    margin: 0 auto var(--space-lg);
    font-size: var(--fs-base);
}

/* ---------- 11. DRESS CODE ---------- */
.dresscode {
    text-align: center;
}

/* Mini galería de inspiración del dress code
   (alternativa custom al embed de Pinterest) */
.dresscode__gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    max-width: 520px;
    margin: var(--space-lg) auto;
}

.dresscode__item {
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 3 / 4;
    background-color: rgba(245, 239, 230, 0.06); /* placeholder mientras carga */
}

.dresscode__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
    transition: transform 700ms cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}

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

@media (min-width: 640px) {
    .dresscode__gallery {
        grid-template-columns: repeat(3, 1fr);
        max-width: 720px;
        gap: var(--space-md);
    }
}

/* ---------- 12. NOTES / ACLARACIONES ---------- */
.notes {
    text-align: center;
}

.notes__list {
    list-style: none;
    max-width: 560px;
    margin: 0 auto;
    padding: 0;
}

.notes__item {
    padding: var(--space-md) var(--space-sm);
    font-size: var(--fs-sm);
    line-height: 1.7;
    opacity: 0.92;
    border-top: 1px solid rgba(245, 239, 230, 0.15);
}

.notes__item:first-child {
    border-top: none;
}

.notes__text {
    margin: 0;
}

/* Negritas inline dentro de las aclaraciones: peso marcado
   para que las frases clave destaquen bien. */
.notes__text strong {
    font-weight: 700;
}

/* Datos tabulados (p. ej. banco, titular, nro de cuenta).
   Usa <dl> con grid de 2 columnas para alinear label/valor. */
.notes__data {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: var(--space-md);
    row-gap: 0.35rem;
    max-width: 360px;
    margin: var(--space-sm) auto 0;
    padding: var(--space-sm) 0 0;
    text-align: left;
}

.notes__data dt {
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent);
    align-self: center;
}

.notes__data dd {
    margin: 0;
    font-size: var(--fs-sm);
    word-break: break-word;
}

/* ---------- 13. PHOTO NOTE ----------
   Bloque destacado al final: banda full-width con fondo verde
   más claro (mismo tratamiento que la sección RSVP) + ícono
   de cámara + mensaje en mayúsculas. */
.photo-note {
    text-align: center;
    background-color: var(--color-bg-soft);
    max-width: none !important; /* override de main > section */
    padding-left: var(--space-md);
    padding-right: var(--space-md);
}

.photo-note__icon {
    width: 44px;
    height: 44px;
    margin: 0 auto var(--space-md);
    color: var(--color-accent);
}

.photo-note__icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.photo-note__text {
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    line-height: 1.9;
    margin: 0 auto;
    max-width: 680px;
    color: var(--color-cream);
}

@media (min-width: 640px) {
    .photo-note__text {
        font-size: calc(var(--fs-sm) + 0.05rem);
        max-width: 760px;
    }
}

/* ---------- 14. FOOTER ---------- */
.footer {
    text-align: center;
    padding: var(--space-lg) var(--space-md);
    border-top: 1px solid rgba(245, 239, 230, 0.15);
    margin-top: var(--space-xl);
}

.footer__names {
    font-family: var(--font-title);
    font-size: var(--fs-lg);
    margin-bottom: var(--space-xs);
}

.footer__date {
    font-size: var(--fs-xs);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
    color: var(--color-accent);
}

.footer__credit {
    font-size: var(--fs-xs);
    opacity: 0.7;
}

/* =========================================================
   14. MEDIA QUERIES — escalado hacia desktop
   (mobile-first: todo lo de arriba es para mobile)
   ========================================================= */

/* Tablet */
@media (min-width: 640px) {
    :root {
        --fs-xl: 2.5rem;
        --fs-2xl: 3.75rem;
        --fs-3xl: 5rem;
    }

}

/* Desktop */
@media (min-width: 1024px) {
    :root {
        --fs-xl: 3rem;
        --fs-2xl: 4.5rem;
        --fs-3xl: 6rem;
    }

    main > section {
        padding: var(--space-2xl) var(--space-md);
    }

    .hero__tagline {
        font-size: var(--fs-sm);
    }
    .hero__date {
        font-size: var(--fs-md);
    }
}

/* =========================================================
   15. SCROLL REVEAL — animaciones al entrar al viewport
   ---------------------------------------------------------
   La clase .reveal se agrega automáticamente desde JS a
   varios selectores (títulos, tarjetas, etc.).
   Cuando el IntersectionObserver detecta visibilidad,
   suma .is-visible y dispara la transición.
   ========================================================= */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 900ms cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 900ms cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform;
}

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

/* Stagger automático para hijos dentro de un contenedor reveal-stagger.
   Se aplica a countdown__grid, events__grid y gifts__box. */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(22px);
    transition:
        opacity 800ms cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 800ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal-stagger.is-visible > *:nth-child(1) {
    transition-delay: 80ms;
}
.reveal-stagger.is-visible > *:nth-child(2) {
    transition-delay: 180ms;
}
.reveal-stagger.is-visible > *:nth-child(3) {
    transition-delay: 280ms;
}
.reveal-stagger.is-visible > *:nth-child(4) {
    transition-delay: 380ms;
}
.reveal-stagger.is-visible > *:nth-child(5) {
    transition-delay: 480ms;
}

.reveal-stagger.is-visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================
   16. MICROINTERACCIONES
   ========================================================= */

/* Shine sutil atravesando los botones solid al hover */
.btn--solid {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn--solid::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.45) 50%,
        transparent 100%
    );
    transform: translateX(-110%);
    transition: transform 700ms ease;
    pointer-events: none;
}

.btn--solid:hover::before {
    transform: translateX(110%);
}

/* Lift + sombra suave en hover sobre tarjetas */
.event-card {
    position: relative;
    overflow: hidden;
}

.event-card::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-accent);
    transition:
        width 400ms ease,
        left 400ms ease;
}

.event-card:hover {
    box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.4);
}

.event-card:hover::after {
    width: 60%;
    left: 20%;
}

.event-card__icon {
    transition:
        transform 500ms ease,
        color 400ms ease;
}

.event-card:hover .event-card__icon {
    transform: translateY(-4px) rotate(-4deg);
    color: var(--color-cream);
}

/* Pulse muy sutil en los segundos del countdown (indica "vivo") */
@keyframes soft-pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.75;
    }
}

#cd-seconds {
    animation: soft-pulse 2s ease-in-out infinite;
}

/* Caja de regalos: al hover se ilumina la fila */
.gifts__line {
    transition:
        background-color 300ms ease,
        padding-left 300ms ease;
    padding-left: 0;
}

.gifts__line:hover {
    background-color: rgba(245, 239, 230, 0.06);
    padding-left: var(--space-xs);
}

/* =========================================================
   17. ACCESIBILIDAD — reduce motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    /* Mostrar todo revelado sin animar */
    .reveal,
    .reveal-stagger > * {
        opacity: 1 !important;
        transform: none !important;
    }

    /* Sin parallax */
    .hero::before {
        transform: none !important;
    }
}
