/* BrainFeed marketing — Midnight editorial tokens (aligned with mobile app) */

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

:root {
    --bg-main: #10141c;
    --bg-card: #151a23;
    --bg-elevated: #1b212c;
    --bg-reading: #090c15;
    --text-primary: #f5f7fb;
    --text-secondary: #9ba2ae;
    --text-muted: rgba(255, 255, 255, 0.52);
    --text-body: rgba(255, 255, 255, 0.84);
    --action: #3b82f6;
    --action-hover: #2563eb;
    --on-action: #ffffff;
    --border: #2b3340;
    --hairline: rgba(255, 255, 255, 0.07);
    --success: #10b981;
    --font-display: "Newsreader", Georgia, "Times New Roman", serif;
    --font-body: "Inter", system-ui, -apple-system, sans-serif;
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;
    --space-section: clamp(4.5rem, 10vw, 7.5rem);
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --max-width: 1120px;
    --nav-h: 72px;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

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

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    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.85' 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 180px;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* ——— Typography ——— */

.wordmark {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.section-kicker {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2rem, 4.5vw, 2.75rem);
    line-height: 1.15;
    letter-spacing: -0.4px;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.section-lead {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text-secondary);
    max-width: 36rem;
}

/* ——— Layout ——— */

.wrap {
    width: min(100% - 2rem, var(--max-width));
    margin-inline: auto;
}

.section {
    padding: var(--space-section) 0;
    position: relative;
}

/* ——— Buttons / Store CTAs ——— */

.store-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn-store {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 52px;
    padding: 0.7rem 1.15rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    background: linear-gradient(180deg, var(--action) 0%, var(--action-hover) 100%);
    color: var(--on-action);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    transition: background 180ms var(--ease-out), border-color 180ms var(--ease-out),
        transform 180ms var(--ease-out);
}

.btn-store:hover {
    background: var(--action-hover);
    color: var(--on-action);
}

.btn-store:active {
    transform: scale(0.98);
}

.btn-store--ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text-primary);
}

.btn-store--ghost:hover {
    background: var(--bg-elevated);
    border-color: #3a4554;
    color: var(--text-primary);
}

.btn-store svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.btn-store span {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
}

.btn-store small {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.8;
}

.btn-store strong {
    font-size: 0.95rem;
    font-weight: 600;
}

.nav-cta {
    display: none;
    align-items: center;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--action) 0%, var(--action-hover) 100%);
    color: var(--on-action);
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 180ms var(--ease-out);
}

.nav-cta:hover {
    background: var(--action-hover);
    color: var(--on-action);
}

/* ——— Navigation ——— */

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background 220ms var(--ease-out), border-color 220ms var(--ease-out),
        backdrop-filter 220ms var(--ease-out);
}

.site-nav.is-scrolled {
    background: rgba(16, 20, 28, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--hairline);
}

.nav-inner {
    width: min(100% - 2rem, var(--max-width));
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.nav-logo {
    font-size: 1.35rem;
}

.nav-links {
    display: none;
    list-style: none;
    gap: 1.75rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 160ms var(--ease-out);
}

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

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

    .nav-cta {
        display: inline-flex;
    }
}

/* ——— Hero ——— */

.hero {
    min-height: 100svh;
    display: grid;
    align-items: stretch;
    padding-top: var(--nav-h);
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 55% at 70% 40%, rgba(59, 130, 246, 0.08), transparent 60%),
        linear-gradient(180deg, var(--bg-reading) 0%, var(--bg-main) 55%, var(--bg-main) 100%);
}

.hero-grid {
    width: min(100%, var(--max-width) + 4rem);
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: clamp(2rem, 6vw, 4rem) 1rem 0;
    align-items: end;
}

.hero-copy {
    max-width: 34rem;
    padding-bottom: clamp(1rem, 4vw, 3rem);
    z-index: 2;
}

.hero-brand {
    font-size: clamp(2.75rem, 8vw, 4.5rem);
    line-height: 1;
    margin-bottom: 1.25rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.hero-brand.is-enter {
    animation: heroEnter 700ms var(--ease-out) both;
}

.hero h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.75rem, 4.2vw, 2.35rem);
    line-height: 1.2;
    letter-spacing: -0.4px;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.hero h1 .accent {
    color: var(--action);
}

.hero-support {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text-secondary);
    max-width: 30rem;
    margin-bottom: 1.75rem;
}

.hero-copy .store-row.is-enter {
    animation: heroEnter 700ms var(--ease-out) 120ms both;
}

.hero h1.is-enter {
    animation: heroEnter 700ms var(--ease-out) 60ms both;
}

.hero-support.is-enter {
    animation: heroEnter 700ms var(--ease-out) 90ms both;
}

.hero-visual {
    position: relative;
    min-height: min(62vh, 560px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-inline: -1rem;
}

.hero-visual::before {
    content: "";
    position: absolute;
    inset: 10% 5% 0;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(27, 33, 44, 0.9), transparent 70%),
        linear-gradient(180deg, transparent, var(--bg-main));
    z-index: 0;
}

.hero-phone {
    position: relative;
    z-index: 1;
    width: min(78vw, 300px);
    border-radius: 2.35rem;
    overflow: hidden;
    border: 2px solid var(--border);
    background: var(--bg-reading);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 28px 48px rgba(0, 0, 0, 0.55);
    will-change: transform;
    transition: transform 80ms linear;
}

.hero-phone.is-enter {
    animation: phoneEnter 900ms var(--ease-out) 160ms both;
}

.hero-phone img {
    display: block;
    width: 100%;
    height: auto;
}

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

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

