/* Log in and sign up. Loaded by accounts/login.html and accounts/signup.html
   on top of app.css. Same tokens, so dark mode follows.

   Like Settings and the builder: the dark band with the question, and on it
   the form written on a pass, cream in both colour schemes like the landing
   page's. The band and the pass look the same in both schemes; they are the
   "window", not a theme, so the fields on the pass carry their own colours
   rather than the tokens, which would turn them dark on a cream card.
   The pass is not tilted here, unlike the others: it is typed into. */

.authview {
  --au-1: #3b2a1d;
  --au-2: #1d1611;
  --au-3: #110d0a;
  --au-ink: #fbf3e7;
  --au-ink-2: rgba(251, 243, 231, 0.74);
  --au-ink-3: rgba(251, 243, 231, 0.52);
  --au-line: rgba(251, 243, 231, 0.12);
  /* The brand red, lifted so it still reads on the dark band. */
  --au-accent: #ff5a4f;
  --au-red: #dc2229;
  /* The pass's own palette, the landing page's. */
  --au-paper: #fffaf2;
  --au-paper-2: #f3e4cd;
  --au-paper-ink: #241c12;
  --au-paper-ink-2: #6b5a45;
  --au-paper-ink-3: #9c8a70;
  --au-paper-line: #eadbc4;
  --au-paper-risk: #a3311f;
}

/* ------------------------------------------------------------ chrome */
/* The top bar joins the band, as on the landing page and the builder. A
   stranger has no nav here: the pass carries Log in and Sign up. */
.authview .topbar { background: var(--au-2); border-bottom-color: var(--au-line); }
.authview .brand { color: var(--au-ink); }
.authview .brand-name span { color: var(--au-accent); }

main.au-main { padding: 0; max-width: none; }

/* ------------------------------------------------------------ the band */
.au-hero {
  position: relative; overflow: hidden; isolation: isolate;
  color: var(--au-ink);
  background:
    radial-gradient(800px 520px at 78% 35%, var(--au-1) 0%, rgba(59, 42, 29, 0) 70%),
    linear-gradient(180deg, var(--au-2) 0%, var(--au-3) 100%);
}
/* A faint grid of dots, strongest behind the pass. */
.au-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(251, 243, 231, 0.09) 1px, transparent 1.3px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse at 76% 50%, #000 10%, transparent 70%);
          mask-image: radial-gradient(ellipse at 76% 50%, #000 10%, transparent 70%);
  animation: dots-drift 6s linear infinite;
}
/* Routes flying behind everything, as at the foot of the landing page: the
   dotted routes flow, and flights cross them one after another so one is
   always in the air. The keyframes are app.css's. */
.au-arcs {
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%;
  pointer-events: none;
}
/* Bright and quick enough to read as moving on a desktop screen too; at 0.3
   and 10 units a second it only showed on a phone. */
.au-arcs .arc-base {
  fill: none; stroke: rgba(255, 90, 79, 0.45); stroke-width: 2; stroke-dasharray: 4 10;
  animation: arc-march 1.4s linear infinite;
}
.au-arcs .arc-fly {
  fill: none; stroke: var(--au-accent); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 12 188; animation: arc-cross 6s linear infinite;
  filter: drop-shadow(0 0 6px rgba(255, 90, 79, 0.85));
}
.au-arcs .arc-fly-2 { animation-duration: 7.5s; animation-delay: -2.5s; }
.au-arcs .arc-fly-3 { animation-duration: 9s; animation-delay: -6s; }

.au-hero-in {
  max-width: 1000px; margin: 0 auto; padding: 64px 28px 84px;
  min-height: min(720px, calc(100vh - 57px));
  display: grid; gap: 32px 64px; align-items: center;
  grid-template-columns: minmax(0, 1fr) 400px;
}

/* Messages ("Too many tries", logged out) sit on the band, so they read as
   part of the page rather than as a strip above it. */
main.au-main > .messages {
  margin: 0; padding: 22px max(28px, calc((100% - 1000px) / 2 + 28px)) 0;
  background: var(--au-2);
}
.authview .msg { border-radius: 0 12px 12px 0; }

