/* Field Glide sign-in. Tokens match the mobile and web prototypes (dark, accent #E85D2A). */
:root {
  --accent: #E85D2A;
  --accent-hover: #ff7a47;
  --route: #A4694A; /* the logo's route lines */
  --dot: #E09A2B;   /* the logo's destination dot */
  --red: #FF453A;
  --bg-page: #0A0E18;
  --bg-app: #0E1420;
  --bg-side: #0B101B;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-3: rgba(255, 255, 255, 0.09);
  --divider: rgba(255, 255, 255, 0.08);
  --text: #fff;
  --text-2: rgba(255, 255, 255, 0.62);
  --text-3: rgba(255, 255, 255, 0.5);
  --text-4: rgba(255, 255, 255, 0.4);
  --font: 'Outfit', system-ui, sans-serif;
  --display: 'Barlow Condensed', 'Outfit', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg-app);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
@keyframes glide { from { opacity: 0; transform: translate(-28px, 18px) rotate(-6deg) } to { opacity: 1; transform: none } }
@keyframes loadbar { from { transform: translateX(-100%) } to { transform: translateX(250%) } }
@keyframes draw { from { stroke-dashoffset: 1200 } to { stroke-dashoffset: 0 } }
@keyframes pulse { 0%, 100% { opacity: 0.25; transform: scale(1) } 50% { opacity: 0.5; transform: scale(1.15) } }

/* ───────── Brand ───────── */
.wordmark {
  font-family: var(--display); font-weight: 700; line-height: 1;
  text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap;
}
.wordmark span { color: var(--accent); }
.tagline { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }

/* ───────── Splash ───────── */
.splash {
  min-height: 100%; position: relative; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(120% 70% at 50% 42%, rgba(232, 93, 42, 0.14) 0%, rgba(14, 20, 32, 0) 60%), var(--bg-app);
}
.splash-mark { width: 128px; height: auto; animation: glide 0.9s cubic-bezier(.2, .8, .2, 1) both; }
.splash-word { font-size: 56px; margin-top: 24px; animation: riseIn 0.6s 0.35s ease both; }
.splash-tag { margin-top: 12px; animation: riseIn 0.6s 0.55s ease both; }
.splash-bar {
  position: absolute; bottom: 86px; width: 120px; height: 3px; border-radius: 2px;
  background: rgba(255, 255, 255, 0.08); overflow: hidden; animation: fadeIn 0.4s 0.8s both;
}
.splash-bar div { width: 40%; height: 100%; background: var(--accent); border-radius: 2px; animation: loadbar 1.1s ease-in-out infinite; }

/* ───────── Layout ───────── */
.auth { min-height: 100%; display: grid; grid-template-columns: minmax(360px, 44%) 1fr; animation: fadeIn 0.25s ease; }
.auth-brand {
  position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 40px 48px 48px;
  background: radial-gradient(90% 60% at 80% 30%, rgba(232, 93, 42, 0.1) 0%, rgba(11, 16, 27, 0) 60%), var(--bg-side);
  border-right: 1px solid var(--divider);
}
.lockup { position: relative; display: flex; align-items: center; gap: 10px; }
.lockup img { display: block; }
.brand-copy { position: relative; margin-top: auto; }
.headline { font-family: var(--display); font-weight: 700; font-size: 52px; line-height: 1; text-transform: uppercase; letter-spacing: 0.01em; }
.headline span { color: var(--accent); }
.pitch { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 16px; max-width: 420px; }
.pitch li { font-size: 14px; line-height: 1.45; color: var(--text-3); }
.pitch b { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }

/* Route motif: the logo's curved route lines ending at its dot. */
.route { position: absolute; inset: 0; width: 100%; height: 100%; }
.route-line {
  fill: none; stroke: var(--route); stroke-width: 3; stroke-linecap: round; opacity: 0.55;
  stroke-dasharray: 1200; animation: draw 1.6s 0.2s cubic-bezier(.4, 0, .2, 1) both;
}
.route-line--soft { opacity: 0.25; animation-delay: 0.5s; }
.route-dot { fill: var(--dot); animation: fadeIn 0.4s 1.4s both; }
.route-dot-halo { fill: var(--dot); transform-box: fill-box; transform-origin: center; animation: pulse 3s 1.8s ease-in-out infinite; opacity: 0.25; }

