/* ===========================================
   A&C — Save the date
   Hermano pequeño de la invitación: mismos tokens, misma
   tipografía y mismos gestos (filetes, grano, revelados),
   pero con la mitad de secciones y un solo objetivo:
   que el 5 de junio de 2027 acabe en su calendario.
   =========================================== */

/* ===========================================
   TOKENS — idénticos a los de la invitación.
   Si tocas uno aquí, tócalo también allí.
   =========================================== */
:root {
    color-scheme: light;

    --paper: #f6f4f0;
    --paper-sunk: #edeae3;
    --paper-raised: #fbfaf8;
    --ink: #16150f;
    --ink-soft: #6d685d;

    --accent: #6f6a54;
    --accent-wash: rgba(111, 106, 84, 0.08);
    --accent-light: #c9c2a8;

    --line: rgba(22, 21, 15, 0.10);
    --line-strong: rgba(22, 21, 15, 0.22);

    --shadow-soft: 0 1px 2px rgba(22, 21, 15, 0.03), 0 8px 28px rgba(22, 21, 15, 0.05);

    --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --w-extralight: 200;
    --w-light: 300;
    --w-regular: 400;
    --w-medium: 500;
    --w-semibold: 600;

    --step--2: clamp(0.69rem, 0.67rem + 0.10vw, 0.75rem);
    --step--1: clamp(0.80rem, 0.76rem + 0.18vw, 0.90rem);
    --step-0: clamp(1.00rem, 0.97rem + 0.16vw, 1.08rem);
    --step-1: clamp(1.15rem, 1.07rem + 0.40vw, 1.45rem);
    --step-2: clamp(1.45rem, 1.26rem + 0.95vw, 2.15rem);
    --step-3: clamp(1.85rem, 1.52rem + 1.65vw, 3.00rem);
    --step-4: clamp(2.80rem, 1.90rem + 4.30vw, 6.00rem);

    --space-2xs: 0.375rem;
    --space-xs: 0.75rem;
    --space-sm: 1.25rem;
    --space-md: 2rem;
    --space-lg: 3.5rem;
    --space-xl: clamp(4.5rem, 3rem + 7vw, 9rem);
    --gutter: clamp(1.25rem, 6vw, 3rem);

    --r-surface: 14px;
    --r-control: 10px;
    --r-pill: 999px;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --t-fast: 0.2s var(--ease);
    --t-base: 0.4s var(--ease);
    --t-slow: 0.85s var(--ease);
}

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

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-padding-top: 5.5rem;
}

body {
    font-family: var(--font);
    font-weight: var(--w-light);
    font-size: var(--step-0);
    line-height: 1.7;
    letter-spacing: 0.005em;
    background: var(--paper);
    color: var(--ink);
    overflow-x: hidden;
}

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

/* El <picture> no debe crear caja propia: el marco del hero coloca el
   <img> y un elemento intermedio en línea metería ruido. */
picture {
    display: contents;
}

::selection {
    background: var(--ink);
    color: var(--paper);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Grano de papel: capa fija, sin eventos, para no repintar al hacer scroll. */
.grain {
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.skip-link {
    position: absolute;
    top: -100px;
    left: var(--gutter);
    z-index: 200;
    padding: 0.75rem 1.25rem;
    background: var(--ink);
    color: var(--paper);
    font-size: var(--step--1);
    text-decoration: none;
    border-radius: var(--r-control);
    transition: top var(--t-fast);
}

.skip-link:focus {
    top: 1rem;
}

/* ===========================================
   REVELADOS AL SCROLL
   =========================================== */
[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--t-slow), transform var(--t-slow);
    transition-delay: var(--delay, 0ms);
}

[data-animate].is-in {
    opacity: 1;
    transform: none;
}

/* ===========================================
   NAVEGACIÓN
   Sin menú: la página entera cabe en cuatro scrolls. Solo la
   firma a la izquierda y la única acción que pedimos, a la derecha.
   =========================================== */
.nav-sentinel {
    position: absolute;
    top: 0;
    height: 1px;
    width: 1px;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-xs);
    height: 64px;
    padding: 0 var(--gutter);
    transition: background var(--t-base), box-shadow var(--t-base);
}

.nav-scrolled {
    background: rgba(246, 244, 240, 0.82);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 1px 0 var(--line);
}

