/*
 * Gastronaut – öffentliche Seiten (Startseite, Registrierung, Passwort, AGB, Anleitungen)
 * Nutzt die Farb-Tokens aus admin-theme.css (Entwurf B, Türkis) und gilt nur für body.gx-public.
 */

body.gx-public {
    margin: 0;
    background: var(--gx-surface);
    color: var(--gx-text);
    font-family: var(--gx-font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.gx-public h1, .gx-public h2, .gx-public h3 {
    color: var(--gx-text);
    font-family: var(--gx-font);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 0.5em;
}

.gx-public h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.gx-public h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.gx-public h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }
.gx-public p { margin: 0 0 1em; }

.gx-public a {
    color: var(--gx-accent);
    text-decoration: none;
}

.gx-public a:hover { color: var(--gx-accent-hover); text-decoration: underline; }

.gx-public img { max-width: 100%; height: auto; }

.gx-public .gx-icon { flex: none; vertical-align: middle; }

.gp-container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

.gp-narrow { max-width: 760px; }
.gp-narrow-sm { max-width: 520px; }
.gp-narrow-lg { max-width: 920px; }

/* ------------------------------------------------------------------ Buttons */

.gp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    height: 40px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--gx-radius-sm);
    font: 600 0.92rem/1 var(--gx-font);
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
}

.gx-public a.gp-btn:hover { text-decoration: none; }
.gp-btn-lg { height: 48px; padding: 0 24px; font-size: 1rem; }

.gp-btn-primary { background: var(--gx-accent); color: #fff !important; }
.gp-btn-primary:hover { background: var(--gx-accent-hover); }

.gp-btn-ghost { background: var(--gx-surface); border-color: var(--gx-border-strong); color: var(--gx-text) !important; }
.gp-btn-ghost:hover { border-color: var(--gx-accent); color: var(--gx-accent) !important; }

.gp-btn-light { background: #fff; color: var(--gx-sidebar) !important; }
.gp-btn-light:hover { background: var(--gx-accent-soft); }

.gp-btn-outline-light { border-color: rgba(255, 255, 255, 0.55); color: #fff !important; background: transparent; }
.gp-btn-outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

.gp-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.gp-actions-center { justify-content: center; margin-top: 8px; }

/* ------------------------------------------------------------------ Kopfzeile */

.gp-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(160%) blur(8px);
    border-bottom: 1px solid var(--gx-border);
}

.gp-header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 68px;
}

.gp-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--gx-text) !important;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.gx-public .gp-brand:hover { text-decoration: none; }
.gp-brand img { border-radius: 9px; }

.gp-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.gp-nav > a:not(.gp-btn),
.gp-dropdown > summary {
    padding: 8px 12px;
    border-radius: var(--gx-radius-sm);
    color: var(--gx-muted) !important;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
}

.gp-nav > a:not(.gp-btn):hover,
.gp-dropdown > summary:hover {
    background: var(--gx-neutral-soft);
    color: var(--gx-text) !important;
    text-decoration: none;
}

.gp-nav .gp-btn { margin-left: 6px; }

.gp-dropdown { position: relative; }
.gp-dropdown > summary { list-style: none; }
.gp-dropdown > summary::-webkit-details-marker { display: none; }
.gp-dropdown > summary::after { content: "▾"; margin-left: 6px; font-size: 0.75em; }

.gp-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 270px;
    padding: 6px;
    background: var(--gx-surface);
    border: 1px solid var(--gx-border);
    border-radius: var(--gx-radius);
    box-shadow: 0 12px 32px rgba(15, 45, 42, 0.12);
}

.gp-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border-radius: var(--gx-radius-sm);
    color: var(--gx-text) !important;
    font-size: 0.93rem;
}

.gp-dropdown-menu a:hover { background: var(--gx-accent-soft); text-decoration: none; }

.gp-burger {
    display: none;
    margin-left: auto;
    padding: 8px;
    border: 1px solid var(--gx-border);
    border-radius: var(--gx-radius-sm);
    background: var(--gx-surface);
    color: var(--gx-text);
    cursor: pointer;
}

/* ------------------------------------------------------------------ Abschnitte */

.gp-main { min-height: 60vh; }

