/* ============================================================
   login.css — the sign-in screen and its OmniaAI splash intro.
   Loaded after base/components; reuses the shared design tokens
   and the navy frame the section pages sit in. Prefix: lg-
   ============================================================ */

.lg-body {
  /* The same deep navy that frames reception and tops the launcher */
  background: rgba(31, 54, 72, 1);
  min-height: 100vh;
}

.lg-frame {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 14px 14px 0;
}

/* ============================================================
   SHELL
   ============================================================ */

.lg-shell {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Held back while the splash plays, then eased in as it leaves */
html.lg-splash-on .lg-shell {
  opacity: 0;
  transform: translateY(14px) scale(0.99);
}

/* ============================================================
   SHOWCASE — the OmniaAI artwork and what the system covers
   ============================================================ */

.lg-showcase {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 56px;
  border-radius: calc(var(--radius-xl) - 8px);
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.95) 0, rgba(255, 255, 255, 0) 52%),
    linear-gradient(160deg, var(--primary-softer) 0%, var(--bg) 58%, #dae6f0 100%);
}

.lg-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(47, 128, 185, 0.14) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
  pointer-events: none;
}

.lg-showcase > * {
  position: relative;
}

.lg-showcase__art {
  position: relative;
  width: min(460px, 100%);
  margin-bottom: 30px;
}

.lg-showcase__halo {
  position: absolute;
  inset: 8% 16%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(95, 168, 216, 0.38), rgba(95, 168, 216, 0) 70%);
  filter: blur(10px);
  animation: lgHalo 5s ease-in-out infinite;
}

.lg-showcase__orb {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 28px rgba(20, 48, 77, 0.16));
  animation: lgFloat 6s ease-in-out infinite;
}

@keyframes lgFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes lgHalo {
  0%, 100% { opacity: 0.55; transform: scale(0.94); }
  50% { opacity: 1; transform: scale(1.04); }
}

.lg-showcase__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  color: var(--steel-700);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lg-showcase__eyebrow .icon {
  width: 13px;
  height: 13px;
  color: var(--primary);
}

.lg-showcase__title {
  max-width: 460px;
  margin-top: 16px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--navy-900);
}

.lg-showcase__desc {
  max-width: 430px;
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-2);
}

.lg-showcase__sections {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 480px;
  margin-top: 24px;
}

.lg-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text-1);
  font-size: 12px;
  font-weight: 700;
}

.lg-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============================================================
   SIGN-IN PANEL
   ============================================================ */

.lg-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
}

.lg-panel__inner {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
}

.lg-logo {
  width: 150px;
  height: auto;
  margin-bottom: 34px;
}

.lg-heading {
  margin-bottom: 28px;
}

.lg-heading h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy-900);
}

.lg-heading p {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--text-2);
}

.lg-alert {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--green-soft);
  color: var(--green);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.lg-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lg-field__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.lg-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}

.lg-link:hover {
  text-decoration: underline;
}

/* ---------- Inputs with a leading icon ---------- */

.lg-input {
  position: relative;
  display: flex;
  align-items: center;
}

.lg-input__icon {
  position: absolute;
  left: 14px;
  color: var(--text-3);
  pointer-events: none;
  transition: color 0.15s ease;
}

.lg-input .field__input {
  padding: 13px 46px 13px 42px;
  border-color: var(--surface-2);
  background: var(--surface-2);
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.lg-input .field__input::placeholder {
  color: var(--text-3);
  font-weight: 500;
}

.lg-input .field__input:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.lg-input:focus-within .lg-input__icon {
  color: var(--primary);
}

.lg-input__toggle {
  position: absolute;
  right: 6px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--text-3);
  transition: background 0.15s ease, color 0.15s ease;
}

.lg-input__toggle:hover {
  background: var(--primary-softer);
  color: var(--steel-700);
}

.lg-field.has-error .field__input {
  border-color: var(--red);
  background: var(--surface);
}

.lg-field.has-error .field__input:focus {
  box-shadow: 0 0 0 3px var(--red-soft);
}

.lg-field.has-error .lg-input__icon {
  color: var(--red);
}

