:root {
    --lm-background: #FFFFFF;
    --lm-background-gray: #FAFAFA;
    --lm-surface: #FFFFFF;
    --lm-text: #0A0A0A;
    --lm-text-muted: #71717A;
    --lm-primary: #18181B;
    --lm-primary-text: #FAFAFA;
    --lm-primary-hover: #27272A;
    --lm-lines: #E4E4E7;
    --lm-radius: 0.5rem;
    --lm-wrap-padding: 1.5rem;

    --lm-mark-plate: var(--lm-primary);
    --lm-mark-ink: var(--lm-primary-text);

    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --lm-background: #09090B;
        --lm-background-gray: #0A0A0A;
        --lm-surface: #09090B;
        --lm-text: #FAFAFA;
        --lm-text-muted: #A1A1AA;
        --lm-primary: #FAFAFA;
        --lm-primary-text: #18181B;
        --lm-primary-hover: #E4E4E7;
        --lm-lines: #27272A;
    }
}

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

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

body {
    margin: 0;
    background: var(--lm-background);
    color: var(--lm-text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--lm-primary);
    color: var(--lm-primary-text);
    padding: 0.5rem 1rem;
    border-radius: 0 0 var(--lm-radius) 0;
    z-index: 100;
}

.skip-link:focus {
    left: 0;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--lm-lines);
    background: color-mix(in srgb, var(--lm-background) 88%, transparent);
    backdrop-filter: blur(8px);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.0625rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.021em;
}

.brand-mark {
    flex: none;
    display: block;
    width: 2rem;
    height: 2rem;
}

.brand-word-light {
    font-weight: 400;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.site-nav a {
    text-decoration: none;
    color: var(--lm-text-muted);
    font-size: 0.9375rem;
}

.site-nav a:hover {
    color: var(--lm-text);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--lm-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    border: 1px solid transparent;
    cursor: pointer;
}

.button-primary {
    background: var(--lm-primary);
    color: var(--lm-primary-text);
}

.button-primary:hover {
    background: var(--lm-primary-hover);
}

.button-ghost {
    border-color: var(--lm-lines);
    color: var(--lm-text);
    background: transparent;
}

.button-ghost:hover {
    background: var(--lm-background-gray);
}

@media (max-width: 40rem) {
    .nav-hide-small {
        display: none;
    }
}

/* Hero / content */

main {
    min-height: 60vh;
}

.hero {
    padding: 5rem 0 3rem 0;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 1rem 0;
}

.hero p.lead {
    font-size: 1.125rem;
    color: var(--lm-text-muted);
    max-width: 36rem;
    margin: 0 auto 2rem auto;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.section {
    padding: 3rem 0;
    border-top: 1px solid var(--lm-lines);
}

.section h2 {
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    margin: 0 0 1rem 0;
}

.prose {
    max-width: 48rem;
    margin: 0 auto;
}

.prose h1 {
    font-size: 2rem;
    letter-spacing: -0.02em;
}

.prose h2 {
    font-size: 1.25rem;
    margin-top: 2rem;
}

.prose p,
.prose li {
    color: var(--lm-text);
}

.placeholder-note {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px dashed var(--lm-lines);
    border-radius: var(--lm-radius);
    color: var(--lm-text-muted);
    background: var(--lm-background-gray);
}

/* Legal placeholder markers: [ ... ] the operator has to fill in */
.legal-fill {
    background: color-mix(in srgb, var(--lm-lines) 45%, transparent);
    border-radius: 0.25rem;
    padding: 0 0.25rem;
    font-style: normal;
}

.legal-dl {
    margin: 0.5rem 0 1.5rem 0;
}

.legal-dl dt {
    font-weight: 600;
    margin-top: 1rem;
}

.legal-dl dd {
    margin: 0.25rem 0 0 0;
    color: var(--lm-text);
}

.legal-updated {
    margin-top: 2.5rem;
    color: var(--lm-text-muted);
    font-size: 0.875rem;
}

.section-head {
    max-width: 40rem;
    margin: 0 auto 2.5rem auto;
    text-align: center;
}

.section-head p {
    color: var(--lm-text-muted);
    margin: 0;
}

/* Feature grid */

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1.25rem;
}

.feature-card {
    border: 1px solid var(--lm-lines);
    border-radius: var(--lm-radius);
    padding: 1.5rem;
    background: var(--lm-surface);
}

.feature-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.0625rem;
    letter-spacing: -0.01em;
}

