/* =====================================================
   Hochzeitswebseite · Save the Date
   Hintergrund: #FDEECF · Schrift: schwarz
   Primär: Times New Roman (Light) · Sekundär: Schreibschrift
   ===================================================== */

:root {
    --bg: #fdeecf;
    --bg-soft: #fbe3b8;
    --ink: #111111;
    --ink-soft: #3a3a3a;
    --gold: #b08d57;

    --font-serif: "Times New Roman", Times, serif;
    --font-script: "Allura", cursive;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Schreibschrift-Utility */
.allura-regular {
    font-family: "Allura", cursive;
    font-weight: 400;
    font-style: normal;
}

/* Alle Schreibschrift-Elemente einheitlich rendern */
.headline__script,
.animation__monogram,
.invitation__script {
    font-family: var(--font-script);
    font-weight: 400;
    font-style: normal;
}

html {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 18%, #ffffff2e, transparent 55%),
        radial-gradient(circle at 50% 120%, var(--bg-soft), transparent 60%),
        var(--bg);
    color: var(--ink);
    font-family: var(--font-serif);
    font-weight: 300;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    padding: clamp(1.5rem, 5vw, 4rem);
}

/* =========================
   Layout
   ========================= */
.wedding {
    position: relative;
    width: min(760px, 100%);
    text-align: center;
    padding: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 3.5rem);
}

/* Dünner Zierrahmen */
.frame {
    position: absolute;
    inset: clamp(0.5rem, 2vw, 1.25rem);
    border: 1px solid rgba(17, 17, 17, 0.28);
    pointer-events: none;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 1.4s var(--ease), transform 1.6s var(--ease);
}
.frame::before {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(17, 17, 17, 0.12);
}
.is-ready .frame {
    opacity: 1;
    transform: scale(1);
}

/* =========================
   Intro
   ========================= */
/* =========================
   Zentrale Animation (booth.html)
   ========================= */
.animation {
    position: relative;
    width: clamp(260px, 72vw, 400px);
    /* Nur der sichtbare Rahmen, nicht die leere 9:16-Bühne (Rahmen 1040×1560 in 1080×1920) */
    aspect-ratio: 9 / 13;
    margin: 0 auto clamp(0.25rem, 1vw, 0.6rem);
    display: block;
}
.animation__booth {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: transparent;
}

/* =========================
   Headline
   ========================= */
.headline {
    font-weight: 300;
    line-height: 1.05;
    margin: clamp(1rem, 3vw, 1.6rem) 0 0;
}
.headline__line {
    display: block;
}
.headline__line--words {
    font-size: clamp(1.9rem, 8vw, 3.4rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 300;
}
.headline__script {
    font-family: var(--font-script);
    font-size: clamp(4rem, 20vw, 8rem);
    letter-spacing: 0.01em;
    color: var(--ink);
    margin-top: 0.1em;
    text-transform: none;
}

/* "Evleniyoruz" ist deutlich länger als "Married"/"ślub" → etwas kleiner */
html[lang="tr"] .headline .headline__script {
    font-size: clamp(3.6rem, 18vw, 7.2rem);
}

/* =========================
   Save the Date
   ========================= */
.save-the-date {
    margin-top: clamp(0.25rem, 1vw, 0.6rem);
}
.save-the-date__title .headline__line--words {
    display: block;
    font-size: clamp(1.6rem, 7vw, 2.8rem);
}
.save-the-date__title .headline__script {
    display: block;
    font-size: clamp(3rem, 15vw, 5.5rem);
    margin-top: 0.05em;
}
.save-the-date__date {
    margin-top: 0.4rem;
    font-size: clamp(1.4rem, 6vw, 2.2rem);
    letter-spacing: 0.18em;
    font-weight: 300;
}

/* =========================
   Buttons
   ========================= */
.cta {
    margin-top: clamp(1.6rem, 4vw, 2.4rem);
}
.btn {
    appearance: none;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(0.85rem, 2.6vw, 1rem);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ink);
    background: transparent;
    border: 1px solid var(--ink);
    padding: 0.95em 2.4em;
    border-radius: 0;
    transition: transform 0.4s var(--ease), background 0.4s var(--ease),
        color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(17, 17, 17, 0.12);
}
.btn:active {
    transform: translateY(0);
}
.btn--outline {
    color: var(--ink);
    background: transparent;
    border-color: var(--ink);
}
.btn--outline:hover {
    background: var(--ink);
    color: var(--bg);
}

