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

:root {
    --color-bg:           #06070a;
    --color-bg-card:      #0c0d11;
    --color-bg-hover:     #12131a;
    --color-border:       #1a1c22;
    --color-border-soft:  rgba(255, 255, 255, 0.06);
    --color-accent:       #5865F2;
    --color-accent-light: #7983f5;
    --color-accent-glow:  rgba(88, 101, 242, 0.12);
    --color-text:         #ebebeb;
    --color-text-muted:   #52566a;
    --color-text-sub:     #858aa0;
    --font-main:          'Outfit', system-ui, -apple-system, sans-serif;
    --radius:             20px;
    --radius-sm:          14px;
    --spring:             0.5s cubic-bezier(0.32, 0.72, 0, 1);
    --spring-fast:        0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Grain overlay: fixed, GPU-layer, kein Scroll-Repaint */
.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    opacity: 0.038;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px;
    will-change: transform;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Floating Pill Navbar ─────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    padding: 0.55rem 0.55rem 0.55rem 1.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(6, 7, 10, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    width: max-content;
    max-width: calc(100% - 2rem);
    transition: background var(--spring-fast), border-color var(--spring-fast), box-shadow var(--spring-fast);
}

.navbar.scrolled {
    background: rgba(6, 7, 10, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.navbar-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.025em;
    white-space: nowrap;
}

.navbar-logo .logo-dot {
    width: 7px;
    height: 7px;
    background: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(88, 101, 242, 0.9);
    flex-shrink: 0;
}

.navbar-badge {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent-light);
    background: var(--color-accent-glow);
    border: 1px solid rgba(88, 101, 242, 0.25);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    padding: 0.25rem 0.35rem;
    border-radius: 6px;
    transition: color var(--spring-fast);
    line-height: 1;
}
.lang-btn:hover  { color: var(--color-text); }
.lang-btn.active { color: var(--color-accent); }

.lang-sep {
    color: var(--color-border);
    font-size: 0.7rem;
    user-select: none;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all var(--spring);
    white-space: nowrap;
    font-family: var(--font-main);
    letter-spacing: -0.01em;
}

.btn:active { transform: scale(0.96) !important; }

.btn-primary {
    background: var(--color-accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-accent-light);
    transform: translateY(-3px);
    box-shadow:
        0 16px 40px rgba(88, 101, 242, 0.45),
        0 4px 12px rgba(88, 101, 242, 0.3);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-text-sub);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.825rem;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    padding: 14rem 0 8rem;
    position: relative;
    overflow: hidden;
}

