/* StudyFrames sign-in: the landing page's world (night, sun, Bricolage and Lexend), self-hosted so the
   school's exam server shows it with no internet. Left: who is signing in, on a real screen. Right: the form. */
@font-face { font-family: "Bricolage"; src: url("fonts/BricolageGrotesque-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Lexend"; src: url("fonts/Lexend-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lexend"; src: url("fonts/Lexend-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Lexend"; src: url("fonts/Lexend-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Lexend"; src: url("fonts/Lexend-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --night: #070e24; --navy: #0b1530; --ink: #0b1530; --ink-2: #34406a; --muted: #67718f; --line: #e1e6f2; --mist: #f4f6fb;
  --blue: #1668ff; --blue-2: #0a55e0; --sky: #19c2ff; --sun: #ff9500; --sun-2: #ff6a00; --gold: #ffc23d; --green: #12b76a; --red: #d92d20;
  --on-dark: #e9eeff; --on-dark-2: rgba(222,230,255,.72);
  --display: "Bricolage", "Lexend", system-ui, sans-serif; --body: "Lexend", system-ui, "Segoe UI", sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font: 400 16px/1.55 var(--body); }
a { color: var(--blue); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ico { width: 1.1em; height: 1.1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 8px; }

.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }

/* ---------------------------------------------------------------- the night side */
.side { position: relative; overflow: hidden; isolation: isolate; color: var(--on-dark); padding: 40px clamp(28px, 4vw, 64px);
  background: radial-gradient(900px 600px at 90% -10%, #1b2f6e 0%, transparent 60%), radial-gradient(700px 500px at -10% 110%, #14245a 0%, transparent 60%), var(--night);
  display: grid; grid-template-rows: auto 1fr auto; gap: 2rem; }
.side .sun { position: absolute; z-index: -1; width: 640px; aspect-ratio: 1; right: -260px; bottom: -220px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffd27a 0%, #ff9d1c 32%, #ff6a00 55%, rgba(255,106,0,0) 70%); opacity: .9; animation: breathe 9s ease-in-out infinite; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font: 800 1.3rem/1 var(--display); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand b { color: var(--sky); }
.side .copy { align-self: center; display: grid; gap: 1.2rem; max-width: 30rem; }
.side h1 { margin: 0; font: 800 clamp(2.2rem, 1.4rem + 2.4vw, 3.4rem)/1.04 var(--display); letter-spacing: -.025em; color: #fff; }
.side h1 span { background: linear-gradient(100deg, var(--gold), var(--sun) 40%, var(--sun-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.side p { margin: 0; color: var(--on-dark-2); font-size: 1.05rem; max-width: 34ch; }
.stage { position: relative; min-height: 340px; display: grid; place-items: center; }
.stage [data-for] { display: none; }
.stage [data-for].on { display: block; animation: rise .55s cubic-bezier(.2,.7,.2,1) both; }
.phone { width: 210px; aspect-ratio: 412/892; border-radius: 34px; padding: 9px; background: #0a0f1f; box-shadow: 0 30px 70px -24px rgba(0,0,0,.75), inset 0 0 0 2px rgba(255,255,255,.12); position: relative; }
.phone::before { content: ""; position: absolute; top: 15px; left: 50%; width: 30%; height: 15px; transform: translateX(-50%); background: #0a0f1f; border-radius: 0 0 12px 12px; z-index: 2; }
.phone .screen, .laptop .screen { overflow: hidden; background: #fff; }
.phone .screen { width: 100%; height: 100%; border-radius: 26px; }
.phone video, .laptop video { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.laptop { width: min(440px, 100%); }
.laptop .lid { background: #0a0f1f; border-radius: 14px 14px 5px 5px; padding: 2.2% 2.2% 3%; box-shadow: 0 30px 70px -24px rgba(0,0,0,.75), inset 0 0 0 1px rgba(255,255,255,.08); }
.laptop .screen { border-radius: 5px; aspect-ratio: 1280/750; }
.laptop .base { height: 11px; margin: 0 -6%; background: linear-gradient(#c9d1e4, #8c97b4); border-radius: 0 0 18px 18px; }
.chip { position: absolute; display: flex; align-items: center; gap: .6rem; background: #fff; color: var(--ink); border-radius: 14px; padding: .6rem .85rem; font-size: .8rem; line-height: 1.25; box-shadow: 0 16px 36px -14px rgba(0,0,0,.6); animation: bob 6s ease-in-out infinite; }
.chip b { display: block; font-weight: 700; font-size: .86rem; }
.chip small { color: var(--muted); }
.chip .i { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; }
.chip .i .ico { width: 18px; height: 18px; }
.report { width: 250px; border-radius: 22px; overflow: hidden; background: #f4f6fb; box-shadow: 0 30px 70px -24px rgba(0,0,0,.75); color: var(--ink); font-size: .74rem; }
.report header { background: linear-gradient(135deg, var(--blue), #5b8dff); color: #fff; padding: 1rem .9rem .85rem; }
.report header small { opacity: .85; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.report header b { display: block; font: 700 .98rem/1.25 var(--display); margin-top: .3rem; }
.report .nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; padding: .7rem .7rem 0; }
.report .nums div { background: #fff; border-radius: 9px; padding: .45rem .2rem; text-align: center; }
.report .nums b { display: block; font: 800 1.05rem/1 var(--display); }
.report .nums small { color: var(--muted); font-size: .56rem; }
.report .row { margin: .6rem .7rem .8rem; background: #fff; border-radius: 10px; padding: .55rem .6rem; display: grid; gap: .35rem; }
.report .bar { height: 6px; background: var(--mist); border-radius: 999px; overflow: hidden; }
.report .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--sun)); border-radius: inherit; }
.side .foot { color: var(--on-dark-2); font-size: .8rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.side .foot a { color: var(--on-dark); font-weight: 500; }

/* ---------------------------------------------------------------- the form side */
.main { display: grid; align-content: center; justify-items: center; padding: 28px clamp(20px, 5vw, 72px); background: linear-gradient(180deg, #fff, #f7f9fd); }
.form { width: 100%; max-width: 440px; display: grid; gap: 1rem; }
.mobile-brand { display: none; }
.where { display: inline-flex; align-items: center; gap: .5rem; justify-self: start; padding: .45rem .8rem; border-radius: 999px; background: #e8f1ff; color: var(--blue-2); font-size: .82rem; font-weight: 600; }
.form h2 { margin: 0; font: 800 2rem/1.1 var(--display); letter-spacing: -.02em; }
.form .lede { margin: -.6rem 0 0; color: var(--muted); }
.roles { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--mist); border: 1px solid var(--line); }
.roles button { display: flex; align-items: center; justify-content: center; gap: .45rem; border: 0; background: none; padding: .7rem .5rem; border-radius: 10px; font: 600 .92rem/1 var(--body); color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.roles button.active { background: #fff; color: var(--blue-2); box-shadow: 0 1px 2px rgba(11,21,48,.08), 0 6px 16px -10px rgba(11,21,48,.35); }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 600; font-size: .92rem; }
.field .hint { margin: 0; color: var(--muted); font-size: .84rem; }
.box { position: relative; display: flex; align-items: center; }
.box > .ico { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.box input { width: 100%; height: 50px; border: 1.5px solid var(--line); border-radius: 14px; padding: 0 46px 0 44px; font: 500 1rem var(--body); color: var(--ink); background: #fff; transition: border-color .2s, box-shadow .2s; }
.box input::placeholder { color: #9aa3bd; font-weight: 400; }
.box input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(22,104,255,.14); }
.box .toggle { position: absolute; right: 8px; width: 36px; height: 36px; border: 0; background: none; color: var(--muted); border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.box .toggle:hover { background: var(--mist); }
.between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: .9rem; }
.check { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; color: var(--ink-2); }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.err { display: flex; gap: .6rem; align-items: flex-start; padding: .8rem 1rem; border-radius: 12px; background: #fff1f0; color: #9f1d14; font-size: .92rem; border: 1px solid #ffd2cd; }
.go { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; width: 100%; height: 54px; border: 0; border-radius: 14px; cursor: pointer; font: 700 1.04rem var(--body); color: #fff; background: linear-gradient(135deg, var(--blue), #3d8bff); box-shadow: 0 14px 30px -14px rgba(22,104,255,.9); transition: transform .15s, box-shadow .2s; }
.go:hover { transform: translateY(-1px); box-shadow: 0 18px 34px -14px rgba(22,104,255,.95); }
.go:active { transform: none; }
.or { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .84rem; margin-top: .4rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.path { display: grid; gap: .15rem; padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s; }
.path:hover { text-decoration: none; border-color: #b9c9f2; transform: translateY(-2px); box-shadow: 0 12px 24px -16px rgba(11,21,48,.4); }
.path b { display: flex; align-items: center; gap: .45rem; font-size: .95rem; }
.path b .ico { color: var(--blue); }
.path span { color: var(--muted); font-size: .8rem; font-weight: 400; }
.more { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.8; text-align: center; }
.more a { font-weight: 600; }
.staff { text-align: center; font-size: .8rem; }
.staff button { background: none; border: 0; color: var(--muted); cursor: pointer; font: 500 .8rem var(--body); text-decoration: underline; text-underline-offset: 3px; }
.legal { margin: 0; color: #9aa3bd; font-size: .74rem; text-align: center; max-width: 440px; }

@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 920px) {
  .auth { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { align-content: start; padding-top: 28px; }
  .mobile-brand { display: flex; justify-content: center; }
  .mobile-brand .brand { color: var(--ink); }
}
@media (max-width: 420px) { .paths { grid-template-columns: 1fr; } .roles button .ico { display: none; } }
