/* ===========================================================================
   Dinner-Matching – zentrales Stylesheet
   Kräftige, warme Erdtöne mit goldener Eleganz. Mobile-first.
   =========================================================================== */

:root {
    --bg:        #F1E7D6;   /* tieferes cremiges Beige (Hintergrund) */
    --bg-2:      #E9DCC6;   /* für Verläufe */
    --card:      #E4D6BF;   /* sattes Sandbraun (Flächen/Karten) */
    --card-2:    #EDE0CB;   /* hellere Kartenvariante */
    --primary:   #6B4A33;   /* Mokka/Kastanienbraun (Buttons, Header) */
    --primary-d: #503624;   /* dunkler für Hover */
    --primary-l: #7d5942;   /* heller, für Header-Verlauf */
    --gold:      #C9A227;   /* Altgold */
    --gold-l:    #DBB94A;   /* helleres Gold */
    --gold-d:    #A8861C;
    --text:      #38291F;   /* dunkles warmes Braungrau */
    --text-soft: #7a6655;   /* gedämpfter Text */
    --cream:     #FBF4E8;   /* helle Schrift auf Mokka */
    --cream-soft:#E9D9C2;
    --goldline:  rgba(201, 162, 39, 0.30);
    --weiss:     #fffdf8;
    --fehler:    #b3261e;
    --erfolg:    #1a7f37;

    --radius:    18px;
    --radius-sm: 11px;
    --schatten:  0 14px 38px rgba(56, 41, 31, 0.16);
    --schatten-s:0 5px 16px  rgba(56, 41, 31, 0.10);
    --max:       1100px;
}

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

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

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--text);
    background:
        radial-gradient(1100px 560px at 78% -8%, var(--bg-2), transparent 60%),
        radial-gradient(900px 500px at 8% 0%, rgba(201,162,39,0.10), transparent 55%),
        var(--bg);
    background-attachment: fixed;
    line-height: 1.65;
    font-size: 17px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-wrap: break-word;   /* lange Wörter brechen nur um, wenn sie sonst überlaufen */
}

/* Sicherheit: Inhalte bleiben in ihrer Box (ohne Wörter mitten zu trennen) */
.karte, .feature, .meldung, .profilkarte, .profilkarte .body,
.feld, .hero, .modal, .nav a { min-width: 0; overflow-wrap: break-word; }
h1, h2, h3, p, a, span, label, li { overflow-wrap: break-word; }

h1, h2, h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.14;
    color: var(--text);
    margin: 0 0 .5em;
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1rem; }

a { color: var(--primary); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--gold-d); text-decoration: underline; }

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

/* Gold-Akzentlinie unter zentrierten Überschriften */
h1.text-zentriert::after,
h2.text-zentriert::after,
.hero h1::after {
    content: "";
    display: block;
    width: 64px;
    height: 3px;
    margin: .7rem auto 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--gold-l), var(--gold-d));
}