.nav-logo {
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    font-weight: var(--w-medium);
    letter-spacing: 0.14em;
    text-decoration: none;
    color: var(--ink);
    white-space: nowrap;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.95rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    font-size: clamp(0.65rem, 2.6vw, 0.78rem);
    font-weight: var(--w-medium);
    letter-spacing: 0.04em;
    text-decoration: none;
    color: var(--ink);
    white-space: nowrap;
    transition: background var(--t-base), color var(--t-base), border-color var(--t-base);
}

.nav-cta svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.nav-cta:hover {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

/* ===========================================
   CABECERAS DE SECCIÓN
   =========================================== */
.section {
    padding: var(--space-xl) var(--gutter);
}

.section-sunk {
    background: var(--paper-sunk);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

/* Filete corto en lugar del numeral: marca el arranque de la
   sección sin etiquetarla ni enumerarla. */
.section-header::before {
    content: '';
    display: block;
    width: 28px;
    height: 1px;
    margin: 0 auto var(--space-sm);
    background: var(--accent);
    opacity: 0.5;
}

.section-header h2 {
    font-size: var(--step-3);
    font-weight: var(--w-extralight);
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin-bottom: 0.6rem;
}

.section-subtitle {
    max-width: 42ch;
    margin-inline: auto;
    font-size: var(--step--1);
    color: var(--ink-soft);
}

/* ===========================================
   01. HERO
   Espejo del de la invitación: allí la fecha era el antetítulo
   y "sí, quiero." el titular. Aquí al revés, porque hoy lo único
   que tiene que quedarse en la cabeza es la fecha.
   =========================================== */
.hero {
    position: relative;
    /* Contexto de apilado propio: así el vídeo y el velo pueden ir en
       z-index negativo sin colarse por detrás del resto de la página. */
    isolation: isolate;
    /* El vídeo va un pelín ampliado para que no se vean sus bordes. */
    overflow: hidden;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 6rem var(--gutter) 4rem;
    text-align: center;
}

.hero-video {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    pointer-events: none;
}

/* Velo de papel sobre el vídeo. Casi opaco en el centro, que es donde
   caen la foto y la fecha, y se abre hacia los bordes, que es donde se
   nota que hay algo moviéndose. */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        /* Franja extra arriba: la barra no tiene fondo hasta que haces
           scroll, y el montaje tiene planos nocturnos (fuegos, la Torre
           de noche) sobre los que la tinta se perdería. */
        linear-gradient(to bottom,
            rgba(246, 244, 240, 0.90) 0,
            rgba(246, 244, 240, 0) 170px),
        radial-gradient(ellipse 78% 62% at 50% 52%,
            rgba(246, 244, 240, 0.95) 0%,
            rgba(246, 244, 240, 0.84) 45%,
            rgba(246, 244, 240, 0.52) 100%);
}

.hero-content {
    display: grid;
    justify-items: center;
    gap: clamp(1.35rem, 3.5vw, 2.25rem);
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: clamp(0.75rem, 3vw, 1.25rem);
    font-size: var(--step--2);
    font-weight: var(--w-medium);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.hero-eyebrow::before,
.hero-eyebrow::after {
    content: '';
    width: clamp(28px, 10vw, 64px);
    height: 1px;
    background: var(--line-strong);
}

.hero-eyebrow::after {
    margin-left: -0.4em;
}

/* Foto apaisada, al contrario que el retrato de la invitación:
   mismo marco desplazado, otra proporción. */
.hero-figure {
    position: relative;
    width: clamp(240px, 64vw, 440px);
}

.hero-figure img {
    position: relative;
    z-index: 2;
    width: 100%;
    /* height:auto es obligatorio, no decorativo: los atributos width y height
       del <img> actúan como presentational hints, y si la altura queda fijada
       por el atributo, el navegador ignora aspect-ratio y deforma la foto. */
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: 40% 50%;
    background: var(--paper-sunk);
}

/* Filete desplazado: da profundidad sin sombra ni marco pesado. */
.hero-figure::after {
    content: '';
    position: absolute;
    z-index: 1;
    top: 11px;
    left: 11px;
    right: -11px;
    bottom: -11px;
    border: 1px solid var(--line-strong);
}

.hero-title {
    display: grid;
    font-size: var(--step-4);
    font-weight: var(--w-extralight);
    letter-spacing: -0.05em;
    line-height: 0.92;
}

.hero-title em {
    font-style: normal;
    font-weight: var(--w-light);
    font-variant-numeric: tabular-nums;
}

.hero-place {
    max-width: 34ch;
    font-size: var(--step--1);
    font-weight: var(--w-regular);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1.9;
    color: var(--ink-soft);
}

/* Si algún día no cupiera en una línea, que corte por el punto medio
   y no después de la coma de "Totana, Murcia". */
.hero-place span {
    white-space: nowrap;
}

/* Entrada escalonada al cargar: ordena la lectura de arriba abajo. */
@media (prefers-reduced-motion: no-preference) {

    .hero-eyebrow,
    .hero-figure,
    .hero-title,
    .hero-place {
        animation: heroIn 1.1s var(--ease) backwards;
    }

    .hero-eyebrow {
        animation-delay: 0.1s;
    }

    .hero-figure {
        animation-delay: 0.25s;
    }

    .hero-title {
        animation-delay: 0.45s;
    }

    .hero-place {
        animation-delay: 0.6s;
    }
}

@keyframes heroIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* ===========================================
   02. CUENTA ATRÁS
   Idéntica a la de la invitación, para que las dos
   páginas se reconozcan como la misma boda.
   =========================================== */
.countdown {
    padding: var(--space-lg) var(--gutter);
    border-block: 1px solid var(--line);
    background: var(--paper-raised);
}

.countdown-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 620px;
    margin-inline: auto;
}

.cd-unit {
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    padding-inline: 0.25rem;
}

.cd-unit+.cd-unit {
    border-left: 1px solid var(--line);
}

.cd-value {
    font-size: var(--step-2);
    font-weight: var(--w-extralight);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1;
}

.cd-label {
    font-size: var(--step--2);
    letter-spacing: 0.16em;
    color: var(--ink-soft);
}

.countdown-done {
    text-align: center;
    font-size: var(--step-1);
    font-weight: var(--w-light);
}

/* ===========================================
   03. LO QUE YA SABEMOS
   Cuatro datos y ni uno más. Lo demás es la invitación.
   =========================================== */
.facts {
    display: grid;
    gap: var(--space-md);
    max-width: 760px;
    margin-inline: auto;
}

.fact {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-sm);
    align-items: start;
}

