/* =========================================================
   懂学链 — styles.css (light blue/white)
   Scrollable landing: color hero + glass card sections
   ========================================================= */

@font-face {
    font-family: "Geist Pixel Circle";
    src: url("fonts/GeistPixel-Circle.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

:root {
    --bg: #f6f9ff;
    --bg-2: #eef4ff;
    --panel: #ffffff;
    --panel-2: #f7fbff;
    --border: rgba(37, 99, 235, 0.12);
    --border-hi: rgba(37, 99, 235, 0.42);
    --primary: #2563eb;
    --primary-2: #1d4ed8;
    --accent: #c9a84c;
    --text: #0f172a;
    --muted: #5b6b83;
    --muted-2: #94a3b8;
    --glow: rgba(37, 99, 235, 0.16);
    --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
    --font-display: "BubbledotICG-FinePos", "Geist Pixel Circle", monospace;
    --radius: 16px;
    --shadow: 0 14px 34px rgba(37, 99, 235, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

/* Each full-bleed section snaps to the viewport */
section {
    scroll-snap-align: start;
}

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

.container {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Nav ===== */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: background .35s, border-color .35s, backdrop-filter .35s, box-shadow .35s;
    border-bottom: 1px solid transparent;
}

#nav.scrolled {
    background: rgba(255, 255, 255, 0.72);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
    box-shadow: 0 4px 24px rgba(37, 99, 235, 0.06);
}

.nav-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: var(--text);
}

.brand img {
    width: 30px;
    height: 30px;
    border-radius: 7px;
}

.brand b {
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--primary-2);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: .92rem;
    font-weight: 500;
    transition: color .2s;
}

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

.nav-actions {
    display: flex;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    border-radius: 10px;
    transition: all .2s;
    letter-spacing: .02em;
}

.btn-sm {
    padding: 9px 20px;
    font-size: .85rem;
}

.btn-lg {
    padding: 15px 38px;
    font-size: 1.02rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
    color: #fff;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.34);
}

/* ===== Mouse glow (follows cursor) ===== */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.13), rgba(37, 99, 235, 0.05) 42%, transparent 72%);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity .4s ease;
    will-change: transform;
}

@media (hover: none) {
    .cursor-glow {
        display: none;
    }
}

/* ===== Hero ===== */
.hero {
    position: relative;
    height: 100vh;
    height: 100dvh;
    min-height: 620px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(1100px 560px at 80% -8%, rgba(37, 99, 235, 0.12), transparent 60%),
        radial-gradient(880px 480px at -8% 28%, rgba(37, 99, 235, 0.08), transparent 55%),
        var(--bg);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 940px;
    padding: 0 24px;
}

/* Trust row */
.trust {
    --trust-size: clamp(34px, 4.4vw, 42px);
    display: inline-flex;
    align-items: center;
    margin-bottom: clamp(18px, 2.6vh, 28px);
}

.avatar {
    width: var(--trust-size);
    height: var(--trust-size);
    border-radius: 50%;
    background: var(--bg-2);
    border: 1px solid var(--border);
    padding: 5px;
    display: grid;
    place-items: center;
    position: relative;
    box-shadow: var(--shadow);
    transition: transform .35s ease;
}

.avatar::before {
    content: "";
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #fff;
}

.avatar i {
    position: absolute;
    font-size: calc(var(--trust-size) * 0.34);
    color: #111;
    z-index: 1;
}

.avatar.a1 { z-index: 1; }
.avatar.a2 { z-index: 2; margin-left: calc(var(--trust-size) * -0.42); }
.avatar.a3 { z-index: 4; margin-left: calc(var(--trust-size) * -0.42); }
.avatar.a1:hover { transform: translateY(-2px); }
.avatar.a2:hover { transform: translateY(-4px); }
.avatar.a3:hover { transform: translateY(-2px); }

.trust-pill {
    margin-left: calc(var(--trust-size) * -0.42);
    height: var(--trust-size);
    padding-left: calc(var(--trust-size) * 0.58);
    padding-right: 20px;
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-weight: 500;
    font-size: clamp(12px, 1.4vw, 13.5px);
    white-space: nowrap;
}

/* Headline */
.headline {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text);
    font-size: clamp(34px, 7vw, 96px);
    letter-spacing: -0.04em;
    line-height: 1.12;
    white-space: nowrap;
}

.headline.anim {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
}

.headline .line {
    display: block;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(14px);
    animation: headlineFade .85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.headline .l1 { animation-delay: 0.12s; }
.headline .l2 { animation-delay: 0.3s; }
.headline .line.accent { color: var(--primary); }

.subhead {
    max-width: min(560px, 94%);
    margin: clamp(18px, 3vh, 28px) auto 0;
    font-size: clamp(15px, 1.7vw, 18px);
    color: var(--muted);
    line-height: 1.6;
}

.cta-row {
    margin-top: clamp(22px, 3.5vh, 34px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: clamp(14px, 1.5vw, 15px);
    padding: clamp(12px, 1.7vh, 14px) clamp(24px, 3vw, 30px);
    border-radius: 999px;
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}

.cta-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.28);
}

