/* Layout: full-bleed deep teal field with drifting glass tiles; brand statement left, glass sign-in card right; stacks on phones. Single dark look by choice. */
:root {
  --ink: #06141c;
  --deep: #0b2a3a;
  --mid: #11435a;
  --glass: rgba(9, 30, 42, 0.72);
  --line: rgba(160, 225, 240, 0.16);
  --text: #e8f6fa;
  --muted: #8fb2bf;
  --accent: #5fe0ee;
  --accent-2: #2fb3d1;
  --accent-ink: #04222c;
  --danger: #ff8a8a;
  --ok: #7bf0b4;
  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(120% 90% at 12% 0%, var(--mid) 0%, var(--deep) 42%, var(--ink) 100%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 24px;
  overflow-x: hidden;
}
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.shell {
  position: relative; z-index: 1;
  min-height: 100%;
  max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 440px);
  align-items: center; gap: clamp(32px, 7vw, 96px);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand svg { width: 44px; height: 44px; flex: none; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; }
.wordmark b { color: var(--accent); font-weight: 700; }
.hero { min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(30px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -0.03em;
  margin: 0; max-width: 14ch; text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { margin: 0; color: var(--muted); max-width: 44ch; font-size: 16px; }
.meta { display: flex; flex-wrap: wrap; gap: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.meta span { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(123, 240, 180, 0.18); }

.card {
  min-width: 0;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(24px, 4vw, 36px);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.card header { margin-bottom: 24px; }
.card h2 { font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: -0.02em; margin: 0 0 4px; }
.card header p { margin: 0; color: var(--muted); font-size: 14px; }
form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.control { position: relative; display: flex; align-items: center; }
.control > svg.lead { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; transition: color .15s; }
.control input {
  width: 100%; min-width: 0; height: 50px;
  background: rgba(3, 14, 20, 0.6); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 0 46px 0 44px; font: inherit; font-size: 15px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.control input::placeholder { color: rgba(143, 178, 191, 0.55); }
.control input:hover { border-color: rgba(160, 225, 240, 0.3); }
.control input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(95, 224, 238, 0.16); background: rgba(3, 14, 20, 0.85); }
.control:focus-within > svg.lead { color: var(--accent); }
.control input[aria-invalid="true"] { border-color: var(--danger); }
.reveal {
  position: absolute; right: 6px; width: 38px; height: 38px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center;
}
.reveal:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.reveal:focus-visible, .link:focus-visible, .check input:focus-visible + .box, button.go:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.reveal svg { width: 20px; height: 20px; }
.hint { font-size: 12px; color: var(--danger); min-height: 0; display: none; }
.hint.show { display: block; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--muted); user-select: none; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .box { width: 20px; height: 20px; border-radius: 6px; border: 1px solid rgba(160, 225, 240, 0.35); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.check .box svg { width: 12px; height: 12px; opacity: 0; color: var(--accent-ink); }
.check input:checked + .box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .box svg { opacity: 1; }
.link { color: var(--accent); text-decoration: none; font-size: 14px; font-weight: 600; border-radius: 4px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
button.go {
  position: relative; height: 52px; border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: var(--accent-ink); font: 700 15px var(--font-body); letter-spacing: 0.02em;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 10px 28px rgba(47, 179, 209, 0.35);
  transition: transform .12s, box-shadow .15s, filter .15s;
}
button.go:hover { filter: brightness(1.07); box-shadow: 0 14px 34px rgba(47, 179, 209, 0.45); }
button.go:active { transform: translateY(1px); }
button.go[disabled] { cursor: progress; filter: saturate(0.7); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(4, 34, 44, 0.3); border-top-color: var(--accent-ink); animation: spin .7s linear infinite; display: none; }
button.go[disabled] .spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.status { font-size: 13px; border-radius: 10px; padding: 10px 14px; display: none; }
.status.show { display: block; }
.status.err { color: var(--danger); background: rgba(255, 138, 138, 0.1); border: 1px solid rgba(255, 138, 138, 0.25); }
.status.ok { color: var(--ok); background: rgba(123, 240, 180, 0.1); border: 1px solid rgba(123, 240, 180, 0.25); }
.card footer { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); font-family: var(--font-mono); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card .brand-sm { display: none; margin-bottom: 22px; }

@media (max-width: 880px) {
  body { padding-block: 16px; }
  .shell { grid-template-columns: minmax(0, 1fr); max-width: 460px; align-content: center; gap: 24px; }
  .hero h1, .hero p, .meta { display: none; }
  .hero { align-items: center; }
}
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 1.6s; } * { transition: none !important; } }
