/* ============================================================
   Tokens
   ============================================================ */
:root {
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --color-bg: #f5f8f3;
    --color-surface: #ffffff;
    --color-surface-sunken: #e9ede6;
    --color-ink: #19231d;
    --color-muted: #5b6459;
    --color-primary: #2e6b41;
    --color-primary-strong: #1f4e31;
    --color-primary-soft: #e3ede4;
    --color-on-primary: #ffffff;
    --color-accent-warm: #bd8163;
    --color-accent-warm-strong: #9c6549;
    --edge-hairline: rgba(25, 35, 29, 0.12);
    --shadow-soft: 0 1px 2px rgba(25, 35, 29, 0.05), 0 12px 32px rgba(25, 35, 29, 0.08);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --container-width: 1120px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --color-bg: #12160f;
        --color-surface: #1a2117;
        --color-surface-sunken: #212a1d;
        --color-ink: #eef2ea;
        --color-muted: #a3ac9c;
        --color-primary: #6cb888;
        --color-primary-strong: #8fd0a6;
        --color-primary-soft: #223428;
        --color-on-primary: #10160e;
        --color-accent-warm: #d69a7c;
        --color-accent-warm-strong: #e4b295;
        --edge-hairline: rgba(238, 242, 234, 0.12);
        --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
    }
}
:root[data-theme="dark"] {
    --color-bg: #12160f;
    --color-surface: #1a2117;
    --color-surface-sunken: #212a1d;
    --color-ink: #eef2ea;
    --color-muted: #a3ac9c;
    --color-primary: #6cb888;
    --color-primary-strong: #8fd0a6;
    --color-primary-soft: #223428;
    --color-accent-warm: #d69a7c;
    --color-accent-warm-strong: #e4b295;
    --edge-hairline: rgba(238, 242, 234, 0.12);
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* ============================================================
   Reset & Basics
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; text-wrap: balance; margin: 0; }
p { margin: 0; }
.muted { color: var(--color-muted); }

/* Links im Fließtext müssen ohne Farbe erkennbar sein (WCAG 1.4.1). */
main p a:not(.button):not(.version-badge),
.legal-page a {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}
main p a:not(.button):not(.version-badge):hover,
.legal-page a:hover { text-decoration-thickness: 2px; }

:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}
/* Fokus muss auf dem dunklen Bereich und auf dem grünen Skip-Link sichtbar bleiben. */
.section-invert :focus-visible,
.skip-link:focus-visible {
    outline-color: #ffffff;
}

@media (forced-colors: active) {
    .button { border: 2px solid ButtonText; }
    :focus-visible { outline-color: Highlight; }
}

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -3rem;
    left: 1rem;
    background: var(--color-primary);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    z-index: 100;
    transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}

/* ============================================================
   Layout helpers
   ============================================================ */
.section-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}
.section-inner.narrow { max-width: 720px; }
.section-inner.center { text-align: center; }
.section-inner.center p { margin-left: auto; margin-right: auto; }

.section { padding: 3.5rem 0; }
.section-muted { background: var(--color-surface-sunken); }
/* Fester dunkelgrüner Akzentbereich – bewusst NICHT über die Theme-Tokens,
   damit er in beiden Modi dunkel bleibt. */
