/* Visual language borrowed from Orfeo Labs (codex-landing / liquid glass):
   steel-slate stage with a white key light, one blue accent, frosted glass,
   pill controls, Inter + JetBrains Mono. */
:root {
  --bg: #202d40;
  --bg-2: #1a2534;
  --text: #f2f5fa;
  --text-2: #c3cbd8;
  --text-3: #9aa5b6;
  --muted-ink: #b4bece;
  --line: rgba(229, 234, 242, 0.16);
  --line-2: rgba(229, 234, 242, 0.28);
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);

  /* Accent — Orfeo brand ramp at hue 225 */
  --accent: hsl(227 74% 64%);
  --accent-hi: hsl(230 88% 78%);
  --accent-ink: hsl(227 100% 91%);
  --accent-glow: hsl(235 100% 68%);
  --grad-cta: linear-gradient(145deg, hsl(232 86% 67%), hsl(232 75% 58%) 62%, hsl(233.5 63% 51%));
  --blue: #8fb4f5;
  --mint: #7ee0d3;

  --danger: #f87171;
  --ok: #34d399;
  --warn: #f5a623;
  --radius: 24px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.18, 1);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11', 'ss01';
}

button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); }

.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }

/* ── Stage: Orfeo's steel gradient with a moving key light ─────────── */
.ambient {
  --lx: 8%; --ly: 4%; --gx: 78%; --gy: 30%;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 72% 82% at 100% 100%, rgba(19, 30, 46, 0.62) 0%, rgba(26, 38, 55, 0.34) 38%, transparent 72%),
    radial-gradient(ellipse 54% 70% at 4% 68%, rgba(139, 150, 169, 0.3) 0%, rgba(107, 119, 138, 0.16) 34%, transparent 70%),
    linear-gradient(112deg, #8a94a5 0%, #6c7789 24%, #515d72 46%, #3b4860 68%, #29374b 86%, #202d40 100%);
}
.ambient > * { position: absolute; }
.ambient .key {
  width: 124vw; height: 140vh;
  left: var(--lx); top: var(--ly);
  translate: -50% -50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.82) 0%, rgba(232, 234, 239, 0.58) 23%, rgba(188, 194, 204, 0.3) 49%, rgba(135, 145, 161, 0.08) 78%, transparent 100%);
  transition: left 1.8s var(--ease-out), top 1.8s var(--ease-out);
  animation: key-drift 18s ease-in-out infinite alternate;
}
@keyframes key-drift { to { transform: translate(3vw, 2vh) scale(1.04); } }
.ambient .glow {
  width: 46vw; height: 46vw; border-radius: 50%;
  left: var(--gx); top: var(--gy);
  translate: -50% -50%;
  background: hsl(231 86% 64% / 0.26);
  filter: blur(110px);
  transition: left 2.2s var(--ease-out), top 2.2s var(--ease-out);
}
.ambient .veil { inset: 0; background: rgba(13, 21, 34, 0.5); }
.ambient .dots {
  inset: 0;
  background-image: radial-gradient(circle, rgba(214, 222, 233, 0.16) 0, rgba(214, 222, 233, 0.16) 0.8px, transparent 1px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 55%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 70% 55%, #000 10%, transparent 75%);
  opacity: 0.7;
}
.ambient::after {
  /* Orfeo's fine diagonal line texture */
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-image:
    repeating-linear-gradient(117deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(23deg, rgba(61, 75, 97, 0.018) 0 1px, transparent 1px 5px);
}

/* ── Glass ──────────────────────────────────────── */
.glass {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(146, 158, 180, 0.34), rgba(96, 110, 133, 0.26));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 24px 70px rgba(8, 16, 28, 0.38);
  -webkit-backdrop-filter: blur(28px) saturate(125%);
  backdrop-filter: blur(28px) saturate(125%);
}

/* ── Form controls ──────────────────────────────── */
.field { display: grid; gap: 8px; }
.field label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-3);
}
.input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.055));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -1px 2px rgba(5, 9, 18, 0.22);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.input::placeholder { color: rgba(226, 232, 248, 0.42); }
.input:hover { border-color: rgba(255, 255, 255, 0.26); }
.input:focus {
  border-color: hsl(232 90% 70% / 0.72);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 0 3px hsl(232 86% 67% / 0.2);
}
.input:-webkit-autofill, .input:-webkit-autofill:hover, .input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  -webkit-box-shadow: inset 0 0 0 1000px #303c55;
  transition: background-color 9999s ease-out;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  font-weight: 550;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, opacity 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.btn-primary {
  color: #fff;
  background: var(--grad-cta);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 1px hsl(232 64% 56% / 0.16), 0 10px 28px hsl(231 61% 55% / 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 0 0 1px hsl(233 76% 61% / 0.35), 0 15px 38px hsl(232 66% 57% / 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.42); }
.btn-ghost {
  color: #eef2f8;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 22px rgba(8, 16, 28, 0.18);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.2); }
.btn-sm { min-height: 36px; padding: 0 16px; font-size: 13px; }
.btn-danger { color: #fecaca; }

:focus-visible { outline: 2px solid hsl(235 100% 76%); outline-offset: 3px; }
.input:focus-visible { outline: none; }

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Supplied logo artwork rendered as a mask, so it takes the text colour
   without redrawing it (same approach as Orfeo's BrandLogo). */
.brand-logo {
  display: inline-block; flex: none; vertical-align: middle;
  height: var(--h, 24px); width: calc(var(--h, 24px) * var(--ratio, 1));
  background-color: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat;
  mask: var(--src) center / contain no-repeat;
}
