/* Public site. Unslop by Damir Sokolovsky, CC BY 4.0.
   https://github.com/heydamir/unslop
   Direction: calm, exact, a little warm. World: a daylight screen.
   Signature: one finger-tap mark under the homepage headline. */

:root {
    --ink: #111827;
    --body: #4b5565;
    --muted: #6b7487;
    --faint: #6b7487;
    --line: rgba(17, 24, 39, 0.1);
    --soft: #eceff4;
    --bg: #f5f7fa;
    --card: #ffffff;
    --green: #047857;
    --green-dark: #065f46;
    --green-tint: #e7f3ee;
    --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }

body {
    font-family: "Nunito", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    font-weight: 500;
    color: var(--ink);
    background: var(--bg);
}

a { color: inherit; }
img { display: block; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.02em; }

/* ---------- Header ---------- */

.top-wrap {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(245, 247, 250, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.top, .hero, .doors, .block, .closer, .foot-inner, .foot-legal, .legal {
    width: min(var(--max), calc(100% - 40px));
    margin-left: auto;
    margin-right: auto;
}

.top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; padding: 12px 0; }

.logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    gap: 2px;
    white-space: nowrap;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
}
.logo img { width: 40px; height: 33px; }
.logo > span,
.foot-logo > span { white-space: nowrap; }
.logo-dash { color: #6d4dff; }

.top-nav { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-left: auto; }
.top-nav > * { white-space: nowrap; flex-shrink: 0; }
.nav-link { text-decoration: none; padding: 8px 12px; border-radius: 10px; color: var(--muted); }
.nav-link:hover { color: var(--ink); background: var(--soft); }

.lang-btn {
    box-sizing: border-box;
    width: 52px;
    font: inherit;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.2;
    text-align: center;
    border: 1px solid var(--line);
    background: white;
    color: var(--muted);
    border-radius: 10px;
    padding: 7px 0;
    margin-left: 6px;
    cursor: pointer;
}
/* ---------- Buttons ---------- */

.btn {
    font: inherit;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 10px;
    border: 0;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 160ms cubic-bezier(0.22, 1, 0.36, 1), transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}
.btn:active { transform: scale(0.98); }
.btn--small { font-size: 14px; min-height: 36px; padding: 0 16px; border-radius: 8px; }

.btn--green { background: var(--green); color: white; }
.btn--green:hover { background: var(--green-dark); }

.btn--dark { background: var(--ink); color: white; }
.btn--dark:hover { background: #1f2937; }

.btn--line { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn--line:hover { background: var(--soft); }

/* ---------- Hero ---------- */

.hero-band { background: var(--bg); padding-bottom: 8px; }

.hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
    padding: 28px 0 40px;
}

.chip {
    display: block;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

h1 { margin: 0; font-size: clamp(40px, 5vw, 64px); line-height: 1.05; font-weight: 500; letter-spacing: -0.03em; }
.home .hero-copy h1::after {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    margin-top: 16px;
    border-radius: 50%;
    background: var(--ink);
    box-shadow: 0 0 0 6px rgba(17, 24, 39, 0.08);
}

.lede { margin: 20px 0 0; max-width: 36rem; font-size: 18px; line-height: 28px; color: var(--body); font-weight: 400; }
.facts { margin: 18px 0 0; max-width: 520px; font-size: 14px; line-height: 1.6; color: var(--muted); }

/* Hub mock: a quiet stand-in for the student hub */
.hub-mock { justify-self: center; width: min(100%, 340px); }

.hub-card {
    background: var(--card);
    border-radius: 16px;
    border: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
    padding: 20px;
}
.hub-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.hub-coins { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 500; color: var(--ink); }
.hub-coins img { width: 20px; height: 20px; }
.hub-who { display: grid; justify-items: center; gap: 4px; margin: 6px 0 14px; }
.hub-who img { width: 60px; height: 60px; border-radius: 50%; background: var(--soft); }
.hub-who b { font-size: 17px; }

.hub-subjects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile {
    display: flex; justify-content: space-between; align-items: center;
    padding: 11px 12px; border-radius: 12px;
    background: var(--bg); border: 1px solid var(--line);
    font-size: 14px; font-weight: 500;
}
.tile em { font-style: normal; font-size: 12px; color: var(--muted); }
.tile--done { background: var(--green-tint); border-color: transparent; }
.tile--done em { color: var(--green-dark); font-size: 14px; }

.hub-badges {
    margin-top: 12px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 14px; color: var(--muted);
}
.hub-badges div { display: flex; gap: 2px; }
.hub-badges img { width: 40px; height: 40px; }

/* ---------- Doors (role entry) ---------- */

.doors {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding-top: 36px;
}

.door {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 16px;
    min-height: 0;
    padding: 20px 20px 18px;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: none;
    text-decoration: none;
    text-align: left;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.12;
    color: var(--ink);
    cursor: pointer;
}
.door > span { position: relative; z-index: 1; max-width: 8em; padding-right: 8px; }
.door-icon {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    box-shadow: none;
    flex: none;
}
.door::after {
    content: "";
    position: absolute;
    right: 20px;
    bottom: 24px;
    width: 7px;
    height: 7px;
    border-radius: 0;
    border-top: 1.5px solid var(--muted);
    border-right: 1.5px solid var(--muted);
    background: none;
    box-shadow: none;
    transform: rotate(45deg);
}
a.door { transition: background-color 160ms cubic-bezier(0.22, 1, 0.36, 1); }
a.door:hover { background: var(--soft); transform: none; box-shadow: none; }
a.door:active { transform: none; }
a.door:focus-visible { outline: 3px solid var(--door-ink, var(--green)); outline-offset: 3px; }

.role-welcome {
    width: min(440px, calc(100% - 40px));
    margin: 72px auto;
    text-align: center;
}
.role-welcome h1 { font-size: 36px; }
.role-welcome p { margin: 12px 0 28px; color: var(--body); font-size: 18px; font-weight: 600; line-height: 1.5; }
.role-welcome .btn { width: 100%; }
.welcome-signin { display: inline-block; margin-top: 16px; color: var(--muted); font-weight: 500; }
.role-welcome--long { width: min(560px, calc(100% - 40px)); text-align: left; }
.role-welcome--long .welcome-copy p {
    margin: 0 0 16px;
    color: var(--body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
}
.role-welcome--long .welcome-copy p:first-child { color: var(--ink); font-size: 18px; }
.role-welcome--long .welcome-signin { display: block; text-align: center; }

.door--student,
.door--parent,
.door--teacher { background: var(--card); }

.door-text { display: grid; gap: 2px; flex: 1; }
.door-text strong { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.door-tag { font-size: 13px; color: var(--muted); }
.door-sub { font-size: 14px; color: var(--muted); }

.door-faces { display: flex; }
.door-faces img { width: 48px; height: 48px; border-radius: 50%; border: 3px solid white; background: var(--soft); }
.door-faces img + img { margin-left: -16px; }

.door-actions { display: flex; align-items: center; gap: 14px; }
.door-link { font-size: 15px; color: var(--muted); font-weight: 500; }
.door-link:hover { color: var(--ink); }

/* ---------- Blocks ---------- */

.block { padding: 88px 0 0; scroll-margin-top: 64px; }
.block--first { padding-top: 56px; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 14px; font-weight: 500; }
.block h1, .block h2, .closer h2 { margin: 0; font-size: clamp(28px, 3.4vw, 38px); line-height: 1.15; }
.block-lead { margin: 10px 0 0; color: var(--muted); font-size: 17px; font-weight: 600; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.step-art {
    height: 140px; border-radius: 18px;
    display: grid; place-items: center;
    background: var(--bg); border: 1px solid var(--line);
    margin-bottom: 14px;
}
.step-art img { width: 88px; height: 88px; }
.step h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 18px; }
.step-n {
    flex: none; width: 16px; height: 16px; border-radius: 0;
    display: grid; place-items: center;
    background: transparent; color: var(--muted); font-size: 13px;
}
.step p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; font-weight: 600; }

.mini-q { display: grid; gap: 7px; width: 62%; }
.mini-q i { height: 20px; border-radius: 7px; background: white; border: 1px solid var(--line); }
.mini-q i.on { background: var(--green-tint); border-color: var(--green); }

.parents { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }

.checks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 28px; line-height: 1.45; color: var(--body); }
.checks li::before {
    content: "";
    position: absolute; left: 0; top: 7px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--ink);
}

.price-line { margin: 22px 0 0; color: var(--muted); font-size: 15px; }
.price-line a, .plans-fine a, .faq a, .legal a { color: var(--green-dark); font-weight: 500; }

.report-mock {
    background: white;
    border-radius: 22px;
    border: 1px solid var(--line);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.07);
    padding: 22px;
}
.report-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.report-head b { font-size: 19px; }
.report-head span { color: var(--muted); font-size: 14px; }
.report-row { display: grid; grid-template-columns: 70px 1fr 40px; align-items: center; gap: 12px; margin-top: 12px; font-size: 14px; }
.report-row i { height: 8px; border-radius: 999px; display: block; background: linear-gradient(90deg, var(--green) var(--w), var(--soft) var(--w)); }
.report-row em { font-style: normal; color: var(--muted); text-align: right; }
.report-next { margin-top: 18px; background: var(--bg); border-radius: 12px; padding: 10px 12px; font-size: 14px; color: var(--body); }

/* ---------- Pricing ---------- */

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; align-items: start; }
.plan {
    position: relative;
    background: white;
    border-radius: 20px;
    border: 1px solid var(--line);
    padding: 24px 22px;
}
.plan--focus { border-color: var(--ink); }
.plan-flag {
    position: static;
    display: block;
    margin: 0 0 8px;
    background: none;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    padding: 0;
    border-radius: 0;
}
.plan h3 { margin: 0; font-size: 18px; }
.price { margin: 12px 0 0; }
.price b { display: block; font-size: 28px; font-weight: 500; letter-spacing: -0.03em; }
.price span { color: var(--muted); font-size: 14px; }
.plan .checks li { font-size: 15px; }
.plans-fine { margin: 20px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.plans-cta { margin-top: 24px; }

.faq { display: grid; margin-top: 20px; max-width: 760px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
    cursor: pointer;
    list-style: none;
    padding: 18px 32px 18px 0;
    font-size: 17px;
    font-weight: 500;
    position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 22px; color: var(--faint); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; color: var(--body); line-height: 1.6; font-weight: 600; }

/* ---------- Closer ---------- */

.closer {
    margin-top: 96px;
    margin-bottom: 48px;
    text-align: left;
    padding: 0;
    border-radius: 0;
    background: transparent;
}
.closer p { color: var(--body); font-size: 17px; margin: 12px 0 0; max-width: 36rem; font-weight: 400; }
.closer-actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 12px; margin-top: 24px; }

