/* ==========================================================================
   PETRI — Design System
   Gemeinsame Basis für alle Seiten. Farbwelt und Formensprache sind aus
   der App abgeleitet: tiefer Petrol-Verlauf, warmer Orange-Akzent,
   weiche Radien, dezente Glaskanten.

   Hinweis: Es werden bewusst KEINE externen Web-Fonts (z.B. Google Fonts)
   geladen — das vermeidet Drittanbieter-Verbindungen (DSGVO) und ist
   schneller. Stattdessen der native System-Font-Stack.
   ========================================================================== */

/* ------------------------------ 1. TOKENS ------------------------------ */
:root {
    /* Flächen — von tief (oben) nach petrol (unten), wie in der App */
    --p-abyss:        #06131a;
    --p-deep:         #0b202a;
    --p-mid:          #10333f;
    --p-teal:         #164a5a;

    /* Glas-Oberflächen */
    --p-surface:      rgba(255, 255, 255, 0.045);
    --p-surface-2:    rgba(255, 255, 255, 0.075);
    --p-sunken:       rgba(0, 0, 0, 0.28);
    --p-line:         rgba(255, 255, 255, 0.10);
    --p-line-strong:  rgba(255, 255, 255, 0.18);

    /* Akzent */
    --p-orange:       #ff9500;
    --p-orange-hot:   #ff6b00;
    --p-orange-soft:  rgba(255, 149, 0, 0.12);
    --p-orange-glow:  rgba(255, 149, 0, 0.35);
    --p-gradient-cta: linear-gradient(135deg, #ffa41f 0%, #ff7a00 100%);

    /* Signale */
    --p-green:        #10b981;
    --p-red:          #ff5a5a;

    /* Text */
    --p-text:         #f2f7f9;
    --p-muted:        #9db2bb;
    --p-faint:        #6b828c;

    /* Radien */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --r-pill: 999px;

    /* Schatten */
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.45);

    /* Rhythmus */
    --gutter: clamp(20px, 5vw, 40px);
    --section-y: clamp(64px, 10vw, 120px);
    --maxw: 1180px;

    /* Bewegung */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* ------------------------------ 2. BASIS ------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
    font-family: var(--font-sans);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 90px;
}

body {
    min-height: 100vh;
    background: var(--p-deep);
    color: var(--p-text);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
}

/* Der durchgehende Petrol-Verlauf der App, als fixierte Grundfläche */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(22, 74, 90, 0.55) 0%, transparent 60%),
        linear-gradient(170deg, var(--p-abyss) 0%, var(--p-deep) 45%, var(--p-mid) 100%);
}

img, svg, video { max-width: 100%; display: block; }
a { color: var(--p-orange); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; }
strong { color: var(--p-text); font-weight: 700; }

::selection { background: var(--p-orange); color: #10222b; }

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
    outline: 2px solid var(--p-orange);
    outline-offset: 3px;
    border-radius: 6px;
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ------------------------------ 3. LOGO -------------------------------- */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--p-text);
    text-decoration: none;
}
.logo:hover { text-decoration: none; color: var(--p-text); }
.logo__wortmarke {
    display: block;
    height: 44px;
    width: auto;
}