.fact svg {
    width: 26px;
    height: 26px;
    color: var(--accent);
    margin-top: 0.3rem;
}

.fact h3 {
    font-size: var(--step-0);
    font-weight: var(--w-medium);
    letter-spacing: -0.01em;
    line-height: 1.4;
    margin-bottom: 0.2rem;
}

.fact p {
    font-size: var(--step--1);
    color: var(--ink-soft);
    line-height: 1.65;
}

/* ===========================================
   04. EL LUGAR
   Único bloque oscuro de la página, como en la invitación.
   =========================================== */
.venue-hero {
    /* Móvil primero: por defecto la foto pequeña (61 KB). Las pantallas
       anchas se ganan la grande más abajo. Un fondo CSS nunca es lazy,
       así que esto se descarga sí o sí al abrir la página. */
    --foto: url("img/la-santa-movil.jpg");
    /* --veil  velo plano de toda la sección. Más bajo, más foto.
       --focus capa suave concentrada en la columna de texto. */
    --veil: 0.7;
    --focus: 0.34;

    position: relative;
    color: var(--paper);
    text-shadow: 0 1px 3px rgba(22, 21, 15, 0.5);
    background-color: var(--ink);
    background-image:
        radial-gradient(ellipse 115% 88% at 50% 42%,
            rgba(22, 21, 15, var(--focus)) 0%,
            rgba(22, 21, 15, 0.18) 48%,
            rgba(22, 21, 15, 0) 100%),
        linear-gradient(rgba(22, 21, 15, var(--veil)), rgba(22, 21, 15, var(--veil))),
        var(--foto);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.venue-hero .section-header::before {
    background: var(--paper);
    opacity: 0.45;
}

.venue-hero .section-subtitle {
    color: rgba(246, 244, 240, 0.90);
}

.venue-hero .btn-outline {
    color: var(--paper);
    border-color: rgba(246, 244, 240, 0.38);
}

.venue-hero .btn-outline:hover {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--paper);
}

.venue-body {
    max-width: 560px;
    margin-inline: auto;
    text-align: center;
}

.venue-context {
    color: var(--paper);
    margin-bottom: var(--space-lg);
}

.venue-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    justify-content: center;
}

/* ===========================================
   BOTONES
   =========================================== */
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.6rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    background: transparent;
    color: var(--ink);
    font-family: var(--font);
    font-size: var(--step--1);
    font-weight: var(--w-medium);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--t-base), color var(--t-base), border-color var(--t-base), transform var(--t-fast);
}