.cta-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.36);
}

.cta-ghost {
    color: var(--primary);
    background: #fff;
    border: 1px solid var(--border);
}

.cta-ghost:hover {
    transform: translateY(-2px) scale(1.02);
    background: var(--panel-2);
    border-color: var(--border-hi);
}

/* Scroll hint */
.scroll-hint {
    margin-top: clamp(26px, 5vh, 46px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    color: var(--muted-2);
    font-size: .76rem;
    letter-spacing: .04em;
}

.mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--muted-2);
    border-radius: 13px;
    position: relative;
}

.wheel {
    width: 3px;
    height: 6px;
    background: var(--primary);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: wheel 1.6s ease-in-out infinite;
}

@keyframes wheel {
    0% { opacity: 1; top: 6px; }
    100% { opacity: 0; top: 18px; }
}

/* ===== Below-the-fold ===== */
.content {
    position: relative;
    z-index: 2;
    background: var(--bg);
}

.block {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    padding: 90px 0;
    z-index: 2;
}

.block .container {
    width: 100%;
}

.sec-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 56px;
}

.sec-head h2 {
    font-size: clamp(1.7rem, 3.4vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -.01em;
    margin-bottom: 14px;
    color: var(--text);
}

.sec-head p {
    color: var(--muted);
    font-size: 1rem;
}

.sec-tag {
    display: inline-block;
    color: var(--primary);
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 14px;
}

.flow-line {
    width: 64px;
    height: 3px;
    margin: 0 auto 18px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    background-size: 200% 100%;
    animation: flow 3s linear infinite;
}

@keyframes flow {
    0% { background-position: 200% 0; }
    100% { background-position: 0 0; }
}

/* Glass material (light) */
.glass {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.stat-card {
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    transition: transform .25s, border-color .25s, box-shadow .25s;
}

.stat-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hi);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.12);
}

.stat-card .symbol {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 32px);
    color: var(--primary);
    line-height: 1;
}

.stat-card .value {
    font-size: clamp(20px, 2.4vw, 28px);
    letter-spacing: -0.025em;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--text);
}

.stat-card .label {
    color: var(--muted);
    font-size: clamp(11.5px, 1.2vw, 12.5px);
}

/* Features */
.feat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.feat-card {
    position: relative;
    overflow: hidden;
    padding: 20px 20px;
    transition: transform .25s, border-color .25s, box-shadow .25s;
}

.feat-card::after {
    content: "";
    position: absolute;
    top: -60%;
    left: -40%;
    width: 70%;
    height: 180%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.12), transparent);
    transform: rotate(20deg);
    transition: left .6s ease;
}

.feat-card:hover::after {
    left: 160%;
}

.feat-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-hi);
    box-shadow: 0 24px 44px rgba(37, 99, 235, 0.12);
}

.feat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(37, 99, 235, 0.04));
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.feat-icon svg {
    width: 26px;
    height: 26px;
    color: var(--primary);
}

.feat-card h3 {
    font-size: 1.02rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.feat-card p {
    color: var(--muted);
    font-size: .85rem;
    line-height: 1.5;
}

/* How it works */
.flow-panel {
    padding: 44px 40px;
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 24px;
    align-items: center;
}

.flow-step {
    text-align: center;
}

.flow-step .icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(37, 99, 235, 0.03));
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.flow-step .icon svg {
    width: 30px;
    height: 30px;
    color: var(--primary);
}

.flow-step h4 {
    font-size: .98rem;
    margin-bottom: 6px;
    color: var(--text);
}

.flow-step p {
    color: var(--muted);
    font-size: .84rem;
    max-width: 180px;
    margin: 0 auto;
}

.flow-arrow {
    color: var(--muted-2);
    display: flex;
    align-items: center;
}

@keyframes dashmove {
    to { stroke-dashoffset: -20; }
}

.flow-arrow svg {
    width: 40px;
    height: 14px;
    stroke-dasharray: 6 4;
    animation: dashmove 1s linear infinite;
}

.flow-note {
    margin-top: 28px;
    text-align: center;
    color: var(--muted);
    font-size: .86rem;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: .72rem;
    font-weight: 600;
}

