/* ============================================================================
   Follow My Watch — Fassung „Die Linie": Rechtstexte und Kontakt

   Dieselben Grundwerte wie die Startseite, aber ohne die laufende Route.
   Wer hier liest, will lesen; eine Linie, die quer durch einen Paragrafen
   waechst, waere nur im Weg. Was bleibt: der Kartengrund, das Korn, die
   Schriften und die Farben.

   Aufbau:
     1. Grundwerte
     2. Grundgeruest
     3. Kopfband
     4. Titelblock
     5. Inhaltsverzeichnis
     6. Fliesstext
     7. Kontaktformular
     8. Fusszeile
   ========================================================================= */

/* ------------------------------------------------------- 1. Grundwerte */
:root {
    --grund:      #080a12;
    --grund-2:    #0d111c;
    --puls:       #10b981;
    --puls-hell:  #34d399;
    --schrift:    #f4f6fa;
    --leise:      #9aa4bd;
    --rand:       rgba(255, 255, 255, .10);
    --rand-hell:  rgba(255, 255, 255, .20);

    --anzeige: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
    --text:    'Inter', 'Segoe UI', system-ui, sans-serif;
    --zahl:    ui-monospace, 'SFMono-Regular', 'SF Mono', Menlo, Consolas, monospace;

    --spur: min(1200px, 100% - clamp(2.5rem, 6vw, 5rem));
    --rund: 14px;
    --schwung: cubic-bezier(.16, 1, .3, 1);
}

/* ---------------------------------------------------- 2. Grundgeruest */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 6rem;
    -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Beide Sprachfassungen stehen im Markup; sichtbar ist immer nur eine. */
html[lang="de"] [data-lang="en"] { display: none; }
html[lang="en"] [data-lang="de"] { display: none; }
/* Bis die Sprache feststeht, nichts zeigen - sonst blitzt die falsche auf. */
html.i18n-wait body { visibility: hidden; }

body {
    margin: 0;
    background: var(--grund);
    color: var(--schrift);
    font-family: var(--text);
    font-size: 1.0625rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--puls-hell); text-underline-offset: .2em; }
a:hover { color: var(--schrift); }

:focus-visible {
    outline: 3px solid var(--puls-hell);
    outline-offset: 3px;
    border-radius: 4px;
}
main:focus { outline: none; }
::selection { background: rgba(16, 185, 129, .3); }

.sprunglink {
    position: fixed;
    left: .75rem;
    top: -5rem;
    z-index: 200;
    padding: .8rem 1.25rem;
    background: var(--puls);
    color: #04231a;
    font-weight: 600;
    border-radius: 0 0 10px 10px;
    text-decoration: none;
    transition: top .18s ease;
}
.sprunglink:focus { top: 0; }

/* Derselbe Kartengrund wie auf der Startseite, damit die Unterseiten nicht
   wie eine fremde Webseite wirken. */
.kartengrund {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px) 0 0 / 100% 7.5rem,
        linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px) 0 0 / 7.5rem 100%,
        radial-gradient(130% 60% at 72% -10%, #17203c 0%, var(--grund) 62%);
}
.kartengrund::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23k)'/%3E%3C/svg%3E");
    opacity: .045;
    mix-blend-mode: overlay;
}

/* ---------------------------------------------------------- 3. Kopfband */
.kopf {
    position: fixed;
    inset: 0 0 auto;
    z-index: 80;
    background: rgba(8, 10, 18, .72);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
    border-bottom: 1px solid var(--rand);
}
.kopf-zeile {
    width: var(--spur);
    margin-inline: auto;
    min-height: 4.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wortmarke {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    gap: .6rem;
    margin-right: auto;
    font: 700 1.0625rem/1 var(--anzeige);
    letter-spacing: -.015em;
    color: var(--schrift);
    text-decoration: none;
    white-space: nowrap;
}
.wortmarke .kugel {
    flex: none;
    width: .5rem; height: .5rem;
    border-radius: 50%;
    background: var(--puls);
}

.zurueck {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 2.75rem;
    padding-inline: .25rem;
    font-size: .9375rem;
    color: var(--leise);
    text-decoration: none;
    white-space: nowrap;
}
.zurueck:hover { color: var(--schrift); }
@media (max-width: 519.98px) { .zurueck span { display: none; } }

.sprachwahl {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--rand);
    border-radius: 999px;
    overflow: hidden;
}
.sprachwahl button {
    min-width: 2.75rem;
    min-height: 2.25rem;
    padding: 0 .25rem;
    background: none;
    border: 0;
    color: var(--leise);
    font: 500 .8125rem/1 var(--zahl);
    letter-spacing: .08em;
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease;
}
.sprachwahl button:hover { color: var(--schrift); }
.sprachwahl button[aria-current="true"] {
    background: rgba(255, 255, 255, .10);
    color: var(--schrift);
}
.sprachwahl button:disabled { cursor: default; }
.sprachwahl button:focus-visible { outline-offset: -3px; }