.feature-card p {
    margin: 0;
    color: var(--lm-text-muted);
    font-size: 0.9375rem;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--lm-radius);
    background: var(--lm-primary);
    color: var(--lm-primary-text);
    font-weight: 700;
    margin-bottom: 0.875rem;
}

.feature-icon svg {
    width: 1.375rem;
    height: 1.375rem;
}

/* Steps */

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1.5rem;
    counter-reset: step;
}

.step {
    position: relative;
    padding-left: 3rem;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--lm-primary);
    color: var(--lm-primary-text);
    font-weight: 700;
    font-size: 0.875rem;
}

.step h3 {
    margin: 0 0 0.375rem 0;
    font-size: 1rem;
}

.step p {
    margin: 0;
    color: var(--lm-text-muted);
    font-size: 0.9375rem;
}

/* Closing CTA */

.cta-section {
    text-align: center;
    background: var(--lm-background-gray);
}

.cta-section h2 {
    margin-bottom: 0.75rem;
}

.cta-section p {
    color: var(--lm-text-muted);
    max-width: 34rem;
    margin: 0 auto 1.5rem auto;
}

/* Footer */

.site-footer {
    border-top: 1px solid var(--lm-lines);
    background: var(--lm-background-gray);
    padding: 2rem 0;
    color: var(--lm-text-muted);
    font-size: 0.875rem;
}

.site-footer .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.footer-links a {
    text-decoration: none;
    color: var(--lm-text-muted);
}

.footer-links a:hover {
    color: var(--lm-text);
}

/* Privacy banner */

.privacy-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: 32rem;
    margin: 0 auto;
    background: var(--lm-surface);
    border: 1px solid var(--lm-lines);
    border-radius: var(--lm-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 50;
}

.privacy-banner p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--lm-text-muted);
}

.privacy-banner-close {
    flex: none;
}

/* Pricing */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.25rem;
    align-items: start;
}

.price-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--lm-lines);
    border-radius: var(--lm-radius);
    padding: 1.75rem;
    background: var(--lm-surface);
}

.price-card.featured {
    border-color: var(--lm-primary);
    box-shadow: 0 0 0 1px var(--lm-primary);
}

.price-badge {
    align-self: flex-start;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    background: var(--lm-primary);
    color: var(--lm-primary-text);
    margin-bottom: 0.75rem;
}

.price-name {
    margin: 0 0 0.25rem 0;
    font-size: 1.125rem;
    letter-spacing: -0.01em;
}

.price-amount {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.price-period {
    color: var(--lm-text-muted);
    font-size: 0.9375rem;
}

.price-features {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0;
    display: grid;
    gap: 0.5rem;
}

.price-features li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.9375rem;
    color: var(--lm-text);
}

.price-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--lm-primary);
    font-weight: 700;
}

.price-card .button {
    margin-top: auto;
}

.price-notes {
    margin-top: 2.5rem;
}

.price-notes dt {
    font-weight: 600;
    margin-top: 1rem;
}

.price-notes dd {
    margin: 0.25rem 0 0 0;
    color: var(--lm-text-muted);
}

/* Documentation layout */

.doku {
    display: grid;
    grid-template-columns: 16rem 1fr;
    gap: 2.5rem;
    padding: 2.5rem 0;
    align-items: start;
}

@media (max-width: 52rem) {
    .doku {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.doku-nav {
    position: sticky;
    top: 5rem;
}

.doku-nav-titel {
    margin: 0 0 0.75rem 0;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--lm-text-muted);
}

.doku-nav ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.25rem;
}

.doku-nav a {
    display: block;
    padding: 0.375rem 0.625rem;
    border-radius: var(--lm-radius);
    text-decoration: none;
    color: var(--lm-text-muted);
    font-size: 0.9375rem;
}

.doku-nav a:hover {
    background: var(--lm-background-gray);
    color: var(--lm-text);
}

.doku-nav a[aria-current="page"] {
    background: var(--lm-primary);
    color: var(--lm-primary-text);
}

.doku-inhalt {
    margin: 0;
}

.doku-inhalt h1 {
    margin-top: 0;
}

.doku-stand {
    margin-top: 2.5rem;
    color: var(--lm-text-muted);
    font-size: 0.875rem;
}

.table-scroll {
    overflow-x: auto;
}

.doku-inhalt table {
    border-collapse: collapse;
    width: 100%;
}

