:root {
    --red: #F90100;        /* roșul din logo */
    --red-ink: #C40000;    /* roșu pentru text mic pe alb (contrast AA) */
    --ink: #111111;
    --muted: #5C5254;
    --paper: #FFFFFF;
    --blush: #FDECEC;
    --blush-deep: #F9D6D4;
    --line: #E8D3D2;
    --radius: 18px;
    --wobble: 14px 18px 12px 20px / 18px 12px 20px 14px;
    --marker: "Caveat Brush", "Segoe Print", "Bradley Hand", cursive;
    --sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color-scheme: light;
}

*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    min-height: 100svh;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
}

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

a {
    color: inherit;
}

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

.marker {
    font-family: var(--marker);
    font-weight: 400;
    letter-spacing: 0.01em;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 100;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

/* ---------- Intro: cutia închisă ---------- */

.intro {
    position: fixed;
    inset: 0;
    z-index: 50;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: max(1.5rem, env(safe-area-inset-top)) 1rem max(1.5rem, env(safe-area-inset-bottom));
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 62%, #FFFFFF 0 28%, transparent 62%),
        var(--blush);
    text-align: center;
    transition: opacity 500ms ease, visibility 0s linear 500ms;
}

.intro {
    display: none;
}

.show-intro .intro {
    display: flex;
}

.show-intro .page {
    visibility: hidden;
}

.show-intro.intro-out .page {
    visibility: visible;
}

.intro__logo {
    width: 116px;
    height: auto;
    margin-bottom: 1rem;
}

.intro__title {
    margin: 0;
    font-size: clamp(3.4rem, 17vw, 5.5rem);
    line-height: 1;
}

.breve {
    position: relative;
    display: inline-block;
}

.breve::before {
    position: absolute;
    top: -0.04em;
    left: 50%;
    width: 0.34em;
    height: 0.15em;
    border: 0.06em solid var(--red);
    border-top: 0;
    border-radius: 0 0 0.3em 0.3em / 0 0 0.26em 0.26em;
    content: "";
    transform: translateX(-46%) rotate(-6deg);
}

.intro__lead {
    margin: 0.5rem 0 1rem;
    color: var(--muted);
    font-size: 1rem;
}

.intro__hint {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.75rem 0 0;
    color: var(--red-ink);
    font-size: 0.9rem;
    font-weight: 600;
}

.intro__hint::before {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--red);
    content: "";
    animation: pulse 1.6s ease-in-out infinite;
}

/* Cutia: SVG în stilul desenului cu omuleții */

.giftbox {
    position: relative;
    width: min(58vw, 230px);
    aspect-ratio: 1 / 1.08;
    margin-top: 2.75rem;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    touch-action: none;
    animation: wiggle 3.2s ease-in-out 1.2s infinite;
}

.giftbox:focus-visible {
    outline-offset: 12px;
    border-radius: 24px;
}

/* Umbra de sub cutie */
.giftbox::after {
    position: absolute;
    right: 4%;
    bottom: -7%;
    left: 4%;
    z-index: -1;
    height: 8%;
    border-radius: 50%;
    background: rgba(17, 17, 17, 0.1);
    content: "";
}

.giftbox .giftbox__sparks {
    top: 18%;
    left: -22%;
    width: 144%;
    max-width: none;
    height: auto;
    aspect-ratio: 3 / 2;
    fill: none;
    stroke: var(--red);
    stroke-width: 6;
    stroke-linecap: round;
    animation: sparks 1.6s ease-in-out infinite;
    transition: opacity 200ms ease;
}

.intro.is-opening .giftbox__sparks {
    opacity: 0;
    animation: none;
}

.giftbox svg {
    position: absolute;
    overflow: visible;
}