/* -------------------------------------------------------- 4. Titelblock */
.titelblock {
    position: relative;
    z-index: 2;
    width: var(--spur);
    margin-inline: auto;
    padding-block: max(7rem, 10vw) clamp(2.5rem, 5vw, 4rem);
    border-bottom: 1px solid var(--rand);
}
.titelblock .auge {
    margin: 0 0 1rem;
    font: 500 .6875rem/1 var(--zahl);
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--puls);
}
.titelblock h1 {
    margin: 0;
    font-family: var(--anzeige);
    font-weight: 700;
    font-size: clamp(2rem, 5.6vw, 4rem);
    line-height: 1.02;
    letter-spacing: -.03em;
    max-width: 18ch;
    text-wrap: balance;
}
.titelblock .stand {
    margin: 1rem 0 0;
    color: var(--leise);
    font-size: .9375rem;
}

/* ----------------------------------------------- 5. Inhaltsverzeichnis */
.gerippe {
    position: relative;
    z-index: 2;
    width: var(--spur);
    margin-inline: auto;
    padding-block: clamp(2.5rem, 5vw, 4rem) 5rem;
    display: grid;
    gap: clamp(2rem, 4vw, 3.5rem);
}
/* Die Spalte fuer das Verzeichnis entsteht nur, wenn es eines gibt. Sonst
   rutschte der Text in die schmale erste Spalte - kurze Seiten wie der
   Kontakt haetten dann eine Textbreite von 16 rem. */
@media (min-width: 1080px) {
    .gerippe { align-items: start; }
    .gerippe:has(> .verzeichnis:not([hidden])) {
        grid-template-columns: 16rem minmax(0, 1fr);
    }
}

/* Auf schmalen Schirmen ein aufklappbares Verzeichnis, auf breiten eine
   mitlaufende Spalte. Dasselbe Element, nur anders gezeigt: so gibt es die
   Liste auch auf dem Telefon und fuer Vorlesesoftware - „display: none"
   haette sie dort ganz entfernt. */