.doku-inhalt th,
.doku-inhalt td {
    border: 1px solid var(--lm-lines);
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.doku-inhalt img {
    max-width: 100%;
    height: auto;
    border-radius: var(--lm-radius);
}

.doku-inhalt pre {
    overflow-x: auto;
    padding: 1rem;
    border-radius: var(--lm-radius);
    background: var(--lm-background-gray);
    border: 1px solid var(--lm-lines);
}

/* ============================================================
   Landing motion + Flag-Football-Akzent (leaguema)
   Refinement über das Zinc-System: ein sparsamer Sport-Akzent,
   Energie kommt aus der Bewegung. Inhalt ist ohne JS sichtbar;
   Bewegung ist an html.motion gekoppelt und respektiert
   prefers-reduced-motion.
   ============================================================ */

:root {
    --lm-accent: #15803d;
    --lm-accent-strong: #16a34a;
    --lm-accent-soft: color-mix(in srgb, var(--lm-accent) 16%, transparent);
    --lm-ball: #9a4f28;
    --lm-ball-edge: #5c2f16;
    --lm-ball-line: #f6ecd8;
    --lm-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --lm-accent: #4ade80;
        --lm-accent-strong: #86efac;
        --lm-accent-soft: color-mix(in srgb, var(--lm-accent) 20%, transparent);
    }
}

/* Browser-Surfaces mitnehmen (Selektion, Scrollbar, Fokus, Scroll) */
html {
    scroll-behavior: smooth;
    scrollbar-color: var(--lm-lines) transparent;
}

::selection {
    background: color-mix(in srgb, var(--lm-accent) 32%, transparent);
    color: var(--lm-text);
}

::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--lm-lines) 90%, var(--lm-accent));
    border-radius: 999px;
    border: 3px solid var(--lm-background);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--lm-accent);
}

:focus-visible {
    outline: 2px solid var(--lm-accent);
    outline-offset: 2px;
    border-radius: 3px;
}

/* ---- Hero: Flag-Football-Feld-Motiv ---- */

.hero {
    position: relative;
    overflow: hidden;
    padding: 6rem 0 4.5rem 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-field {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-field-lines {
    position: absolute;
    inset: -20% -10%;
    background-image: repeating-linear-gradient(
        105deg,
        color-mix(in srgb, var(--lm-accent) 26%, transparent) 0 2px,
        transparent 2px 64px);
    -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 72%);
    mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 72%);
    opacity: 0.5;
    animation: fieldDrift 9s linear infinite;
    will-change: background-position;
}

.hero-field-fade {
    position: absolute;
    inset: 0;
    background: radial-gradient(80% 60% at 50% -10%, var(--lm-accent-soft), transparent 70%);
}

@keyframes fieldDrift {
    to { background-position: -64px 0; }
}

.hero-ball {
    position: absolute;
    top: 12%;
    right: 8%;
    width: clamp(64px, 9vw, 108px);
    height: auto;
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.35));
    transform: rotate(-18deg);
}

html.motion .hero-ball {
    animation: ballArc 1100ms var(--lm-ease-out) both;
}

@keyframes ballArc {
    0% { opacity: 0; transform: translate(-38vw, -46vh) rotate(-220deg) scale(0.7); }
    60% { opacity: 1; }
    100% { opacity: 1; transform: translate(0, 0) rotate(-18deg) scale(1); }
}

@media (max-width: 46rem) {
    .hero-ball { top: 4%; right: 4%; opacity: 0.9; }
}

/* Headline: Wort-für-Wort-Einstieg als Focal Moment */
.hero h1 {
    font-size: clamp(2.2rem, 6vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    text-wrap: balance;
    margin: 0 0 1.1rem 0;
}

.hero h1 span {
    display: inline-block;
}

.hero-accent {
    color: var(--lm-accent);
    position: relative;
}

.hero-accent::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.06em;
    height: 0.14em;
    border-radius: 999px;
    background: var(--lm-accent);
    opacity: 0.28;
    transform: scaleX(0);
    transform-origin: left;
}

html.motion .hero h1.is-visible .hero-accent::after {
    animation: underlineIn 700ms var(--lm-ease-out) 620ms both;
}

@keyframes underlineIn {
    to { transform: scaleX(1); }
}

.hero .lead {
    font-size: 1.175rem;
    max-width: 38rem;
}

/* Hero-Differenzierer (kein Metrik-Template: Label + Nutzen) */
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem;
    margin: 2.5rem 0 0 0;
    padding: 0;
}

.hero-stats div {
    flex: 1 1 12rem;
    min-width: 11rem;
    border-top: 2px solid var(--lm-accent);
    padding-top: 0.7rem;
}

