/*
 * BearTrack — handgeschriebenes CSS, kein Build-Schritt.
 *
 * Absicht: All-Inkl hat kein Node. Mit Tailwind muesste bei jedem Deploy ein
 * npm-Build laufen und `public/build` mitcommittet oder per CI nachgeschoben
 * werden. Fuer eine Landingpage und zwei Rechtstexte ist das mehr Maschinerie
 * als Inhalt, deshalb steht das Stylesheet direkt in public/ und wird ohne Vite
 * eingebunden.
 *
 * Die Farbwerte sind nicht neu erfunden, sondern die der App
 * (app/src/main/java/de/tedlab/beartrack/ui/theme/Color.kt): LimeAccent
 * #CDEC1F, PulsePink #FF1F8F, und die Flaechen aus Light-/DarkPalette. Wenn
 * dort etwas geaendert wird, gehoert es hier mit geaendert — sonst driften App
 * und Website auseinander.
 */

:root {
    color-scheme: light dark;

    --canvas: #F4F5F6;
    --surface: #FFFFFF;
    --surface-2: #EEEEEE;
    --line: #E6E8EA;
    --ink: #0E0F11;
    --muted: #6E767C;

    /* Markenakzente — in beiden Themes identisch, genau wie in der App. */
    --lime: #CDEC1F;
    --lime-dim: #B7D416;
    --teal: #018786;
    --pink: #FF1F8F;

    --shadow-card: 0 14px 36px -28px rgba(14, 15, 17, 0.35);
    --shadow-card-hover: 0 18px 40px -24px rgba(14, 15, 17, 0.4);
    --shadow-lime: 0 12px 28px -10px rgba(205, 236, 31, 0.75);

    --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
    --measure: 72rem;
}

/*
 * Dark Mode kommt aus der DarkPalette der App. Die alte Seite auf tedlab.de war
 * nur hell — das hier passt naeher zu dem, was der Nutzer auf dem Telefon sieht.
 */
@media (prefers-color-scheme: dark) {
    :root {
        --canvas: #0E0F11;
        --surface: #1A1C1F;
        --surface-2: #24272B;
        --line: #34373C;
        --ink: #F2F2F2;
        --muted: #8A8A8A;

        --shadow-card: 0 14px 36px -28px rgba(0, 0, 0, 0.8);
        --shadow-card-hover: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
    }
}

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

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 16px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

a { color: inherit; }

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

/*
 * Das Logo-SVG ist von sich aus lime. Auf dem hellen Grund (#F4F5F6) ist das
 * unlesbar — die tedlab-Fassung erzwang deshalb per `brightness-0` Schwarz.
 * Hier dasselbe, nur invertiert fuer Dark Mode: brightness(0) macht alles
 * schwarz, invert(1) daraus weiss. Ein Asset statt zwei, und der Kontrast
 * stimmt in beiden Themes.
 *
 * logo-white.svg liegt weiter im Repo, wird aber nicht mehr eingebunden —
 * brauchbar fuer OG-Images, wo CSS-Filter nicht greifen.
 */
.logo { filter: brightness(0); }
@media (prefers-color-scheme: dark) {
    .logo { filter: brightness(0) invert(1); }
}

/* Squircle mit Fallback auf runde Ecken — wie im Original. */
.squircle { border-radius: 0.95rem; }
@supports (corner-shape: squircle) {
    .squircle { border-radius: 1.5rem; corner-shape: squircle; }
}

.wrap { max-width: var(--measure); margin-inline: auto; padding-inline: 1.5rem; }

/* Der Lime-Teal-Schimmer oben. pointer-events aus, damit er nichts blockiert. */
.glow {
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 560px;
    pointer-events: none;
    background: radial-gradient(58% 55% at 50% -8%,
        rgba(205, 236, 31, 0.22), rgba(3, 218, 197, 0.10) 46%, transparent 72%);
}

.page { position: relative; min-height: 100vh; overflow: hidden; }
.page > .inner { position: relative; }

/* ---------- Kopf ---------- */

.topbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; padding-block: 1.5rem; flex-wrap: wrap;
}
.brand-group { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; }
/*
 * Lime gefuellt statt Umriss in Teal: Teal traegt hier die kleinen
 * Grossbuchstaben-Labels (.eyebrow) und kommt auf beiden Untergruenden nur auf
 * etwa 4:1 — fuer 12px zu knapp. Lime auf --ink liegt in Hell und Dunkel weit
 * darueber, weil beide Werte in den Themes gleich bleiben. Der Primaerknopf
 * weiter unten ist dieselbe Farbe, aber viel groesser und hat den Schatten; das
 * Abzeichen bleibt ihm damit sichtbar untergeordnet.
 */