.verzeichnis {
    border: 1px solid var(--rand);
    border-radius: var(--rund);
    background: rgba(17, 22, 38, .78);
}
.verzeichnis summary {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 3rem;
    padding: .75rem 1.125rem;
    cursor: pointer;
    list-style: none;
    font: 500 .75rem/1 var(--zahl);
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--leise);
}
.verzeichnis summary::-webkit-details-marker { display: none; }
.verzeichnis summary::after {
    content: "";
    flex: none;
    margin-left: auto;
    width: 9px; height: 9px;
    border-right: 1.5px solid var(--puls);
    border-bottom: 1.5px solid var(--puls);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform .3s var(--schwung);
}
.verzeichnis[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.verzeichnis summary:hover { color: var(--schrift); }

.verzeichnis ol { margin: 0; padding: 0 1.125rem 1rem; list-style: none; }

@media (min-width: 1080px) {
    .verzeichnis {
        position: sticky;
        top: 6rem;
        max-height: calc(100dvh - 8rem);
        overflow-y: auto;
        border: 0;
        background: none;
        /* Etwas Luft oben, sonst schneidet der eigene Ueberlauf die
           Oberkante der Beschriftung an. */
        padding: .25rem .5rem 0 0;
        scrollbar-width: thin;
    }
    /* Nicht ausblenden, sondern zur Ueberschrift machen: die Beschriftung
       gehoert auch zur Spalte, und ein <details> ohne sichtbares summary
       waere fuer Vorlesesoftware namenlos. Aufklappen entfaellt hier,
       weil das Skript die Liste offen haelt. */
    .verzeichnis summary {
        min-height: 0;
        padding: 0 0 .875rem;
        pointer-events: none;
        cursor: default;
    }
    .verzeichnis summary::after { display: none; }
    .verzeichnis ol { padding: 0; }
}
.verzeichnis a {
    display: block;
    padding: .3125rem 0 .3125rem .75rem;
    border-left: 2px solid var(--rand);
    font-size: .875rem;
    line-height: 1.4;
    color: var(--leise);
    text-decoration: none;
    transition: color .2s ease, border-color .2s ease;
}
.verzeichnis a:hover { color: var(--schrift); border-color: var(--rand-hell); }
.verzeichnis a[aria-current="true"] { color: var(--puls-hell); border-color: var(--puls); }

/* ---------------------------------------------------------- 6. Fliesstext */
.text { max-width: 68ch; }

.text h2 {
    margin: 3rem 0 1rem;
    font-family: var(--anzeige);
    font-weight: 700;
    font-size: clamp(1.375rem, 2.6vw, 1.75rem);
    line-height: 1.2;
    letter-spacing: -.02em;
    scroll-margin-top: 6rem;
    text-wrap: balance;
}
.text > div > *:first-child,
.text h2:first-child { margin-top: 0; }

.text h3 {
    margin: 2rem 0 .625rem;
    font-family: var(--anzeige);
    font-weight: 500;
    font-size: 1.125rem;
    letter-spacing: -.01em;
    color: var(--schrift);
}

.text p { margin: 0 0 1.125rem; color: var(--leise); text-wrap: pretty; }
.text strong { color: var(--schrift); font-weight: 600; }
.text em { color: var(--schrift); }

.text ul { margin: 0 0 1.25rem; padding-left: 0; list-style: none; }
.text li {
    position: relative;
    margin-bottom: .5rem;
    padding-left: 1.5rem;
    color: var(--leise);
}
.text li::before {
    content: "";
    position: absolute;
    left: .25rem; top: .7em;
    width: .375rem; height: .375rem;
    border-radius: 50%;
    background: var(--puls);
    opacity: .75;
}

.text address {
    margin: 0 0 1.25rem;
    padding: 1rem 1.25rem;
    border-left: 2px solid var(--puls);
    background: rgba(255, 255, 255, .035);
    border-radius: 0 8px 8px 0;
    font-style: normal;
    color: var(--schrift);
}

.text dl.contact {
    display: grid;
    gap: .25rem 1.25rem;
    margin: 0 0 1.25rem;
}
@media (min-width: 520px) { .text dl.contact { grid-template-columns: max-content 1fr; } }
.text dl.contact dt {
    font: 500 .75rem/1.6 var(--zahl);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--leise);
}
.text dl.contact dd { margin: 0 0 .625rem; }

.text code {
    padding: .1em .35em;
    border-radius: 4px;
    background: rgba(255, 255, 255, .07);
    font-family: var(--zahl);
    font-size: .875em;
    color: var(--puls-hell);
}

/* Hervorgehobene Kaesten: Widerrufsrecht, Kernaussagen, Warnhinweise. */
.text .highlight {
    margin: 0 0 1.5rem;
    padding: 1.25rem 1.375rem;
    border: 1px solid rgba(16, 185, 129, .28);
    border-radius: var(--rund);
    background: linear-gradient(rgba(16, 185, 129, .07), rgba(16, 185, 129, .07)),
                rgba(15, 20, 34, .8);
}
.text .highlight > *:last-child { margin-bottom: 0; }
.text .highlight p { color: var(--schrift); }

.text .updated {
    font: 500 .75rem/1.6 var(--zahl);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--leise);
}

.text hr {
    margin: 2.5rem 0;
    border: 0;
    border-top: 1px solid var(--rand);
}

/* Tabellen laufen bei Bedarf im eigenen Kasten seitlich, nie die Seite. */
.text table {
    width: 100%;
    margin: 0 0 1.5rem;
    border-collapse: collapse;
    font-size: .9375rem;
}
.text table caption {
    margin-bottom: .625rem;
    text-align: left;
    font-size: .875rem;
    color: var(--leise);
}
.text th, .text td {
    padding: .75rem .875rem;
    border: 1px solid var(--rand);
    text-align: left;
    vertical-align: top;
}
.text th {
    background: rgba(255, 255, 255, .05);
    font-weight: 600;
    color: var(--schrift);
}
.text td { color: var(--leise); }
.tabellenkasten { overflow-x: auto; margin-bottom: 1.5rem; }
.tabellenkasten table { margin-bottom: 0; }