@media (min-width: 960px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
        align-items: center;
        min-height: calc(100svh - var(--nav-h));
        padding: 0 1.5rem;
        gap: 1rem;
    }

    .hero-copy {
        padding-bottom: 0;
        padding-left: 0.5rem;
    }

    .hero-visual {
        min-height: calc(100svh - var(--nav-h));
        margin-inline: 0;
        margin-right: -1.5rem;
        justify-content: flex-end;
        align-items: center;
        padding-right: clamp(1rem, 4vw, 3rem);
    }

    .hero-visual::before {
        inset: 0 0 0 20%;
        background:
            linear-gradient(90deg, var(--bg-main) 0%, transparent 28%),
            radial-gradient(ellipse at 60% 45%, rgba(59, 130, 246, 0.07), transparent 55%),
            linear-gradient(180deg, var(--bg-reading), var(--bg-main));
    }

    .hero-phone {
        width: min(34vw, 340px);
    }
}

/* ——— Reveal ——— */

[data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 650ms var(--ease-out), transform 650ms var(--ease-out);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reduce-motion [data-reveal],
.reduce-motion .hero-brand.is-enter,
.reduce-motion .hero h1.is-enter,
.reduce-motion .hero-support.is-enter,
.reduce-motion .hero-copy .store-row.is-enter,
.reduce-motion .hero-phone.is-enter {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
}

/* ——— Factsheets ——— */

.section--feed {
    background: var(--bg-main);
}

.feed-layout {
    display: grid;
    gap: clamp(2rem, 5vw, 3.5rem);
}

@media (min-width: 900px) {
    .feed-layout {
        grid-template-columns: 1.05fr 0.95fr;
        align-items: center;
    }
}

.topic-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.topic-tile {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-xl);
    overflow: hidden;
    isolation: isolate;
}

.topic-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.85) brightness(0.72);
    transform: scale(1.02);
}

.topic-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(9, 12, 21, 0.85) 100%);
}

.topic-tile span {
    position: absolute;
    left: 1rem;
    bottom: 0.9rem;
    z-index: 1;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.feed-points {
    list-style: none;
    margin-top: 1.75rem;
    display: grid;
    gap: 1rem;
}

.feed-points li {
    padding-left: 1.15rem;
    border-left: 2px solid var(--border);
    color: var(--text-body);
    font-size: 1rem;
}

.feed-points strong {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.15rem;
    font-family: var(--font-body);
}

/* ——— BrainBattle ——— */

.section--battle {
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, transparent 42%),
        linear-gradient(180deg, #0d121a 0%, var(--bg-main) 100%);
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
}

.battle-layout {
    display: grid;
    gap: 2.5rem;
}

@media (min-width: 900px) {
    .battle-layout {
        grid-template-columns: 0.9fr 1.1fr;
        align-items: center;
        gap: 4rem;
    }
}

.battle-panel {
    border-radius: var(--radius-xl);
    background: linear-gradient(160deg, var(--bg-elevated), var(--bg-card));
    border: 1px solid var(--hairline);
    padding: clamp(1.5rem, 4vw, 2.25rem);
}

.battle-rounds {
    display: grid;
    gap: 0.85rem;
}

.battle-round {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--hairline);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.battle-round:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.battle-round em {
    font-style: normal;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.battle-round span {
    color: var(--text-muted);
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ——— How it works ——— */

.flow-steps {
    margin-top: 2.5rem;
    display: grid;
    gap: 2rem;
    counter-reset: step;
}

@media (min-width: 800px) {
    .flow-steps {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
}

.flow-step {
    counter-increment: step;
}

.flow-step::before {
    content: counter(step, decimal-leading-zero);
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--action);
    letter-spacing: -0.5px;
    margin-bottom: 0.75rem;
}

.flow-step h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 0.5rem;
}

.flow-step p {
    color: var(--text-secondary);
    font-size: 0.9875rem;
    line-height: 1.65;
}

/* ——— Trust ——— */

.section--trust {
    padding-top: calc(var(--space-section) * 0.65);
    padding-bottom: calc(var(--space-section) * 0.65);
}

.trust-line {
    max-width: 46rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.trust-meta {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 500;
}

/* ——— Closing CTA ——— */

.section--cta {
    text-align: center;
    background:
        radial-gradient(ellipse 70% 80% at 50% 100%, rgba(59, 130, 246, 0.12), transparent 55%),
        var(--bg-main);
    border-top: 1px solid var(--hairline);
}

.section--cta .section-title {
    margin-inline: auto;
}

.section--cta .section-lead {
    margin-inline: auto;
    margin-bottom: 1.75rem;
}

.section--cta .store-row {
    justify-content: center;
}

/* ——— Impressum ——— */

.section--legal {
    background: var(--bg-reading);
    border-top: 1px solid var(--hairline);
    padding-top: calc(var(--space-section) * 0.7);
    padding-bottom: calc(var(--space-section) * 0.7);
}

.impressum-grid {
    margin-top: 2rem;
    display: grid;
    gap: 1.75rem;
}

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

.impressum-grid h3 {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}

.impressum-grid p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
}

.impressum-grid a {
    color: var(--action);
}

.impressum-grid a:hover {
    color: var(--action-hover);
}

/* ——— Footer ——— */

.site-footer {
    border-top: 1px solid var(--hairline);
    background: var(--bg-reading);
    padding: 1.5rem 0 2rem;
}

.footer-inner {
    width: min(100% - 2rem, var(--max-width));
    margin-inline: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

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

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

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

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