/* ============================================================
   TOKENS
   ============================================================ */
:root {
    --ink: #3B4A3B;
    --sage-deep: #4E5F4E;
    --sage: #7CA091;
    --sage-transparent: #8fa99e15;
    --olive: #97A06E;
    --peach: #E8C6A3;
    --peach-soft: #F4DCC3;
    --cream: #FBF6EC;
    --cream-2: #F3ECDD;
    --line: rgba(59, 74, 59, 0.16);
    --shadow: 0 10px 30px rgba(59, 74, 59, 0.10);

    /* Einziger Nav-Breakpoint — siehe NAV-Section.
       Media Queries können keine Variablen nutzen, daher steht
       der Wert dort nochmal ausgeschrieben: 1100px. */
    --nav-breakpoint: 1500px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1,
h2,
h3,
.serif {
    font-family: 'Cormorant Garamond', serif;
    color: var(--sage-deep);
}

h1 {
    font-weight: 500;
}

h2 {
    font-weight: 500;
    font-size: 2.4rem;
    letter-spacing: .01em;
}

h3 {
    font-weight: 600;
}

.eyebrow {
    font-family: 'Jost', sans-serif;
    text-transform: uppercase;
    letter-spacing: .28em;
    font-size: .72rem;
    color: var(--sage);
    font-weight: 500;
    display: inline-block;
    margin-bottom: 14px;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 24px 0 88px;
}

section .container {
    text-align: center;
}

section>.container>.eyebrow {
    display: block;
}

.section-lede {
    max-width: 620px;
    margin: 0 auto 48px;
    color: var(--ink);
    opacity: .85;
    font-weight: 300;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 2px;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.btn {
    padding: 13px 34px;
    background: var(--peach);
    border: 1px solid var(--peach);
    color: var(--sage-deep);
}

.btn:hover {
    background: var(--sage-deep);
    border-color: var(--sage-deep);
    color: var(--cream);
}

.btn-ghost {
    padding: 13px 28px;
    background: transparent;
    border: 1px solid var(--sage-deep);
    color: var(--sage-deep);
}

.btn-ghost:hover {
    background: var(--sage-deep);
    color: var(--cream);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ============================================================
   FORM FIELDS
   Gemeinsam genutzt von der Homepage-Card (.rsvp-card) und der
   Standalone-Formularseite (.rsvp-form) — beide verwenden dasselbe
   .field / .checkbox-row Markup, daher eine Definition für beide.
   ============================================================ */
.field {
    margin-bottom: 20px;
}

/* Uppercase-Label — schließt .checkbox-row bewusst aus, damit es
   nicht über Spezifität mit dem Checkbox-Label kollidiert. */
.field>label:not(.checkbox-row) {
    display: block;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--sage-deep);
    margin-bottom: 8px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field select,
.field textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    background: #fff;
    font-family: 'Jost', sans-serif;
    color: var(--ink);
    border-radius: 2px;
    font-size: .95rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--sage);
    box-shadow: 0 0 0 3px rgba(124, 160, 145, 0.18);
}

.field .is-invalid {
    border-color: #b5563f;
}

.field-error {
    color: #b5563f;
    font-size: .82rem;
    margin-top: 6px;
}

.field-help {
    color: var(--ink);
    opacity: .6;
    font-size: .82rem;
    margin-top: 6px;
}

.field-row {
    display: flex;
    gap: 14px;
}

.field-row-item {
    flex: 1;
    min-width: 0;
}

.field-label-below {
    margin-bottom: 0 !important;
    margin-top: 8px;
}

/* ---- Custom Checkbox ---- */
.checkbox-row {
    display: flex;
    align-items: center;
    /* align-items: flex-start; */
    gap: 10px;
    font-size: .92rem;
    color: var(--ink);
    cursor: pointer;
    line-height: 1.5;
    text-transform: none;
    letter-spacing: normal;
    margin-bottom: 0;
}

.checkbox-row input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 40px;
    height: 40px;
    margin: 0;
    cursor: pointer;
}

