/* ===========================================================================
   AdaOS sign in

   Same tokens, same type, same shapes as the reviewer interface; styles.css is
   loaded first and this file only adds the landing screen. Depth comes from a
   stacked shadow and a specular highlight that follows the pointer. The card
   itself never transforms, because putting the form on a 3D layer softens the
   text it contains.

   Everything animated is behind prefers-reduced-motion.
   =========================================================================== */

.lg-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  /* safe keeps the top of the card reachable when the viewport is shorter
     than the card; centred overflow is otherwise unscrollable */
  place-items: safe center;
  padding: 32px 20px;
  background: var(--bg);
  overflow-x: hidden;
}

/* ============================ AMBIENT STAGE =============================== */
/* Fixed behind everything, never interactive. */
.lg-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* A blueprint grid, faded out towards the edges so it never reads as a border. */
.lg-grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, .16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, .16) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 78% 68% at 50% 46%, #000 0%, transparent 100%);
  mask-image: radial-gradient(ellipse 78% 68% at 50% 46%, #000 0%, transparent 100%);
}

/* Soft coloured light. Kept inside the accent and neutral ramps so the page
   still reads as the product and not as a marketing page. */
.lg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform;
}
.lg-glow-a {
  width: 620px; height: 620px;
  top: -220px; left: 50%; margin-left: -520px;
  background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, .10), transparent 68%);
  animation: lg-drift-a 26s ease-in-out infinite alternate;
}
.lg-glow-b {
  width: 560px; height: 560px;
  bottom: -240px; left: 50%; margin-left: 40px;
  background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, .08), transparent 68%);
  animation: lg-drift-b 32s ease-in-out infinite alternate;
}
.lg-glow-c {
  width: 480px; height: 480px;
  top: 42%; left: 50%; margin-left: -240px;
  background: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, .05), transparent 70%);
  animation: lg-drift-c 38s ease-in-out infinite alternate;
}

@keyframes lg-drift-a {
  from { transform: translate3d(0, 0, 0)      scale(1); }
  to   { transform: translate3d(70px, 46px, 0) scale(1.09); }
}
@keyframes lg-drift-b {
  from { transform: translate3d(0, 0, 0)        scale(1.05); }
  to   { transform: translate3d(-64px, -40px, 0) scale(.94); }
}
@keyframes lg-drift-c {
  from { transform: translate3d(-26px, 12px, 0) scale(.96); }
  to   { transform: translate3d(30px, -18px, 0) scale(1.06); }
}

/* ================================ LAYOUT ================================== */
.lg-main {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  place-items: center;
}

/* The card sits flat. A 3D tilt rasterises the text on a scaled composited
   layer, which softens every glyph on the page, so depth here comes from the
   stacked shadow and the pointer lit sheen instead. */
.lg-scene {
  width: 100%;
  max-width: 424px;
  animation: lg-rise .62s cubic-bezier(.16, .84, .28, 1) both;
}
@keyframes lg-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ================================= CARD =================================== */
.lg-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: box-shadow .34s ease;
  /* stacked shadow: contact, mid, and a wide ambient cast */
  box-shadow:
    0 1px 2px rgba(15, 23, 42, .05),
    0 10px 24px -12px rgba(15, 23, 42, .16),
    0 40px 72px -28px rgba(15, 23, 42, .22);
}
.lg-card.is-lit {
  box-shadow:
    0 1px 2px rgba(15, 23, 42, .05),
    0 16px 34px -14px rgba(15, 23, 42, .20),
    0 56px 96px -32px rgba(15, 23, 42, .28);
}

/* Accent hairline along the top edge, brightest in the middle. */
.lg-edge {
  position: absolute;
  top: -1px; left: 14px; right: 14px;
  height: 1px;
  border-radius: var(--r-full);
  background: linear-gradient(90deg,
    transparent, rgba(37, 99, 235, .55) 35%, rgba(37, 99, 235, .9) 50%,
    rgba(37, 99, 235, .55) 65%, transparent);
  opacity: .8;
}

/* Specular highlight. Follows the pointer via --lg-mx / --lg-my set in JS. */
.lg-sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
  background: radial-gradient(
    320px circle at var(--lg-mx, 50%) var(--lg-my, 0%),
    rgba(37, 99, 235, .10), rgba(37, 99, 235, .04) 42%, transparent 66%);
}
.lg-card.is-lit .lg-sheen { opacity: 1; }

.lg-card-body {
  position: relative;
  padding: 30px 32px 26px;
}