.section-invert {
    background: #1f4e31;
    color: #f5f8f3;
}
.section-invert .eyebrow { color: #bfe0cb; }
.section-invert .support-note { color: #dcecdf; }
.section-invert .button-ghost-invert { color: #ffffff; }
/* Weiße Fläche = klar als Button erkennbar auf dem dunklen Grün (WCAG 1.4.11). */
.section-invert .button-primary { background: #ffffff; color: #1f4e31; }
.section-invert .button-primary:hover { background: #e3ede4; }

.eyebrow {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    margin-bottom: 0.6rem;
}

.section-head { margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
.section h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin-bottom: 0.75rem; }
.section p + p { margin-top: 0.9rem; }

/* ============================================================
   Buttons
   ============================================================ */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.8rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
    cursor: pointer;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--color-primary); color: var(--color-on-primary); }
.button-primary:hover { background: var(--color-primary-strong); }
/* Sekundär-Button: eigene Fläche + Schatten, damit er auch ohne kräftigen
   Rahmen klar als Bedienelement erkennbar ist (WCAG 1.4.11). */
.button-ghost {
    background: var(--color-surface);
    color: var(--color-ink);
    border-color: var(--edge-hairline);
    box-shadow: 0 1px 2px rgba(25, 35, 29, 0.08);
}
.button-ghost:hover { border-color: var(--color-primary); color: var(--color-primary-strong); }
.button-ghost-invert { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.button-ghost-invert:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--color-bg) 88%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--edge-hairline);
}
.site-header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--color-ink);
    margin-right: auto;
}
.brand-dot {
    width: 0.6rem; height: 0.6rem;
    border-radius: 50%;
    background: var(--color-primary);
    flex-shrink: 0;
}
.site-nav {
    display: none;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.95rem;
}
.site-nav a {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;      /* Touch-Ziel ≥ 24px (WCAG 2.5.8), komfortabel 44px */
    padding: 0 0.5rem;
    border-radius: var(--radius-sm);
}
.site-nav a:hover { color: var(--color-primary); }
.header-github {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem; height: 2.25rem;
    border-radius: 50%;
    color: var(--color-ink);
    transition: background-color 0.12s ease;
}
.header-github:hover { background: var(--color-surface-sunken); }

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

/* ============================================================
   Hero
   ============================================================ */
.hero { padding: 2.5rem 0 3rem; }
.hero-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.25rem;
    display: grid;
    gap: 2.5rem;
}
.hero-copy h1 {
    font-size: clamp(2rem, 6vw, 3.1rem);
    margin: 0.2rem 0 1.1rem;
}
.hero-lede {
    font-size: 1.08rem;
    color: var(--color-muted);
    max-width: 46ch;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.5rem;
}
.hero-actions.center { justify-content: center; }
.hero-meta {
    margin-top: 1.1rem;
    font-size: 0.85rem;
    color: var(--color-muted);
}

.hero-visual { display: flex; justify-content: center; }
.browser-frame {
    background: var(--color-surface);
    border: 1px solid var(--edge-hairline);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    width: 100%;
    max-width: 560px;
}
.browser-frame-bar {
    display: flex;
    gap: 0.4rem;
    padding: 0.7rem 0.9rem;
    background: var(--color-surface-sunken);
}
.browser-frame-bar span {
    width: 0.55rem; height: 0.55rem;
    border-radius: 50%;
    background: var(--edge-hairline);
}
.browser-frame img { width: 100%; height: auto; }

@media (min-width: 960px) {
    .hero-inner { grid-template-columns: 1.05fr 0.95fr; align-items: center; }
    .hero-visual { justify-content: flex-end; }
    .browser-frame { transform: rotate(-1.2deg); }
}

/* ============================================================
   Intro
   ============================================================ */
.intro p { font-size: 1.05rem; }
.wordplay { color: var(--color-primary); font-weight: 700; }

/* ============================================================
   Feature showcase (screenshots)
   ============================================================ */
.showcase { display: flex; flex-direction: column; gap: 3rem; }
.showcase-row {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}
.showcase-text h3 { font-size: 1.4rem; margin-bottom: 0.6rem; }
.showcase-text p { color: var(--color-muted); }
.showcase-media .browser-frame.is-compact { max-width: none; }
.showcase-media .browser-frame.is-compact img {
    height: 240px;
    object-fit: cover;
    object-position: top center;
}
.showcase-media-mobile { display: flex; justify-content: center; }
.showcase-media-mobile img {
    max-width: 240px;
    height: 340px;
    object-fit: cover;
    object-position: top center;
    border-radius: var(--radius-md);
    border: 1px solid var(--edge-hairline);
    box-shadow: var(--shadow-soft);
}

@media (min-width: 860px) {
    .showcase-row { grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: center; }
    .showcase-row.is-reverse .showcase-text { order: 2; }
    .showcase-row.is-reverse .showcase-media { order: 1; }
    .showcase-media-mobile { justify-content: flex-start; }
    .showcase-media .browser-frame.is-compact img { height: 300px; }
}

/* ============================================================
   Feature grid (text-only)
   ============================================================ */