.checkbox-box {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: 1px solid var(--sage);
    border-radius: 7px;
    background: var(--sage-transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, border-color .15s;
}

.checkbox-box i {
    font-size: 2rem;
    color: #fff;
    opacity: 0;
    transition: opacity .15s;
}

.checkbox-row input[type="checkbox"]:checked+.checkbox-box {
    background: var(--sage);
    border-color: var(--sage);
}

.checkbox-row input[type="checkbox"]:checked+.checkbox-box i {
    opacity: 1;
}

.checkbox-row input[type="checkbox"]:focus-visible+.checkbox-box {
    box-shadow: 0 0 0 3px rgba(124, 160, 145, 0.28);
}


.checkbox-label {
    padding-top: 0px;
}

.rsvp-alert {
    background: rgba(181, 86, 63, 0.1);
    color: #8a3f2c;
    border: 1px solid rgba(181, 86, 63, 0.3);
    padding: 10px 14px;
    border-radius: 2px;
    font-size: .88rem;
    margin-bottom: 20px;
}

/* ============================================================
   NAV

   Aufbau: Desktop ist der Basiszustand (Links horizontal sichtbar),
   Mobile wird in EINER Media Query darunter überschrieben.

   Wichtig: Es gibt genau einen Breakpoint (1100px) und genau einen
   @media-Block für die Nav. Frühere Versionen hatten zwei Blöcke mit
   unterschiedlichen Breiten — dabei war der Hamburger-Button in einem
   Bereich sichtbar, aber ohne Klapp-Logik, also wirkungslos.
   Wenn der Breakpoint geändert wird: nur an dieser einen Stelle.
   ============================================================ */
nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(251, 246, 236, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.nav-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 10px 24px;
    max-width: 1440px;
    margin: 0 auto;
}

/* line-height: 1 sowohl hier als auch bei .nav-links a — sonst
   erzeugen die unterschiedlichen Schriftgrößen unterschiedlich hohe
   Zeilenboxen und Logo und Links sitzen optisch versetzt. */
.brand {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--sage-deep);
}

/* Desktop-Zustand */
.nav-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-links li {
    list-style: none;
}

/* padding-top gleicht padding-bottom (2px) + border-bottom (1px) aus,
   damit der Text in der Box mittig sitzt und der Hover-Strich
   keinen Sprung erzeugt. */
.nav-links a {
    display: inline-block;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    line-height: 1;
    color: var(--ink);
    opacity: .75;
    padding-top: 3px;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: opacity .2s, color .2s;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--sage);
    border-color: var(--sage);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--sage-deep);
    cursor: pointer;
}

/* Mobile-Zustand — der einzige Nav-Breakpoint */
@media (max-width: 1500px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--cream);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        max-height: calc(100vh - 68px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        border-bottom: 1px solid var(--line);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        padding: 16px 24px;
        border-bottom: none;
    }

    .nav-toggle {
        display: block;
    }
}

/* ============================================================
   HERO
   ============================================================ */
header.hero {
    --focus-x: 48%;
    --focus-y: 40%;
    --hero-min: 80vh;
    position: relative;
    max-height: 90vh;
    min-height: var(--hero-min);
    display: flex;
    align-items: flex-end;
    background:
        linear-gradient(180deg, rgba(59, 74, 59, 0.2) 0%, rgba(59, 74, 59, 0.55) 100%),
        url('/static/img/xingundjonas_im_rahmen.jpg') var(--focus-x) var(--focus-y) / cover no-repeat;
}

header.hero::before {
    content: '';
    position: absolute;
    inset: 15px;
    border: 1px solid rgba(251, 246, 236, 0.55);
    pointer-events: none;
}

/* Tablet / kleines Landscape */
@media (max-width: 760px) {
    header.hero {
        --focus-x: 48%;
        --focus-y: 50%;
        --hero-min: 80vh;
    }
}

/* Große Screens im 4:3-Bereich */
/* @media (min-width: 1080px) and (min-aspect-ratio: 4/3) {
    header.hero {
        --focus-x: 48%;
        --focus-y: 50%;
        --hero-min: 80vh;
    }
} */

/* Hochkant-Handys (die meisten Smartphones im Portrait) */
@media (max-width: 600px) and (orientation: portrait) {
    header.hero {
        --focus-x: 48%;
        --focus-y: 50%;
        --hero-min: 90vh;
        background-image:
            linear-gradient(180deg, rgba(59, 74, 59, 0.10) 0%, rgba(59, 74, 59, 0.55) 100%),
            url('/static/img/xingundjonas_im_rahmen.jpg');
    }
}

/* Besonders hohe, schmale Screens (z.B. 344x882, Galaxy Fold Z) */
@media (max-width: 600px) and (orientation: portrait) and (max-aspect-ratio: 9/19) {
    header.hero {
        --focus-x: 48%;
        --focus-y: 50%;
        --hero-min: 90vh;
    }
}

/* Querformat-Handys (z.B. iPhone 17 Pro landscape: ~930×430px).
   Über max-height statt max-width erkannt, da Landscape-Phones zwar
   breit, aber sehr niedrig sind — eine reine Breiten-Query würde sie
   sonst mit Tablets im Portrait verwechseln. */
