/* Сова — вход. Night canvas, the 270° owl in the centre, a paper card on the right. Tokens from the brandbook. */
:root {
  --night: #0f1015; --night-2: #15161c; --moon: #f1f1f4; --dim: #8d909c; --faint: #5c5f6d; --rule: #262834;
  --sunset: #ff6a3d; --sunset-2: #ef5a2e;
  --ink: #15161c; --ink-2: #474955; --ink-3: #868894; --panel: #ffffff; --panel-2: #f6f5f1; --line: #e4e2dc;
  --bad: #d23c2a; --bad-soft: #fbe5e1;
  --font: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #f1f1f4; --ink-2: #b6b8c2; --ink-3: #7d808c; --panel: #16171d; --panel-2: #1d1e26; --line: #2c2e3a; --bad: #ff6b5a; --bad-soft: #36160f; }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { position: relative; display: grid; grid-template-rows: auto 1fr auto; min-height: 100vh; overflow-x: hidden; background: var(--night); color: var(--moon); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2 { font-family: var(--display); margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--sunset); outline-offset: 2px; border-radius: 8px; }

/* sky */
.sky { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.stars { position: absolute; left: 0; top: 0; right: 0; }
.stars i { position: absolute; border-radius: 50%; background: var(--moon); opacity: .2; animation: twinkle 4s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .06; } to { opacity: .75; } }
.glow { position: absolute; border-radius: 50%; filter: blur(10px); }
.glow.a { left: 18%; top: 22%; width: 820px; height: 820px; background: radial-gradient(circle, rgba(255, 106, 61, .17), transparent 62%); }
.glow.b { right: -240px; top: -300px; width: 760px; height: 760px; background: radial-gradient(circle, rgba(92, 116, 255, .12), transparent 62%); }

/* top bar */
.top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px clamp(16px, 4vw, 56px) 0; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 0 0 1px #2f3140; }
.word { width: 88px; height: 26px; background: var(--moon); -webkit-mask: url(/sova-wordmark.svg) center / contain no-repeat; mask: url(/sova-wordmark.svg) center / contain no-repeat; }
.top-link { padding: 8px 15px; background: transparent; cursor: pointer; border: 1px solid #34374a; border-radius: 999px; color: var(--moon); font: 600 13px var(--font); text-decoration: none; transition: border-color .15s, background .15s; }
.top-link:hover { border-color: var(--sunset); background: rgba(255, 106, 61, .1); }

/* stage: copy · owl · form */
.stage { position: relative; display: grid; grid-template-columns: minmax(380px, 1fr) minmax(360px, 520px) 350px; grid-template-areas: "copy visual side"; gap: clamp(20px, 2.6vw, 44px); align-items: center; width: 100%; max-width: 1560px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 56px); }
.copy { grid-area: copy; }
.visual { grid-area: visual; }
.side { grid-area: side; display: grid; gap: 16px; justify-items: center; }

h1 { font-size: clamp(38px, 3.45vw, 60px); line-height: 1.02; letter-spacing: -.045em; white-space: nowrap; }
h1 span { color: var(--sunset); }
.lead { margin-top: 22px; max-width: 470px; color: #aeb0bb; font-size: 16.5px; line-height: 1.6; }
.fact { position: relative; margin-top: 26px; max-width: 440px; padding-left: 16px; border-left: 2px solid var(--sunset); color: var(--dim); font-size: 14px; line-height: 1.55; transition: color .3s, border-color .3s; }
.fact b { color: var(--moon); font-weight: 600; }
.fact.blind { color: #ffa382; }

/* the 270° scope */
.scope { display: block; width: 100%; height: auto; overflow: visible; }
.ring { fill: none; stroke: #454859; stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 802; stroke-dashoffset: 802; animation: draw 1.7s cubic-bezier(.3, .7, .2, 1) .15s forwards; }
.ring.inner { stroke: #2c2f3d; stroke-width: 1.2; stroke-dasharray: 2 6; stroke-dashoffset: 0; animation: fade 1.2s .7s both; }
.blind { fill: none; stroke: var(--sunset); stroke-width: 1.4; stroke-dasharray: 1.5 6; stroke-linecap: round; opacity: .22; transition: opacity .35s; }
.scope.is-blind .blind { opacity: .95; }
.tick { stroke: #50536a; stroke-width: 1.3; stroke-linecap: round; }
.tick.major { stroke: #7a7e95; stroke-width: 1.8; }
#ticks { animation: fade .9s 1s both; }
.tick-label { fill: var(--faint); font: 600 10px var(--mono); }
.beam { animation: fade 1s .9s both; }

.owl-pop { transform-box: view-box; transform-origin: 200px 190px; animation: pop 1s cubic-bezier(.34, 1.56, .64, 1) .1s both; }
.now { fill: var(--sunset); font: 700 15px var(--mono); letter-spacing: .02em; }
.big { fill: var(--moon); font: 800 44px var(--display); letter-spacing: -.04em; }
.blind-label { fill: var(--faint); font: 600 9.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; transition: fill .35s; }
.scope.is-blind .blind-label { fill: var(--sunset); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.55) translateY(14px); } }

/* card */
.card { width: 100%; padding: 32px 30px 28px; border-radius: 24px; background: var(--panel); color: var(--ink); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .06); animation: rise .8s cubic-bezier(.2, .8, .2, 1) .35s both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.card h2 { font-size: 28px; letter-spacing: -.03em; }
.muted { margin-top: 6px; color: var(--ink-3); font-size: 14px; }
form { display: grid; }
.field { display: grid; gap: 7px; margin-top: 18px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
input { width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); color: var(--ink); font: 16px var(--font); transition: border-color .15s, box-shadow .15s; }
input:focus { outline: none; border-color: var(--sunset-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sunset-2) 16%, transparent); }
.pw { position: relative; display: block; }
.pw input { padding-right: 104px; }
.show { position: absolute; right: 6px; top: 50%; translate: 0 -50%; padding: 7px 11px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-3); font: 600 13px var(--font); cursor: pointer; }
.show:hover { background: var(--line); color: var(--ink); }
.err { margin-top: 16px; padding: 10px 13px; border-radius: 11px; background: var(--bad-soft); color: var(--bad); font-size: 14px; }
.primary { margin-top: 22px; min-height: 50px; border: 0; border-radius: 14px; background: var(--sunset-2); color: #fff; font: 700 16px var(--font); cursor: pointer; box-shadow: 0 14px 28px -14px var(--sunset-2); transition: background .15s, transform .08s, box-shadow .2s; }
.primary:hover { background: #ff6a3d; box-shadow: 0 16px 34px -12px #ff6a3d; }
.primary:active { transform: translateY(1px); }
.primary:disabled { opacity: .6; cursor: progress; }

/* who signs in: the administration with a password, a teacher with a code from the bot */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 22px; padding: 4px; border-radius: 13px; background: var(--panel-2); }
.tabs button { min-height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-3); font: 600 14px var(--font); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 0 0 1px var(--line); }
.steps { margin: 14px 0 0; padding-left: 1.2em; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
#t-code { font: 600 22px var(--mono, ui-monospace, monospace); letter-spacing: .18em; }
.fine { margin-top: 16px; color: var(--ink-3); font-size: 12.5px; line-height: 1.5; }

/* school chooser */
.who { margin-top: 6px; color: var(--ink-3); font-size: 14px; }
.schools { display: grid; gap: 10px; margin-top: 20px; }
.school { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel-2); color: var(--ink); text-decoration: none; transition: border-color .15s; }
.school:hover { border-color: var(--sunset-2); }
.school img { width: 46px; height: 46px; border-radius: 13px; }
.school b { display: block; font: 700 16px var(--display); }
.school span { color: var(--ink-3); font-size: 13px; }
.school i { color: var(--sunset-2); font-style: normal; font-weight: 700; }
.linkish { margin-top: 18px; padding: 0; border: 0; background: none; color: var(--ink-3); font: 500 13.5px var(--font); text-decoration: underline; cursor: pointer; }


/* contacts: a small card under «Связаться» */
.contact { inset: 74px clamp(16px, 4vw, 56px) auto auto; width: min(340px, calc(100vw - 32px)); margin: 0; padding: 20px 20px 16px; border: 1px solid #2c2f3d; border-radius: 20px; background: #16171d; color: var(--moon); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .8); }
.contact:popover-open { animation: drop .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.contact-title { font: 700 17px var(--display); letter-spacing: -.01em; }
.contact-note { margin-top: 3px; color: var(--dim); font-size: 13px; }
.contact-rows { display: grid; margin-top: 12px; }
.contact-rows a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--rule); color: var(--moon); text-decoration: none; }
.contact-rows a:hover b { color: var(--sunset); }
.contact-rows i { color: var(--faint); font: 700 10.5px var(--mono); font-style: normal; letter-spacing: .08em; text-transform: uppercase; }
.contact-rows b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; text-align: right; transition: color .15s; }
.contact-docs { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-top: 12px; border-top: 1px solid var(--rule); }
.contact-docs a { color: var(--dim); font-size: 12.5px; text-decoration: none; }
.contact-docs a:hover { color: var(--moon); }
.contact-fine { margin-top: 10px; color: var(--faint); font-size: 11.5px; }

/* what Sova can do now and what comes next */
.mods { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; max-width: 1560px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 56px) 28px; }
.mods div { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 2px; padding: 18px 20px 0 0; border-top: 1px solid var(--rule); animation: fade 1s both; }
.mods div:nth-child(2) { animation-delay: .1s; } .mods div:nth-child(3) { animation-delay: .2s; } .mods div:nth-child(4) { animation-delay: .3s; } .mods div:nth-child(5) { animation-delay: .4s; }
.mods .soon { border-top-style: dashed; }
.mods i { grid-row: span 2; color: var(--sunset); font: 700 12px/1.6 var(--mono); font-style: normal; }
.mods .soon i { color: var(--faint); }
.mods b { font-size: 15px; font-weight: 650; }
.mods .soon b { color: #c3c5ce; }
.mods span { color: var(--dim); font-size: 13px; line-height: 1.45; }
.mods em { margin-left: 6px; padding: 2px 7px; border-radius: 999px; background: rgba(255, 106, 61, .16); color: #ff9a78; font: 700 10px var(--font); font-style: normal; letter-spacing: .05em; text-transform: uppercase; vertical-align: 2px; }

/* medium screens: owl above the text, form on the right */
@media (max-width: 1240px) {
  .mods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mods div { padding-bottom: 14px; }
  .stage { grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: "visual side" "copy side"; row-gap: 8px; }
  .visual { max-width: 470px; justify-self: center; width: 100%; }
  }
/* short laptop screens: keep everything above the fold */
@media (min-width: 1241px) and (max-height: 860px) {
  .lead { font-size: 15.5px; margin-top: 16px; }
  .fact { margin-top: 18px; }
  .stage { grid-template-columns: minmax(380px, 1fr) minmax(340px, 460px) 340px; }
}
/* phones */
@media (max-width: 860px) {
  body { display: block; }
  .stage { grid-template-columns: minmax(0, 1fr); grid-template-areas: "visual" "copy" "side"; gap: 22px; padding-top: 4px; }
  .visual { max-width: 340px; justify-self: center; width: 100%; }
  h1 { font-size: 38px; white-space: normal; }
  .lead { font-size: 15px; margin-top: 14px; }
  .fact { display: none; }
  .card { padding: 26px 20px 24px; }
  .mods { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; padding-top: 28px; }
  .mods div { padding-right: 0; padding-bottom: 14px; }
  .contact { inset: 66px 16px auto auto; }
  .top-link { padding: 7px 13px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .ring { stroke-dashoffset: 0; }
}

/* /t/<link> from the bot: a short page between MAX and the teachers' room */
.enter { max-width: 460px; margin: 18vh auto 0; padding: 0 16px; text-align: center; }
.enter h1 { font: 800 30px/1.1 var(--display); letter-spacing: -.02em; }
.enter p { margin-top: 12px; color: var(--dim); }
.enter a { color: var(--sunset); font-weight: 700; }
.top-entry { display:flex; align-items:center; gap:18px; }
.bot-top-link { color:var(--sunset-2); text-decoration:none; }
.entry-button { display:flex; align-items:center; justify-content:center; padding:14px 18px; min-height:48px; border-radius:12px; background:var(--sunset-2); color:#fff; font:700 15px var(--font); text-decoration:none; text-align:center; }
.entry-button:focus-visible { outline:3px solid currentColor; outline-offset:3px; }
.entry-connect { margin:18px 0; }
.entry-connect summary { cursor:pointer; padding:12px 0; color:var(--ink-2); font-size:13px; }
#entry-bot-qr { display:flex; justify-content:center; padding:14px; background:#fff; border-radius:12px; }
#entry-bot-qr svg { max-width:180px; height:auto; }
.entry-family { margin:22px 0 0; padding-top:16px; border-top:1px solid var(--line); font-size:12px; line-height:1.6; color:var(--ink-3); }
.entry-family a { color:inherit; text-underline-offset:3px; }
@media (max-width:520px) { .top-entry {gap:12px;} .top-entry .top-link {font-size:12px;} }