/* Haupt-Glow oben-mitte */
.hero::before {
    content: '';
    position: absolute;
    top: -25%;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 1000px;
    background: radial-gradient(ellipse at center,
        rgba(88, 101, 242, 0.08) 0%,
        rgba(88, 101, 242, 0.03) 40%,
        transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Akzent-Glow unten-rechts */
.hero::after {
    content: '';
    position: absolute;
    bottom: -5%;
    right: -8%;
    width: 700px;
    height: 700px;
    background: radial-gradient(ellipse at center,
        rgba(88, 101, 242, 0.04) 0%,
        transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-accent-light);
    background: rgba(88, 101, 242, 0.08);
    border: 1px solid rgba(88, 101, 242, 0.2);
    padding: 0.38rem 1rem;
    border-radius: 999px;
    margin-bottom: 2.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-eyebrow .dot {
    width: 5px;
    height: 5px;
    background: var(--color-accent);
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

.hero-title {
    font-size: clamp(3.2rem, 9vw, 6.5rem);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 1.0;
    margin-bottom: 1.75rem;
    text-wrap: balance;
}

.hero-title .gradient {
    background: linear-gradient(135deg, #ffffff 15%, rgba(121, 131, 245, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--color-text-sub);
    max-width: 520px;
    margin: 0 auto 3rem;
    line-height: 1.75;
    text-wrap: pretty;
}

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

/* ── Stats ────────────────────────────────────────────────────── */
.stats {
    padding: 5rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--color-border);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.stat-item {
    background: var(--color-bg-card);
    padding: 2.5rem 2rem;
    text-align: center;
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 1;
    background: linear-gradient(135deg, #fff 10%, var(--color-accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-top: 0.6rem;
    letter-spacing: 0.02em;
}

/* ── Features (Bento Grid) ────────────────────────────────────── */
.features {
    padding: 9rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-wrap: balance;
}

.section-title .gradient {
    background: linear-gradient(135deg, #fff 15%, var(--color-accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-sub {
    color: var(--color-text-muted);
    font-size: 1rem;
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.75;
}

/* Bento-Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}

/* Outer Shell (Double-Bezel) */
.feature-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: var(--radius);
    padding: 5px;
    transition: border-color var(--spring), transform var(--spring), box-shadow var(--spring);
}

.feature-card:hover {
    border-color: rgba(88, 101, 242, 0.28);
    transform: translateY(-4px);
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(88, 101, 242, 0.1);
}

/* Inner Core (Double-Bezel) */
.feature-card-inner {
    background: var(--color-bg-card);
    border-radius: calc(var(--radius) - 5px);
    padding: 1.75rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Bento-Layout, asymmetrisch */
.feature-card:nth-child(1) { grid-column: span 7; }
.feature-card:nth-child(2) { grid-column: span 5; }
.feature-card:nth-child(3) { grid-column: span 4; }
.feature-card:nth-child(4) { grid-column: span 4; }
.feature-card:nth-child(5) { grid-column: span 4; }
.feature-card:nth-child(6) { grid-column: span 12; }

/* Icon */
.feature-icon {
    width: 44px;
    height: 44px;
    background: rgba(88, 101, 242, 0.08);
    border: 1px solid rgba(88, 101, 242, 0.18);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--color-accent-light);
    transition: background var(--spring-fast), box-shadow var(--spring-fast), border-color var(--spring-fast);
    flex-shrink: 0;
}

.feature-card:hover .feature-icon {
    background: rgba(88, 101, 242, 0.16);
    border-color: rgba(88, 101, 242, 0.35);
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.2);
}

.feature-icon svg {
    width: 20px;
    height: 20px;
}

.feature-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    letter-spacing: -0.025em;
}

.feature-desc {
    font-size: 0.875rem;
    color: var(--color-text-sub);
    line-height: 1.65;
    flex: 1;
}

/* ── CTA ──────────────────────────────────────────────────────── */
.cta {
    padding: 9rem 0;
}

/* Outer shell (Double-Bezel) */
.cta-box {
    background: rgba(88, 101, 242, 0.04);
    border: 1px solid rgba(88, 101, 242, 0.14);
    border-radius: calc(var(--radius) * 1.4);
    padding: 7px;
    position: relative;
    overflow: hidden;
}

/* Inner core */
.cta-box-inner {
    border-radius: calc(var(--radius) * 1.4 - 7px);
    padding: 5.5rem 2rem;
    text-align: center;
    position: relative;
    background: linear-gradient(160deg, rgba(88, 101, 242, 0.05) 0%, transparent 55%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cta-box-inner::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 450px;
    background: radial-gradient(ellipse,
        rgba(88, 101, 242, 0.1) 0%,
        transparent 65%);
    pointer-events: none;
}

.cta-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    margin-bottom: 1rem;
    position: relative;
    text-wrap: balance;
}

.cta-sub {
    color: var(--color-text-sub);
    margin-bottom: 2.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem;
    line-height: 1.75;
    text-wrap: pretty;
}

/* ── Footer ───────────────────────────────────────────────────── */
.footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--color-border);
}

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

.footer-copy {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

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

.footer-links a {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--spring-fast);
}

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

/* ── Eingeloggter User in Nav ─────────────────────────────────── */
.nav-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-user-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--color-text);
    padding: 0.28rem 0.75rem 0.28rem 0.28rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    transition: all var(--spring-fast);
}

.nav-user-link:hover {
    border-color: rgba(88, 101, 242, 0.4);
    background: rgba(88, 101, 242, 0.08);
}

.nav-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-username {
    font-size: 0.82rem;
    font-weight: 600;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.nav-logout {
    padding: 0.4rem;
    color: var(--color-text-muted);
}

.nav-logout:hover { color: #f04747; }

/* ── Animationen ──────────────────────────────────────────────── */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(32px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up {
    animation: fadeUp 0.75s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}
.fade-up-delay-1 { animation-delay: 0.1s;  opacity: 0; }
.fade-up-delay-2 { animation-delay: 0.22s; opacity: 0; }
.fade-up-delay-3 { animation-delay: 0.38s; opacity: 0; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
    .features-grid { grid-template-columns: repeat(6, 1fr); }
    .feature-card:nth-child(1) { grid-column: span 6; }
    .feature-card:nth-child(2) { grid-column: span 6; }
    .feature-card:nth-child(3) { grid-column: span 3; }
    .feature-card:nth-child(4) { grid-column: span 3; }
    .feature-card:nth-child(5) { grid-column: span 3; }
    .feature-card:nth-child(6) { grid-column: span 3; }
}

@media (max-width: 640px) {
    .features-grid         { grid-template-columns: 1fr; }
    .feature-card:nth-child(n) { grid-column: span 1; }
    .stats-grid            { grid-template-columns: 1fr; background: none; border: none; border-radius: 0; gap: 1px; }
    .stat-item             { border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
    .hero-actions          { flex-direction: column; align-items: stretch; }
    .btn                   { justify-content: center; }
    .footer-inner          { flex-direction: column; text-align: center; }
    .navbar                { padding: 0.5rem 0.5rem 0.5rem 1.1rem; }
    .navbar-inner          { gap: 1rem; }
}
