/* v3.18.1 — two-panel login page (school portal + SaaS platform "Log in" + platform admin).
   Always exactly one screen: nothing scrolls. Sizes follow the window height, and
   login.js steps the page down (lp-f1 … lp-f5) when content would not fit — less
   important items are hidden first (classes lp-o1/lp-o2/lp-o3), then everything
   is scaled. The page sets --lp-brand (main colour), --lp-brand-dark and --lp-accent. */
html:has(.lp-body), .lp-body { height: 100%; overflow: hidden; }
.lp-body { margin: 0; background: #f4f5fa; color: #1a1f36; font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
.lp-body *, .lp-body *::before, .lp-body *::after { box-sizing: border-box; }
.lp { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr); height: 100vh; height: 100dvh; overflow: hidden; }

/* ---------- story side ---------- */
.lp-story { position: relative; overflow: hidden; isolation: isolate; color: #fff; display: flex; flex-direction: column; gap: clamp(10px, 2.2vh, 24px); min-height: 0;
  padding: clamp(16px, 4vh, 44px) clamp(22px, 4vw, 64px); background: var(--lp-brand-dark, #121e35); }
.lp-bg { position: absolute; inset: 0; z-index: -2; }
.lp-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1.08); transition: opacity 1.4s ease; }
.lp-slide.on { opacity: 1; animation: lpKen 14s ease-out forwards; }
@keyframes lpKen { from { transform: scale(1.12) translate3d(1.5%, 1%, 0); } to { transform: scale(1) translate3d(0, 0, 0); } }
.lp-story::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(160deg, rgba(10, 18, 45, .93), rgba(10, 18, 45, .74) 50%, rgba(10, 18, 45, .95)); background:
    linear-gradient(160deg, color-mix(in srgb, var(--lp-brand-dark, #121e35) 93%, transparent) 0%, color-mix(in srgb, var(--lp-brand-dark, #121e35) 74%, transparent) 50%, color-mix(in srgb, var(--lp-brand-dark, #121e35) 95%, transparent) 100%); }
.lp-story.noslides .lp-bg { background: radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--lp-accent, #b8860b) 35%, transparent), transparent 60%), radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, var(--lp-brand, #1b2a4a) 80%, #000 0%), transparent 60%), var(--lp-brand-dark, #121e35); }
.lp-orb { position: absolute; border-radius: 50%; filter: blur(2px); z-index: -1; animation: lpFloat 18s ease-in-out infinite alternate; pointer-events: none; }
.lp-orb.a { width: 340px; height: 340px; right: -120px; top: 8%; opacity: .14; background: radial-gradient(circle at 30% 30%, var(--lp-accent, #b8860b), transparent 70%); }
.lp-orb.b { width: 220px; height: 220px; left: -60px; bottom: 18%; background: radial-gradient(circle at 60% 40%, #fff, transparent 70%); animation-duration: 24s; opacity: .12; }
@keyframes lpFloat { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-30px, 40px, 0) scale(1.12); } }

.lp-brand { display: flex; align-items: center; gap: 12px; flex: none; }
.lp-brand img { height: clamp(32px, 5.6vh, 52px); width: auto; max-width: 200px; object-fit: contain; background: rgba(255,255,255,.94); border-radius: 10px; padding: 5px 7px; }
.lp-brand b { font-size: clamp(15px, 2vh, 18px); letter-spacing: .01em; line-height: 1.2; display: block; }
.lp-brand small { display: block; opacity: .75; font-weight: 500; font-size: clamp(10.5px, 1.4vh, 12.5px); letter-spacing: .08em; text-transform: uppercase; }
.lp-hero { max-width: 640px; margin: auto 0; flex: none; animation: lpRise .9s ease both .1s; }
.lp-hero h1 { text-shadow: 0 2px 18px rgba(0,0,0,.35); font-size: clamp(24px, min(3.6vw, 5.4vh), 52px); line-height: 1.06; margin: 0 0 clamp(8px, 1.5vh, 14px); font-weight: 800; letter-spacing: -.01em; text-wrap: balance;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lp-hero p { margin: 0; font-size: clamp(13.5px, 1.9vh, 16.5px); line-height: 1.55; opacity: .92; max-width: 560px; text-wrap: pretty;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lp-caption { display: inline-flex; align-items: center; gap: 8px; margin-top: clamp(8px, 1.6vh, 16px); font-size: 13px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); padding: 5px 12px; border-radius: 999px; backdrop-filter: blur(6px); transition: opacity .5s; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-caption:empty { display: none; }
@keyframes lpRise { from { opacity: 0; transform: translate3d(0, 18px, 0); } to { opacity: 1; transform: none; } }

.lp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: clamp(8px, 1.4vh, 14px); max-width: 760px; flex: none; animation: lpRise .9s ease both .3s; }
.lp-card { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 14px; padding: clamp(10px, 1.8vh, 16px) clamp(12px, 1.6vw, 18px); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2); min-width: 0; }
.lp-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; opacity: .85; margin-bottom: 6px; }
.lp-card { display: grid; align-content: start; }
.lp-card-h { grid-row: 1; grid-column: 1; }
/* every announcement / quote shares one cell, so the card is as tall as the longest one and never jumps */
.lp-ann { grid-row: 2; grid-column: 1; visibility: hidden; }
.lp-ann.on { visibility: visible; animation: lpFade .6s ease both; }
.lp-ann b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: clamp(14px, 1.9vh, 16px); line-height: 1.3; }
.lp-ann p { margin: 4px 0 0; font-size: clamp(12.5px, 1.6vh, 14px); line-height: 1.45; opacity: .9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lp-ann a { display: inline-block; margin-top: 6px; color: #fff; font-weight: 600; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.lp-ann time { font-size: 11.5px; opacity: .7; }
.lp-dots { display: inline-flex; gap: 6px; }
.lp-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.4); cursor: pointer; }
.lp-dots button.on { background: #fff; width: 20px; border-radius: 5px; }
.lp-quote { grid-row: 1; grid-column: 1; margin: 0; visibility: hidden; }
.lp-quote.on { visibility: visible; animation: lpFade .8s ease both; }
.lp-quote p { margin: 0; font-size: clamp(13.5px, 1.9vh, 16px); line-height: 1.5; font-style: italic; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lp-quote p::before { content: "\201C"; font-size: 30px; line-height: 0; vertical-align: -11px; margin-right: 4px; opacity: .6; font-style: normal; }
.lp-quote cite { display: block; margin-top: 4px; font-style: normal; font-size: 12.5px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes lpFade { from { opacity: 0; transform: translate3d(0, 6px, 0); } to { opacity: 1; transform: none; } }

/* ---------- form side ---------- */
.lp-form-side { display: flex; flex-direction: column; justify-content: center; justify-content: safe center; align-items: center; min-height: 0; overflow: hidden;
  padding: clamp(14px, 3.5vh, 40px) clamp(18px, 2.4vw, 32px); background: #fff; position: relative; }
.lp-form { width: 100%; max-width: 410px; animation: lpRise .8s ease both; flex: none; }
.lp-form .lp-logo { height: clamp(34px, 6.4vh, 64px); max-width: 220px; object-fit: contain; display: block; margin: 0 0 clamp(8px, 1.8vh, 18px); }
.lp-form h2 { margin: 0 0 4px; font-size: clamp(21px, 3.3vh, 28px); line-height: 1.15; font-weight: 800; color: var(--lp-brand-dark, #121e35); letter-spacing: -.01em; }
.lp-form .lp-sub { margin: 0 0 clamp(12px, 2.6vh, 24px); color: #5b6280; font-size: clamp(13px, 1.75vh, 14.5px); line-height: 1.5; }
.lp-field { margin-bottom: clamp(9px, 1.7vh, 16px); }
.lp-field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 5px; color: #2b3150; }
.lp-input { position: relative; }
.lp-input > svg { position: absolute; z-index: 1; left: 14px; top: 50%; transform: translateY(-50%); color: #8a90ab; pointer-events: none; }
.lp-input input { width: 100%; height: clamp(42px, 5.6vh, 50px); border: 1.5px solid #d9dceb; border-radius: 12px; padding: 0 46px 0 44px; font: inherit; font-size: 15.5px; background: #fafbff; color: #1a1f36; transition: border-color .2s, box-shadow .2s, background .2s; }
.lp-input input:focus { outline: none; border-color: var(--lp-brand, #1b2a4a); background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--lp-brand, #1b2a4a) 16%, transparent); }
.lp-eye { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: transparent; color: #6b7190; cursor: pointer; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.lp-eye:hover { background: #eef0f8; }
.lp-row { display: flex; justify-content: flex-end; margin: -2px 0 clamp(10px, 1.8vh, 18px); font-size: 13.5px; }
.lp-row a { color: var(--lp-brand, #1b2a4a); font-weight: 600; text-decoration: none; }
.lp-row a:hover { text-decoration: underline; }
.lp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: clamp(42px, 5.6vh, 50px); border-radius: 12px; border: 0; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .2s, background .2s; }
.lp-btn-main { color: #fff; background: linear-gradient(135deg, var(--lp-brand, #1b2a4a), var(--lp-brand-dark, #121e35)); box-shadow: 0 12px 24px -12px color-mix(in srgb, var(--lp-brand, #1b2a4a) 70%, transparent); }
.lp-btn-main:hover { transform: translateY(-1px); box-shadow: 0 16px 28px -12px color-mix(in srgb, var(--lp-brand, #1b2a4a) 80%, transparent); color: #fff; }
.lp-btn-main:active { transform: none; }
.lp-btn-main[disabled] { opacity: .7; cursor: progress; }
.lp-btn-soft { background: #f1f2f8; color: #2b3150; height: clamp(38px, 4.8vh, 46px); font-size: 14px; font-weight: 600; border: 1px solid #e3e5f0; }
.lp-btn-soft:hover { background: #e8eaf4; color: #1a1f36; }
.lp-or { display: flex; align-items: center; gap: 12px; color: #8a90ab; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; margin: clamp(12px, 2.4vh, 24px) 0 clamp(8px, 1.4vh, 14px); }
.lp-or::before, .lp-or::after { content: ""; flex: 1; height: 1px; background: #e6e8f2; }
.lp-alt { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lp-alert { border-radius: 12px; padding: clamp(8px, 1.4vh, 12px) 14px; font-size: 13.5px; line-height: 1.45; margin-bottom: clamp(10px, 1.8vh, 16px); }
.lp-alert-err { background: #fdecee; color: #8a0f1d; border: 1px solid #f6c8ce; }
.lp-alert-info { background: #eaf2ff; color: #173e7a; border: 1px solid #c9dbfb; }
.lp-alert-ok { background: #e9f7ee; color: #15603a; border: 1px solid #c3e6d0; }
.lp-foot { margin-top: clamp(12px, 2.6vh, 28px); font-size: 12px; color: #8a90ab; text-align: center; }
.lp-foot a { color: inherit; }
.lp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.lp-mini { margin: clamp(10px, 1.8vh, 16px) 0 0; font-size: 13px; color: #5b6280; text-align: center; line-height: 1.5; }
.lp-mini a { color: var(--lp-brand, #1b2a4a); font-weight: 600; }
.lp-choices { max-height: 46vh; overflow-y: auto; margin: 0 -4px; padding: 2px 4px; }
.lp-choice { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border: 1.5px solid #e1e4f0; border-radius: 14px; background: #fff; cursor: pointer; font: inherit; margin-bottom: 8px; transition: border-color .2s, transform .15s, box-shadow .2s; }
.lp-choice:hover { border-color: var(--lp-brand, #1b2a4a); transform: translateY(-1px); box-shadow: 0 10px 22px -16px rgba(20, 30, 70, .6); }
.lp-choice b { display: block; font-size: 15px; color: #1a1f36; }
.lp-choice small { color: #6b7190; font-size: 12.5px; }
.lp-choice span.go { color: var(--lp-brand, #1b2a4a); font-weight: 700; white-space: nowrap; }

/* ---------- fitting steps (set by login.js on each panel) ---------- */
.lp-f1 .lp-o1, .lp-f2 .lp-o2, .lp-f3 .lp-o3 { display: none !important; }
.lp-story.lp-f1 .lp-caption, .lp-story.lp-f1 .lp-brand small, .lp-story.lp-f1 .lp-ann p, .lp-story.lp-f1 .lp-ann time { display: none; }
.lp-story.lp-f2 .lp-hero p, .lp-story.lp-f2 .lp-card + .lp-card { display: none; }
.lp-story.lp-f3 .lp-cards { display: none; }
.lp-story.lp-f4 .lp-hero h1 { -webkit-line-clamp: 2; font-size: clamp(20px, 4.4vh, 34px); }
.lp-form-side.lp-f1 .lp-foot, .lp-form-side.lp-f1 .lp-sub { margin-bottom: 10px; }
.lp-form-side.lp-f2 .lp-logo { display: none; }
.lp-form-side.lp-f2 .lp-sub { display: none; }
.lp-form-side.lp-f2 h2 { margin-bottom: 10px; }
.lp-form-side.lp-f3 .lp-or { display: none; }
.lp-form-side.lp-f3 .lp-alt { margin-top: 10px; }
.lp-form-side.lp-f3 .lp-field label { margin-bottom: 3px; font-size: 12.5px; }
.lp-f4 > * { zoom: .9; }
.lp-f5 > * { zoom: .8; }

/* ---------- phones and narrow windows: a short story band on top, the form below ---------- */
@media (max-width: 900px) {
  .lp { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .lp-story { order: 1; padding: clamp(12px, 2.4vh, 22px) 18px; gap: clamp(6px, 1.4vh, 12px); max-height: 36vh; max-height: 36dvh; }
  .lp-form-side { order: 2; padding: clamp(12px, 2.6vh, 26px) 18px; }
  .lp-hero { margin: 0; }
  .lp-hero h1 { font-size: clamp(20px, 3.4vh, 28px); -webkit-line-clamp: 2; margin-bottom: 6px; }
  .lp-hero p { font-size: 13.5px; -webkit-line-clamp: 2; }
  .lp-brand img { height: clamp(28px, 4.4vh, 40px); }
  .lp-cards { grid-template-columns: 1fr; }
  .lp-card + .lp-card { display: none; }
  .lp-caption { display: none; }
  .lp-form .lp-logo { display: none; }
}
@media (max-width: 420px) { .lp-alt { grid-template-columns: 1fr 1fr; } .lp-btn-soft { font-size: 13px; gap: 5px; } .lp-btn-soft svg { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .lp-slide.on, .lp-orb, .lp-hero, .lp-cards, .lp-form, .lp-ann.on, .lp-quote.on { animation: none !important; }
  .lp-slide { transition: none; transform: none; }
}