/* --- Layout-Container --------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 1.5rem;
}
.inhalt { flex: 1 0 auto; padding: 3rem 0 4.5rem; }
.schmal { max-width: 480px; margin: 0 auto; }
.mittel { max-width: 760px; margin: 0 auto; }

/* --- Kopfzeile / Navigation (kräftiger Mokka-Header) ------------------- */
.kopf {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(120deg, var(--primary-d), var(--primary) 60%, var(--primary-l));
    border-bottom: 2px solid var(--gold);
    box-shadow: 0 4px 18px rgba(56,41,31,0.22);
}
.kopf .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 76px;
}
.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--cream);
    letter-spacing: -0.01em;
}
.logo:hover { text-decoration: none; color: #fff; }
.logo .punkt { color: var(--gold-l); }

.nav { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.nav a {
    padding: .5rem .85rem;
    border-radius: var(--radius-sm);
    color: var(--cream-soft);
    font-size: .97rem;
    font-weight: 500;
}
.nav a:hover { background: rgba(255,255,255,0.12); color: #fff; text-decoration: none; }

/* „Registrieren" im Header: goldener Blickfang */
.kopf .nav a.btn {
    background: linear-gradient(135deg, var(--gold-l), var(--gold-d));
    color: #322811;
    box-shadow: 0 6px 16px rgba(201,162,39,0.35);
}
.kopf .nav a.btn:hover { color: #2b2310; filter: brightness(1.05); }

/* --- Buttons ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border: none;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    padding: .8rem 1.6rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-l), var(--primary));
    color: #fff;
    text-align: center;
    box-shadow: var(--schatten-s);
    transition: filter .15s ease, transform .06s ease, box-shadow .15s ease;
}
.btn:hover { filter: brightness(1.07); text-decoration: none; color: #fff; box-shadow: var(--schatten); }
.btn:active { transform: translateY(1px); }
.btn--block { display: flex; width: 100%; }

/* Gold-Button – für „Jetzt freischalten" o. Ä. */
.btn--gold {
    background: linear-gradient(135deg, var(--gold-l), var(--gold-d));
    color: #2b2310;
    box-shadow: 0 9px 24px rgba(201, 162, 39, 0.40);
}
.btn--gold:hover { filter: brightness(1.06); color: #2b2310; }

.btn--ghost {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    box-shadow: none;
}
.btn--ghost:hover { background: var(--primary); color: #fff; filter: none; }

.btn--klein { padding: .4rem .9rem; font-size: .85rem; }

/* --- Karten (mit feinem Goldrand) -------------------------------------- */
.karte {
    background: linear-gradient(180deg, var(--card-2), var(--card));
    border: 1px solid var(--goldline);
    border-radius: var(--radius);
    box-shadow: var(--schatten);
    padding: 2.25rem;
}

/* --- Formulare ---------------------------------------------------------- */
.feld { margin-bottom: 1.15rem; }
.feld label { display: block; font-weight: 600; font-size: .94rem; margin-bottom: .4rem; }
.feld input,
.feld select,
.feld textarea {
    width: 100%;
    padding: .8rem .95rem;
    font: inherit;
    color: var(--text);
    background: var(--weiss);
    border: 1.5px solid rgba(107, 74, 51, 0.22);
    border-radius: var(--radius-sm);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.feld input:focus,
.feld select:focus,
.feld textarea:focus {
    outline: none;
    border-color: var(--gold-d);
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.16);
}
.feld textarea { min-height: 130px; resize: vertical; }

/* Auswahlfelder an die Textfelder angleichen: eigener Pfeil statt nativem Look */
.feld select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.6rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B4A33' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.95rem center;
    background-size: 13px;
}
.feld select::-ms-expand { display: none; }

/* Datumsfeld: gleiche Breite wie die anderen Felder + linksbündig */
.feld input[type="date"] {
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    -webkit-appearance: none;   /* Safari/iOS dehnt das Feld sonst nicht auf 100% */
    appearance: none;
}
.feld input[type="date"]::-webkit-date-and-time-value { text-align: left; }
/* Kalender-Symbol rechts sichtbar lassen */
.feld input[type="date"]::-webkit-calendar-picker-indicator { margin-left: auto; }

/* Button horizontal zentrieren (schrumpft auf Inhaltsbreite) */
.btn--mitte {
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.feld--check { display: flex; align-items: flex-start; gap: .65rem; }
.feld--check input { width: auto; margin-top: .3rem; }
.feld--check label { font-weight: 400; }

.feld-hinweis { font-size: .84rem; color: var(--text-soft); margin-top: .35rem; }

/* --- Meldungen ---------------------------------------------------------- */
.meldung { padding: .9rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1.3rem; font-size: .95rem; }
.meldung--fehler { background: #f8e3e1; color: var(--fehler); border: 1px solid #e8b4af; }
.meldung--erfolg { background: #e3f3e7; color: var(--erfolg); border: 1px solid #aed6ba; }
.meldung ul { margin: .3rem 0 0; padding-left: 1.2rem; }

/* --- Trennlinie mit Gold-Raute ----------------------------------------- */
.trenner {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 1.85rem 0;
    opacity: .7;
    position: relative;
    overflow: visible;
}
.trenner::after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    width: 7px; height: 7px;
    transform: translate(-50%, -50%) rotate(45deg);
    background: var(--gold);
    border-radius: 1px;
}

/* --- Premium-Badge ------------------------------------------------------ */
.badge-premium {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: linear-gradient(135deg, var(--gold-l), var(--gold-d));
    color: #2b2310;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: .26rem .68rem;
    border-radius: 999px;
    box-shadow: 0 3px 10px rgba(201,162,39,0.35);
}

/* --- Hilfsklassen ------------------------------------------------------- */
.text-zentriert { text-align: center; }
.text-soft { color: var(--text-soft); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.stapel > * + * { margin-top: 1.75rem; }

/* --- Hero --------------------------------------------------------------- */
.hero {
    text-align: center;
    padding: 3.75rem 1.5rem 4.25rem;
    background:
        radial-gradient(720px 340px at 50% -30%, rgba(201,162,39,0.18), transparent 70%);
    border-radius: var(--radius);
}
.hero .eyebrow {
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold-d);
    margin-bottom: 1rem;
}
.hero h1 { margin-bottom: .4rem; }
.hero p.lead { font-size: 1.22rem; color: var(--text-soft); max-width: 640px; margin: 1.3rem auto 2rem; }
.hero .btn { margin: .35rem; }

/* --- Feature-Grid (mit Gold-Oberkante) --------------------------------- */
.features {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 2.5rem;
}
.feature {
    position: relative;
    background: linear-gradient(180deg, var(--card-2), var(--card));
    border: 1px solid var(--goldline);
    border-top: 3px solid var(--gold);
    border-radius: var(--radius);
    padding: 1.85rem 1.5rem;
    box-shadow: var(--schatten-s);
}
.feature .num {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    color: var(--gold-d);
    font-weight: 700;
}
.feature h3 { margin: .5rem 0 .35rem; }
.feature p { margin: 0; color: var(--text-soft); font-size: .96rem; }

/* --- Filterleiste (Entdecken) ------------------------------------------ */
.filterkarte {
    max-width: 560px;
    margin: 0 auto 1.75rem;
    padding: 1.5rem;
}
.filterbar {
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
    align-items: flex-end;
}
.filterbar .feld { margin: 0; flex: 1; min-width: 90px; }
.filterbar .feld--breit { flex: 2.2; min-width: 160px; }
.filter-aktionen {
    display: flex;
    gap: .6rem;
    justify-content: center;
    margin-top: 1.1rem;
}

/* --- Entdecken-Karte (Profil-Card) ------------------------------------- */
.profilkarte {
    max-width: 460px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--goldline);
    border-radius: var(--radius);
    box-shadow: var(--schatten);
    overflow: hidden;
}
.profilkarte .foto { position: relative; }
.profilkarte .foto img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.profilkarte .foto .overlay {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: linear-gradient(transparent, rgba(56,41,31,.85));
    color: #fff;
    padding: 2rem 1.25rem 1rem;
    text-align: center;
}
.profilkarte .body { padding: 1.6rem; }
.profilkarte .name { margin-bottom: .15rem; }

/* --- Fotogalerie -------------------------------------------------------- */
.foto-grid {
    display: grid;
    gap: 1rem;
    /* Feste, kompakte Kacheln – Fotos werden nicht groß aufgezogen */
    grid-template-columns: repeat(auto-fill, 130px);
    justify-content: start;
}
.foto-grid .item { text-align: center; }
.foto-grid .item img {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: var(--schatten-s);
    border: 1px solid var(--goldline);
}
.foto-grid .item form { margin: .45rem 0 0; }

/* --- Footer ------------------------------------------------------------- */
.fuss {
    flex-shrink: 0;
    background: linear-gradient(120deg, var(--primary-d), var(--primary));
    border-top: 2px solid var(--gold);
    margin-top: 3rem;
    padding: 2.25rem 0;
    font-size: .9rem;
    color: var(--cream-soft);
}
.fuss .container { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.fuss-links a { color: var(--cream-soft); margin-right: 1.25rem; }
.fuss-links a:hover { color: var(--gold-l); }

/* Aktive Seite in der Navigation hervorheben (golden) */
.nav a.aktiv { color: var(--gold-l); }

/* Hamburger-Button (nur mobil sichtbar) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 46px; height: 46px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 12px;
    padding: 0;
}
.hamburger span {
    display: block;
    width: 25px; height: 2px;
    background: var(--cream);
    border-radius: 2px;
    transition: transform .22s ease, opacity .22s ease;
}
.hamburger.aktiv span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.aktiv span:nth-child(2) { opacity: 0; }
.hamburger.aktiv span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Profilseite: angenehm schmale, zentrierte Spalte (Apple-Look) */
.profil-wrap { max-width: 760px; margin: 0 auto; }

/* --- Responsiv ---------------------------------------------------------- */
@media (max-width: 560px) {
    body { font-size: 16px; }
    .karte { padding: 1.5rem; }
    .inhalt { padding: 1.75rem 0 2.5rem; }
    .kopf .container { min-height: 62px; }
    .logo { font-size: 1.32rem; }
    .nav a { padding: .45rem .6rem; font-size: .92rem; }
    .kopf .nav a.btn { padding: .55rem 1rem; }

    .hero { padding: 2.5rem 1rem 3rem; }
    .hero p.lead { font-size: 1.08rem; }
    /* Volle Breite, gut greifbare Buttons */
    .hero .btn { display: flex; width: 100%; margin: .5rem 0 0; }
    .trenner { margin: 1.4rem 0; }
}

/* Mobile Navigation: Hamburger öffnet ein übersichtliches Klappmenü */
@media (max-width: 700px) {
    .hamburger { display: flex; }

    /* Menü standardmäßig zu; klappt unter dem Header auf */
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        flex-direction: column;
        gap: .25rem;
        background: linear-gradient(160deg, var(--primary), var(--primary-d));
        border-bottom: 2px solid var(--gold);
        box-shadow: 0 12px 24px rgba(56, 41, 31, 0.30);
        padding: .75rem 1rem 1.1rem;
    }
    .nav.offen { display: flex; }

    .nav a {
        width: 100%;
        padding: .95rem 1rem;
        font-size: 1.05rem;
        border-radius: 12px;
        color: var(--cream);
    }
    .nav a:hover { background: rgba(255, 255, 255, 0.12); }
    .nav a.aktiv { color: var(--gold-l); background: rgba(255, 255, 255, 0.08); }

    /* „Registrieren" im Klappmenü als voller Gold-Button */
    .kopf .nav a.btn { width: 100%; margin-top: .35rem; padding: .9rem 1rem; }

    /* Like/Pass: große, gut trennbare Tap-Flächen */
    .profilkarte .body .btn { padding: .9rem 1rem; }
}

/* --- Hero-Aktionen ------------------------------------------------------ */
.hero-aktionen {
    display: flex;
    gap: .8rem;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-aktionen .btn { margin: 0; }

/* Dezenter „Wie funktioniert's?"-Link (kein lauter Button) */
.link-erklaer {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    color: var(--primary);
    padding: .4rem .6rem;
    border-bottom: 2px solid var(--goldline);
    border-radius: 2px;
    transition: color .15s ease, border-color .15s ease;
}
.link-erklaer:hover { color: var(--gold-d); border-color: var(--gold); }

/* --- Blocksatz ---------------------------------------------------------- */
.blocktext {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* --- Modal (Erklär-Fenster) -------------------------------------------- */
.modal {
    width: min(560px, 92vw);
    max-height: 88vh;
    padding: 0;
    border: 1px solid var(--goldline);
    border-radius: 22px;
    background: linear-gradient(180deg, var(--card-2), var(--card));
    color: var(--text);
    box-shadow: var(--schatten);
    overflow: auto;
}
.modal::backdrop {
    background: rgba(56, 41, 31, 0.45);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.modal .modal-inner { padding: 2.4rem; }
/* sanftes Einblenden */
.modal[open] { animation: modal-auf .18s ease-out; }
@keyframes modal-auf {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

/* --- Apple-artige Desktop-Politur (ruhig, viel Weißraum) --------------- */
@media (min-width: 701px) {
    .inhalt { padding: 4.5rem 0 6rem; }
    .hero {
        padding: 5.5rem 2rem 6rem;
        max-width: 860px;
        margin: 0 auto;
    }
    .hero h1 { font-size: clamp(2.8rem, 4.4vw, 3.8rem); letter-spacing: -0.02em; }
    .hero p.lead { font-size: 1.32rem; line-height: 1.5; margin-top: 1.5rem; }
    .hero-aktionen { margin-top: 2.25rem; }
    /* Etwas mehr Luft in Karten */
    .karte { padding: 2.6rem; }
    /* Größerer Abstand zwischen den Profil-Kästen (Angaben ↔ Fotos) */
    .stapel > * + * { margin-top: 2.5rem; }
    /* Lesefluss: Fließtext nicht zu breit werden lassen */
    .hero p.lead, .blocktext { max-width: 60ch; margin-left: auto; margin-right: auto; }
}