/* ------------------------------ 4. HEADER ------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 25, 33, 0.72);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid var(--p-line);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 68px;
    padding-block: 12px;
}
.site-nav { display: none; gap: 28px; }
.site-nav a {
    color: var(--p-muted);
    font-size: 0.94rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s var(--ease);
}
.site-nav a:hover { color: var(--p-text); }

@media (min-width: 900px) {
    .site-nav { display: flex; }
}

/* ------------------------------ 5. BUTTONS ----------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
                background 0.22s var(--ease), border-color 0.22s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px) scale(0.99); }

.btn--primary {
    background: var(--p-gradient-cta);
    color: #10222b;
    box-shadow: 0 10px 30px rgba(255, 122, 0, 0.28);
}
.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(255, 122, 0, 0.40);
}
.btn--ghost {
    background: var(--p-surface);
    color: var(--p-text);
    border-color: var(--p-line-strong);
}
.btn--ghost:hover { background: var(--p-surface-2); border-color: var(--p-orange); }

.btn--danger { background: var(--p-red); color: #2a0c0c; }
.btn--danger:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(255, 90, 90, 0.3); }

.btn--sm { padding: 10px 18px; font-size: 0.88rem; }
.btn--block { display: flex; width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

/* Store-Badges */
.store-buttons { display: flex; flex-wrap: wrap; gap: 14px; }
.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 200px;
    padding: 11px 22px;
    border: 1px solid var(--p-line-strong);
    border-radius: var(--r-md);
    background: rgba(4, 14, 19, 0.75);
    color: #fff;
    text-decoration: none;
    transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), background 0.22s var(--ease);
}
.store-btn:hover {
    transform: translateY(-3px);
    border-color: var(--p-orange);
    background: rgba(4, 14, 19, 0.92);
    text-decoration: none;
}
.store-btn svg { width: 24px; height: 24px; fill: #fff; flex: 0 0 24px; }
.store-btn__text { display: flex; flex-direction: column; line-height: 1.25; }
.store-btn__text span { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: #a9bcc4; }
.store-btn__text strong { font-size: 1.05rem; font-weight: 700; }

/* ------------------------------ 6. FORMULARE --------------------------- */
.feld-gruppe { margin-bottom: 20px; text-align: left; }
.feld-gruppe label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--p-text);
}
.feld {
    width: 100%;
    padding: 15px 16px;
    background: var(--p-sunken);
    border: 1px solid var(--p-line);
    border-radius: var(--r-md);
    color: var(--p-text);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.feld::placeholder { color: var(--p-faint); }
.feld:focus {
    outline: none;
    border-color: var(--p-orange);
    background: rgba(0, 0, 0, 0.4);
}
textarea.feld { resize: vertical; min-height: 120px; line-height: 1.6; }

/* ------------------------------ 7. STATUS ------------------------------ */
.status-box {
    display: none;
    padding: 16px 18px;
    margin-bottom: 24px;
    border-radius: var(--r-md);
    font-size: 0.95rem;
    line-height: 1.55;
}
.status-box.fehler  { display: block; background: rgba(255, 90, 90, 0.12);  border: 1px solid rgba(255, 90, 90, 0.45);  color: #ffd8d8; }
.status-box.erfolg  { display: block; background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.45); color: #ccf5e6; }
.status-box.hinweis { display: block; background: var(--p-orange-soft);     border: 1px solid rgba(255, 149, 0, 0.4);   color: #ffe6c2; }

.lade-anzeige {
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 30px 10px;
    text-align: center;
}

.spinner {
    display: inline-block;
    width: 26px; height: 26px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--p-orange);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------ 8. LEGAL / INHALTSSEITEN --------------- */
main { flex: 1 0 auto; }

.legal-main {
    padding-block: clamp(40px, 7vw, 80px);
    display: flex;
    justify-content: center;
    padding-inline: var(--gutter);
}

.content-box {
    width: 100%;
    max-width: 860px;
    padding: clamp(26px, 5vw, 52px);
    background: var(--p-surface);
    border: 1px solid var(--p-line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-md);
    line-height: 1.75;
}
.content-box--narrow { max-width: 600px; }

/* In den Rechtstexten stehen lange URLs im Fließtext. Ohne Umbruchpunkt schieben
   sie auf schmalen Displays die ganze Seite seitlich auf. */
.content-box p,
.content-box li,
.content-box td { overflow-wrap: anywhere; }

.content-box h1 {
    font-size: clamp(1.8rem, 4.5vw, 2.4rem);
    margin-bottom: 28px;
    background: linear-gradient(120deg, #ffb648, var(--p-orange-hot));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.content-box h2 {
    margin-top: 40px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    font-size: clamp(1.15rem, 2.6vw, 1.4rem);
    color: var(--p-text);
    border-bottom: 1px solid var(--p-line);
}
.content-box h3 { margin-top: 26px; margin-bottom: 8px; font-size: 1.08rem; color: var(--p-text); }
.content-box h4 { margin-top: 20px; margin-bottom: 6px; font-size: 0.98rem; color: var(--p-muted); font-weight: 700; }
.content-box p,
.content-box li { color: var(--p-muted); margin-bottom: 14px; }
.content-box ul, .content-box ol { padding-left: 22px; margin-bottom: 16px; }
.content-box li::marker { color: var(--p-orange); }
.content-box a { color: var(--p-orange); }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    padding: 8px 16px 8px 12px;
    border: 1px solid var(--p-line);
    border-radius: var(--r-pill);
    background: var(--p-surface);
    color: var(--p-muted);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.back-link:hover { color: var(--p-text); border-color: var(--p-orange); text-decoration: none; }

/* Hervorhebungs-Boxen der Rechtsseiten */
.eu-box, .widerruf-box, .ugc-box, .warn-box {
    margin: 22px 0;
    padding: 18px 20px;
    border-radius: var(--r-md);
    font-size: 0.95rem;
}
.eu-box     { background: var(--p-orange-soft); border-left: 4px solid var(--p-orange); }
.widerruf-box { background: var(--p-sunken); border: 1px solid var(--p-line-strong); }
.widerruf-box h3 { margin-top: 0; color: var(--p-text); }
.ugc-box    { background: rgba(255, 90, 90, 0.08); border-left: 4px solid var(--p-red); }
.ugc-box p  { color: var(--p-text); margin-bottom: 0; }
.warn-box   { background: rgba(255, 90, 90, 0.10); border-left: 4px solid var(--p-red); color: #ffd8d8; }
.warn-box strong { color: #fff; }

/* ------------------------------ 9. FOOTER ------------------------------ */
.site-footer {
    margin-top: auto;
    padding-block: clamp(40px, 6vw, 64px) 32px;
    background: rgba(4, 12, 17, 0.7);
    border-top: 1px solid var(--p-line);
}
.site-footer__grid {
    display: grid;
    gap: 32px;
    grid-template-columns: 1fr;
    align-items: start;
}
.site-footer__claim { color: var(--p-muted); font-size: 0.92rem; max-width: 320px; margin-top: 14px; }
.site-footer__col h4 {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--p-faint);
    margin-bottom: 14px;
    font-weight: 700;
}
.site-footer__col ul { list-style: none; display: grid; gap: 10px; }
.site-footer__col a {
    color: var(--p-muted);
    font-size: 0.94rem;
    text-decoration: none;
    transition: color 0.2s var(--ease);
}
.site-footer__col a:hover { color: var(--p-text); }
.site-footer__bottom {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--p-line);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    justify-content: space-between;
    color: var(--p-faint);
    font-size: 0.84rem;
}

@media (min-width: 760px) {
    .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
}

/* ------------------------------ 10. MOTION ----------------------------- */
/* Nur wenn JavaScript aktiv ist, wird eingeblendet — sonst bliebe der
   Inhalt bei deaktiviertem JS dauerhaft unsichtbar. */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.sichtbar { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .js .reveal { opacity: 1; transform: none; }
}
