/* Tutoza website — same palette and font as the app (src/theme.ts) */
:root {
  --brand: #2F5BFF;
  --brand-2: #2448E8;
  --brand-soft: #EEF2FF;
  --ink: #0B1220;
  --ink-2: #18233B;
  --accent: #FFB224;
  --green: #12A150;
  --rose: #E5484D;
  --text: #0B1220;
  --soft: #5B6475;
  --muted: #8A93A6;
  --bg: #F6F7F9;
  --card: #FFFFFF;
  --border: #E6E8EE;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(11, 18, 32, .04), 0 8px 24px rgba(11, 18, 32, .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); line-height: 1.6;
  font-family: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.2; color: var(--text); }
p, li { color: var(--soft); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- Nav ---------- */
nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 18, 32, .86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: -0.03em; flex-shrink: 0; }
.logo::before { content: ""; width: 30px; height: 30px; background: url(logo.svg) center / contain no-repeat; }
.logo span { display: none; }
nav .links { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
nav .links::-webkit-scrollbar { display: none; }
nav .links a { color: #B7C0D1; text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 10px; white-space: nowrap; transition: color .15s, background .15s; }
nav .links a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
nav .links a.cta { background: var(--brand); color: #fff; margin-left: 6px; }
nav .links a.cta:hover { background: var(--brand-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: #fff; text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 14px 22px; border-radius: 14px; border: 0; transition: transform .15s, background .15s, box-shadow .15s;
  box-shadow: 0 8px 24px rgba(47, 91, 255, .35);
}
.btn:hover { background: var(--brand-2); transform: translateY(-1px); }
.btn.ghost { background: rgba(255, 255, 255, .08); box-shadow: none; border: 1px solid rgba(255, 255, 255, .14); }
.btn.ghost:hover { background: rgba(255, 255, 255, .14); }
.btn.light { background: #fff; color: var(--brand); box-shadow: 0 8px 24px rgba(0, 0, 0, .15); }
.btn.outline { background: transparent; color: var(--text); border: 1.5px solid var(--border); box-shadow: none; }
.btn.outline:hover { border-color: var(--text); background: transparent; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff; background: var(--ink);
  padding: 72px 0 96px;
}
.hero::before, .page::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 400px at 85% 20%, rgba(47, 91, 255, .45), transparent 70%),
    radial-gradient(500px 360px at 10% 110%, rgba(255, 178, 36, .14), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 70%); mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 70%);
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #DCE3FF;
  background: rgba(47, 91, 255, .18); border: 1px solid rgba(120, 150, 255, .3); padding: 6px 12px; border-radius: 999px;
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(255, 178, 36, .2); }
.hero h1 { color: #fff; font-size: clamp(36px, 6vw, 60px); line-height: 1.05; letter-spacing: -0.04em; margin: 20px 0 18px; font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #7D9BFF, #B7C7FF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: #B7C0D1; font-size: 18px; max-width: 540px; margin: 0 0 28px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ticks { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 28px; padding: 0; list-style: none; }
.ticks li { color: #94A0B8; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; margin: 0; }
.ticks li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px; }

/* ---------- Phone mockup ---------- */
.device { position: relative; justify-self: center; width: 300px; max-width: 100%; }
.phone {
  position: relative; width: 100%; aspect-ratio: 9 / 18.5; border-radius: 44px; padding: 10px;
  background: linear-gradient(160deg, #2A3550, #0E1526); box-shadow: 0 40px 80px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.screen { height: 100%; border-radius: 36px; overflow: hidden; background: var(--bg); display: flex; flex-direction: column; font-size: 11px; }
.s-top { background: var(--ink); color: #fff; padding: 30px 16px 46px; }
.s-top small { color: #94A0B8; display: block; font-size: 10px; }
.s-top b { font-size: 19px; letter-spacing: -0.02em; }
.s-stats { display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; margin: -32px 12px 0; border-radius: 16px; padding: 12px 6px; box-shadow: var(--shadow); text-align: center; }
.s-stats b { display: block; font-size: 18px; color: var(--text); }
.s-stats span { color: var(--muted); font-size: 9.5px; }
.s-label { font-weight: 800; color: var(--text); font-size: 12px; margin: 14px 14px 8px; }
.s-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px; }
.s-tile { background: #fff; border-radius: 14px; padding: 10px; border: 1px solid var(--border); }
.s-tile i { display: block; width: 24px; height: 24px; border-radius: 8px; margin-bottom: 6px; }
.s-tile b { display: block; font-size: 11px; color: var(--text); }
.s-tile span { color: var(--muted); font-size: 9px; }
.s-row { margin: 10px 12px 0; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 10px; display: flex; gap: 8px; align-items: center; }
.s-row i { width: 26px; height: 26px; border-radius: 8px; background: #FFF4E0; flex-shrink: 0; }
.s-row b { display: block; font-size: 10.5px; color: var(--text); }
.s-row span { color: var(--muted); font-size: 9px; }
.s-tabs { margin-top: auto; background: #fff; border-top: 1px solid var(--border); display: flex; justify-content: space-around; padding: 10px 0 14px; }
.s-tabs i { width: 18px; height: 18px; border-radius: 6px; background: #D7DCE6; }
.s-tabs i:first-child { background: var(--brand); }
.float {
  position: absolute; display: flex; gap: 10px; align-items: center; background: #fff; color: var(--text);
  border-radius: 16px; padding: 10px 14px 10px 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .28); font-size: 12.5px; line-height: 1.35;
  width: max-content; max-width: 230px; animation: bob 6s ease-in-out infinite;
}
.float b { display: block; font-size: 13px; }
.float span { color: var(--soft); }
.float .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.float.f1 { top: 40%; left: -96px; }
.float.f2 { bottom: 16%; right: -84px; animation-delay: -3s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .float { animation: none; } html { scroll-behavior: auto; } }

/* ---------- Sections ---------- */
.block { padding: 88px 0; }
.block.alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 800; color: var(--brand); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.head h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 12px; font-weight: 800; letter-spacing: -0.03em; }
.head p { font-size: 17px; margin: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #D7DCE6; }
.card h3 { margin: 16px 0 6px; font-size: 18px; font-weight: 700; }
.card p { margin: 0; font-size: 15px; }
.icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; }
.icon svg { width: 24px; height: 24px; }
.i-blue { background: #EEF2FF; color: var(--brand); }
.i-green { background: #E7F6EE; color: var(--green); }
.i-amber { background: #FFF4E0; color: #D98A00; }
.i-pink { background: #FCEAF4; color: #D6409F; }
.i-violet { background: #F0EBFF; color: #6E56CF; }
.i-cyan { background: #E3F6FA; color: #0E8AA6; }

/* Roles */
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.role { border-radius: var(--radius); padding: 28px; border: 1px solid var(--border); background: var(--bg); }
.role.main { background: var(--ink); border-color: var(--ink); }
.role.main h3, .role.main .tag { color: #fff; }
.role.main li { color: #B7C0D1; }
.role .tag { font-size: 13px; font-weight: 800; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; }
.role h3 { font-size: 22px; margin: 6px 0 14px; }
.role ul { list-style: none; padding: 0; margin: 0; }
.role li { padding-left: 26px; position: relative; margin: 10px 0; font-size: 15px; }
.role li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 28px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 800; font-size: 17px; }
.step h3 { margin: 16px 0 6px; font-size: 18px; }
.step p { margin: 0; font-size: 15px; }

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 860px; margin: 0 auto; }
.plan { background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 32px; display: flex; flex-direction: column; }
.plan.featured { background: var(--ink); border-color: var(--ink); position: relative; overflow: hidden; }
.plan.featured::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 260px at 100% 0%, rgba(47, 91, 255, .5), transparent 70%); pointer-events: none; }
.plan > * { position: relative; }
.plan.featured h3, .plan.featured .amount { color: #fff; }
.plan.featured p, .plan.featured li { color: #B7C0D1; }
.plan h3 { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge { font-size: 12px; font-weight: 800; color: var(--ink); background: var(--accent); padding: 3px 10px; border-radius: 999px; letter-spacing: 0; }
.amount { font-size: 48px; font-weight: 800; letter-spacing: -0.04em; margin: 14px 0 2px; color: var(--text); line-height: 1; }
.amount small { font-size: 16px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 20px 0 0; }
.plan li { padding-left: 26px; position: relative; margin: 10px 0; font-size: 15px; }
.plan li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px; }
.addons { max-width: 860px; margin: 16px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.addon { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.addon b { display: block; font-size: 15px; }
.addon span { font-size: 13px; color: var(--soft); display: block; margin-top: 2px; }
.addon .p { font-size: 20px; font-weight: 800; margin-top: 10px; color: var(--text); }
.fine { text-align: center; font-size: 14px; max-width: 640px; margin: 24px auto 0; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 0 22px; margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 700; font-size: 16px; padding: 18px 28px 18px 0; position: relative; color: var(--text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 500; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0 0 18px; }

/* CTA band */
.band { padding: 0 0 88px; }
.band .box {
  position: relative; overflow: hidden; border-radius: 28px; padding: 56px 40px; text-align: center; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.band .box::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 200px at 90% 0%, rgba(255, 255, 255, .25), transparent 70%), radial-gradient(300px 200px at 0% 100%, rgba(255, 178, 36, .3), transparent 70%); }
.band .box > * { position: relative; }
.band h2 { color: #fff; font-size: clamp(26px, 4vw, 38px); margin: 0 0 10px; font-weight: 800; }
.band p { color: #DCE3FF; font-size: 17px; margin: 0 auto 24px; max-width: 520px; }

/* ---------- Policy / inner pages ---------- */
header.page { position: relative; overflow: hidden; background: var(--ink); color: #fff; padding: 56px 0 96px; }
header.page .wrap { position: relative; z-index: 1; max-width: 820px; }
header.page h1 { margin: 0; font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -0.03em; color: #fff; }
header.page p { margin: 10px 0 0; color: #94A0B8; font-size: 15px; }
main { position: relative; }
header.page + main { margin-top: -56px; padding-bottom: 64px; }
header.page + main .wrap { max-width: 820px; }
header.page + main section {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 28px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(11, 18, 32, .03);
}
header.page + main h2 { font-size: 19px; margin: 0 0 10px; font-weight: 800; }
header.page + main p { margin: 8px 0; }
header.page + main ul, header.page + main ol { padding-left: 20px; margin: 8px 0; }
header.page + main li { margin: 6px 0; }
header.page + main strong { color: var(--text); }
section.note { background: var(--brand-soft) !important; border-color: #D4DDFF !important; }
section.warn { background: #FFF1F1 !important; border-color: #FFD6D6 !important; }
section.warn h2 { color: #B4232A; }
section.warn p, section.warn li { color: #8C1D23; }

/* ---------- Footer ---------- */
footer { background: var(--ink); color: #94A0B8; padding: 56px 0 32px; font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 32px 48px; justify-content: space-between; }
footer .about { max-width: 320px; }
footer .about p { color: #94A0B8; margin: 12px 0 0; }
footer .cols { display: flex; gap: 48px; flex-wrap: wrap; }
footer h4 { color: #fff; font-size: 14px; margin: 0 0 12px; }
footer .cols a { display: block; color: #94A0B8; text-decoration: none; margin: 8px 0; }
footer .cols a:hover { color: #fff; }
footer .legal { flex-basis: 100%; border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 24px; margin: 8px 0 0; color: #6B7891; font-size: 13px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 56px; }
  .hero { padding: 56px 0 80px; }
  .float.f1 { left: -40px; }
  .float.f2 { right: -40px; }
  .roles, .steps { grid-template-columns: 1fr; }
  .addons { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  nav .links a:not(.cta) { display: none; }
  .hero h1 { font-size: 38px; }
  .hero .lead { font-size: 16px; }
  .device { width: 250px; }
  .float { max-width: 190px; font-size: 11.5px; padding: 8px 10px 8px 8px; }
  .float b { font-size: 12px; }
  .float .ic { width: 28px; height: 28px; }
  .float.f1 { left: -28px; top: 40%; }
  .float.f2 { right: -28px; }
  .block { padding: 64px 0; }
  .plans { grid-template-columns: 1fr; }
  .plan { padding: 26px; }
  .band .box { padding: 40px 22px; }
  header.page + main section { padding: 22px 20px; }
  footer .cols { gap: 32px; }
}

/* =====================================================================
   Education layer: doodles, microscope zoom, lab experiments
   ===================================================================== */

/* Scroll progress line under the nav */
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--brand), #7D9BFF, var(--accent)); transform-origin: 0 50%; transform: scaleX(0); }

/* Hero doodles: floating formulas + atom */
.doodles { position: absolute; inset: 0; pointer-events: none; z-index: 0; translate: 0 calc(var(--sy, 0) * 0.25px); }
.doodles span {
  position: absolute; font: italic 500 clamp(15px, 1.6vw, 22px)/1 Georgia, "Times New Roman", serif; color: rgba(183, 199, 255, .2);
  white-space: nowrap; animation: drift 12s ease-in-out infinite;
}
.doodles span:nth-child(2n) { animation-duration: 15s; animation-delay: -4s; }
.doodles span:nth-child(3n) { animation-duration: 18s; animation-delay: -8s; }
.doodles .atom { position: absolute; width: 110px; height: 110px; opacity: .28; animation: spin 24s linear infinite; }
.doodles .geo { position: absolute; width: 150px; opacity: .22; }
@keyframes drift { 0%, 100% { transform: translate(0, 0) rotate(-2deg); } 50% { transform: translate(10px, -16px) rotate(2deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Microscope zoom (sticky scroll story) ---------- */
.scope { position: relative; height: 360vh; background: var(--ink); color: #fff; }
.scope-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.scope-sticky::before { content: ""; position: absolute; inset: 0; background: radial-gradient(500px 400px at 50% 65%, rgba(47, 91, 255, .28), transparent 70%); }
.scope-device {
  position: absolute; left: 50%; top: 60%; width: min(280px, 56vw, 40vh); height: auto;
  translate: -50% -50%; transform-origin: 50% 62.4%; will-change: transform, opacity;
}
.scope-caps { position: absolute; left: 0; right: 0; top: calc(64px + 4vh); z-index: 3; text-align: center; }
.cap { position: absolute; left: 0; right: 0; padding: 0 20px; opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; }
.cap.on { opacity: 1; transform: none; }
.cap .eyebrow { color: #9DB2FF; }
.cap h2 { color: #fff; font-size: clamp(28px, 4.6vw, 48px); font-weight: 800; letter-spacing: -0.03em; margin: 0 auto 10px; max-width: 760px; text-shadow: 0 4px 30px rgba(0, 0, 0, .5); }
.cap p { color: #C9D3EA; font-size: 17px; margin: 0 auto; max-width: 540px; text-shadow: 0 2px 16px rgba(0, 0, 0, .6); }
.cap .hint { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: #9DB2FF; }
.cap .hint i { width: 18px; height: 28px; border: 2px solid currentColor; border-radius: 10px; position: relative; }
.cap .hint i::after { content: ""; position: absolute; left: 50%; top: 5px; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px; background: currentColor; animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(8px); } }

.scope-view {
  position: absolute; inset: 0; z-index: 2; clip-path: circle(0 at 50% 50%);
  background: radial-gradient(circle at 50% 45%, #1B3F7A 0%, #0E2350 45%, #060E22 100%);
}
.scope-view::after { /* lens vignette */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 55%, rgba(0, 0, 0, .55) 100%);
}
.reticle { position: absolute; inset: 0; pointer-events: none; }
.reticle::before, .reticle::after { content: ""; position: absolute; background: rgba(157, 178, 255, .12); }
.reticle::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.reticle::after { top: 50%; left: 0; right: 0; height: 1px; }
.reticle i { position: absolute; left: 50%; top: 50%; border: 1px dashed rgba(157, 178, 255, .14); border-radius: 50%; translate: -50% -50%; }
.scalebar { position: absolute; left: 20px; bottom: 22px; display: flex; align-items: center; gap: 10px; color: #9DB2FF; font-size: 12px; font-weight: 700; z-index: 3; }
.scalebar::before { content: ""; width: 60px; height: 4px; border-radius: 2px; background: #9DB2FF; }
.mag {
  position: absolute; right: 20px; bottom: 18px; z-index: 4; font-weight: 800; font-size: 14px; color: #fff;
  background: rgba(47, 91, 255, .35); border: 1px solid rgba(157, 178, 255, .4); padding: 6px 12px; border-radius: 999px;
  font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .3s;
}
.mag.on { opacity: 1; }

/* background cells drifting in the specimen */
.cell { position: absolute; border-radius: 50%; border: 1.5px solid rgba(125, 155, 255, .35); background: radial-gradient(circle at 35% 35%, rgba(125, 155, 255, .22), rgba(47, 91, 255, .06) 70%); animation: float-cell 14s ease-in-out infinite; }
.cell::after { content: ""; position: absolute; left: 38%; top: 36%; width: 24%; height: 24%; border-radius: 50%; background: rgba(255, 178, 36, .45); }
@keyframes float-cell { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(12px, -10px); } 66% { transform: translate(-8px, 12px); } }

/* the four "student" cells that carry real info */
.cell-card {
  position: absolute; left: var(--x); top: var(--y); z-index: 3; width: clamp(118px, min(17vw, 23vh), 196px); aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 18px;
  border: 1.5px solid rgba(157, 178, 255, .55); color: #fff;
  background: radial-gradient(circle at 32% 28%, rgba(125, 155, 255, .4), rgba(47, 91, 255, .16) 55%, rgba(12, 30, 70, .55));
  box-shadow: 0 0 50px rgba(47, 91, 255, .35), inset 0 0 30px rgba(157, 178, 255, .2);
  border-radius: 46% 54% 52% 48% / 50% 44% 56% 50%;
  opacity: 0; transform: translate(-50%, -50%) scale(.35); transition: opacity .6s, transform .7s cubic-bezier(.2, .9, .3, 1.3);
  animation: morph 9s ease-in-out infinite;
}
.cell-card.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cell-card::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px var(--accent); margin-bottom: 8px; }
.cell-card small { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #9DB2FF; }
.cell-card b { font-size: clamp(14px, 1.4vw, 17px); line-height: 1.25; margin: 4px 0; }
.cell-card i { font-style: normal; font-size: 12px; color: #C9D3EA; }
@keyframes morph {
  0%, 100% { border-radius: 46% 54% 52% 48% / 50% 44% 56% 50%; }
  50% { border-radius: 54% 46% 44% 56% / 44% 56% 46% 54%; }
}

/* ---------- Lab experiments ---------- */
.labs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lab { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.lab .bench {
  height: 260px; display: grid; place-items: center; border-bottom: 1px solid var(--border);
  background-color: #FBFCFF;
  background-image: linear-gradient(#E9EEFB 1px, transparent 1px), linear-gradient(90deg, #E9EEFB 1px, transparent 1px);
  background-size: 22px 22px; background-position: -1px -1px;
}
.lab .bench svg { width: 210px; height: 240px; overflow: visible; }
.lab .txt { padding: 22px 24px 26px; }
.lab .tag { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.lab h3 { margin: 6px 0 6px; font-size: 19px; }
.lab p { margin: 0; font-size: 15px; }

.lab svg .vb { transform-box: view-box; }
.lab svg .fb { transform-box: fill-box; }
/* titration */
.burette-liquid { transform-origin: 50% 100%; transform: scaleY(calc(1 - var(--p, 0) * .7)); }
.flask-pink { opacity: var(--p, 0); }
.flask-level { transform-origin: 50% 100%; transform: scaleY(calc(.55 + var(--p, 0) * .45)); }
.drop { animation: drip 1.1s ease-in infinite; }
.drop.d2 { animation-delay: .55s; }
.lab.done .drop { animation: none; opacity: 0; }
@keyframes drip { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(36px); opacity: 0; } }
/* filtration */
.muddy { transform-origin: 100px 100px; transform: scale(calc(1 - var(--p, 0) * .85)); }
.clear-water { transform-origin: 50% 100%; transform: scaleY(var(--p, 0)); }
.residue { opacity: var(--p, 0); }
/* geometry */
.ray { transform-origin: 100px 190px; transform: rotate(calc(var(--p, 0) * -72deg)); }
.arc-draw { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p, 0)); }
.tri-draw { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p, 0)); }
.angle-label { font: 800 15px "Plus Jakarta Sans", sans-serif; fill: var(--brand); }

@media (max-width: 960px) {
  .labs { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .doodles span:nth-child(n+6) { display: none; }
  .doodles .atom { width: 70px; height: 70px; }
  .doodles .geo { display: none; }
  .cap p { font-size: 15px; }
  .scope { height: 320vh; }
  .cell-card { width: min(42vw, 25vh); padding: 10px; }
  .cell-card::before { width: 10px; height: 10px; margin-bottom: 4px; }
  .cell-card small { font-size: 9.5px; }
  .cell-card b { font-size: 13px; }
  .cell-card i { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .doodles span, .doodles .atom, .cell, .cell-card, .drop, .cap .hint i::after { animation: none !important; }
}

/* CTA band buttons */
.band-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- Lite mode: budget phones / data saver get static visuals ---------- */
.lite .doodles span, .lite .doodles .atom, .lite .cell, .lite .cell-card, .lite .drop, .lite .float, .lite .cap .hint i::after { animation: none !important; }
.lite .cells { display: none; }
.lite .scope { height: auto; }

/* ---------- Real app screenshots ---------- */
.phone.real .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shots img { display: block; width: 100%; height: auto; }
.block.dark { background: var(--ink); }
.block.dark .head h2 { color: #fff; }
.block.dark .head p { color: #94A0B8; }
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.shots figure { margin: 0; }
.shots img { border-radius: 24px; border: 6px solid #1A2335; box-shadow: 0 24px 48px rgba(0, 0, 0, .4); box-sizing: border-box; }
.shots figcaption { margin-top: 14px; color: #94A0B8; font-size: 14px; line-height: 1.45; }
.shots figcaption b { display: block; color: #fff; font-size: 16px; margin-bottom: 2px; }
@media (max-width: 960px) {
  .shots { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .shots figure { scroll-snap-align: start; }
}
.block.dark .eyebrow { color: #9DB2FF; }