.gp-section { padding: 72px 0; }
.gp-section-tight { padding: 24px 0 72px; }
.gp-section-muted { background: var(--gx-bg); }

.gp-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--gx-accent);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gp-lead { color: var(--gx-muted); font-size: 1.1rem; }
.gp-hint { color: var(--gx-subtle); font-size: 0.9rem; margin-top: 16px; }

.gp-section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.gp-section-head p { color: var(--gx-muted); font-size: 1.05rem; }
.gp-page-head { margin-bottom: 28px; }

/* Hero */
.gp-hero {
    padding: 72px 0 80px;
    background:
        radial-gradient(circle at 85% 20%, var(--gx-accent-soft), transparent 55%),
        linear-gradient(180deg, var(--gx-surface) 0%, var(--gx-bg) 100%);
}

.gp-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
    align-items: center;
}

.gx-public .gp-hero h1 { font-size: clamp(2.4rem, 5.5vw, 3.6rem); }
.gp-hero .gp-lead { font-size: 1.2rem; max-width: 560px; margin-bottom: 28px; }

.gp-hero-visual img {
    display: block;
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(15, 45, 42, 0.18);
}

/* Funktionen */
.gp-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gp-feature {
    padding: 24px;
    background: var(--gx-surface);
    border: 1px solid var(--gx-border);
    border-radius: var(--gx-radius-lg);
    transition: border-color .15s, box-shadow .15s;
}

.gp-feature:hover { border-color: var(--gx-accent-mid); box-shadow: 0 8px 24px rgba(15, 45, 42, 0.06); }
.gp-feature p { margin: 0; color: var(--gx-muted); font-size: 0.95rem; }

.gp-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 16px;
    border-radius: var(--gx-radius);
    background: var(--gx-accent-soft);
    color: var(--gx-accent);
}

/* Schritte */
.gp-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gp-steps li {
    padding: 28px;
    background: var(--gx-surface);
    border: 1px solid var(--gx-border);
    border-radius: var(--gx-radius-lg);
}

.gp-steps p { margin: 0; color: var(--gx-muted); font-size: 0.95rem; }

.gp-step-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--gx-accent);
    color: #fff;
    font-weight: 700;
}

/* Warum */
.gp-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}

.gp-split p { color: var(--gx-muted); font-size: 1.05rem; }

.gp-checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }

.gp-checks li {
    display: flex;
    gap: 12px;
    padding: 16px 18px;
    background: var(--gx-surface-muted);
    border: 1px solid var(--gx-border-soft);
    border-radius: var(--gx-radius);
    color: var(--gx-muted);
}

.gp-checks .gx-icon { margin-top: 3px; color: var(--gx-accent); }
.gp-checks strong { color: var(--gx-text); }

/* Call to action */
.gp-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 40px 44px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--gx-sidebar) 0%, var(--gx-sidebar-raised) 100%);
    color: var(--gx-sidebar-muted);
}

.gx-public .gp-cta h2 { color: #fff; margin-bottom: 6px; }
.gp-cta p { margin: 0; }

/* ------------------------------------------------------------------ Karten & Formulare */

.gp-card {
    padding: 32px;
    background: var(--gx-surface);
    border: 1px solid var(--gx-border);
    border-radius: var(--gx-radius-lg);
    box-shadow: var(--gx-shadow);
}

.gp-card + .gp-card { margin-top: 20px; }
.gp-card-center { text-align: center; }
.gp-card h1 { font-size: 1.7rem; }

.gp-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--gx-success-soft);
    color: var(--gx-success);
    font-size: 1.6rem;
    font-weight: 700;
}

.gp-status-error { background: var(--gx-danger-soft); color: var(--gx-danger); }

.gp-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--gx-accent-soft);
    color: var(--gx-accent-hover);
    font-weight: 600;
    font-size: 0.9rem;
}

.gp-loading { color: var(--gx-subtle); text-align: center; }

.gp-alert {
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: var(--gx-radius);
    border: 1px solid;
    font-weight: 500;
}

.gp-alert-error { background: var(--gx-danger-soft); border-color: var(--gx-danger-border); color: var(--gx-danger); }

.gp-form { margin: 0; }
.gp-fieldset { margin: 0 0 20px; min-width: 0; }