/* ---------- Footer ---------- */

.foot { border-top: 1px solid var(--line); }
.page .foot { margin-top: 64px; }
.foot-inner { display: flex; justify-content: space-between; gap: 24px; padding: 28px 0 12px; }
.foot-brand { max-width: 460px; }
.foot-brand strong { font-size: 17px; font-weight: 500; }
.foot-logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    letter-spacing: -0.03em;
    line-height: 1;
    font-size: 15px;
}
.foot-logo img { width: 28px; height: 23px; }
.foot-brand p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; font-weight: 600; }
.foot-brand a { color: var(--ink); font-weight: 500; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; align-content: flex-start; }
.foot-links a { color: var(--muted); text-decoration: none; font-size: 14px; }
.foot-links a:hover { color: var(--ink); }
.foot-legal { padding: 0 0 28px; color: var(--faint); font-size: 13px; margin-top: 8px; }

/* ---------- Policy pages ---------- */

.legal { max-width: 720px; padding: 48px 0 0; }
.legal h1 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 38px); }
.legal h2 { margin: 28px 0 6px; font-size: 19px; }
.legal p, .legal li { color: var(--body); font-size: 16px; line-height: 1.7; font-weight: 600; }
.legal p { margin: 0 0 8px; }
.legal .legal-lead { font-size: 18px; color: var(--ink); }
.legal ul { padding-left: 20px; margin: 0; }
.legal .legal-links { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .steps { grid-template-columns: 1fr 1fr; }
    .nav-link { display: none; }
    .nav-link--show { display: inline-block; }
}