.hero-stats dt {
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--lm-text);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.hero-stats dd {
    margin: 0.2rem 0 0 0;
    color: var(--lm-text-muted);
    font-size: 0.95rem;
    line-height: 1.4;
}

/* ---- Reveal-System (an html.motion gekoppelt) ---- */
html.motion [data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.7s var(--lm-ease-out),
        transform 0.7s var(--lm-ease-out);
    transition-delay: calc(var(--i, 0) * 70ms);
}

html.motion [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

/* Headline-Wörter staffeln, sobald die H1 sichtbar ist */
html.motion .hero h1[data-reveal] span {
    opacity: 0;
    transform: translateY(0.7em) rotate(3deg);
    transition:
        opacity 0.6s var(--lm-ease-out),
        transform 0.6s var(--lm-ease-out);
}

html.motion .hero h1[data-reveal] {
    opacity: 1;
    transform: none;
}

html.motion .hero h1[data-reveal].is-visible span {
    opacity: 1;
    transform: none;
}

html.motion .hero h1[data-reveal].is-visible span:nth-child(1) { transition-delay: 60ms; }
html.motion .hero h1[data-reveal].is-visible span:nth-child(2) { transition-delay: 180ms; }
html.motion .hero h1[data-reveal].is-visible span:nth-child(3) { transition-delay: 320ms; }

/* ---- Feature-Karten: Hover + Akzent-Karte ---- */
.feature-card {
    position: relative;
    transition:
        transform 0.28s var(--lm-ease-out),
        border-color 0.28s ease,
        box-shadow 0.28s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: color-mix(in srgb, var(--lm-accent) 55%, var(--lm-lines));
    box-shadow: 0 16px 30px -18px color-mix(in srgb, var(--lm-accent) 65%, #000);
}

.feature-icon {
    transition: background 0.28s ease, color 0.28s ease, transform 0.28s var(--lm-ease-out);
}

.feature-card:hover .feature-icon {
    background: var(--lm-accent);
    color: #06210f;
    transform: rotate(-6deg) scale(1.05);
}

.feature-card-accent {
    border-color: color-mix(in srgb, var(--lm-accent) 45%, var(--lm-lines));
    background:
        radial-gradient(120% 130% at 100% 0%, var(--lm-accent-soft), transparent 55%),
        var(--lm-surface);
}

.feature-card-accent .feature-icon {
    background: var(--lm-accent);
    color: #06210f;
}

/* ---- Steps: Nummern-Ring als Akzent, Pop beim Reveal ---- */
.steps { position: relative; }

.step::before {
    background: color-mix(in srgb, var(--lm-accent) 16%, var(--lm-surface));
    color: var(--lm-accent);
    border: 2px solid var(--lm-accent);
    transition: transform 0.4s var(--lm-ease-out);
}

html.motion .step[data-reveal]::before { transform: scale(0.4); }
html.motion .step[data-reveal].is-visible::before {
    transform: scale(1);
    transition-delay: calc(var(--i, 0) * 70ms + 120ms);
}

/* ---- CTA: Feld-Motiv im Hintergrund ---- */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-field { z-index: 0; }
.cta-field .hero-field-lines { opacity: 0.32; animation-duration: 12s; }
.cta-content { position: relative; z-index: 1; }

/* ---- Primär-Button: Akzent-Sheen beim Hover ---- */
.button-primary {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.button-primary::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(120deg, transparent 30%, color-mix(in srgb, var(--lm-accent) 60%, transparent) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.6s var(--lm-ease-out);
}

.button-primary:hover::after { transform: translateX(120%); }

.button {
    transition: transform 0.18s var(--lm-ease-out), background 0.2s ease, border-color 0.2s ease;
}

.button:active { transform: translateY(1px) scale(0.99); }

/* ---- Reduced Motion: Bewegung raus, Bedeutung bleibt ---- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .hero-field-lines,
    html.motion .hero-ball {
        animation: none !important;
    }

    html.motion [data-reveal],
    html.motion .hero h1[data-reveal] span,
    html.motion .step[data-reveal]::before {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .hero-accent::after { transform: scaleX(1); }

    .feature-card:hover { transform: none; }
    .button-primary::after { display: none; }
}

/* Football-Farben per CSS (var() ist als SVG-Attribut ungültig) + Größe absichern */
.hero-ball {
    display: block;
    max-width: 112px;
}
.hero-ball .ball-body {
    fill: var(--lm-ball);
    stroke: var(--lm-ball-edge);
    stroke-width: 2;
}
.hero-ball .ball-lace {
    stroke: var(--lm-ball-line);
    stroke-width: 1.7;
}
