/*
 * Turnen-App Webseite – App-nahes Marketinglayout
 * Basis: Demo-App UI-Variablen aus app.css / typography.css / views.css
 */

:root {
    --site-width: 1180px;
    --site-green: #3f9b0b;
    --site-green-dark: #2f7608;
    --site-blue: #0048b6;
    --site-blue-dark: #00388f;
    --site-orange: #d87900;
    --site-purple: #7c3aed;
    --site-danger: #dc2626;
    --site-bg: #eef3fb;
    --site-bg-soft: #f4f7fb;
    --site-card: rgba(255, 255, 255, 0.92);
    --site-line: #c8d6ec;
    --site-line-soft: #d8e0ec;
    --site-text: #182033;
    --site-muted: #637083;
    --site-shadow: 0 18px 45px rgba(20, 37, 63, 0.10);
    --site-shadow-soft: 0 8px 22px rgba(20, 37, 63, 0.07);
    --site-radius: 1.1rem;
    --site-radius-lg: 1.55rem;
    --site-radius-pill: 999px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    font-family: var(--font-main, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    color: var(--site-text);
    background:
        radial-gradient(circle at 0% 0%, rgba(37, 87, 167, 0.13), transparent 28rem),
        radial-gradient(circle at 90% 8%, rgba(63, 155, 11, 0.10), transparent 24rem),
        linear-gradient(135deg, #f7faff 0%, var(--site-bg) 62%, #edf3fb 100%);
    font-size: var(--type-base, 0.82rem);
    line-height: 1.45;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
    background-size: 58px 58px;
    opacity: 0.28;
}

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

a {
    color: inherit;
}

p,
li {
    color: var(--site-muted);
}

p {
    margin-top: 0;
}

h1,
h2,
h3,
h4 {
    color: var(--site-text);
    margin-top: 0;
    line-height: 1.12;
    letter-spacing: -0.025em;
}

h1 {
    max-width: 900px;
    font-size: clamp(2.05rem, 6vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

h2 {
    font-size: clamp(1.55rem, 3vw, 2.45rem);
}

h3 {
    font-size: 1.05rem;
}

.container {
    width: min(var(--site-width), calc(100% - 2rem));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0.5rem;
    z-index: 100;
    padding: 0.65rem 0.85rem;
    border-radius: 0.75rem;
    background: var(--site-text);
    color: #ffffff;
}

.skip-link:focus {
    left: 0.5rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(216, 224, 236, 0.9);
    background: rgba(244, 247, 251, 0.86);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--site-text);
    text-decoration: none;
}

.brand-mark {
    width: 3rem;
    height: 3rem;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(216, 224, 236, 0.9);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 26px rgba(20, 37, 63, 0.08);
    overflow: hidden;
    color: var(--site-green);
    font-weight: 900;
}

.brand-mark img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.brand-text {
    display: grid;
    gap: 0.1rem;
}

.brand-text strong {
    font-size: 0.94rem;
    line-height: 1.15;
}

.brand-text small {
    color: var(--site-muted);
    font-size: 0.76rem;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
}

.main-nav a {
    padding: 0.65rem 0.78rem;
    border-radius: var(--site-radius-pill);
    color: #48556a;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--site-green-dark);
    background: rgba(63, 155, 11, 0.10);
}

.main-nav .nav-demo,
.main-nav a:last-child {
    color: #ffffff;
    background: var(--site-blue);
}

.main-nav .nav-demo:hover,
.main-nav a:last-child:hover {
    color: #ffffff;
    background: var(--site-blue-dark);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    min-height: 2.65rem;
    border: 1px solid var(--site-line-soft);
    border-radius: var(--site-radius-pill);
    background: #ffffff;
    color: var(--site-text);
    font-weight: 800;
}

.site-main {
    min-height: 60vh;
}

.section,
.hero {
    padding: clamp(2.4rem, 6vw, 5.5rem) 0;
}

.section-compact {
    padding: clamp(1.4rem, 3vw, 2.7rem) 0;
}

.section-soft {
    background: rgba(255, 255, 255, 0.42);
    border-block: 1px solid rgba(216, 224, 236, 0.62);
}

.hero-grid,
.grid {
    display: grid;
    gap: 1rem;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(300px, 0.86fr);
    align-items: center;
    gap: clamp(1.4rem, 5vw, 4rem);
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hero-copy {
    display: grid;
    gap: 1rem;
}

.hero .lead {
    max-width: 760px;
}

.lead {
    color: #3d4b62;
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.58;
}

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

.eyebrow,
.phase,
.badge-label {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    color: #526174;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.11em;
}

.eyebrow::before {
    content: "";
    width: 0.46rem;
    height: 0.46rem;
    border-radius: 999px;
    background: var(--site-green);
    box-shadow: 0 0 0 0.32rem rgba(63, 155, 11, 0.12);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    margin-top: 0.6rem;
}

.btn,
.button,
button.btn {
    min-height: 2.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.78rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.8rem;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 850;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover,
.button:hover {
    transform: translateY(-1px);
}

.btn-primary,
.button-primary {
    color: #ffffff;
    background: var(--site-blue);
    box-shadow: 0 10px 24px rgba(0, 72, 182, 0.20);
}

.btn-primary:hover,
.button-primary:hover {
    background: var(--site-blue-dark);
}

.btn-secondary,
.button-secondary {
    color: var(--site-green-dark);
    background: #ffffff;
    border-color: var(--site-line-soft);
}

.btn-green,
.button-green {
    color: var(--site-green-dark);
    background: rgba(63, 155, 11, 0.12);
    border-color: rgba(63, 155, 11, 0.22);
}

.btn-ghost {
    color: var(--site-text);
    background: rgba(255, 255, 255, 0.68);
    border-color: var(--site-line-soft);
}

.hero-device {
    position: relative;
    isolation: isolate;
}

.hero-device::before,
.hero-device::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 999px;
    filter: blur(5px);
}

.hero-device::before {
    inset: 4% auto auto -7%;
    width: 12rem;
    height: 12rem;
    background: rgba(63, 155, 11, 0.12);
}

.hero-device::after {
    right: -3%;
    bottom: 6%;
    width: 13rem;
    height: 13rem;
    background: rgba(37, 87, 167, 0.12);
}

.hero-device img,
.screenshot img {
    border-radius: 1.45rem;
    box-shadow: var(--site-shadow);
}

.hero-device img {
    width: min(420px, 100%);
    margin-inline: auto;
}

.app-panel,
.card,
.visual-card,
.stat,
.screenshot,
.timeline-card,
.pricing-card,
.notice,
.form-panel,
.admin-panel,
.admin-card {
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-lg);
    background: var(--site-card);
    box-shadow: var(--site-shadow-soft);
}

.card,
.visual-card,
.form-panel,
.admin-card {
    padding: 1rem;
}

.card h2,
.card h3,
.pricing-card h2,
.screenshot strong {
    margin-bottom: 0.35rem;
}

.card p:last-child,
.pricing-card p:last-child,
.screenshot p:last-child {
    margin-bottom: 0;
}

.app-panel {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255,255,255,0.78));
}

.panel-kicker {
    margin-bottom: 0.3rem;
    color: #526174;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.panel-title,
.green-title {
    color: var(--site-green-dark);
}

.stat {
    min-height: 7rem;
    display: grid;
    align-content: center;
    gap: 0.25rem;
    padding: 1rem;
}

.stat strong {
    color: var(--site-green-dark);
    font-size: clamp(1.2rem, 2.4vw, 1.85rem);
    line-height: 1;
}

.stat span {
    color: var(--site-text);
    font-weight: 800;
}

.feature-icon,
.card-icon {
    width: 2.6rem;
    height: 2.6rem;
    display: inline-grid;
    place-items: center;
    margin-bottom: 0.55rem;
    border-radius: 0.82rem;
    color: #ffffff;
    background: var(--site-blue);
    font-weight: 900;
}

.feature-icon.green,
.card-icon.green {
    background: var(--site-green);
}

.feature-icon.orange,
.card-icon.orange {
    background: var(--site-orange);
}

.feature-icon.purple,
.card-icon.purple {
    background: var(--site-purple);
}

.pill,
.status-pill {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.25rem;
    padding: 0.28rem 0.55rem;
    border-radius: var(--site-radius-pill);
    font-size: 0.7rem;
    font-weight: 900;
    line-height: 1.1;
}

.pill.done,
.pill.success {
    color: var(--site-green-dark);
    background: rgba(63, 155, 11, 0.13);
}

.pill.progress {
    color: #9a5600;
    background: rgba(216, 121, 0, 0.14);
}

.pill.planned {
    color: #4d5566;
    background: rgba(99, 112, 131, 0.13);
}

.clean-list {
    display: grid;
    gap: 0.45rem;
    margin: 0.8rem 0 0;
    padding: 0;
    list-style: none;
}

.clean-list li {
    position: relative;
    padding-left: 1.25rem;
}

.clean-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--site-green-dark);
    font-weight: 900;
}