.btn-outline svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.btn-outline:hover {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

.btn-outline:active {
    transform: scale(0.98);
}

/* Relleno sólido para la única acción principal de la página. */
.btn-solid {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

.btn-solid:hover {
    background: transparent;
    color: var(--ink);
    border-color: var(--line-strong);
}

/* ===========================================
   05. CALENDARIO
   =========================================== */
.calendar-card {
    max-width: 540px;
    margin-inline: auto;
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--r-surface);
    box-shadow: var(--shadow-soft);
}

/* Hoja de calendario dibujada con CSS: no hace falta otra imagen. */
.calendar-chip {
    display: grid;
    justify-items: center;
    width: 88px;
    margin: 0 auto var(--space-md);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-control);
    overflow: hidden;
    background: var(--paper);
}

.chip-month {
    width: 100%;
    padding: 0.32rem 0;
    background: var(--ink);
    color: var(--paper);
    font-size: var(--step--2);
    font-weight: var(--w-medium);
    letter-spacing: 0.22em;
    text-indent: 0.22em;
    text-transform: uppercase;
}

.chip-day {
    padding: 0.4rem 0 0.1rem;
    font-size: var(--step-2);
    font-weight: var(--w-extralight);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.chip-year {
    padding-bottom: 0.5rem;
    font-size: var(--step--2);
    letter-spacing: 0.16em;
    color: var(--ink-soft);
}

.calendar-text {
    max-width: 38ch;
    margin: 0 auto var(--space-md);
    font-size: var(--step--1);
    color: var(--ink-soft);
}

.calendar-actions {
    display: grid;
    gap: var(--space-xs);
    justify-items: stretch;
}

/* Dentro de la tarjeta los botones ocupan todo el ancho y pueden
   partir la etiqueta: en un móvil de 320px no cabe en una línea. */
.calendar-actions .btn-outline {
    padding-inline: 1.1rem;
    white-space: normal;
}

.calendar-note {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--line);
    font-size: var(--step--2);
    line-height: 1.7;
    color: var(--ink-soft);
}

/* ===========================================
   06. CIERRE
   =========================================== */
.closing {
    max-width: 540px;
    margin-inline: auto;
    text-align: center;
}

.closing p {
    font-size: var(--step-1);
    font-weight: var(--w-extralight);
    letter-spacing: -0.02em;
    line-height: 1.45;
}

.closing span {
    display: block;
    margin-top: var(--space-sm);
    font-size: var(--step--1);
    font-weight: var(--w-light);
    letter-spacing: 0;
    line-height: 1.7;
    color: var(--ink-soft);
}

/* ===========================================
   PIE
   =========================================== */
.footer {
    padding: var(--space-xl) var(--gutter);
    text-align: center;
    background: var(--ink);
    color: var(--paper);
}

.footer-inner {
    display: grid;
    justify-items: center;
    gap: 0.5rem;
}

.footer-logo {
    font-size: var(--step-2);
    font-weight: var(--w-extralight);
    letter-spacing: 0.22em;
    margin-right: -0.22em;
    margin-bottom: var(--space-xs);
}

.footer-rule {
    width: 40px;
    height: 1px;
    background: currentColor;
    opacity: 0.3;
    margin-bottom: var(--space-xs);
}

.footer-date {
    font-size: var(--step--1);
    font-weight: var(--w-medium);
    letter-spacing: 0.1em;
    opacity: 0.85;
}

.footer-tagline {
    font-size: var(--step--2);
    letter-spacing: 0.06em;
    opacity: 0.55;
}

/* ===========================================
   TABLET Y ESCRITORIO (min-width: 700px)
   =========================================== */
@media (min-width: 700px) {
    .facts {
        grid-template-columns: 1fr 1fr;
        column-gap: var(--space-lg);
        row-gap: var(--space-lg);
    }

    /* A partir de aquí la pantalla da para la foto grande del santuario. */
    .venue-hero {
        --foto: url("img/la-santa.jpg");
    }

    .calendar-card {
        padding: var(--space-lg);
    }

    /* Los dos botones, uno al lado del otro y del mismo ancho. */
    .calendar-actions {
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
    }
}

/* ===========================================
   MOVIMIENTO REDUCIDO
   =========================================== */
@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    [data-animate] {
        opacity: 1;
        transform: none;
    }
}