@media (orientation: landscape) and (max-height: 500px) {
    header.hero {
        --hero-min: 80vh;
        --focus-x: 48%;
        --focus-y: 35%;
        max-height: 100vh;
    }
}

.hero-inner {
    position: relative;
    z-index: 2;
    padding: 0 30px 30px;
    max-width: 1080px;
    margin: 0 auto;
    width: 100%;
    color: var(--cream);
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: .3em;
    font-size: .75rem;
    color: var(--peach-soft);
    margin-bottom: 18px;
}

.hero h1 {
    color: var(--cream);
    font-size: clamp(3rem, 8vw, 6rem);
    font-style: italic;
    line-height: 1;
    margin: 0 0 18px;
}

.hero-date {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 1.05rem;
    letter-spacing: .04em;
}

.hero-date .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--peach-soft);
}

/* ============================================================
   LEAF DIVIDER (Signature-Element)
   ============================================================ */
.leaf-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 56px 24px 8px;
    color: var(--sage);
}

.leaf-divider .stem {
    height: 1px;
    flex: 1;
    max-width: 180px;
    background: var(--line);
}

.leaf-divider svg {
    width: 46px;
    height: 20px;
}

/* ============================================================
   STORY / DRESSCODE
   ============================================================ */
#story .story-text {
    max-width: 640px;
    margin: 0 auto;
    text-align: left;
    font-size: 1.05rem;
    color: var(--ink);
    opacity: .9;
}

#story .story-text p+p {
    margin-top: 1.2em;
}

#story .story-text::first-letter {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.2rem;
    color: var(--sage-deep);
    float: left;
    line-height: .8;
    margin: 6px 8px 0 0;
}

/* ============================================================
   PROGRAMM (Timeline)
   ============================================================ */
.timeline {
    max-width: 520px;
    margin: 0 auto;
    text-align: left;
}

.timeline-item {
    display: grid;
    grid-template-columns: 64px 24px 1fr;
    column-gap: 20px;
    position: relative;
    padding-bottom: 38px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-time {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.25rem;
    color: var(--sage-deep);
    text-align: right;
    padding-top: 2px;
}

.timeline-marker {
    position: relative;
    display: flex;
    justify-content: center;
}

.timeline-marker .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--peach);
    box-shadow: 0 0 0 3px var(--cream), 0 0 0 4px var(--sage);
    margin-top: 6px;
    z-index: 1;
}

.timeline-marker .line {
    position: absolute;
    top: 18px;
    bottom: -38px;
    width: 1px;
    background: var(--line);
}

.timeline-item:last-child .timeline-marker .line {
    display: none;
}

.timeline-content h4 {
    margin: 0 0 4px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--sage-deep);
}

.timeline-content p {
    margin: 0;
    font-size: .9rem;
    opacity: .8;
}

/* ============================================================
   RSVP — Teaser-Card auf der Startseite
   ============================================================ */
#rsvp {
    background: var(--cream-2);
}

.rsvp-card {
    max-width: 480px;
    margin: 0 auto;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 44px 40px;
    box-shadow: var(--shadow);
    text-align: left;
}

.rsvp-cta {
    text-align: center;
    padding: 8px 4px;
}

.rsvp-cta p {
    margin: 0 0 24px;
    color: var(--ink);
    opacity: .85;
    font-size: 1rem;
}

.rsvp-cta .btn {
    padding: 14px 42px;
}

/* ============================================================
   RSVP — eigenständige Formularseite (rsvp.html, thank_you.html)
   ============================================================ */
.rsvp-page {
    padding: 72px 0 96px;
}

.rsvp-form-wrap {
    max-width: 520px;
    margin: 0 auto;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 48px 40px;
    box-shadow: var(--shadow);
    text-align: center;
}

.rsvp-title {
    font-size: 2.6rem;
    margin: 4px 0 10px;
}

.rsvp-sub {
    color: var(--ink);
    opacity: .8;
    margin: 0 0 36px;
    font-size: .95rem;
}

.rsvp-form {
    text-align: left;
}

.rsvp-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.thank-you-card {
    text-align: center;
    padding: 56px 40px;
}

.thank-you-card .btn-ghost {
    margin-top: 12px;
}

/* ============================================================
   LOCATION
   ============================================================ */
.loc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    text-align: left;
}

@media (max-width: 1000px) {
    .loc-grid {
        grid-template-columns: 1fr;
    }
}

.loc-card {
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 2px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.loc-card .map {
    height: 400px;
    overflow: hidden;
}

.loc-card .map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.loc-card .body {
    padding: 24px 26px;
}

.loc-card h3 {
    margin: 0 0 4px;
    font-size: 1.4rem;
}

.loc-card p {
    margin: 0;
    opacity: .75;
    font-size: .92rem;
}

/* ============================================================
   TABELLEN
   ============================================================ */
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--sage-deep);
    font-weight: 500;
    padding: 12px 16px;
    border-bottom: 1px solid var(--sage-deep);
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--line);
    font-size: .94rem;
    vertical-align: top;
}