.section-head {
    max-width: 850px;
    margin-bottom: 1.2rem;
}

.section-head.centered {
    margin-inline: auto;
    text-align: center;
}

.section-head.centered .eyebrow {
    margin-inline: auto;
}

.screens {
    align-items: start;
}

.screenshot {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.78);
}

.screenshot img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 1.35rem 1.35rem 0 0;
    box-shadow: none;
}

.screenshot figcaption {
    padding: 0.95rem 1rem 1.05rem;
}

.screenshot p {
    margin: 0.25rem 0 0;
}

.timeline {
    position: relative;
    display: grid;
    gap: 1rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0.72rem;
    top: 0.6rem;
    bottom: 0.6rem;
    width: 2px;
    background: linear-gradient(var(--site-green), rgba(63, 155, 11, 0.08));
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 1.55rem minmax(0, 1fr);
    gap: 1rem;
}

.timeline-dot {
    width: 1.45rem;
    height: 1.45rem;
    margin-top: 0.85rem;
    border: 0.32rem solid rgba(63, 155, 11, 0.14);
    border-radius: 999px;
    background: var(--site-green);
    box-shadow: 0 0 0 0.2rem #ffffff;
}

.timeline-card {
    padding: 1rem;
}

.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 1rem;
}

.pricing-card.is-featured {
    border-color: rgba(63, 155, 11, 0.42);
    background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(239, 255, 231, 0.82));
}