/* ---------------------------------------------------- 7. Kontaktformular */
.form-hinweis {
    max-width: 68ch;
    margin: 0 0 2rem;
    padding: 1.125rem 1.375rem;
    border-radius: var(--rund);
    border: 1px solid var(--rand);
}
.form-hinweis p { margin: 0; }
.form-hinweis-ok {
    border-color: rgba(16, 185, 129, .45);
    background: linear-gradient(rgba(16, 185, 129, .1), rgba(16, 185, 129, .1)),
                rgba(15, 20, 34, .85);
}
.form-hinweis-fehler {
    border-color: rgba(248, 113, 113, .45);
    background: linear-gradient(rgba(248, 113, 113, .1), rgba(248, 113, 113, .1)),
                rgba(28, 16, 20, .85);
}
.form-hinweis-fehler a { color: #fca5a5; }

.pflicht-legende {
    max-width: 68ch;
    margin: 0 0 1rem;
    font-size: .875rem;
    color: var(--leise);
}

.kontakt-form {
    max-width: 40rem;
    margin: 0 0 3rem;
    display: grid;
    gap: 1.5rem;
}

/* Der Honigtopf muss fuer Menschen unsichtbar sein, fuer Skripte aber wie
   ein normales Feld aussehen: also nicht display:none. */
.honigtopf {
    position: absolute;
    left: -9999px;
    width: 1px; height: 1px;
    overflow: hidden;
}

.feld { display: grid; gap: .5rem; }
.feld label {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    font-weight: 500;
    font-size: .9375rem;
}
.feld .pflicht { color: var(--puls); }
.feld .freiwillig {
    font: 500 .6875rem/1 var(--zahl);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--leise);
}
.feld input, .feld textarea {
    width: 100%;
    min-height: 3rem;
    padding: .75rem .875rem;
    border: 1px solid var(--rand-hell);
    border-radius: 10px;
    background: rgba(255, 255, 255, .04);
    color: var(--schrift);
    font: 400 1rem/1.5 var(--text);
    transition: border-color .2s ease, background-color .2s ease;
}
.feld textarea { resize: vertical; min-height: 10rem; }
.feld input:hover, .feld textarea:hover { border-color: rgba(255, 255, 255, .3); }
.feld input:focus, .feld textarea:focus {
    background: rgba(255, 255, 255, .06);
    border-color: var(--puls);
}
.feld input:focus-visible, .feld textarea:focus-visible { outline-offset: 1px; }
/* Erst melden, wenn jemand das Feld verlassen oder abgeschickt hat.
   ":invalid" allein faerbte ein leeres Pflichtfeld schon beim Laden rot. */
.feld input:user-invalid,
.feld textarea:user-invalid { border-color: rgba(248, 113, 113, .65); }
.feld small { font-size: .8125rem; color: var(--leise); }

.form-datenschutz { margin: 0; font-size: .875rem; color: var(--leise); }

.form-senden {
    justify-self: start;
    min-height: 3rem;
    padding: .8rem 1.75rem;
    border: 0;
    border-radius: 999px;
    background: var(--puls);
    color: #04231a;
    font: 600 .9375rem/1 var(--text);
    cursor: pointer;
    transition: background-color .2s ease, transform .2s var(--schwung);
}
.form-senden:hover { background: var(--puls-hell); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .form-senden:hover { transform: none; } }

/* ---------------------------------------------------------- 8. Fusszeile */
.fuss {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--rand);
    background: rgba(6, 8, 14, .8);
    padding-block: 2.5rem;
    font-size: .875rem;
}
.fuss-innen { width: var(--spur); margin-inline: auto; display: grid; gap: 1rem; }
.fuss nav { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.fuss nav a {
    display: inline-block;
    padding: .375rem 0;
    color: var(--leise);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.fuss nav a:hover { color: var(--schrift); border-color: var(--rand-hell); }
.fuss .zeile { color: rgba(255, 255, 255, .52); }
.fuss .zeile a { display: inline-block; padding-block: .25rem; color: var(--leise); }
@media (min-width: 820px) {
    .fuss-innen { grid-template-columns: 1fr auto; align-items: baseline; }
}