.badge-green { background: rgba(22, 163, 74, 0.10); color: #15803d; }
.badge-red { background: rgba(239, 68, 68, 0.10); color: #dc2626; }

/* Schools */
.school-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.school-card {
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.school-card svg {
    width: 30px;
    height: 30px;
    color: var(--accent);
    flex-shrink: 0;
}

.school-card .t {
    font-weight: 600;
    font-size: .92rem;
    color: var(--text);
}

.school-card .s {
    color: var(--muted-2);
    font-size: .78rem;
}

/* CTA — open closing statement */
.cta-block {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 90px 24px;
    overflow: hidden;
    background: var(--bg);
}

.cta-block::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.04) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 100%, #000 20%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 100%, #000 20%, transparent 78%);
    pointer-events: none;
    z-index: 0;
}

/* Bubble cell field (organic aggregation) */
.bubble-field {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 1fr;
    gap: 16px;
    padding: 16px;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.55;
}

.b {
    border-radius: 50%;
    background: #e8f1ff;
    animation: bubble 7s ease-in-out infinite;
}

.b.rr {
    border-radius: 34%;
}

.b:nth-child(3n) {
    background: #f6eed2;
}

.b:nth-child(even) {
    animation-delay: -1.4s;
}

.b:nth-child(3n) {
    animation-delay: -2.6s;
}

.b:nth-child(4n) {
    animation-delay: -3.8s;
}

@keyframes bubble {
    0%,
    100% {
        transform: scale(1) translate(0, 0);
    }

    25% {
        transform: scale(1.08) translate(10px, -8px);
    }

    55% {
        transform: scale(0.94) translate(-10px, 8px);
    }

    78% {
        transform: scale(1.04) translate(6px, 6px);
    }
}

.cta-decor {
    position: absolute;
    border-radius: 22px;
    pointer-events: none;
    box-shadow: var(--shadow);
}

.cta-decor.d1 {
    width: 88px;
    height: 88px;
    top: 20%;
    right: 15%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(37, 99, 235, 0.05));
    border: 1px solid var(--border);
    transform: rotate(18deg);
}

.cta-decor.d2 {
    width: 64px;
    height: 64px;
    bottom: 18%;
    left: 13%;
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.20), rgba(201, 168, 76, 0.05));
    border: 1px solid var(--border);
    border-radius: 18px;
    transform: rotate(-12deg);
}

.cta-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 760px;
}

.cta-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.cb {
    font-size: .82rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid var(--border);
    padding: 7px 15px;
    border-radius: 100px;
}

.cta-inner h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.8vw, 3.4rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 18px;
    color: var(--text);
}

.cta-kicker {
    font-size: .82rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 16px;
}

.cta-inner h2 .grad2 {
    background: linear-gradient(100deg, var(--primary-2), var(--primary) 55%, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.cta-sub {
    max-width: 540px;
    margin: 0 auto 30px;
    color: var(--muted);
    font-size: clamp(.95rem, 1.3vw, 1.05rem);
    line-height: 1.6;
}

/* Bobbin-style dark pill button with arrow */
.btn-dark {
    color: #fff;
    background: #141414;
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.btn-dark:hover {
    transform: translateY(-2px) scale(1.02);
    background: #000;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.btn-dark .arrow {
    font-size: 1.05em;
    line-height: 1;
}

.cta-inner p {
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    color: var(--muted);
    max-width: 560px;
    margin: 0 auto 32px;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.cta-box h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text);
}

.cta-box p {
    color: var(--muted);
    margin-bottom: 28px;
}

.cta-meta {
    margin-top: 20px;
    color: var(--muted-2);
    font-size: .84rem;
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 36px 0;
    text-align: center;
    color: var(--muted-2);
    font-size: .84rem;
    position: relative;
    z-index: 2;
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

/* ===== Reveal on scroll ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal.in {
    opacity: 1;
    transform: none;
}

/* ===== Entrance animations (hero) ===== */
.anim {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
    filter: blur(6px);
    animation: revealHero 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--d, 0s);
}

@keyframes revealHero {
    to {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

@keyframes headlineFade {
    to {
        opacity: 1;
        transform: none;
    }
}

/* CTA row pulse */
.cta-row.anim {
    animation: revealPulse 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--d, 0s);
}

@keyframes revealPulse {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
        filter: blur(6px);
    }

    60% {
        opacity: 1;
        transform: translateY(-2px) scale(1.03);
        filter: blur(0);
    }

    100% {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .stats-grid, .feat-grid, .school-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .flow-panel {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .flow-arrow svg {
        transform: rotate(90deg);
    }

    .nav-links {
        display: none;
    }
}

@media (max-width: 540px) {
    .stats-grid, .feat-grid, .school-grid {
        grid-template-columns: 1fr;
    }

    .headline {
        letter-spacing: -0.06em;
    }

    .block {
        padding: 72px 0;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .anim,
    .headline .line,
    .cta-row.anim {
        animation: none !important;
    }

    .anim,
    .headline .line {
        opacity: 1;
        transform: none;
        filter: none;
    }

    .reveal {
        transition: none;
        opacity: 1;
        transform: none;
    }
}
