/* livmation.com – die oeffentliche Seite.
 *
 * Schwester der Oberflaechen von Miliarum und Vilicus, nicht ihre Kopie.
 * Derselbe warme neutrale Grund, dieselben Radien, dieselbe Schriftfamilie --
 * wer von der Website in ein Produkt wechselt, soll nicht den Anbieter
 * wechseln. Was sich unterscheidet, ist die Dichte: Ein Dashboard packt
 * Zahlen, eine Startseite Saetze. Deshalb 15px statt 14.5px, mehr Luft
 * zwischen den Abschnitten und breitere Zeilen.
 *
 * Der Akzent der Website ist Indigo. Damit steht sie neben den drei Produkten
 * statt zwischen ihnen -- Gold, Gruen und Azur bleiben den Produkten, und
 * zwar nur in ihrem eigenen Abschnitt.
 */

:root {
    --bg: #262624;          /* Grund der Seite (warmes neutrales Grau) */
    --bg-tief: #1f1e1d;     /* Abgesetzte Baender */
    --bg-topbar: #1a1918;   /* Kopfleiste */
    --card: #30302e;        /* Karten */
    --card-2: #3a3a37;      /* Zweite Ebene, Hover */
    --line: #46453f;        /* Linien */
    --text: #f5f4ef;
    --muted: #a8a69c;

    /* Der Akzent der Website. Vier Marken, mehr nicht -- ein Wechsel der
       Familie ist eine Aenderung an vier Zeilen, und keine Komponente
       schreibt eine Farbe fest. */
    --accent: #4f46e5;
    --accent-strong: #a5b4fc;
    --accent-soft: rgba(165, 180, 252, .14);
    --accent-text: #f2f3ff;

    /* Die beiden Produkte. Sie erscheinen nur in ihrem Abschnitt, und dort
       ueber --ton, damit keine Komponente eine Produktfarbe kennt. Vilicus
       traegt sein Waldgruen wie in der eigenen Oberflaeche. */
    --miliarum: #fbbf24;
    --vilicus:  #63b287;
    --ton: var(--accent-strong);

    --ok: #4ade80;
    --warn: #fbbf24;
    --err: #f87171;

    --radius-sm: 6px;
    --radius-md: 10px;

    --wrap: 1120px;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .6rem; font-weight: 600; }
h1 { font-size: 2.3rem; letter-spacing: -.02em; }
h2 { font-size: 1.55rem; letter-spacing: -.01em; }
h3 { font-size: 1.1rem; }
p  { margin: 0 0 1rem; }

code, kbd, .mono {
    font-family: "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
    font-size: .92em;
}

/* Ein Fokusring, der auf jedem Grund sichtbar ist. Der voreingestellte Ring
   des Browsers verschwindet auf dunklem Grau fast vollstaendig. */
:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.visuell-versteckt {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip {
    position: absolute; left: -999px; top: 0; z-index: 60;
    background: var(--accent); color: var(--accent-text);
    padding: .6rem 1rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus { left: 0; }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 1.4rem;
}

/* ---------- Kopfleiste ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(26, 25, 24, .86);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    height: 60px;
}

.marke {
    display: flex; align-items: center; gap: .55rem;
    color: var(--text); font-weight: 600; letter-spacing: -.01em;
    flex: 0 0 auto;
}
.marke:hover { text-decoration: none; }
/* Das Zeichen: ein M in einem Quadrat, als SVG in der Adresse selbst.
   Eine Bilddatei waere ein zweiter Abruf fuer 26 Pixel -- und dasselbe
   Zeichen steht als Favicon im Kopf jeder Seite. */
.marke-zeichen {
    width: 26px; height: 26px; flex: 0 0 auto;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%234f46e5'/%3E%3Cpath d='M8 23V9l8 8 8-8v14' fill='none' stroke='%23f2f3ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.nav { display: flex; gap: .3rem; margin-left: auto; }
.nav-rechts { display: flex; align-items: center; gap: .4rem; }

.nav-link {
    color: var(--muted);
    padding: .4rem .7rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}
.nav-link:hover { background: var(--card); color: var(--text); text-decoration: none; }
.nav-link.aktiv { color: var(--text); background: var(--accent-soft); }

.inline { display: inline; }

.nav-schalter {
    display: none;
    width: 38px; height: 38px;
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius-sm); cursor: pointer;
    margin-left: auto;
    position: relative;
}
.nav-schalter-strich,
.nav-schalter-strich::before,
.nav-schalter-strich::after {
    position: absolute; left: 50%; transform: translateX(-50%);
    width: 16px; height: 2px; background: var(--text); border-radius: 2px;
    content: "";
}
.nav-schalter-strich { top: 50%; margin-top: -1px; }
.nav-schalter-strich::before { top: -5px; }
.nav-schalter-strich::after  { top: 5px; }

.nav-klein { border-top: 1px solid var(--line); background: var(--bg-topbar); }
.nav-klein .wrap {
    display: flex; flex-direction: column; align-items: stretch;
    gap: .3rem; padding-top: .7rem; padding-bottom: .9rem;
}
.nav-klein .nav-link { padding: .6rem .7rem; }
.nav-klein .btn { justify-content: center; }
.nav-klein form { display: block; }
.nav-klein form .btn { width: 100%; }

/* ---------- Abschnitte ---------- */
main { flex: 1 0 auto; }

section { padding: 4rem 0; }
section + section { border-top: 1px solid var(--line); }
.band { background: var(--bg-tief); }

.section-head {
    /* 62 Zeichen. Eine Zeile ueber die vollen 1120px liest sich nicht -- das
       Auge verliert beim Ruecksprung die naechste Zeile. */
    max-width: 62ch;
    margin-bottom: 2rem;
}
.section-head p { color: var(--muted); margin-bottom: 0; }

.augenbraue {
    display: block;
    font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
    color: var(--ton); margin-bottom: .5rem; font-weight: 600;
}

/* ---------- Hero ---------- */
.hero { padding: 5rem 0 4.5rem; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero h1 { max-width: 16ch; }
.hero-text { font-size: 1.1rem; color: var(--muted); max-width: 52ch; }
.hero-knoepfe { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }

.hero-fakten {
    display: flex; flex-wrap: wrap; gap: 1.6rem;
    margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
}
.hero-fakt strong { display: block; font-size: 1.35rem; }
.hero-fakt span { color: var(--muted); font-size: .88rem; }

/* ---------- Knoepfe ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .45rem;
    background: var(--accent); color: var(--accent-text);
    border: 1px solid transparent; border-radius: var(--radius-sm);
    padding: .6rem 1.1rem; font: inherit; font-weight: 600;
    cursor: pointer; white-space: nowrap;
}
.btn:hover { filter: brightness(1.12); text-decoration: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: default; filter: none; }

.btn-still {
    background: var(--card); color: var(--text); border-color: var(--line);
}
.btn-still:hover { background: var(--card-2); filter: none; }

.btn-klein { padding: .38rem .75rem; font-size: .88rem; }
.btn-gross { padding: .8rem 1.5rem; font-size: 1.02rem; }
.btn-gefahr { background: transparent; color: var(--err); border-color: var(--err); }
.btn-gefahr:hover { background: rgba(248, 113, 113, .12); filter: none; }

/* ---------- Karten ---------- */
.karte {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.4rem;
}
.karte + .karte { margin-top: 1rem; }
.karte h3 { margin-bottom: .35rem; }
.karte p:last-child { margin-bottom: 0; }

.raster { display: grid; gap: 1rem; }
.raster-3 { grid-template-columns: repeat(3, 1fr); }
.raster-2 { grid-template-columns: repeat(2, 1fr); }

/* Ein Rasterfeld darf schmaler werden als sein Inhalt.
 *
 * Ohne diese Zeile ist die kleinste Breite eines Feldes die seines
 * laengsten unumbrechbaren Inhalts -- und in einer Karte steht
 * `curl -fsSL https://livmation.com/install.sh | bash` in einem <pre>, das
 * nicht umbricht. Am Telefon schob diese eine Zeile die ganze Seite auf
 * 512px und liess sie seitlich scrollen. Der <pre> hat sein eigenes
 * overflow-x und scrollt jetzt selbst, statt die Seite zu verbreitern. */
.raster > *,
.hero-inner > *,
.produkt-inner > * { min-width: 0; }

/* ---------- Produktabschnitt ---------- */

/* Die einzige Stelle, an der ein Produkt seine Farbe bekommt. Nicht an
   `.produkt` gebunden, sondern an das Datenattribut selbst: Der Hero-Stapel
   braucht dieselbe Zuordnung, und zweimal dieselben Zeilen laufen
   irgendwann auseinander. Ein weiteres Produkt ist eine Zeile hier und eine
   Marke oben -- und keine Komponente kennt eine Produktfarbe. */
[data-akzent="miliarum"] { --ton: var(--miliarum); }
[data-akzent="vilicus"]  { --ton: var(--vilicus); }

.produkt-inner {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 2.6rem;
    align-items: center;
}
.produkt:nth-of-type(even) .produkt-bild { order: -1; }

.produkt h2 { display: flex; align-items: center; gap: .6rem; }
.produkt h2::before {
    content: ""; width: 10px; height: 10px; border-radius: 3px;
    background: var(--ton); flex: 0 0 auto;
}

.merkmale { list-style: none; margin: 1.2rem 0 0; padding: 0; }
.merkmale li {
    position: relative; padding-left: 1.5rem; margin-bottom: .7rem;
    color: var(--muted);
}
.merkmale li::before {
    content: ""; position: absolute; left: 0; top: .62em;
    width: 7px; height: 7px; border-radius: 2px; background: var(--ton);
}
.merkmale strong { color: var(--text); font-weight: 600; }

/* ---------- Bildschirmfoto im Fensterrahmen ---------- */
.shot {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-tief);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .38);
}
.shot-leiste {
    display: flex; align-items: center; gap: .5rem;
    padding: .55rem .8rem;
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--line);
}
.shot-punkte { display: flex; gap: .32rem; flex: 0 0 auto; }
.shot-punkt { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.shot-adresse {
    flex: 1 1 auto; min-width: 0;
    background: var(--bg); border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: .12rem .55rem;
    font-size: .78rem; color: var(--muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.shot img { display: block; width: 100%; height: auto; }

.shot-platzhalter {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    gap: .4rem; padding: 3.2rem 1.4rem; text-align: center;
    background:
        repeating-linear-gradient(-45deg, transparent, transparent 9px,
                                  rgba(255, 255, 255, .022) 9px, rgba(255, 255, 255, .022) 18px);
    color: var(--muted);
}
.shot-platzhalter strong { color: var(--text); font-weight: 600; }
.shot-platzhalter .mono { color: var(--ton); font-size: .82rem; word-break: break-all; }
.shot-platzhalter.eng { padding: 1.6rem .8rem; gap: .2rem; font-size: .88rem; }
.shot-platzhalter.eng .mono { font-size: .72rem; }

/* Der Stapel im Hero: Miliarum gross, darunter die beiden Knoten nebeneinander.
   So steht oben, worum es geht -- drei Programme, nicht eines. */
.stapel { display: grid; gap: .7rem; }
.stapel-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.stapel-reihe > * { min-width: 0; }
/* Der grosse Rahmen wirft den Schatten, die kleinen nicht -- drei Schatten
   uebereinander sehen aus wie Nebel, nicht wie Tiefe. */
.stapel-reihe .shot { box-shadow: none; }

/* ---------- Formulare ---------- */
.formular { max-width: 34rem; }
.feld { margin-bottom: 1rem; }
.feld label { display: block; margin-bottom: .32rem; font-weight: 600; font-size: .92rem; }
.feld .hinweis { display: block; color: var(--muted); font-size: .85rem; margin-top: .3rem; }

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="file"], select, textarea {
    width: 100%;
    background: var(--bg-tief);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: .58rem .7rem;
    font: inherit;
}
textarea { min-height: 5.5rem; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent-strong); }
input::placeholder, textarea::placeholder { color: #7c7a72; }

.feld-reihe { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }

.banner {
    border: 1px solid var(--line);
    border-left: 3px solid var(--muted);
    background: var(--card);
    border-radius: var(--radius-md);
    padding: .8rem 1rem;
    margin-bottom: 1.2rem;
}
.banner.ok   { border-left-color: var(--ok); }
.banner.warn { border-left-color: var(--warn); }
.banner.err  { border-left-color: var(--err); }
.banner[hidden] { display: none; }

/* ---------- Tabellen ---------- */
.tabelle-huelle { overflow-x: auto; }

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}
table.data th {
    text-align: left; font-weight: 600; color: var(--muted);
    font-size: .8rem; letter-spacing: .04em; text-transform: uppercase;
    padding: .5rem .7rem; border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
table.data td {
    padding: .62rem .7rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover td { background: var(--card-2); }
table.data td.empty-state { color: var(--muted); text-align: center; padding: 1.6rem .7rem; }
table.data td.zahl { text-align: right; font-variant-numeric: tabular-nums; }

.pill {
    display: inline-block;
    padding: .1rem .5rem;
    border-radius: var(--radius-sm);
    background: var(--card-2); color: var(--muted);
    font-size: .8rem; font-weight: 600; white-space: nowrap;
}
.pill.ok   { background: rgba(74, 222, 128, .16); color: var(--ok); }
.pill.warn { background: rgba(251, 191, 36, .16); color: var(--warn); }
.pill.err  { background: rgba(248, 113, 113, .16); color: var(--err); }
.pill.ton  { background: var(--accent-soft); color: var(--accent-strong); }

.leer { color: var(--muted); }

.schluesselfeld {
    display: block;
    background: var(--bg-tief);
    border: 1px dashed var(--accent-strong);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    font-family: "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
    font-size: 1.15rem;
    letter-spacing: .06em;
    word-break: break-all;
    margin-bottom: 1rem;
}

pre.block {
    background: var(--bg-tief);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: .9rem 1rem;
    overflow-x: auto;
    margin: 0 0 1rem;
}
pre.block code { color: var(--accent-strong); }

.werteliste { margin: 0; }
.werteliste div {
    display: flex; gap: 1rem; justify-content: space-between;
    padding: .5rem 0; border-bottom: 1px solid var(--line);
}
.werteliste div:last-child { border-bottom: none; }
.werteliste dt { color: var(--muted); }
.werteliste dd { margin: 0; text-align: right; word-break: break-word; }

/* ---------- Fuss ---------- */
.site-footer {
    flex: 0 0 auto;
    background: var(--bg-topbar);
    border-top: 1px solid var(--line);
    padding: 2.4rem 0 1.4rem;
    margin-top: auto;
}
.footer-inner {
    display: flex; flex-wrap: wrap; gap: 1.6rem; justify-content: space-between;
    padding-bottom: 1.4rem; border-bottom: 1px solid var(--line);
}
.footer-marke { font-weight: 600; margin-bottom: .2rem; }
.footer-klein { color: var(--muted); font-size: .9rem; margin: 0; max-width: 44ch; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.1rem; align-items: flex-start; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--text); }
.footer-fuss {
    display: flex; justify-content: space-between; gap: 1rem;
    padding-top: 1.1rem; color: var(--muted); font-size: .85rem;
}

/* ---------- Schmalere Fenster ---------- */
@media (max-width: 980px) {
    .hero-inner,
    .produkt-inner { grid-template-columns: 1fr; gap: 2rem; }
    .produkt:nth-of-type(even) .produkt-bild { order: 0; }
    .raster-3 { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { max-width: none; }
}

@media (max-width: 760px) {
    .nav, .nav-rechts { display: none; }
    .nav-schalter { display: block; }
    section { padding: 3rem 0; }
    .hero { padding: 3.2rem 0 3rem; }
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.35rem; }
    .raster-3, .raster-2, .feld-reihe { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; }

    /* Tabellen werden zu Karten. Am Telefon ist eine sechsspaltige Tabelle
       entweder unlesbar klein oder laeuft seitlich aus dem Bild -- beides
       schlechter als untereinander stehende beschriftete Zeilen. Genau wie
       in den Oberflaechen von Miliarum und Vilicus. */
    table.data thead { display: none; }
    table.data, table.data tbody, table.data tr, table.data td {
        display: block; width: 100%;
    }
    .tabelle-huelle { overflow-x: visible; }
    table.data tr {
        border: 1px solid var(--line);
        border-radius: var(--radius-md);
        margin-bottom: .7rem;
        background: var(--card);
    }
    table.data tbody tr:hover td { background: transparent; }
    table.data td {
        display: flex; align-items: baseline; gap: 1rem;
        justify-content: space-between;
        border-bottom: 1px solid var(--line);
        padding: .5rem .8rem;
        text-align: right;
    }
    table.data tr td:last-child { border-bottom: none; }
    table.data td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: .78rem; letter-spacing: .04em; text-transform: uppercase;
        font-weight: 600;
        text-align: left;
        flex: 0 0 auto;
    }
    table.data td.zahl { text-align: right; }
    table.data td.empty-state { justify-content: center; text-align: center; }
    table.data td.empty-state::before { content: ""; }
}

@media (max-width: 420px) {
    .wrap { padding: 0 1rem; }
    h1 { font-size: 1.7rem; }
    .schluesselfeld { font-size: .98rem; }
}

/* Wer im System weniger Bewegung eingestellt hat, bekommt weniger Bewegung.
   Das ist keine Geschmacksfrage: Fuer manche Menschen loesen bewegte Flaechen
   Uebelkeit aus. */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Frueher als style="" in den Seiten. Die Content-Security-Policy laesst
   eingebettete Stile nicht zu, also standen diese Abstaende nie auf dem
   Bildschirm. */
.abstand-oben { margin-top: 1rem; }
.wrap-text { max-width: 52rem; }
.fehler-seite { max-width: 40rem; text-align: center; }
.fehler-seite h1 { font-size: 3.4rem; margin-bottom: .2rem; }
.fehler-seite .hero-text { margin: 0 auto 1.6rem; }
