/* =========================================================
   MARTINA · MIS 15
   HOJA DE ESTILOS
========================================================= */


/* =========================================================
   FUENTES
========================================================= */

@font-face {
    font-family: Allura;
    src: url("../allura.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: Montserrat;
    src: url("../montserrat-300.ttf") format("truetype");
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: Montserrat;
    src: url("../montserrat-400.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: Montserrat;
    src: url("../montserrat-500.ttf") format("truetype");
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: Montserrat;
    src: url("../montserrat-600.ttf") format("truetype");
    font-weight: 600;
    font-display: swap;
}


/* =========================================================
   VARIABLES
========================================================= */

:root {
    --rose: #d6769c;
    --deep: #a83268;
    --ink: #493640;
    --cream: #fff8fb;
    --paper: #fffdfa;
    --gold: #c69779;
}


/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: Montserrat, sans-serif;
    font-weight: 300;
}

body.invitation-locked {
    overflow: hidden;
}

[hidden] {
    display: none !important;
}

a {
    color: inherit;
}

/* =========================================================
   PANTALLA DE BIENVENIDA
========================================================= */

.welcome-screen {
    position: fixed;
    z-index: 1100;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: auto;
    padding: 32px 22px;
    background:
        linear-gradient(
            135deg,
            rgba(132, 25, 77, 0.68),
            rgba(209, 88, 140, 0.58)
        ),
        url("../disco-rosa.webp") center / cover;
    color: white;
    text-align: center;
}

.welcome-inner {
    width: min(100%, 650px);
}

.welcome-invitation {
    margin: 0;
    font-size: clamp(16px, 4vw, 22px);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.welcome-name {
    margin: 18px 0 38px;
    color: white;
    font:
        400 clamp(88px, 19vw, 175px) / 0.92
        Allura,
        cursive;
    text-shadow: 0 3px 18px #6b194c88;
}

.welcome-button {
    border: 1px solid #ffffffc7;
    padding: 15px 24px;
    background: transparent;
    color: white;
    cursor: pointer;
    font: 500 11px Montserrat, sans-serif;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    transition: background-color 0.2s, color 0.2s;
}

.welcome-button:hover {
    background: white;
    color: var(--deep);
}

.welcome-button:focus-visible {
    outline: 3px solid white;
    outline-offset: 4px;
}

body:not(.invitation-open) .music-button {
    display: none;
}

/* =========================================================
   CONTROL DE MÚSICA
========================================================= */

.music-button {
    position: fixed;
    z-index: 1000;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    padding: 0;
    border: 1px solid #ffffffb8;
    border-radius: 50%;
    background: var(--deep);
    color: white;
    box-shadow: 0 4px 16px #38132655;
    cursor: pointer;
    font: 500 21px Montserrat, sans-serif;
    transition: transform 0.2s, background-color 0.2s;
}

.music-button:hover {
    transform: scale(1.06);
    background: var(--rose);
}

.music-button:focus-visible {
    outline: 3px solid white;
    outline-offset: 3px;
}


/* =========================================================
   HERO / PORTADA
========================================================= */

.hero {
    min-height: 100svh;
    display: grid;
    place-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            rgba(132, 25, 77, 0.68),
            rgba(209, 88, 140, 0.58)
        ),
        url("../disco-rosa.webp") center / cover;

    padding: 50px 22px;
    color: white;
}

.hero:before,
.hero:after {
    content: "✳";
    position: absolute;
    color: #fff;
    font-size: clamp(130px, 29vw, 370px);
    opacity: 0.16;
    line-height: 1;
}

.hero:before {
    left: -0.12em;
    top: -0.11em;
}

.hero:after {
    right: -0.12em;
    bottom: -0.22em;
    transform: rotate(25deg);
}

.hero-inner {
    z-index: 1;
    max-width: 650px;
}


/* =========================================================
   TEXTOS
========================================================= */

.eyebrow,
.label {
    letter-spacing: 0.24em;
    text-transform: uppercase;
    font-size: 11px;
    color: var(--deep);
}

.hero .eyebrow {
    color: #fff;
}

.hero h1 {
    font:
        400 clamp(88px, 19vw, 175px) / 0.92
        Allura,
        cursive;

    color: white;
    text-shadow: 0 3px 18px #6b194c88;
    margin: 26px 0 16px;
}

.hero .intro {
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: clamp(11px, 2vw, 14px);
}

.countdown {
    display: flex;
    justify-content: center;
    gap: clamp(18px, 5vw, 38px);
    margin-top: 24px;
}

.countdown-item {
    display: grid;
    gap: 4px;
    min-width: 58px;
    text-align: center;
    letter-spacing: 0.12em;
}

.countdown-item strong {
    font-size: clamp(24px, 6vw, 36px);
    font-weight: 500;
    line-height: 1;
}

.countdown-item span {
    font-size: 9px;
}

.hero-time {
    margin: 20px 0 0;
    font-size: 14px;
    letter-spacing: 0.12em;
    text-align: center;
}


/* =========================================================
   SEPARADORES
========================================================= */

.rule {
    height: 1px;
    width: 60px;
    background: var(--gold);
    margin: 28px auto;
}

.hero .rule {
    background: #fff;
}


/* =========================================================
   BOTÓN DE INGRESO
========================================================= */

.scroll {
    display: inline-block;
    margin-top: 46px;
    text-decoration: none;
    border: 1px solid #ffffffa8;
    padding: 13px 20px;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: white;
}


/* =========================================================
   SECCIONES
========================================================= */

section {
    padding: 90px 22px;
    text-align: center;
}

.section-inner {
    max-width: 750px;
    margin: auto;
}

.soft {
    background: var(--paper);
}


/* =========================================================
   TÍTULOS
========================================================= */

h2 {
    font:
        400 clamp(35px, 8vw, 57px) / 1.1
        Allura,
        cursive;

    color: var(--deep);
    margin: 15px 0 22px;
}


/* =========================================================
   TEXTOS
========================================================= */

.copy {
    font-size: 15px;
    line-height: 1.9;
    max-width: 540px;
    margin: 0 auto;
}

.date-big {
    font:
        400 clamp(22px, 5vw, 33px)
        Montserrat,
        sans-serif;

    letter-spacing: 0.04em;
}


/* =========================================================
   IMAGEN PRINCIPAL
========================================================= */

.cover-art {
    display: block;
    width: 100%;
    height: auto;
    margin: 34px auto;
    border-radius: 2px;
    box-shadow: 0 10px 35px #51222b24;
}


/* =========================================================
   DETALLES
========================================================= */

.details {
    display: flex;
    justify-content: center;
    gap: clamp(24px, 9vw, 100px);
    margin: 36px 0 28px;
    flex-wrap: wrap;
}

.details p {
    margin: 7px 0;
}


/* =========================================================
   BOTONES
========================================================= */

.outline {
    display: inline-block;
    text-decoration: none;
    color: var(--deep);
    border: 1px solid #c5a9a1;
    padding: 13px 24px;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    transition: 0.2s;
}

.outline:hover {
    background: var(--deep);
    color: white;
}


/* =========================================================
   ICONOS
========================================================= */

.icon {
    width: 55px;
    height: 55px;
    object-fit: contain;
    margin: 0 auto 8px;
    filter: drop-shadow(0 3px 4px #0001);
}


/* =========================================================
   DRESS CODE
========================================================= */

.dress {
    background:
        linear-gradient(
            140deg,
            #ead8d4,
            #f8f1ee 55%,
            #e9d6d1
        );
}

.dress .icon {
    width: 64px;
    height: 64px;
}

.dress-note {
    font:
        italic 22px
        Allura,
        cursive;

    color: var(--deep);
    margin-top: 24px;
}


/* =========================================================
   REGALOS
========================================================= */

.gift {
    background: var(--paper);
}

.giftbox {
    border: 1px solid #e5d8d0;
    max-width: 500px;
    margin: 30px auto 0;
    padding: 34px 22px;
}

.giftbox .icon {
    width: 59px;
    height: 59px;
}

.giftbox strong {
    font-weight: 500;
    letter-spacing: 0.09em;
    font-size: 12px;
}

.alias-entry {
    display: grid;
    justify-items: center;
    gap: 7px;
}

.alias-copy-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.copy-alias-button {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 5px;
    border: 1px solid #e5d8d0;
    border-radius: 50%;
    background: transparent;
    color: var(--deep);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.copy-alias-button:hover {
    background: var(--deep);
    color: white;
}

.copy-alias-button:focus-visible {
    outline: 2px solid var(--rose);
    outline-offset: 2px;
}

.copy-alias-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

.copy-alias-feedback {
    min-height: 1em;
    color: var(--deep);
    font-size: 11px;
}


/* =========================================================
   RSVP
========================================================= */

.rsvp {
    background:
        linear-gradient(
            145deg,
            #f3e4df,
            #fffaf6
        );
}

.rsvp .deadline {
    color: var(--rose);
    letter-spacing: 0.15em;
    font-size: 11px;
    margin: 24px 0;
}


/* =========================================================
   RSVP · CONFIRMACIÓN DE ASISTENCIA
========================================================= */

.rsvp {
    background:
        linear-gradient(
            145deg,
            #f3e4df,
            #fffaf6
        );
}

.rsvp .deadline {
    color: var(--rose);
    letter-spacing: 0.15em;
    font-size: 11px;
    margin: 24px 0;
}


/* =========================================================
   FORMULARIO
========================================================= */

.form {
    max-width: 460px;
    margin: 38px auto 0;
    text-align: left;
}

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

.form label {
    display: block;

    text-transform: uppercase;

    letter-spacing: 0.14em;

    font-size: 10px;

    margin: 0 0 8px;

    color: var(--ink);
}


/* =========================================================
   INPUTS Y SELECT
========================================================= */

.form input,
.form select,
.form textarea {

    width: 100%;

    padding: 15px 16px;

    border: 1px solid #d7c5bf;

    background: rgba(255, 253, 250, 0.85);

    font:
        300 14px
        Montserrat,
        sans-serif;

    color: var(--ink);

    border-radius: 0;

    outline: none;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.form textarea {
    resize: vertical;
    min-height: 110px;
}

.form input::placeholder,
.form textarea::placeholder {
    color: #9b8988;
}

.form input:focus,
.form select:focus,
.form textarea:focus {

    border-color: var(--rose);

    box-shadow:
        0 0 0 3px
        rgba(214, 118, 156, 0.12);
}


/* =========================================================
   OPCIONES DE ASISTENCIA
========================================================= */

.attendance-group {
    margin-top: 34px;
}

.attendance-options {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 12px;

    margin-top: 12px;
}

.attendance-btn {

    min-height: 72px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 5px;

    padding: 12px;

    border: 1px solid #d7c5bf;

    background: rgba(255, 253, 250, 0.7);

    color: var(--ink);

    cursor: pointer;

    font:
        500 11px
        Montserrat,
        sans-serif;

    letter-spacing: 0.06em;

    transition:
        all 0.25s ease;
}

.attendance-btn:hover {

    border-color: var(--rose);

    transform: translateY(-2px);
}


/* =========================================================
   ICONOS DE ASISTENCIA
========================================================= */

.attendance-icon {

    width: 25px;
    height: 25px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid #c9b5af;

    border-radius: 50%;

    font-size: 14px;

    transition: all 0.25s ease;
}


/* =========================================================
   BOTÓN SELECCIONADO
========================================================= */

.attendance-btn.active {

    background: var(--deep);

    border-color: var(--deep);

    color: white;

    box-shadow:
        0 8px 22px
        rgba(168, 50, 104, 0.18);
}

.attendance-btn.active .attendance-icon {

    border-color: white;

    background: white;

    color: var(--deep);
}


/* =========================================================
   CAMPOS CONDICIONALES
========================================================= */

.conditional-fields {

    display: none;

    opacity: 0;

    transform: translateY(-8px);

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.conditional-fields.visible {

    display: block;

    opacity: 1;

    transform: translateY(0);
}


/* =========================================================
   MENSAJE PARA NO ASISTENTES
========================================================= */

.not-attending-message {

    display: none;

    margin: 25px 0;

    padding: 25px 20px;

    text-align: center;

    background: rgba(255, 255, 255, 0.45);

    border:
        1px solid
        rgba(168, 50, 104, 0.15);
}

.not-attending-message.visible {

    display: block;

    animation:
        fadeIn 0.35s ease;
}

.message-icon {

    font-size: 28px;

    color: var(--rose);

    margin-bottom: 8px;
}

.not-attending-message p {

    margin: 0 0 8px;

    font:
        400 24px
        Allura,
        cursive;

    color: var(--deep);
}

.not-attending-message span {

    display: block;

    font-size: 12px;

    line-height: 1.7;

    color: var(--ink);
}


/* =========================================================
   BOTÓN ENVIAR
========================================================= */

.form-submit {

    width: 100%;

    margin-top: 12px;

    padding: 17px 20px;

    border: 0;

    background: var(--deep);

    color: white;

    cursor: pointer;

    font:
        400 11px
        Montserrat,
        sans-serif;

    letter-spacing: 0.18em;

    text-transform: uppercase;

    transition:
        background 0.25s ease,
        transform 0.2s ease,
        opacity 0.25s ease;
}

.form-submit:not(:disabled):hover {

    background: var(--rose);

    transform: translateY(-1px);
}

.form-submit:disabled {

    opacity: 0.4;

    cursor: not-allowed;
}


/* =========================================================
   MENSAJE DE RESULTADO
========================================================= */

.form-status {

    display: none;

    margin-top: 25px;

    padding: 24px 20px;

    text-align: center;

    background: rgba(255, 255, 255, 0.55);

    border:
        1px solid
        rgba(168, 50, 104, 0.15);
}

.form-status.visible {

    display: block;

    animation:
        fadeIn 0.4s ease;
}

.form-status .status-title {

    display: block;

    margin-bottom: 8px;

    font:
        400 27px
        Allura,
        cursive;

    color: var(--deep);
}

.form-status .status-text {

    display: block;

    font-size: 12px;

    line-height: 1.7;
}


/* =========================================================
   ANIMACIÓN
========================================================= */

@keyframes fadeIn {

    from {

        opacity: 0;

        transform:
            translateY(8px);

    }

    to {

        opacity: 1;

        transform:
            translateY(0);

    }

}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 520px) {

    .attendance-options {

        grid-template-columns: 1fr;

    }

    .attendance-btn {

        min-height: 64px;

    }

}


/* =========================================================
   CIERRE
========================================================= */

.closing {
    background: var(--deep);
    color: #fff7f2;
    padding: 72px 20px;
}

.closing h2 {
    color: #fff7f2;
    font-size: 65px;
}

.closing .name {
    font:
        400 76px
        Allura,
        cursive;

    color: #e7c8bf;
}

.closing small {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    text-align: center;
    padding: 22px;
    background: #633843;
    color: #f8e9e4;
    font-size: 10px;
    letter-spacing: 0.13em;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 520px) {

    section {
        padding: 72px 20px;
    }

    .details {
        gap: 30px;
    }

    .hero:before {
        top: -0.04em;
    }

}
