/* ============================================================
   VISTA PORTAL: shared styles for every page.
   Colors come from the Vista Brand Guidelines (2025):
   Deep Horizon #172750, Vista Crest #1C427B, Sunrise Gold #FFD018.
   Font: Figtree, a free stand-in for Greycliff CF until Vista
   confirms a web license.
   ============================================================ */

:root {
  --deep-horizon: #172750;
  --vista-crest: #1C427B;
  --sunrise-gold: #FFD018;
  --night: #0E1A36;
  --ink: #0D1113;
  --muted: #55607A;
  --line: #DCE2EC;
  --paper: #FFFFFF;
  --radius: 16px;
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--night); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font: 16px/1.55 var(--font);
  color: var(--ink);
  background: transparent; /* the fixed sky layer sits behind the page */
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* ---------- The sky: sunrise gradient, mountain footage on top when it loads ---------- */
.sky {
  position: fixed; inset: 0; z-index: -2; overflow: hidden;
  background:
    radial-gradient(60% 48% at 50% 78%, rgba(255, 208, 24, .55) 0%, rgba(255, 208, 24, .16) 38%, rgba(255, 208, 24, 0) 70%),
    linear-gradient(180deg, #0E1A36 0%, var(--deep-horizon) 34%, var(--vista-crest) 72%, #3D5F93 100%);
}
.sky::after { /* Vista's own mountain watermark along the horizon (still sky only) */
  content: ""; position: absolute; left: 50%; bottom: -4vh; width: min(1100px, 130vw); height: 46vh;
  transform: translateX(-50%);
  background: url("../assets/vista-watermark.svg") no-repeat center bottom / contain;
  opacity: .10; transition: opacity .9s ease;
}
.sky.has-video::after { opacity: 0; }
.sky video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .9s ease;
}
.sky video.is-playing { opacity: 1; animation: drift 36s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.07); } }
.scrim {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(14, 26, 54, .70) 0%, rgba(14, 26, 54, .62) 38%, rgba(23, 39, 80, .38) 62%, rgba(14, 26, 54, .70) 100%);
}
@media (prefers-reduced-motion: reduce) {
  .sky video { display: none; }
}

/* Pause control for the moving background (shown only while footage plays) */
.motion-toggle {
  position: fixed; right: 14px; bottom: 14px; z-index: 2;
  font: 600 12.5px var(--font); color: #fff; cursor: pointer;
  background: rgba(14, 26, 54, .55); border: 1px solid rgba(255, 255, 255, .35); border-radius: 99px;
  padding: 6px 12px;
}
.motion-toggle:hover { background: rgba(14, 26, 54, .75); }
.motion-toggle:focus-visible { outline: 3px solid var(--sunrise-gold); outline-offset: 2px; }
.motion-toggle[hidden] { display: none; }

/* ---------- Landing page ---------- */
.landing {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 16px 32px; color: #fff; text-align: center;
}
.brand-title { margin: 0; }
.brand-title img { width: min(340px, 78vw); height: auto; display: block; margin: 0 auto; }
.tagline {
  margin: 18px 0 0; font-size: 13px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase;
  color: #fff; text-wrap: balance;
}
.doors {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
  width: 100%; max-width: 900px; margin-top: 44px;
}
.door {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 28px 20px 24px; border-radius: var(--radius); text-decoration: none;
  background: var(--paper); color: var(--deep-horizon);
  box-shadow: 0 10px 30px rgba(8, 16, 36, .28);
  border-bottom: 4px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.door:hover, .door:focus-visible {
  transform: translateY(-4px); box-shadow: 0 16px 38px rgba(8, 16, 36, .36); border-bottom-color: var(--sunrise-gold);
}
.door:focus-visible { outline: 3px solid var(--sunrise-gold); outline-offset: 3px; }
.door img { width: 58px; height: 58px; margin-bottom: 6px; }
.door h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.005em; }
.door p { margin: 0; font-size: 14px; color: var(--muted); }
.door .go { margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--vista-crest); white-space: nowrap; }
.footnote { margin-top: 34px; font-size: 12.5px; line-height: 1.7; color: rgba(255, 255, 255, .9); }

@media (max-width: 760px) {
  .doors { grid-template-columns: 1fr; max-width: 420px; gap: 14px; margin-top: 34px; }
  .door { flex-direction: row; text-align: left; padding: 18px; gap: 14px; }
  .door img { width: 46px; height: 46px; margin: 0; flex: 0 0 auto; }
  .door .text { flex: 1 1 auto; }
  .door .go { margin: 0; }
}

/* ---------- Login pages ---------- */
.login {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 16px;
}
.login-card {
  width: 100%; max-width: 420px; background: var(--paper); border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(8, 16, 36, .34); padding: 32px 28px 26px;
}
.login-card .logo { width: 210px; max-width: 70%; height: auto; display: block; margin: 0 auto 22px; }
.login-card h1 { margin: 0; text-align: center; font-size: 24px; font-weight: 800; color: var(--deep-horizon); }
.login-card .sub { margin: 6px 0 22px; text-align: center; color: var(--muted); font-size: 14.5px; }
.field { margin: 0 0 14px; }
.field label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }
.field input {
  width: 100%; font: 16px var(--font); color: var(--ink); background: #fff;
  border: 1px solid #C6CFDD; border-radius: 10px; padding: 11px 12px;
}
.field input:focus { outline: 2px solid var(--vista-crest); outline-offset: 1px; border-color: var(--vista-crest); }
.btn {
  width: 100%; margin-top: 6px; border: 0; border-radius: 10px; padding: 12px 16px; cursor: pointer;
  font: 700 16px var(--font); color: #fff; background: var(--deep-horizon);
}
.btn:hover { background: var(--vista-crest); }
.btn:focus-visible { outline: 3px solid var(--vista-crest); outline-offset: 2px; }
.notice {
  margin: 14px 0 0; padding: 11px 13px; border-radius: 10px; font-size: 14px; line-height: 1.5;
  background: #FFF7D6; border: 1px solid #F1DD8A; color: #4A3A00;
}
.notice:empty { margin: 0; padding: 0; border: 0; background: none; } /* stays in the page so screen readers announce it */
.back { margin-top: 18px; text-align: center; font-size: 14px; }
.back a { color: #fff; text-decoration: none; font-weight: 600; }
.back a:hover { text-decoration: underline; }
.back a:focus-visible { outline: 3px solid var(--sunrise-gold); outline-offset: 3px; border-radius: 4px; }