/* ================================ BRAND =================================== */
.lg-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 20px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.lg-mark {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: var(--r-full);
  background: var(--navy-900);
  color: var(--white);
  display: grid; place-items: center;
  font-size: 17px; font-weight: 600; line-height: 1;
  box-shadow: 0 4px 10px -2px rgba(15, 23, 42, .45), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.lg-brand-text { display: flex; flex-direction: column; min-width: 0; }
.lg-brand-name {
  font-size: var(--fs-md); font-weight: 700;
  letter-spacing: -.012em; color: var(--ink);
}
.lg-brand-sub {
  font-size: var(--fs-xs); color: var(--ink-3); letter-spacing: .005em;
}

.lg-head { margin-bottom: 20px; }
.lg-title { font-size: var(--fs-2xl); }
.lg-sub { margin-top: 5px; font-size: var(--fs-md); color: var(--ink-2); }

/* ================================ FORM ==================================== */
.lg-form { display: flex; flex-direction: column; gap: 15px; }
.lg-field { display: flex; flex-direction: column; gap: 6px; }
.lg-label {
  font-size: var(--fs-sm); font-weight: 600; color: var(--slate-700);
  letter-spacing: -.005em;
}
.lg-input-wrap { position: relative; display: flex; align-items: center; }

.lg-input {
  width: 100%;
  padding: 11px 12px;
  font: inherit;
  font-size: var(--fs-md);
  color: var(--ink);
  background: var(--slate-50);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: background .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.lg-input.has-affix { padding-right: 62px; }
.lg-input::placeholder { color: var(--ink-3); }
.lg-input:hover:not(:focus) { border-color: var(--border-strong); }
.lg-input:focus {
  outline: none;
  background: var(--white);
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.lg-reveal {
  position: absolute;
  right: 5px;
  padding: 5px 8px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  cursor: pointer;
  font-size: var(--fs-xs); font-weight: 600;
  color: var(--ink-2);
}
.lg-reveal:hover { background: var(--slate-100); color: var(--ink); }

/* Submit. The lift on hover is the same depth language as the card. */
.lg-submit {
  position: relative;
  margin-top: 5px;
  padding: 11px 15px;
  overflow: hidden;
  transform: translateZ(0);
  transition: background .14s ease, transform .16s ease, box-shadow .16s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .18);
}
.lg-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -6px rgba(15, 23, 42, .48);
}
.lg-submit:active:not(:disabled) { transform: translateY(0); box-shadow: 0 1px 2px rgba(15, 23, 42, .18); }

/* A single pass of light across the button on hover. */
.lg-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-110%);
  background: linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, .22) 50%, transparent 68%);
}
.lg-submit:hover:not(:disabled)::after { animation: lg-swipe .78s ease-out; }
@keyframes lg-swipe {
  from { transform: translateX(-110%); }
  to   { transform: translateX(110%); }
}

.lg-submit.is-busy { pointer-events: none; }
.lg-submit.is-busy .lg-submit-label { opacity: .55; }
.lg-spinner {
  display: none;
  width: 14px; height: 14px;
  margin-left: 9px;
  border: 2px solid rgba(255, 255, 255, .32);
  border-top-color: var(--white);
  border-radius: var(--r-full);
  animation: lg-spin .62s linear infinite;
}
.lg-submit.is-busy .lg-spinner { display: inline-block; }
@keyframes lg-spin { to { transform: rotate(360deg); } }

/* ================================ ALERT =================================== */
.lg-alert {
  margin-bottom: 15px;
  padding: 9px 12px;
  border: 1px solid rgba(220, 38, 38, .28);
  border-radius: var(--r-md);
  background: var(--red-50);
  color: var(--red-700);
  font-size: var(--fs-sm); font-weight: 500;
  animation: lg-nudge .3s ease both;
}
@keyframes lg-nudge {
  0%   { transform: translateX(0); opacity: 0; }
  25%  { transform: translateX(-5px); opacity: 1; }
  60%  { transform: translateX(4px); }
  100% { transform: translateX(0); }
}

.lg-note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
  line-height: 1.65;
  color: var(--ink-3);
}

.lg-legal {
  margin-top: 20px;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--ink-3);
}
.lg-legal .lg-dot { margin: 0 4px; }
.lg-legal .mono { font-size: 11px; }

/* ============================ RESPONSIVE ================================== */
@media (max-width: 480px) {
  .lg-card-body { padding: 24px 20px 22px; }
  .lg-title { font-size: var(--fs-xl); }
}

/* ========================== REDUCED MOTION ================================ */
/* Depth and light stay, movement stops. */
@media (prefers-reduced-motion: reduce) {
  .lg-scene { animation: none; }
  .lg-glow { animation: none; }
  .lg-card { transition: none; }
  .lg-submit:hover:not(:disabled) { transform: none; }
  .lg-submit::after, .lg-submit:hover:not(:disabled)::after { animation: none; content: none; }
  .lg-alert { animation: none; }
  .lg-spinner { animation-duration: 1.6s; }
}