.gp-fieldset legend {
    float: left;
    width: 100%;
    margin-bottom: 18px;
    padding: 0;
    font-weight: 700;
    font-size: 1.1rem;
}

.gp-optional { color: var(--gx-subtle); font-weight: 500; font-size: 0.9rem; }

.gp-grid {
    clear: both;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

.gp-span-2 { grid-column: span 2; }

.gp-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 0;
    color: var(--gx-text);
    font-weight: 500;
    font-size: 0.9rem;
}

.gp-form > .gp-field + .gp-field,
.gp-card > .gp-form .gp-field + .gp-field { margin-top: 16px; }

.gp-field input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--gx-border-strong);
    border-radius: var(--gx-radius-sm);
    background: var(--gx-surface-muted);
    color: var(--gx-text);
    font: 400 1rem var(--gx-font);
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.gp-field input:focus {
    outline: none;
    border-color: var(--gx-accent);
    background: var(--gx-surface);
    box-shadow: 0 0 0 4px var(--gx-focus-ring);
}

.gp-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.gp-form-actions .gp-hint { margin: 0; }

/* Texte (AGB, Tracking) */
.gp-prose { font-size: 0.97rem; color: var(--gx-muted); overflow-wrap: anywhere; }
.gp-prose h1 { font-size: 1.4rem; margin-top: 0.4em; }

.gp-tracking table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.gp-tracking th, .gp-tracking td { padding: 10px 12px; border-bottom: 1px solid var(--gx-border-soft); text-align: left; }
.gp-tracking th { color: var(--gx-subtle); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.gp-tracking td { color: var(--gx-text); }

/* Anleitungen */
.gp-video {
    position: relative;
    aspect-ratio: 16 / 9;
    margin-bottom: 24px;
    overflow: hidden;
    border-radius: var(--gx-radius-lg);
    background: var(--gx-sidebar);
    box-shadow: 0 16px 40px rgba(15, 45, 42, 0.15);
}

.gp-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gp-more h2 { font-size: 1.15rem; }
.gp-more ul { margin: 0; padding-left: 1.2em; }
.gp-more li { margin: 4px 0; }

/* ------------------------------------------------------------------ Fußzeile */

.gp-footer {
    margin-top: 0;
    padding: 56px 0 24px;
    background: var(--gx-sidebar);
    color: var(--gx-sidebar-muted);
    font-size: 0.93rem;
}

.gp-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.gp-footer p { max-width: 360px; margin-top: 14px; }
.gx-public .gp-footer h3 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
.gp-footer ul { margin: 0; padding: 0; list-style: none; }
.gp-footer li { margin: 0 0 8px; }
.gx-public .gp-footer a { color: var(--gx-sidebar-text); }
.gx-public .gp-footer a:hover { color: #fff; }
.gx-public .gp-footer .gp-brand-footer { color: #fff !important; }

.gp-footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--gx-sidebar-border);
    color: var(--gx-sidebar-icon);
    font-size: 0.85rem;
}

/* ------------------------------------------------------------------ Responsive */

@media (max-width: 960px) {
    .gp-features { grid-template-columns: repeat(2, 1fr); }
    .gp-hero-grid, .gp-split { grid-template-columns: 1fr; gap: 40px; }
    .gp-hero-visual img { max-width: 300px; margin: 0 auto; }
}

@media (max-width: 860px) {
    .gp-burger { display: inline-flex; }

    .gp-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px 16px 20px;
        background: var(--gx-surface);
        border-bottom: 1px solid var(--gx-border);
        box-shadow: 0 16px 32px rgba(15, 45, 42, 0.1);
    }

    .gp-nav.is-open { display: flex; }
    .gp-nav .gp-btn { margin: 6px 0 0; }
    .gp-dropdown-menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; min-width: 0; }
}

@media (max-width: 640px) {
    .gp-container { padding: 0 16px; }
    .gp-section { padding: 48px 0; }
    .gp-hero { padding: 40px 0 56px; }
    .gp-features, .gp-steps, .gp-grid, .gp-footer-grid { grid-template-columns: 1fr; }
    .gp-span-2 { grid-column: auto; }
    .gp-card { padding: 22px; }
    .gp-cta { padding: 28px 22px; }
    .gp-actions .gp-btn { flex: 1 1 100%; }
}