/* Hinweistext statt Button */
.rsvp-note {
    margin-top: clamp(1.6rem, 4vw, 2.4rem);
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(0.9rem, 2.8vw, 1.1rem);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ink);
}

/* =========================
   Einladungssektion
   ========================= */
.back-link {
    display: inline-block;
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
    font-size: clamp(0.8rem, 2.6vw, 0.95rem);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 0.3s var(--ease);
}
.back-link:hover {
    color: var(--ink);
}
.invitation {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    transition: max-height 1s var(--ease), opacity 0.8s var(--ease),
        margin-top 0.8s var(--ease);
}
.invitation.is-open {
    max-height: 2000px;
    opacity: 1;
    margin-top: clamp(2.5rem, 7vw, 4.5rem);
}
.invitation__eyebrow {
    font-size: clamp(0.95rem, 3.4vw, 1.35rem);
    letter-spacing: 0.12em;
    color: var(--ink-soft);
    line-height: 1.4;
}
.invitation__script {
    font-family: var(--font-script);
    font-size: clamp(3.4rem, 16vw, 6rem);
    color: var(--ink);
    margin-top: 0.05em;
}

/* Zwei schräg übereinander gelegte Fotos */
.photos {
    position: relative;
    width: min(420px, 82%);
    margin: clamp(2.5rem, 7vw, 4rem) auto clamp(2rem, 6vw, 3rem);
    aspect-ratio: 4 / 3.6;
}
.photo {
    position: absolute;
    top: 0;
    left: 50%;
    width: 62%;
    background: #fff;
    padding: 12px 12px 42px;
    box-shadow: 0 18px 40px rgba(17, 17, 17, 0.22);
    border-radius: 2px;
}
.photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: var(--bg-soft);
}
.photo--back {
    transform: translateX(-88%) rotate(-9deg);
    z-index: 1;
}
.photo--front {
    transform: translateX(-14%) rotate(7deg);
    z-index: 2;
}

/* =========================
   Countdown
   ========================= */
.countdown {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: clamp(0.4rem, 2vw, 1rem);
    margin-top: clamp(1.5rem, 4vw, 2.4rem);
}
.countdown__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: clamp(48px, 14vw, 72px);
}
.countdown__value {
    font-size: clamp(1.8rem, 8vw, 3rem);
    font-weight: 300;
    line-height: 1;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}