.giftbox__body,
.giftbox__lid {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.giftbox__body {
    bottom: 0;
    width: 88%;
    height: 70%;
    transform-origin: 50% 100%;
}

.giftbox__lid {
    top: 12%;
    z-index: 2;
    width: 100%;
    height: 22%;
}

.giftbox__body svg,
.giftbox__lid svg {
    inset: 0;
    width: 100%;
    height: 100%;
}

.gb-box {
    fill: var(--paper);
    stroke: var(--ink);
    stroke-width: 3.5;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.gb-shine {
    fill: none;
    stroke: var(--blush-deep);
    stroke-width: 5;
    stroke-linecap: round;
}

.gb-ribbon {
    fill: var(--red);
    stroke: var(--ink);
    stroke-width: 3;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    transform-box: fill-box;
    transform-origin: 50% 0;
    transition: transform 320ms ease-in 260ms;
}

.giftbox__bow {
    --pull: 0;
    top: -18%;
    left: 50%;
    z-index: 3;
    width: 68%;
    height: auto;
    aspect-ratio: 160 / 112;
    margin-left: -34%;
    transform-origin: 50% 71%;
    transition: transform 500ms cubic-bezier(0.3, 1.3, 0.5, 1);
    cursor: grab;
}

.giftbox.is-dragging .giftbox__bow {
    transition: none;
    cursor: grabbing;
}

.gb-part {
    fill: var(--red);
    stroke: var(--ink);
    stroke-width: 4.5;
    stroke-linejoin: round;
}

.gb-crease {
    fill: none;
    stroke: var(--ink);
    stroke-width: 3;
    stroke-linecap: round;
}

/* Toate piesele fundei se rotesc în jurul nodului (80, 80) */
.gb-loop,
.gb-tail,
.gb-knot {
    transform-box: view-box;
    transform-origin: 80px 80px;
}

/* Cât tragi de fundă, buclele se întind */
.gb-loop--l {
    transform: rotate(calc(var(--pull) * -16deg)) scale(calc(1 + var(--pull) * 0.18));
}

.gb-loop--r {
    transform: rotate(calc(var(--pull) * 16deg)) scale(calc(1 + var(--pull) * 0.18));
}

.giftbox__tag {
    position: absolute;
    right: -26%;
    bottom: 18%;
    padding: 0.15rem 0.7rem 0.25rem 1.1rem;
    border: 2.5px solid var(--ink);
    border-radius: 6px 10px 10px 6px;
    background: var(--paper);
    color: var(--red-ink);
    font-size: 1.15rem;
    white-space: nowrap;
    transform: rotate(-9deg);
}

.giftbox__tag::before {
    position: absolute;
    top: 50%;
    left: 0.35rem;
    width: 0.4rem;
    height: 0.4rem;
    border: 2px solid var(--ink);
    border-radius: 50%;
    content: "";
    transform: translateY(-50%);
}

/* Deschiderea: funda se dezleagă și zboară → panglica se retrage → capacul sare */
.intro.is-opening .giftbox {
    animation: none;
}

.intro.is-opening .gb-loop--l {
    animation: untie-l 460ms cubic-bezier(0.5, 0, 0.7, 1) forwards;
}

.intro.is-opening .gb-loop--r {
    animation: untie-r 460ms cubic-bezier(0.5, 0, 0.7, 1) forwards;
}

.intro.is-opening .gb-knot {
    animation: knot-pop 260ms ease-in 160ms forwards;
}

.intro.is-opening .gb-tail--l {
    animation: tail-l 460ms ease-in forwards;
}

.intro.is-opening .gb-tail--r {
    animation: tail-r 460ms ease-in forwards;
}

.intro.is-opening .giftbox__bow {
    animation: bow-fly 850ms cubic-bezier(0.3, 0, 0.6, 1) 200ms forwards;
}

.intro.is-opening .gb-ribbon {
    transform: scaleY(0);
}

.intro.is-opening .giftbox__lid {
    opacity: 0;
    transform: translate(-58%, -190%) rotate(-24deg);
    transition: transform 700ms cubic-bezier(0.25, 1.4, 0.5, 1) 540ms, opacity 400ms ease 1050ms;
}

.intro.is-opening .giftbox__body {
    animation: squash 420ms ease 540ms;
}

.intro.is-gone {
    visibility: hidden;
    opacity: 0;
}

/* ---------- Pagina ---------- */

.page {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
}

.page.is-revealed .hero,
.page.is-revealed .rsvp {
    animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.page.is-revealed .rsvp {
    animation-delay: 120ms;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: max(0.9rem, env(safe-area-inset-top)) 1rem 0.5rem;
}

.topbar__logo img {
    width: 104px;
    height: auto;
}

.layout {
    flex: 1;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.hero {
    position: relative;
    padding: 1.5rem 1rem 0.5rem;
}

.hero__bow {
    position: absolute;
    top: 0.25rem;
    right: 0.75rem;
    width: 58px;
    height: auto;
    transform: rotate(14deg);
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: var(--red-ink);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    outline: none;
}

.hero__title {
    display: block;
    font-size: clamp(2.8rem, 13vw, 5.4rem);
    line-height: 0.95;
    text-wrap: balance;
}

.hero__subtitle {
    display: block;
    margin-top: 0.9rem;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.35;
}

.hero__lead {
    max-width: 34ch;
    margin: 0.75rem 0 1.5rem;
    color: var(--muted);
}

.details {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.details li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: var(--wobble);
    background: var(--blush);
}

.details svg {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    fill: none;
    stroke: var(--ink);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.details svg .accent {
    stroke: var(--red);
}

.details strong {
    display: block;
    font-weight: 600;
    line-height: 1.35;
}

.details li span > span {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
}

.details li > span {
    padding-top: 0.15rem;
}

.details__map {
    display: inline-block;
    margin-top: 0.2rem;
    color: var(--red-ink);
    font-size: 0.9rem;
    font-weight: 600;
    text-underline-offset: 3px;
}

.illustration {
    margin: 2.5rem auto 0;
    max-width: 320px;
    text-align: center;
}

.illustration > svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

.illustration .ink path,
.illustration .spark {
    fill: none;
    stroke: var(--ink);
    stroke-width: 3.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.illustration .spark {
    stroke: var(--red);
    stroke-width: 3;
}

.illustration .gift {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: beat 2.4s ease-in-out infinite;
}

.illustration .gift__box {
    fill: var(--red);
    stroke: var(--ink);
    stroke-width: 3;
    stroke-linejoin: round;
}

.illustration .gift__ribbon {
    fill: var(--paper);
    stroke: var(--ink);
    stroke-width: 2.4;
    stroke-linejoin: round;
}

.illustration__caption {
    margin-top: 0.75rem;
    font-size: 1.6rem;
    line-height: 1.15;
    text-wrap: balance;
}

.caption-heart {
    display: inline-block;
    width: 0.8em;
    height: 0.75em;
    margin-left: 0.1em;
    fill: var(--red);
    vertical-align: -0.05em;
}

/* ---------- Cardul cu formularul ---------- */

.rsvp {
    padding: 1.5rem 1rem 2.5rem;
    scroll-margin-top: 1rem;
}

.card {
    position: relative;
    padding: 1.5rem 1.25rem 1.6rem;
    border: 3px solid var(--ink);
    border-radius: 20px 26px 18px 24px / 24px 18px 26px 20px;
    background: var(--paper);
    box-shadow: 6px 7px 0 var(--blush-deep);
}

.card__title {
    margin: 0;
    font-size: 1.4rem;
    line-height: 1.25;
}

.card__intro {
    margin: 0.5rem 0 1.4rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.form__fields {
    display: grid;
    gap: 1.4rem;
}

.field__label,
.field legend {
    display: block;
    margin: 0 0 0.5rem;
    padding: 0;
    font-weight: 600;
    line-height: 1.35;
}

.field__req {
    color: var(--red-ink);
}

.field fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.input {
    width: 100%;
    min-height: 56px;
    padding: 0.85rem 1rem;
    border: 2.5px solid var(--ink);
    border-radius: 12px 16px 12px 14px / 14px 12px 16px 12px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-size: 1.05rem;   /* ≥16px: fără zoom pe iOS */
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.input::placeholder {
    color: #8E8486;
}

.input:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 4px var(--blush-deep);
}

.field.is-invalid .input {
    border-color: var(--red-ink);
}

.choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.choice {
    position: relative;
}

.choice input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.choice__face {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: 118px;
    padding: 0.9rem 0.5rem;
    border: 2.5px solid var(--ink);
    border-radius: 16px 20px 14px 18px / 18px 14px 20px 16px;
    background: var(--paper);
    text-align: center;
    transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.choice__icon {
    font-size: 1.9rem;
    line-height: 1;
    transition: transform 260ms cubic-bezier(0.3, 1.6, 0.5, 1);
}

.choice__title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
}

.choice__hint {
    color: var(--muted);
    font-size: 0.8rem;
}

@media (hover: hover) {
    .choice input:hover + .choice__face {
        transform: translateY(-2px);
        box-shadow: 3px 4px 0 var(--blush-deep);
    }
}

.choice input:active + .choice__face {
    transform: scale(0.97);
}

.choice input:focus-visible + .choice__face {
    outline: 3px solid var(--red);
    outline-offset: 3px;
}

.choice input:checked + .choice__face {
    border-color: var(--red);
    background: var(--blush);
    box-shadow: 4px 5px 0 var(--red);
    transform: translateY(-2px);
}

.choice input:checked + .choice__face .choice__icon {
    transform: scale(1.2) rotate(-8deg);
}

.choice input:checked + .choice__face::after {
    position: absolute;
    top: 0.45rem;
    right: 0.55rem;
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--red);
    color: var(--paper);
    content: "✓";
    font-size: 0.85rem;
    font-weight: 700;
}

.field.is-invalid .choice__face {
    border-color: var(--red-ink);
}

.field__hint {
    margin: 0.45rem 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

.result__mail {
    margin: -0.6rem 0 1.4rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--wobble);
    background: var(--blush);
    font-size: 0.88rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.result__mail[hidden] {
    display: none;
}

.view--no .result__mail {
    margin: 0.6rem auto 0;
    max-width: 34ch;
}

.field__error {
    display: flex;
    gap: 0.4rem;
    margin: 0.5rem 0 0;
    color: var(--red-ink);
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.4;
}

.field__error::before {
    content: "!";
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 0.05rem;
    border-radius: 50%;
    background: var(--red-ink);
    color: var(--paper);
    font-size: 0.75rem;
    font-weight: 700;
}

.field__error[hidden] {
    display: none;
}

.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form__status {
    margin: 1.25rem 0 0;
    padding: 0.85rem 1rem;
    border-left: 4px solid var(--red-ink);
    border-radius: 4px 12px 12px 4px;
    background: var(--blush);
    color: var(--ink);
    font-size: 0.92rem;
    line-height: 1.45;
}

.form__status[hidden] {
    display: none;
}

.form__note {
    margin: 0.75rem 0 0;
    color: var(--muted);
    font-size: 0.68rem;
    line-height: 1.45;
    text-align: center;
}

/* ---------- Butoane ---------- */

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 56px;
    padding: 0.8rem 1.4rem;
    border: 2.5px solid var(--ink);
    border-radius: 999px;
    font: inherit;
    font-size: 1.02rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn--primary {
    background: var(--ink);
    color: var(--paper);
    box-shadow: 4px 4px 0 var(--red);
}

.btn--ghost {
    background: var(--paper);
    color: var(--ink);
}

@media (hover: hover) {
    .btn--primary:hover {
        transform: translate(-1px, -1px);
        box-shadow: 6px 6px 0 var(--red);
    }

    .btn--ghost:hover {
        background: var(--blush);
    }
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--red);
}

.btn--submit {
    width: 100%;
    margin-top: 1.5rem;
}

.btn__spinner {
    display: none;
    width: 1.1rem;
    height: 1.1rem;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: var(--paper);
    border-radius: 50%;
    animation: spin 700ms linear infinite;
}

.btn[aria-busy="true"] {
    cursor: progress;
    opacity: 0.85;
}

.btn[aria-busy="true"] .btn__spinner {
    display: inline-block;
}

.link-btn {
    display: block;
    margin: 1.25rem auto 0;
    padding: 0.5rem;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

/* ---------- Rezultate ---------- */

.view {
    outline: none;
}

.view[hidden] {
    display: none;
}

.view--yes:not([hidden]),
.view--no:not([hidden]) {
    animation: rise 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.result__title {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.25;
}

.result__title .marker {
    display: block;
    color: var(--red);
    font-size: 3.2rem;
    line-height: 1;
}

.result__text {
    margin: 0.6rem 0 1.4rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.result__bow {
    width: 76px;
    height: auto;
    margin: 0 auto 0.75rem;
    transform: rotate(-8deg);
}

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

.view--no .result__text {
    max-width: 32ch;
    margin-inline: auto;
}

.ticket {
    --notch: 14px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    overflow: hidden;
    border: 3px solid var(--ink);
    border-radius: 16px;
    background: var(--blush);
    animation: ticket-in 700ms cubic-bezier(0.3, 1.3, 0.5, 1) 150ms both;
}

.ticket__main {
    padding: 1.1rem 1.15rem 1.2rem;
}

.ticket__kicker {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0;
    color: var(--red-ink);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ticket__name {
    margin: 0.35rem 0 0.9rem;
    font-size: clamp(2.2rem, 10vw, 2.9rem);
    line-height: 1.02;
    overflow-wrap: anywhere;
}

.ticket__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem 1rem;
    margin: 0;
}

.ticket__grid div {
    min-width: 0;
}

.ticket__wide {
    grid-column: 1 / -1;
}

.ticket__grid dt {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ticket__grid dd {
    margin: 0.1rem 0 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
}

.ticket__stub {
    position: relative;
    display: grid;
    place-items: center;
    padding: 1rem;
    border-top: 3px dashed var(--ink);
    background: var(--paper);
}

/* Crestăturile biletului */
.ticket__stub::before,
.ticket__stub::after {
    position: absolute;
    top: calc(var(--notch) * -1 - 1.5px);
    width: calc(var(--notch) * 2);
    height: calc(var(--notch) * 2);
    border: 3px solid var(--ink);
    border-radius: 50%;
    background: var(--paper);
    content: "";
}

.ticket__stub::before {
    left: calc(var(--notch) * -1 - 3px);
}

.ticket__stub::after {
    right: calc(var(--notch) * -1 - 3px);
}

.stamp {
    width: 96px;
    height: 96px;
    transform: rotate(-12deg);
}

.stamp__ring {
    fill: none;
    stroke: var(--red);
    stroke-width: 4;
}

.stamp__ring--thin {
    stroke-width: 2;
    stroke-dasharray: 3 5;
}

.stamp__text {
    fill: var(--red);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.actions {
    display: grid;
    gap: 0.65rem;
    margin-top: 1.4rem;
}

/* După răspuns: doar biletul / mulțumirea */
.is-answered .hero,
.is-answered .illustration {
    display: none;
}

.is-answered .rsvp {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

/* ---------- Footer ---------- */

.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 1.5rem 1rem max(1.75rem, env(safe-area-inset-bottom));
    background: var(--blush);
    color: var(--muted);
    font-size: 0.8rem;
    text-align: center;
}

.footer__slogan {
    color: var(--red);
    font-size: 1.6rem;
}

.confetti {
    position: fixed;
    inset: 0;
    z-index: 60;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ---------- Ecrane mai mari ---------- */

@media (min-width: 560px) {
    .ticket {
        grid-template-columns: 1fr 148px;
    }

    .stamp {
        width: 120px;
        height: 120px;
    }

    .ticket__stub {
        border-top: 0;
        border-left: 3px dashed var(--ink);
    }

    .ticket__stub::before,
    .ticket__stub::after {
        left: calc(var(--notch) * -1 - 1.5px);
    }

    .ticket__stub::before {
        top: calc(var(--notch) * -1 - 3px);
    }

    .ticket__stub::after {
        top: auto;
        right: auto;
        bottom: calc(var(--notch) * -1 - 3px);
    }
}

@media (min-width: 960px) {
    .topbar {
        padding: 1.5rem 2.5rem 0.5rem;
    }

    .topbar__logo img {
        width: 132px;
    }

    .layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 500px);
        align-items: start;
        gap: 4rem;
        padding: 1.5rem 2.5rem 4rem;
    }

    .hero {
        position: sticky;
        top: 2rem;
        padding: 1rem 0 0;
    }

    .hero__bow {
        top: -0.5rem;
        right: 2rem;
        width: 84px;
    }

    .hero__title {
        font-size: clamp(4.5rem, 6.6vw, 6.4rem);
    }

    .hero__subtitle {
        font-size: 1.4rem;
    }

    .details {
        grid-template-columns: 1fr 1fr;
        max-width: 560px;
    }

    .details li:last-child {
        grid-column: 1 / -1;
    }

    .illustration {
        max-width: 380px;
        margin-top: 3rem;
    }

    .illustration__caption {
        font-size: 1.9rem;
    }

    .rsvp {
        padding: 3.5rem 0 0;
    }

    .is-answered .layout {
        grid-template-columns: minmax(0, 560px);
        justify-content: center;
    }

    .is-answered .rsvp {
        padding-top: 1rem;
    }

    .card {
        padding: 2rem 2rem 2.2rem;
        box-shadow: 10px 11px 0 var(--blush-deep);
    }

    .intro__logo {
        width: 140px;
    }

    .footer {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
}

/* ---------- Animații ---------- */

@keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

@keyframes ticket-in {
    from { opacity: 0; transform: translateY(24px) rotate(-3deg) scale(0.96); }
    to { opacity: 1; transform: none; }
}

@keyframes wiggle {
    0%, 82%, 100% { transform: rotate(0); }
    86% { transform: rotate(-4deg); }
    90% { transform: rotate(3.5deg); }
    94% { transform: rotate(-2deg); }
    97% { transform: rotate(1deg); }
}

@keyframes untie-l {
    0% { transform: none; }
    40% { transform: rotate(-24deg) scale(1.18, 0.88); }
    100% { transform: translate(-14px, 8px) rotate(-78deg) scale(0.55, 1.35); }
}

@keyframes untie-r {
    0% { transform: none; }
    40% { transform: rotate(24deg) scale(1.18, 0.88); }
    100% { transform: translate(14px, 8px) rotate(78deg) scale(0.55, 1.35); }
}

@keyframes sparks {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.94); }
}

@keyframes knot-pop {
    to { opacity: 0; transform: scale(0); }
}

@keyframes tail-l {
    to { transform: translate(-12px, 6px) rotate(38deg); }
}

@keyframes tail-r {
    to { transform: translate(12px, 6px) rotate(-38deg); }
}

@keyframes bow-fly {
    0% { opacity: 1; transform: none; }
    30% { transform: translate(50px, -110px) rotate(-20deg); }
    65% { opacity: 1; transform: translate(120px, -230px) rotate(90deg) scale(0.85); }
    100% { opacity: 0; transform: translate(190px, -340px) rotate(200deg) scale(0.6); }
}

@keyframes squash {
    40% { transform: translateX(-50%) scale(1.07, 0.9); }
    70% { transform: translateX(-50%) scale(0.97, 1.03); }
    100% { transform: translateX(-50%); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.6); opacity: 0.4; }
}

@keyframes beat {
    0%, 60%, 100% { transform: scale(1); }
    70% { transform: scale(1.12); }
    80% { transform: scale(0.98); }
    90% { transform: scale(1.06); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
        scroll-behavior: auto !important;
    }

    .btn__spinner {
        animation: none;
        border-top-color: rgba(255, 255, 255, 0.35);
    }
}