.feature-grid {
    display: grid;
    gap: 1.1rem;
    grid-template-columns: 1fr;
}
.feature-card {
    background: var(--color-surface);
    border: 1px solid var(--edge-hairline);
    border-radius: var(--radius-md);
    padding: 1.4rem;
}
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem; height: 2.4rem;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 1.1rem;
    margin-bottom: 0.9rem;
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.feature-card p { color: var(--color-muted); font-size: 0.95rem; }

@media (min-width: 640px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .feature-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   Version badge
   ============================================================ */
.version-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.4rem;
    padding: 0.7rem 1.2rem;
    border-radius: 999px;
    border: 1px solid var(--edge-hairline);
    background: var(--color-surface);
    text-decoration: none;
    color: var(--color-ink);
    font-size: 0.95rem;
    transition: border-color 0.12s ease;
}
.version-badge:hover { border-color: var(--color-primary); }
.version-badge strong { font-variant-numeric: tabular-nums; }
.version-dot {
    width: 0.5rem; height: 0.5rem;
    border-radius: 50%;
    background: var(--color-primary);
}
.version-arrow { color: var(--color-primary); }

/* ============================================================
   Systemanforderungen
   ============================================================ */
.requirements {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}
.requirements li {
    position: relative;
    padding-left: 1.6rem;
    color: var(--color-muted);
}
.requirements li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--color-primary);
}
.requirements strong { color: var(--color-ink); }
.requirements code,
.legal-page code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88em;
    background: var(--color-surface);
    border: 1px solid var(--edge-hairline);
    border-radius: 5px;
    padding: 0.05rem 0.35rem;
}
.requirements-note { margin-top: 1.4rem; font-size: 0.9rem; color: var(--color-muted); }
.requirements-note a { color: var(--color-primary); }

.host-tip {
    margin-top: 2rem;
    padding: 1.6rem;
    background: var(--color-surface);
    border: 1px solid var(--edge-hairline);
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius-md);
}
.host-tip-eyebrow {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    margin-bottom: 0.9rem;
}
.host-tip-logo {
    display: inline-block;
    background: #ffffff;
    border: 1px solid var(--edge-hairline);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.85rem;
    margin-bottom: 1.1rem;
}
.host-tip-logo img { width: 168px; height: auto; display: block; }
.host-tip > p:not(.host-tip-eyebrow):not(.host-tip-note) {
    color: var(--color-ink);
    margin-bottom: 1.1rem;
    max-width: 52ch;
}
.host-tip .button { font-size: 0.92rem; padding: 0.65rem 1.2rem; }
.host-tip-note {
    margin-top: 0.9rem;
    font-size: 0.82rem;
    color: var(--color-muted);
    max-width: 52ch;
}

/* ============================================================
   Support / Mitmachen
   ============================================================ */
.support-note {
    margin-top: 1rem;
    font-style: italic;
    color: var(--color-muted);
    max-width: 46ch;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer { border-top: 1px solid var(--edge-hairline); padding: 2.5rem 0; }
.site-footer-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.9rem;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-weight: 600;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; }
.footer-links a {
    text-decoration: none;
    color: var(--color-muted);
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 0.5rem;
    border-radius: var(--radius-sm);
}
.footer-links a:hover { color: var(--color-primary); text-decoration: underline; }
.footer-note { color: var(--color-muted); }

@media (min-width: 720px) {
    .site-footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ============================================================
   Legal pages
   ============================================================ */
.legal-page .section-inner { padding-top: 1rem; }
.legal-page h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.legal-page .eyebrow { margin-bottom: 0.4rem; }
.legal-page h2 { font-size: 1.3rem; margin: 2.4rem 0 0.7rem; }
.legal-page h3 { font-size: 1.02rem; font-family: var(--font-body); font-weight: 700; margin: 1.4rem 0 0.4rem; }
.legal-page p, .legal-page li { color: var(--color-muted); }
.legal-page p { margin-bottom: 0.7rem; }
.legal-page ul { margin: 0 0 0.7rem; padding-left: 1.2rem; }
.legal-page li { margin-bottom: 0.35rem; }
.legal-page a { color: var(--color-primary); }
.legal-page .legal-intro { margin-bottom: 1.5rem; }
.legal-page .placeholder {
    background: var(--color-primary-soft);
    color: var(--color-primary-strong);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}