.au-kicker {
  display: flex; align-items: center; gap: 11px; margin: 0 0 18px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--au-accent);
}
.au-kicker::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--au-accent); box-shadow: 0 0 0 4px rgba(255, 90, 79, 0.18);
}
.au-hero h1 {
  font-family: var(--display); font-weight: 700; color: var(--au-ink);
  font-size: clamp(38px, 4.6vw, 60px); line-height: 1.02;
  letter-spacing: -0.038em; margin: 0 0 18px;
  animation: au-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.au-lede {
  font-size: clamp(16px, 1.4vw, 18px); line-height: 1.55;
  color: var(--au-ink-2); max-width: 44ch; margin: 0;
  animation: au-rise 0.8s 0.12s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes au-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Sign up: the three steps from the landing page, this one lit. */
.au-steps {
  list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 14px;
  max-width: 44ch;
  animation: au-rise 0.8s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.au-steps li {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px;
  align-items: baseline; margin: 0; color: var(--au-ink-3);
  font-family: var(--display); font-weight: 500; font-size: 15px; line-height: 1.45;
}
.au-steps li span {
  display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 50%; border: 1px solid var(--au-line);
  font-family: var(--mono); font-size: 12.5px; color: var(--au-ink-2);
  transform: translateY(-1px);
}
.au-steps li.on { color: var(--au-ink); font-weight: 600; }
.au-steps li.on span {
  background: var(--au-red); border-color: var(--au-red); color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 90, 79, 0.18);
}

/* ------------------------------------------------------------ the pass */
.au-pass {
  position: relative; padding: 20px 24px 20px; border-radius: 18px;
  background: var(--au-paper); color: var(--au-paper-ink);
  box-shadow: 0 34px 60px -26px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(36, 28, 18, 0.06);
  animation: au-rise 0.8s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.au-pass a { color: #c41c22; }

/* Log in or sign up, as one switch along the top of the pass. */
.au-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  margin: 0 0 22px; border-radius: 999px; background: var(--au-paper-2);
}
.au-tabs a {
  display: block; padding: 8px 12px; border-radius: 999px; text-align: center;
  font-family: var(--display); font-weight: 600; font-size: 14px;
  color: var(--au-paper-ink-2); text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.au-tabs a:hover { color: var(--au-paper-ink); }
.au-tabs a.on {
  background: #fff; color: var(--au-paper-ink);
  box-shadow: 0 1px 3px rgba(36, 28, 18, 0.14);
}
.au-tabs a:focus-visible { outline: 2px solid var(--au-red); outline-offset: 1px; }

.au-form { display: grid; gap: 16px; }
.au-form .field { display: grid; gap: 6px; }
.au-form .lbl {
  margin: 0; font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--au-paper-ink-2);
}
.au-form input[type=email], .au-form input[type=password], .au-form input[type=text] {
  padding: 12px 14px; border-radius: 12px;
  font: 600 16px var(--display); letter-spacing: -0.005em;
  color: var(--au-paper-ink); background: var(--au-paper);
  border: 1px solid var(--au-paper-line);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
/* The fields are the pass's own cream. The pass is light whatever the site
   is, so the controls on it are too; and Chrome's autofill colour (grey-blue
   in a dark scheme) is painted over with the cream, since its background
   cannot be overridden directly. */
.au-pass { color-scheme: light; }
.au-form input:-webkit-autofill,
.au-form input:-webkit-autofill:hover,
.au-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--au-paper-ink);
  -webkit-box-shadow: 0 0 0 1000px var(--au-paper) inset;
  caret-color: var(--au-paper-ink);
}
.au-form input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--au-paper) inset, 0 0 0 3px rgba(220, 34, 41, 0.16);
}
.au-form input::placeholder { color: var(--au-paper-ink-3); font-weight: 500; }
.au-form input:hover { border-color: #d9c09c; }
.au-form input:focus, .au-form input:focus-visible {
  outline: none; border-color: var(--au-red);
  box-shadow: 0 0 0 3px rgba(220, 34, 41, 0.16);
}
.au-form .hint { color: var(--au-paper-ink-2); font-size: 12.5px; }
.au-form .error { margin: 0; color: var(--au-paper-risk); font-size: 13px; line-height: 1.45; }
.au-form .field.has-error input { border-color: var(--au-paper-risk); }
.au-form p.error {
  padding: 11px 14px; border-radius: 0 12px 12px 0;
  background: #f9e7e3; border-left: 3px solid var(--au-paper-risk);
}

.au-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-top: 4px; padding: 14px 24px; border: 0; border-radius: 999px;
  cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 16px;
  background: var(--au-red); color: #fff;
  box-shadow: 0 12px 26px -12px rgba(220, 34, 41, 0.75), inset 0 -2px 0 rgba(0, 0, 0, 0.16);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.au-btn:hover { background: #e8323a; transform: translateY(-1px); }
.au-btn:focus-visible { outline: 2px solid var(--au-paper-ink); outline-offset: 3px; }
.au-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* The tear, with a notch either side in the colour of the band under it. */
.au-tear { position: relative; margin: 22px -24px 16px; border-top: 2px dashed var(--au-paper-line); }
.au-tear::before, .au-tear::after {
  content: ""; position: absolute; top: -10px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--au-2);
}
.au-tear::before { left: -9px; }
.au-tear::after { right: -9px; }

.au-stub { display: grid; gap: 6px; font-size: 14px; line-height: 1.5; color: var(--au-paper-ink-2); }
.au-stub p { margin: 0; }
.au-stub a { font-family: var(--display); font-weight: 600; text-underline-offset: 3px; }

/* ------------------------------------------------------------ phones */
@media (max-width: 860px) {
  .au-hero-in {
    grid-template-columns: minmax(0, 1fr); min-height: 0;
    padding: 34px 20px 52px; gap: 28px;
  }
  .au-pass { max-width: 460px; }
  .au-steps { margin-top: 24px; }
}
@media (max-width: 620px) {
  main.au-main > .messages { padding: 16px 14px 0; }
  .au-hero h1 { font-size: clamp(34px, 9.6vw, 48px); margin-bottom: 12px; }
  .au-hero-in { padding: 26px 14px 44px; gap: 24px; }
  .au-pass { padding: 18px 18px 18px; border-radius: 16px; }
  .au-tear { margin: 20px -18px 14px; }
  /* The steps say again what the pass is for; on a phone the form comes
     first. */
  .au-steps { display: none; }
}