.badge-beta {
    padding: 0.1rem 0.35rem 0.1rem 0.4rem;  /* rechts weniger: die Laufweite haengt hinten nach */
    border-radius: 0.25rem;
    background: var(--lime);
    color: #0E0F11;
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.4;
    text-transform: uppercase;
    white-space: nowrap;
}
.brand img { width: 1.75rem; height: 1.75rem; }
.brand span { font-weight: 700; letter-spacing: 0.35em; font-size: 0.875rem; }

.topbar nav { display: flex; align-items: center; gap: 1rem; font-size: 0.75rem; }

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

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    font: inherit; font-weight: 700; font-size: 0.875rem;
    text-transform: uppercase; letter-spacing: 0.05em;
    padding: 1rem 2rem; border: 0; cursor: pointer;
    text-decoration: none;
    transition: background-color .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s;
}
.btn-primary { background: var(--lime); color: #0E0F11; box-shadow: var(--shadow-lime); }
.btn-primary:hover { background: var(--lime-dim); transform: translateY(-2px); }
.btn-primary:disabled { opacity: .6; transform: none; cursor: default; }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-block { width: 100%; padding-block: 0.875rem; }

/* ---------- Hero ---------- */

.hero { text-align: center; padding-block: 2.5rem 4rem; }
.hero-logo { width: 6rem; height: 6rem; margin: 0 auto 2rem; }
.eyebrow {
    font-size: 0.75rem; letter-spacing: 0.3em; text-transform: uppercase;
    color: var(--teal); margin: 0 0 1.5rem;
}
.hero h1 {
    font-size: clamp(2.75rem, 9vw, 4.5rem); line-height: 1;
    text-transform: uppercase; letter-spacing: -0.02em; margin: 0; font-weight: 700;
}
.rule { width: 6rem; height: 0.375rem; border-radius: 999px; background: var(--lime); margin: 1.25rem auto 0; }
.hero .lead { font-size: 1.125rem; margin: 1.5rem auto 0; max-width: 42rem; }
.hero .sub { font-size: 0.9375rem; color: var(--muted); margin: 0.75rem auto 0; max-width: 42rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 2.5rem; }

@media (min-width: 768px) {
    .hero { padding-block: 5rem 6rem; }
    .hero-logo { width: 7rem; height: 7rem; }
}

/*
 * Google-Play-Badge. Google verlangt, dass das Bild unveraendert bleibt und
 * genug Freiraum hat — deshalb nur Breite setzen, keine Filter, kein Zuschnitt.
 * Die Datei bringt ihren Rand selbst mit, darum der negative Ausgleich, damit
 * sie optisch mit den Buttons auf einer Linie sitzt.
 */
.play-badge { display: inline-block; line-height: 0; }
.play-badge img { width: 216px; max-width: 100%; }
@media (min-width: 768px) { .play-badge img { width: 240px; } }

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

section { padding-block: 3rem; }
.section-label {
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.2em; color: var(--teal); margin: 0 0 2rem;
}

/* ---------- Feature-Karten ---------- */

.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 1rem; padding: 1.5rem; box-shadow: var(--shadow-card);
    transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
.card .icon {
    width: 2.75rem; height: 2.75rem; border-radius: 0.75rem;
    background: var(--lime); color: #0E0F11;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; margin-bottom: 1rem;
}
.card h3 { font-size: 1rem; font-weight: 700; margin: 0 0 0.5rem; }
.card p { font-size: 0.875rem; color: var(--muted); margin: 0; }

/* ---------- Screenshots ---------- */

/* Horizontal scrollen ohne sichtbare Leiste; safe center haelt die Reihe
   zentriert, ohne bei Überlauf links abzuschneiden. */
.shots {
    display: flex; gap: 1rem; overflow-x: auto; scroll-behavior: smooth;
    scroll-snap-type: x mandatory; padding-bottom: 1rem;
    justify-content: safe center;
    scrollbar-width: none; -ms-overflow-style: none;
}
.shots::-webkit-scrollbar { display: none; }
.shots figure { flex: 0 0 auto; width: 11rem; scroll-snap-align: start; margin: 0; }
.shots img {
    border-radius: 1rem; border: 1px solid var(--line);
    background: var(--surface); box-shadow: var(--shadow-card);
}
.shots figcaption {
    margin-top: 0.75rem; text-align: center; font-size: 0.75rem;
    text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
}
@media (min-width: 640px) { .shots figure { width: 12rem; } }

/* Uhr-Screenshots: quadratische Dateien, runde Displays.
 *
 * border-radius 50% schneidet genau den sichtbaren Bildschirm heraus — die Ecken
 * der Datei sind ohnehin schwarz. Der Rahmen entfaellt dabei: auf einem runden
 * Ausschnitt wirkt eine 1px-Linie wie ein Zeichenfehler, und die Uhr hat im
 * Gegensatz zum Handy kein Gehaeuse im Bild.
 *
 * Eigene, kleinere Breite als die Handy-Bilder: nebeneinander im selben Karussell
 * wuerden gleich breite Quadrate neben hohen Rechtecken die Reihe auseinanderziehen.
 */
.shots-watch figure { width: 8.5rem; }
.shots-watch img { border-radius: 50%; border: 0; background: #0e0f11; }
@media (min-width: 640px) { .shots-watch figure { width: 9.5rem; } }

/* Einleitung und Nachsatz einer Sektion — schmal gehalten, damit die Zeilen
 * lesbar kurz bleiben, und mittig unter dem Sektionslabel. */
.section-intro, .section-note {
    max-width: 44rem; margin: 0 auto 1.5rem; text-align: center;
    color: var(--muted); font-size: 0.9375rem; line-height: 1.6;
}
.section-note { margin: 1.5rem auto 0; font-size: 0.875rem; }
.section-intro strong { color: var(--ink); font-weight: 600; }

/* ---------- Formulare ---------- */

.forms { display: grid; gap: 1.5rem; align-items: stretch; max-width: 56rem; }
@media (min-width: 768px) { .forms { grid-template-columns: repeat(2, 1fr); } }

.panel {
    display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 1.5rem; padding: 2rem; scroll-margin-top: 6rem;
    box-shadow: 0 20px 50px -30px rgba(14, 15, 17, 0.28);
}
.panel h2 { font-size: 1.25rem; font-weight: 700; margin: 0 0 0.5rem; }
.panel > p { font-size: 0.875rem; color: var(--muted); margin: 0; }

.panel form { display: flex; flex-direction: column; flex-grow: 1; margin-top: 1.5rem; }
.fields { display: flex; flex-direction: column; gap: 0.75rem; }

input[type=text], input[type=email], input[type=password], textarea {
    width: 100%; font: inherit; font-size: 0.875rem;
    padding: 0.75rem 1rem; border-radius: 0.75rem;
    border: 1px solid var(--line); background: var(--canvas); color: var(--ink);
    transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus {
    outline: none; border-color: var(--teal);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 20%, transparent);
}
textarea { resize: vertical; }

/* Honeypot. Nicht display:none — manche Bots ignorieren unsichtbare Felder
   gezielt, ein weggeschobenes Feld fuellen sie eher aus. */
.honeypot { position: absolute; left: -9999px; }

.form-actions { margin-top: auto; padding-top: 1.5rem; }
.status { font-size: 0.875rem; min-height: 1.25rem; margin: 0.75rem 0 0; color: var(--muted); }
.status.is-ok { color: var(--teal); }
.status.is-error { color: var(--pink); }

.hint { text-align: center; font-size: 0.875rem; color: var(--muted); }
.hint a { font-weight: 700; color: var(--teal); text-decoration: none; }
.hint a:hover { color: var(--ink); }

/* ---------- Fuss ---------- */

footer.site {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 1rem; padding-block: 3rem; margin-top: 2rem; border-top: 1px solid var(--line);
    font-size: 0.75rem; color: var(--muted);
}
footer.site nav { display: flex; gap: 1.5rem; }
footer.site a { text-decoration: none; }
footer.site a:hover { color: var(--ink); }

/* ---------- Rechtstexte ---------- */

.prose { max-width: 48rem; margin-inline: auto; padding-block: 3rem; }
.prose h1 { font-size: 2rem; margin: 0 0 2rem; }
.prose h2 { font-size: 1.375rem; margin: 3rem 0 1rem; }
.prose h3 { font-size: 1.0625rem; margin: 2rem 0 0.5rem; }
.prose h4 { font-size: 0.9375rem; margin: 1.5rem 0 0.5rem; color: var(--muted); }
.prose p, .prose li { font-size: 0.9375rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.5rem; }
.prose a { color: var(--teal); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }
/* Nebensatz im Fliesstext: Ausnahmefaelle, die nicht wie ein gleichwertiger Weg
   aussehen sollen (z. B. der Mail-Notausgang auf /konto-loeschen). --muted ist im
   Dark-Block mitdefiniert, die Zeile traegt also in beiden Themes. */
.prose p.muted { font-size: 0.875rem; color: var(--muted); }
.prose code { background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 0.25rem; font-size: 0.875em; }

/* Verschleierte Kontaktdaten: bis das Skript laeuft, steht hier nur „. . ." */
.obf-hp { display: none; }
.obf-addr, .obf-mail, .obf-phone { -webkit-user-select: none; user-select: none; }

/* Wer Bewegung reduziert haben will, bekommt sie nicht. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
    .btn-primary:hover, .card:hover { transform: none; }
    .shots { scroll-behavior: auto; }
}