.price {
    margin: 0.4rem 0 0.7rem;
    color: var(--site-green-dark);
    font-size: 1.45rem;
    font-weight: 950;
    line-height: 1.1;
}

.module-map {
    display: grid;
    gap: 0.8rem;
}

.module-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--site-line-soft);
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.72);
}

.module-letter {
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    border-radius: 0.75rem;
    color: #ffffff;
    background: var(--site-blue);
    font-weight: 950;
}

.module-row:nth-child(2) .module-letter { background: #087f7f; }
.module-row:nth-child(3) .module-letter { background: #d87900; }
.module-row:nth-child(4) .module-letter { background: #7c3aed; }
.module-row:nth-child(5) .module-letter { background: #0048b6; }

.module-row strong {
    display: block;
}

.module-row small {
    color: var(--site-muted);
}

.founder-note {
    border-color: rgba(216, 121, 0, 0.34);
    background: linear-gradient(135deg, rgba(255, 248, 225, 0.86), rgba(255, 255, 255, 0.94));
}

.lifetime-note {
    border-color: rgba(63, 155, 11, 0.42);
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.92), rgba(255, 255, 255, 0.96));
}

.form {
    display: grid;
    gap: 0.8rem;
}

.field {
    display: grid;
    gap: 0.35rem;
}

.field label {
    color: var(--site-text);
    font-weight: 850;
}

.input,
.select,
.textarea {
    width: 100%;
    min-height: 2.65rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--site-line);
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.92);
    color: var(--site-text);
    font: inherit;
}

.textarea {
    min-height: 8rem;
    resize: vertical;
}

.notice {
    padding: 0.85rem 1rem;
    color: var(--site-green-dark);
    background: rgba(63, 155, 11, 0.10);
}

.notice.error {
    color: #991b1b;
    border-color: rgba(220, 38, 38, 0.25);
    background: rgba(254, 226, 226, 0.86);
}

.hint {
    padding: 0.85rem 1rem;
    border: 1px solid rgba(216, 121, 0, 0.26);
    border-radius: 0.9rem;
    color: #7a4300;
    background: rgba(255, 248, 225, 0.72);
}

.site-footer {
    border-top: 1px solid rgba(216, 224, 236, 0.9);
    background: rgba(255, 255, 255, 0.56);
    padding: 2.4rem 0 1.1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.45fr repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.footer-grid h3 {
    margin-bottom: 0.55rem;
    font-size: 0.86rem;
}

.footer-grid a {
    display: block;
    margin: 0.28rem 0;
    color: var(--site-muted);
    text-decoration: none;
}

.footer-grid a:hover {
    color: var(--site-green-dark);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.8rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(216, 224, 236, 0.78);
    color: var(--site-muted);
    font-size: 0.76rem;
}

.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.38s ease, transform 0.38s ease;
}