.lg-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--red);
}

.lg-error .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

/* ---------- Remember me ---------- */

.lg-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}

.lg-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--steel-700);
  cursor: pointer;
}

/* ---------- Submit ---------- */

.lg-submit {
  gap: 10px;
  margin-top: 6px;
  padding: 14px 20px;
  font-size: 14px;
  box-shadow: 0 10px 22px rgba(20, 48, 77, 0.22);
}

.lg-submit .icon {
  transition: transform 0.15s ease;
}

.lg-submit:hover .icon {
  transform: translateX(3px);
}

.lg-submit.is-busy {
  pointer-events: none;
  filter: saturate(0.8) brightness(0.95);
}

.lg-help {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-3);
}

/* ============================================================
   TASKBAR — the same strip the launcher ends on
   ============================================================ */

.lg-taskbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  padding: 0 8px;
  color: var(--text-on-dark-muted);
  font-size: 12px;
  font-weight: 600;
}

.lg-taskbar__brand {
  letter-spacing: 0.18em;
}

.lg-taskbar__clock {
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   SPLASH — the OmniaAI motion logo, on every visit for a fixed time.
   Only shown when the head script sets html.lg-splash-on, so
   without JavaScript the form is simply there. login.js adds
   is-running as its clock starts and is-playing once the clip
   actually renders, so a clip that never plays still leaves the
   brand and the progress bar on screen for the full duration.
   ============================================================ */

.lg-splash {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  /* The clip's own off-white ground, so its edges disappear */
  background: #fefefe;
  cursor: pointer;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

html.lg-splash-on .lg-splash,
.lg-splash.is-leaving {
  display: flex;
}

.lg-splash.is-leaving {
  opacity: 0;
  visibility: hidden;
}

.lg-splash__video {
  width: min(820px, 100%);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.6s ease, transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
  /* Feather the frame edges (the artwork sits well inside them) so no seam shows */
  -webkit-mask-image:
    linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent),
    linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent),
    linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent);
  mask-composite: intersect;
}

.lg-splash.is-playing .lg-splash__video {
  opacity: 1;
  transform: scale(1);
}

.lg-splash.is-leaving .lg-splash__video {
  transform: scale(1.06);
}

/* Stacked above the clip, whose transform would otherwise paint over it */
.lg-splash__brand {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: -6px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease 0.35s, transform 0.6s ease 0.35s;
}

.lg-splash.is-running .lg-splash__brand {
  opacity: 1;
  transform: none;
}

/* The trailing margin cancels the last letter's tracking so the word centres */
.lg-splash__name {
  margin-right: -0.5em;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.5em;
  color: var(--navy-900);
}

.lg-splash__tag {
  margin-right: -0.32em;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #5fa9b8;
}

.lg-splash__progress {
  width: 150px;
  height: 3px;
  margin-top: 24px;
  border-radius: 999px;
  background: var(--primary-soft);
  overflow: hidden;
}

.lg-splash__progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--navy-900));
  transform: scaleX(0);
  transform-origin: left;
}

.lg-splash.is-running .lg-splash__progress span {
  animation: lgSplashProgress var(--lg-splash-duration, 3000ms) linear forwards;
}

@keyframes lgSplashProgress {
  to { transform: scaleX(1); }
}

.lg-splash__skip {
  position: absolute;
  right: 24px;
  bottom: 24px;
  padding: 9px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.lg-splash__skip:hover {
  border-color: var(--text-3);
  color: var(--navy-900);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 980px) {
  .lg-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .lg-showcase {
    display: none;
  }
}

@media (max-width: 480px) {
  .lg-frame {
    padding: 10px 10px 0;
  }

  .lg-panel {
    padding: 32px 18px;
  }

  .lg-heading h1 {
    font-size: 22px;
  }

  .lg-splash__name {
    font-size: 24px;
  }

  .lg-splash__skip {
    right: 16px;
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lg-showcase__orb,
  .lg-showcase__halo {
    animation: none;
  }

  .lg-shell {
    transition: none;
  }
}