.countdown__label {
    margin-top: 0.55rem;
    font-size: clamp(0.6rem, 2.2vw, 0.75rem);
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.countdown__sep {
    font-size: clamp(1.4rem, 6vw, 2.2rem);
    color: var(--gold);
    line-height: 1;
    align-self: flex-start;
    margin-top: 0.1em;
}

/* =========================
   Einfliegende Elemente (Reveal)
   ========================= */
.reveal {
    opacity: 0;
    transition:
        opacity 1.1s var(--ease),
        transform 1.1s var(--ease);
    will-change: opacity, transform;
}
.reveal--top    { transform: translateY(-40px); }
.reveal--bottom { transform: translateY(40px); }
.reveal--left   { transform: translateX(-60px); }
.reveal--right  { transform: translateX(60px); }
.reveal--scale  { transform: scale(0.82); }

.reveal.is-visible {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* Einfliegende Elemente innerhalb der Einladung (nach Button-Klick) */
.reveal-inv {
    opacity: 0;
    transition:
        opacity 1s var(--ease),
        transform 1s var(--ease);
    will-change: opacity, transform;
}
.reveal-inv--top    { transform: translateY(-40px); }
.reveal-inv--bottom { transform: translateY(40px); }
.reveal-inv--left   { transform: translateX(-70%) rotate(-9deg); }
.reveal-inv--right  { transform: translateX(30%) rotate(7deg); }

.invitation.is-open .reveal-inv {
    opacity: 1;
}
.invitation.is-open .invitation__eyebrow { transition-delay: 0.05s; }
.invitation.is-open .invitation__script { transition-delay: 0.2s; }
.invitation.is-open .photo--back  { transition-delay: 0.4s; }
.invitation.is-open .photo--front { transition-delay: 0.55s; }
.invitation.is-open .countdown    { transition-delay: 0.75s; }
.invitation.is-open .cta          { transition-delay: 0.9s; }
.invitation.is-open .reveal-inv--top,
.invitation.is-open .reveal-inv--bottom {
    transform: translateY(0);
}
/* Fotos fliegen an ihre schräge Zielposition */
.invitation.is-open .photo--back {
    transform: translateX(-88%) rotate(-9deg);
}
.invitation.is-open .photo--front {
    transform: translateX(-14%) rotate(7deg);
}

/* =========================
   Sprachumschalter (unten mittig)
   ========================= */
.lang-switch {
    position: fixed;
    left: 50%;
    bottom: clamp(0.6rem, 2.2vw, 1.2rem);
    transform: translateX(-50%);
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(253, 238, 207, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-family: var(--font-serif);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}
.lang-switch__btn {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 0.2em 0.15em;
    cursor: pointer;
    font: inherit;
    letter-spacing: inherit;
    color: var(--ink-soft);
    opacity: 0.6;
    transition: color 0.3s var(--ease), opacity 0.3s var(--ease);
}
.lang-switch__btn:hover {
    color: var(--ink);
    opacity: 1;
}
.lang-switch__btn.is-active {
    color: var(--ink);
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
}
.lang-switch__sep {
    color: var(--ink-soft);
    opacity: 0.4;
}

/* =========================
   Dekorative Blütenblätter
   ========================= */
.petal {
    position: fixed;
    top: -40px;
    width: 14px;
    height: 14px;
    background: radial-gradient(circle at 30% 30%, #ffffffb0, var(--bg-soft));
    border-radius: 60% 0 60% 0;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}
.is-ready .petal { animation: fall linear infinite; }
.petal--1 { left: 12%; animation-duration: 13s; animation-delay: 0s; }
.petal--2 { left: 34%; animation-duration: 17s; animation-delay: 3s; transform: scale(0.7); }
.petal--3 { left: 68%; animation-duration: 15s; animation-delay: 6s; transform: scale(1.2); }
.petal--4 { left: 86%; animation-duration: 19s; animation-delay: 1.5s; transform: scale(0.85); }

/* =========================
   Keyframes
   ========================= */
@keyframes spin        { to { transform: rotate(360deg); } }
@keyframes spinReverse { to { transform: rotate(-360deg); } }
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(0.94); opacity: 0.7; }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
@keyframes fall {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
    10%  { opacity: 0.8; }
    90%  { opacity: 0.8; }
    100% { transform: translateY(108vh) rotate(320deg); opacity: 0; }
}

/* =========================
   Responsive Feinschliff
   ========================= */
@media (max-width: 600px) {
    body { padding: 1.25rem; }
    .wedding { padding: 2.75rem 1.25rem; }
    .eyebrow { letter-spacing: 0.3em; }
    .save-the-date__meta { letter-spacing: 0.16em; }
}

@media (max-width: 380px) {
    .headline__line--words { letter-spacing: 0.08em; }
    .save-the-date__date { gap: 0.4rem; }
}

/* Barrierefreiheit: Animationen reduzieren */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.001ms !important;
    }
    .reveal { opacity: 1; transform: none; }
    .reveal-inv { opacity: 1; transform: none; }
    .frame { opacity: 1; transform: none; }
}