.reveal.is-visible,
.no-js .reveal {
    opacity: 1;
    transform: none;
}

/* Adminbereich der Webseite im App-Stil */
.admin-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 87, 167, 0.15), transparent 28rem),
        linear-gradient(135deg, #f7faff, #eef3fb);
}

.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 16rem minmax(0, 1fr);
}

.admin-side {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    border-right: 1px solid var(--site-line-soft);
    background: rgba(255, 255, 255, 0.72);
}

.admin-side a {
    padding: 0.7rem 0.8rem;
    border-radius: 0.75rem;
    color: #48556a;
    font-weight: 800;
    text-decoration: none;
}

.admin-side a:hover,
.admin-side a.is-active {
    color: var(--site-green-dark);
    background: rgba(63, 155, 11, 0.10);
}

.admin-side hr {
    width: 100%;
    border: 0;
    border-top: 1px solid var(--site-line-soft) !important;
}

.admin-main {
    min-width: 0;
    padding: 1rem;
}

.admin-panel {
    max-width: 1100px;
    margin-inline: auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.88);
}

.admin-panel table {
    width: 100%;
    border-collapse: collapse;
}

.admin-panel th,
.admin-panel td {
    padding: 0.65rem;
    border-bottom: 1px solid var(--site-line-soft);
    text-align: left;
}

@media (max-width: 980px) {
    .hero-grid,
    .grid-4,
    .grid-3,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        align-items: start;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 1rem, var(--site-width));
    }

    .nav-wrap {
        min-height: 4rem;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        padding: 0 0.9rem;
    }

    .main-nav {
        position: absolute;
        left: 0.5rem;
        right: 0.5rem;
        top: calc(100% + 0.4rem);
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 0.55rem;
        border: 1px solid var(--site-line-soft);
        border-radius: 1rem;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: var(--site-shadow);
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        border-radius: 0.75rem;
    }

    .hero,
    .section {
        padding: 2rem 0;
    }

    .hero-grid,
    .grid,
    .grid-4,
    .grid-3,
    .grid-2,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: clamp(2rem, 11vw, 3.1rem);
    }

    .actions .btn {
        width: 100%;
    }

    .stat {
        min-height: auto;
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-side {
        position: static;
        border-right: 0;
        border-bottom: 1px solid var(--site-line-soft);
    }

    .footer-bottom {
        flex-direction: column;
    }
}

/*
 * Fix 19.8.5.5.1 – Webseite darf nicht die Desktop-Sidebar-Reserve
 * aus dem App-CSS erben. Die App selbst braucht auf Desktop links Platz
 * für ihre feste Navigation; die öffentliche Webseite nicht.
 */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body.site-public,
body.admin-shell {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.site-public .site-header,
body.site-public .site-main,
body.site-public .site-footer {
    width: 100%;
}

body.site-public .container {
    width: min(1320px, calc(100% - clamp(1rem, 5vw, 4rem)));
    max-width: none;
}

@media (min-width: 1025px),
       (min-width: 761px) and (max-width: 1024px) and (orientation: landscape) {
    body.site-public,
    body.admin-shell {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

@media (min-width: 1280px) {
    .hero-grid {
        grid-template-columns: minmax(0, 0.98fr) minmax(360px, 0.72fr);
        gap: clamp(2rem, 4vw, 4.2rem);
    }
}

/* Neues Turnen-App-Logo (Konzept 4) */
.brand--logo {
    gap: 0.75rem;
}

.brand-logo-image {
    display: block;
    width: clamp(9.8rem, 16vw, 12.8rem);
    height: auto;
    max-height: 3.5rem;
    object-fit: contain;
}

.brand-text--subtitle {
    align-self: center;
}

.brand-text--subtitle small {
    display: block;
    max-width: 9.5rem;
    line-height: 1.25;
}

.footer-brand {
    align-items: flex-start;
    margin-bottom: 1rem;
}

.footer-brand .brand-logo-image {
    width: clamp(10rem, 18vw, 14rem);
    max-height: 4.1rem;
}

@media (max-width: 760px) {
    .brand--logo {
        gap: 0.55rem;
    }

    .brand-logo-image {
        width: clamp(8.4rem, 38vw, 10.6rem);
        max-height: 3rem;
    }

    .brand-text--subtitle small {
        display: none;
    }
}

@media (max-width: 420px) {
    .brand-logo-image {
        width: 8.7rem;
        max-height: 2.8rem;
    }
}