@media (max-width: 760px) {
    .hero, .parents { grid-template-columns: 1fr; }
    .hero { padding-top: 24px; gap: 32px; }
    .plans { grid-template-columns: 1fr; gap: 24px; }
    .doors { gap: 10px; padding-top: 22px; }
    .door { gap: 12px; padding: 16px; font-size: 16px; border-radius: 12px; }
    .door > span { max-width: none; }
    .door-icon { width: 28px; height: 28px; }
    .door::after { right: 14px; bottom: 18px; }
    .foot-inner { flex-direction: column; }
    .block { padding-top: 64px; }
}

@media (max-width: 540px) {
    .door > span { padding-right: 20px; }
    .door::after { right: 12px; bottom: 16px; }
}

@media (max-width: 480px) {
    .steps { grid-template-columns: 1fr; }
    .lede { font-size: 17px; }
    .logo { font-size: 14px; gap: 2px; }
    .logo img { width: 32px; height: 26px; }
    .nav-link { padding: 8px; }
    .top-nav .btn--small { padding: 6px 10px; font-size: 14px; }
    .lang-btn { padding: 6px 0; margin-left: 2px; }
}

@media (max-width: 400px) {
    .top { column-gap: 8px; }
    .logo { font-size: 13px; }
    .logo img { width: 30px; height: 24px; }
    .top-nav .btn--small { padding: 6px 8px; font-size: 13px; }
}

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