.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.panel { width: 100%; max-width: 380px; }
.mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 32px; }
.mobile-brand img { display: block; }
.view { animation: fadeIn 0.2s ease; }

/* ───────── Tabs: active tab gets the dot + route line ───────── */
.tabs { display: flex; gap: 24px; margin-bottom: 28px; border-bottom: 1px solid var(--divider); }
.tabs button {
  position: relative; padding: 0 0 12px; font-size: 15px; font-weight: 600; color: var(--text-4);
}
.tabs button:hover { color: var(--text-2); }
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs button[aria-selected="true"]::before,
.tabs button[aria-selected="true"]::after { content: ''; position: absolute; bottom: -1px; }
.tabs button[aria-selected="true"]::before { left: 0; right: 10px; height: 2px; border-radius: 2px; background: var(--route); }
.tabs button[aria-selected="true"]::after { right: 0; bottom: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ───────── Form ───────── */
.title { font-size: 28px; font-weight: 700; line-height: 1.15; }
.sub { font-size: 14px; color: var(--text-4); margin: 6px 0 28px; }
.sub b { color: var(--text); font-weight: 600; }
.muted { color: var(--text-4); }

.label { display: block; font-size: 12px; font-weight: 600; color: var(--text-3); margin-bottom: 6px; }
.field {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; margin-bottom: 14px;
  background: var(--surface-2); border: 1px solid var(--divider); border-radius: 12px; color: rgba(255, 255, 255, 0.35);
  transition: border-color 0.15s, background 0.15s;
}
.field:focus-within { border-color: rgba(232, 93, 42, 0.6); background: var(--surface-3); }
.field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 16px; color: var(--text); }
.field input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 40px #1b212c inset; caret-color: #fff; }
.field-action { font-size: 13px; font-weight: 600; color: var(--text-3); padding: 8px 0 8px 8px; }
.field-action:hover { color: var(--text); }
.hint { font-size: 12px; color: var(--text-4); margin: -6px 0 18px; }
.row-end { display: flex; justify-content: flex-end; margin: -4px 0 18px; }
.link { font-size: 13px; font-weight: 600; color: var(--accent); }
.link:hover { color: var(--accent-hover); }

.note {
  display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--divider); border-radius: 12px; padding: 12px 14px; margin-bottom: 18px;
}
.note-dot { flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--dot); }
.note--error { background: rgba(255, 69, 58, 0.08); border-color: rgba(255, 69, 58, 0.25); color: #ffd1ce; }
.note--error .note-dot { background: var(--red); }

.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 52px;
  border-radius: 12px; font-size: 16px; font-weight: 700; text-decoration: none;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--primary:disabled { opacity: 0.7; cursor: default; }
.btn--ghost { background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: 15px; height: 48px; margin-top: 12px; }
.btn--ghost:hover { color: var(--text); }

.switch { margin-top: 24px; font-size: 13px; color: var(--text-4); text-align: center; }
.return-to { margin-top: 28px; font-size: 12px; color: var(--text-4); text-align: center; }
.return-to b { color: var(--text-2); font-weight: 600; }

.auth[data-mode="signin"] .signup-only,
.auth[data-mode="signup"] .signin-only { display: none; }

/* Where to go next, when sign-in wasn't started from an app. */
.destinations { display: grid; gap: 10px; margin-top: 4px; }
.dest {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; text-decoration: none;
  background: var(--surface-2); border: 1px solid var(--divider); color: var(--text);
}
.dest:hover { border-color: rgba(232, 93, 42, 0.5); }
.dest b { display: block; font-size: 15px; }
.dest small { display: block; font-size: 12px; color: var(--text-4); margin-top: 2px; }
.dest-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(232, 93, 42, 0.15); }

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .mobile-brand { display: flex; }
  .auth-main { align-items: flex-start; padding: 56px 16px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; }
}