tr:last-child td {
    border-bottom: none;
}

.table-wrap {
    max-width: 868px;
    margin: 0 auto;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 2px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-wrap a {
    color: var(--sage-deep);
    border-bottom: 1px solid var(--sage);
    font-size: .88rem;
}

.table-wrap a:hover {
    color: var(--sage);
}

/* ============================================================
   ESSEN / GETRÄNKE / KUCHEN / HOTELS (Card-Listen)
   ============================================================ */
.food-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 420px));
    justify-content: center;
    gap: 28px;
}

.food-grid.single {
    grid-template-columns: minmax(280px, 420px);
}

@media (max-width: 1000px) {
    .food-grid {
        grid-template-columns: minmax(280px, 420px);
    }
}

.food-card {
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 32px 30px;
    box-shadow: var(--shadow);
    text-align: left;
}

.food-card h4 {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--sage-deep);
    text-align: center;
    margin: 0 0 20px;
}

.food-card h4 .icon {
    font-style: normal;
    display: inline-block;
}

.food-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    font-size: .92rem;
}

.food-row:last-child {
    border-bottom: none;
}

.food-row-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.food-row-desc {
    color: var(--ink);
    opacity: .65;
    font-size: .82rem;
    font-weight: 300;
}

.food-row-link {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 3px 9px;
    border-radius: 20px;
    font-weight: 500;
    background: rgba(124, 160, 145, 0.18);
    color: var(--sage-deep);
    white-space: nowrap;
}

.food-row-link:hover {
    background: var(--sage);
    color: var(--cream);
}

#food .container+.container {
    margin-top: 64px;
}

/* ---- Badges ---- */
.badge {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 3px 9px;
    border-radius: 20px;
    font-weight: 500;
}

.badge-vegan {
    background: rgba(151, 160, 110, 0.18);
    color: #5c6640;
}

/* Allergen und "alkoholisch" teilen sich bewusst dieselbe
   Pfirsich-Optik — beides sind Hinweis-Badges. */
.badge-allergen,
.badge-alc {
    background: var(--peach-soft);
    color: #8a5a2b;
}

.badge-free {
    background: rgba(124, 160, 145, 0.18);
    color: var(--sage-deep);
}

.allergen-row {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .25rem;
}

/* ============================================================
   KUCHEN — Formular (Toggle, Erfolgsmeldung, Flash-Markierung)
   ============================================================ */
.cake-form-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.cake-form-header h5 {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--sage-deep);
}

.cake-form-container {
    display: none;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.cake-form-container.open {
    display: block;
}

.form-success {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(124, 160, 145, 0.14);
    color: var(--sage-deep);
    border: 1px solid rgba(124, 160, 145, 0.35);
    padding: 12px 16px;
    border-radius: 2px;
    font-size: .88rem;
    margin-bottom: 20px;
}

.form-success::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--sage);
    color: var(--cream);
    font-size: .75rem;
    font-weight: 600;
}

@keyframes foodRowFlash {

    0%,
    100% {
        background: transparent;
    }

    50% {
        background: var(--peach-soft);
    }
}

.food-row-flash {
    animation: foodRowFlash 1s ease-in-out 5;
    border-radius: 2px;
}

.food-row-new {
    position: relative;
    background: rgba(232, 198, 163, 0.12);
    border-radius: 2px;
}

.food-row-new::after {
    content: 'Neu';
    position: absolute;
    top: 4px;
    right: 0;
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sage-deep);
    opacity: .55;
}

@media (prefers-reduced-motion: reduce) {
    .food-row-flash {
        animation: none;
    }
}

/* ============================================================
   BILDER / FOTOALBEN
   ============================================================ */
.upload-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 40px;
    border: 1px dashed var(--sage);
    border-radius: 2px;
    background: var(--cream-2);
}

.upload-card a:not(.btn) {
    color: var(--sage-deep);
    border-bottom: 1px solid var(--sage);
}

.album-entry+.album-entry {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.album-desc {
    margin: 0 0 14px;
    font-size: 1rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background: var(--sage-deep);
    color: var(--cream-2);
    text-align: center;
    padding: 44px 24px 32px;
}

footer .brand {
    color: var(--cream);
    opacity: .9;
    font-size: 1.2rem;
}

footer p {
    margin: 6px 0 0;
    font-size: .82rem;
    opacity: .65;
}