/* The sign-in page (access.remotetechnology.net; plan 2026-11-18-resident-access-b3-b4-sign-in-pass.md, task 5).
   Redesigned 2026-11-18 (0.30.1, Tim: "a bit flashier and modern"). Hand-written, CSS only: the page's CSP allows this
   site's own files and nothing else, so there are no outside fonts, no inline style and no script-drawn effects.
   Dark is the main look (the brand navy #0b2340 badge behind the white logo; a dot field echoes the logo's swoosh);
   light follows prefers-color-scheme. ALL motion is in the last block and is off under prefers-reduced-motion. */

/* The conic ring around the card turns by animating this angle (browsers without @property just show it still). */
@property --ring { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  color-scheme: dark light;
  --bg0: #050a12; --bg1: #0d2040;
  --card: rgba(13, 22, 37, 0.74); --card-glow: rgba(76, 155, 232, 0.32); --card-shadow: rgba(0, 0, 0, 0.6);
  --ink: #eaf1f8; --muted: #9db0c4; --line: rgba(150, 185, 225, 0.16); --line2: rgba(150, 185, 225, 0.32);
  --field: rgba(4, 9, 17, 0.62); --ph: #8499af; --edge: #566f92; --foot: #b8c7d9;
  --focus: #7cc0ff; --hi: #7cc0ff;
  --btn-ink: #04111f; --btn-a: #8ccaff; --btn-b: #5aa7f0; --btn-c: #4a98e6; --btn-glow: rgba(76, 155, 232, 0.55);
  --go-ink: #03140b; --go-a: #86e5b4; --go-b: #4cc38a; --go-glow: rgba(76, 195, 138, 0.5);
  --orb1: rgba(76, 155, 232, 0.6); --orb2: rgba(45, 212, 191, 0.36); --orb3: rgba(99, 102, 241, 0.4);
  --dot: rgba(150, 195, 240, 0.4);
  --ring0: rgba(150, 185, 225, 0.14); --ring1: rgba(124, 192, 255, 0.95); --ring2: rgba(45, 212, 191, 0.6);
  --info-bg: rgba(76, 155, 232, 0.14); --info-line: rgba(76, 155, 232, 0.45); --info-dot: #5aa7f0; --info-dot-ink: #04111f;
  --bad-bg: rgba(255, 123, 114, 0.12); --bad-line: rgba(255, 123, 114, 0.5); --bad: #ff7b72; --bad-dot-ink: #1d0503;
  --ok-bg: rgba(76, 195, 138, 0.13); --ok-line: rgba(76, 195, 138, 0.5); --ok: #4cc38a; --ok-dot-ink: #03140b;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg0: #e4edf8; --bg1: #f6f9fd;
    --card: rgba(255, 255, 255, 0.8); --card-glow: rgba(11, 92, 173, 0.18); --card-shadow: rgba(16, 40, 80, 0.28);
    --ink: #0e1a2b; --muted: #475a6f; --line: rgba(15, 45, 90, 0.14); --line2: rgba(15, 45, 90, 0.3);
    --field: #ffffff; --ph: #66788d; --edge: #7a8ea6; --foot: #475a6f;
    --focus: #0b5cad; --hi: #0b5cad;
    --btn-ink: #ffffff; --btn-a: #1b72cf; --btn-b: #1470cf; --btn-c: #0b5cad; --btn-glow: rgba(11, 92, 173, 0.45);
    --go-ink: #ffffff; --go-a: #1d7a46; --go-b: #166a3b; --go-glow: rgba(29, 122, 70, 0.4);
    --orb1: rgba(76, 155, 232, 0.32); --orb2: rgba(45, 212, 191, 0.2); --orb3: rgba(99, 102, 241, 0.14);
    --dot: rgba(11, 60, 120, 0.2);
    --ring0: rgba(15, 45, 90, 0.12); --ring1: rgba(11, 92, 173, 0.9); --ring2: rgba(20, 160, 140, 0.55);
    --info-bg: rgba(11, 92, 173, 0.08); --info-line: rgba(11, 92, 173, 0.4); --info-dot: #0b5cad; --info-dot-ink: #ffffff;
    --bad-bg: rgba(180, 35, 24, 0.07); --bad-line: rgba(180, 35, 24, 0.45); --bad: #b42318; --bad-dot-ink: #ffffff;
    --ok-bg: rgba(29, 122, 70, 0.08); --ok-line: rgba(29, 122, 70, 0.45); --ok: #1d7a46; --ok-dot-ink: #ffffff;
  }
}

* { box-sizing: border-box; }
html { background: var(--bg0); }
html, body { margin: 0; }
body {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center;
  padding: clamp(24px, 9vh, 110px) 16px 20px; color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

/* Background: a deep gradient, three soft glows and a dot field that fades out toward the edges. It never scrolls. */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 100%); }
.bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.6px); background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 0%, transparent 75%);
}
.orb { position: absolute; border-radius: 50%; }
.orb-a { width: 75vmax; height: 75vmax; left: -28vmax; top: -34vmax; background: radial-gradient(closest-side, var(--orb1), transparent); }
.orb-b { width: 70vmax; height: 70vmax; right: -30vmax; bottom: -36vmax; background: radial-gradient(closest-side, var(--orb2), transparent); }
.orb-c { width: 64vmax; height: 64vmax; left: 50%; top: -6vmax; margin-left: -32vmax; background: radial-gradient(closest-side, var(--orb3), transparent); }

/* The card: frosted glass over the glow, with a thin lit edge. */
.card {
  position: relative; width: 100%; max-width: 408px; flex: none; padding: 30px 28px 26px;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 34px 70px -34px var(--card-shadow), 0 0 90px -34px var(--card-glow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .card { -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); }
}
@supports ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  .card { border-color: transparent; }
  .card::before {
    content: ""; position: absolute; inset: -1px; padding: 1px; border-radius: inherit; pointer-events: none;
    background: conic-gradient(from var(--ring), var(--ring0), var(--ring1) 12%, var(--ring0) 30%, var(--ring2) 62%, var(--ring0) 82%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  }
}

/* The Remote Access logo is white artwork, so it always sits on the brand navy (#0b2340). */
.badge {
  position: relative; width: fit-content; max-width: 100%; margin: 0 auto 18px; padding: 11px 20px; overflow: hidden; border-radius: 16px;
  background: radial-gradient(120% 150% at 18% 0%, #17407a 0%, #0b2340 58%, #081a31 100%);
  box-shadow: inset 0 0 0 1px rgba(130, 180, 240, 0.3), 0 14px 32px -12px rgba(40, 120, 220, 0.6), 0 0 44px -10px rgba(76, 155, 232, 0.5);
}
.badge::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.2) 50%, transparent 62%); transform: translateX(-130%); }
.logo { display: block; width: 205px; max-width: 100%; height: auto; }

h1 {
  margin: 0 0 4px; text-align: center; font-size: 1.75rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; color: var(--ink);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  h1 { background: linear-gradient(180deg, var(--ink) 30%, var(--muted)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
}
.lede { margin: 0 0 18px; text-align: center; color: var(--muted); font-size: 0.97rem; }

label { display: block; margin-bottom: 7px; font-weight: 600; font-size: 0.9rem; letter-spacing: 0.01em; }
.field { position: relative; }
.field .ic { position: absolute; left: 14px; top: 50%; margin-top: -10px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
input {
  display: block; width: 100%; height: 52px; margin: 0; padding: 0 14px 0 46px; font: inherit; color: var(--ink); caret-color: var(--hi);
  background: var(--field); border: 1px solid var(--edge); border-radius: 13px;
}
input::placeholder { color: var(--ph); opacity: 1; }
input:hover { border-color: var(--hi); }
input:focus { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--focus); box-shadow: 0 0 0 6px var(--info-bg), 0 10px 28px -10px var(--btn-glow); }
.field:focus-within .ic { color: var(--hi); }
input[aria-invalid="true"] { border-color: var(--bad); }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus { -webkit-text-fill-color: var(--ink); caret-color: var(--ink); transition: background-color 99999s ease-out; }

button {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 52px; margin: 16px 0 0; padding: 0 16px; overflow: hidden;
  font: inherit; font-weight: 650; letter-spacing: 0.01em; cursor: pointer; color: var(--btn-ink);
  background: linear-gradient(135deg, var(--btn-a) 0%, var(--btn-b) 55%, var(--btn-c) 100%); border: 0; border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 14px 30px -12px var(--btn-glow);
}
button::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.32) 50%, transparent 65%); transform: translateX(-130%); }
button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button:disabled { cursor: progress; }
button .arrow, button .check, button .spin { flex: none; width: 20px; height: 20px; }
button .spin, button .check { display: none; }
.spin { border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; opacity: 0.85; }
.card[data-state="loading"] .arrow, .card[data-state="going"] .arrow { display: none; }
.card[data-state="loading"] .spin { display: block; }
.card[data-state="going"] .check { display: block; }
.card[data-state="going"] button { color: var(--go-ink); background: linear-gradient(135deg, var(--go-a) 0%, var(--go-b) 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 14px 30px -12px var(--go-glow); }

/* The message under the button: a plain sentence from the service, a problem, or "Taking you on". Kept in the page
   even when empty (collapsed) so a screen reader announces it when text arrives. */
.said {
  position: relative; margin: 16px 0 0; padding: 11px 14px 11px 44px; border: 1px solid var(--info-line); border-radius: 12px;
  background: var(--info-bg); color: var(--ink); font-size: 0.93rem; line-height: 1.45;
}
.said::before {
  content: "i"; content: "i" / ""; position: absolute; left: 12px; top: 11px; display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%;
  background: var(--info-dot); color: var(--info-dot-ink); font-size: 0.78rem; font-weight: 800; line-height: 1;
}
.said.bad { background: var(--bad-bg); border-color: var(--bad-line); }
.said.bad::before { content: "!"; content: "!" / ""; background: var(--bad); color: var(--bad-dot-ink); }
.said.ok { background: var(--ok-bg); border-color: var(--ok-line); }
.said.ok::before { content: "\2713"; content: "\2713" / ""; background: var(--ok); color: var(--ok-dot-ink); }
.said:empty { height: 0; margin: 0; padding: 0; border: 0; overflow: hidden; background: none; }
.said:empty::before { content: none; }
/* "Checking" and "Taking you on" are announced to screen readers; the spinner and the button show them to everyone else. */
.said.busy { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; white-space: nowrap; }

footer { margin-top: auto; padding-top: 24px; display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; color: var(--foot); font-size: 0.82rem; letter-spacing: 0.02em; }
footer svg { flex: none; opacity: 0.85; }

@media (max-width: 420px) {
  body { padding-left: 14px; padding-right: 14px; }
  .card { padding: 26px 20px 22px; border-radius: 20px; }
  .logo { width: 190px; }
  h1 { font-size: 1.6rem; }
}
@media (max-height: 560px) { body { padding-top: 24px; } }

@media (forced-colors: active) {
  .card, input, button, .said { border: 1px solid CanvasText; }
  h1 { background: none; -webkit-text-fill-color: currentColor; color: CanvasText; }
  button:focus-visible, input:focus { outline: 3px solid Highlight; }
}

/* The reduced-motion look: no animation anywhere, and the spinner (which would sit still) gives way to the written
   "Checking…" / "Taking you on…" line. */
@media (prefers-reduced-motion: reduce) {
  .spin { display: none !important; }
  .said.busy { position: relative; width: auto; height: auto; margin: 16px 0 0; padding: 11px 14px 11px 44px; overflow: visible; clip: auto; clip-path: none; border: 1px solid var(--info-line); white-space: normal; }
}

/* Motion (only for people who have not asked for less). */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } }
  @keyframes pop { from { opacity: 0; transform: translateY(-5px) scale(0.98); } }
  @keyframes drift-a { to { transform: translate3d(10vmax, 8vmax, 0) scale(1.12); } }
  @keyframes drift-b { to { transform: translate3d(-9vmax, -7vmax, 0) scale(1.1); } }
  @keyframes drift-c { to { transform: translate3d(-7vmax, 5vmax, 0) scale(0.92); } }
  @keyframes spin-ring { to { --ring: 360deg; } }
  @keyframes sheen { 0%, 62% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
  @keyframes turn { to { transform: rotate(360deg); } }
  @keyframes shake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes bloom { 0% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 0 0 var(--go-glow); } 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 0 14px transparent; } }

  .orb-a { animation: drift-a 28s ease-in-out infinite alternate; }
  .orb-b { animation: drift-b 34s ease-in-out infinite alternate; }
  .orb-c { animation: drift-c 22s ease-in-out infinite alternate; }

  .card { animation: rise 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) both; transition: box-shadow 0.4s ease; }
  .card > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .card > :nth-child(1) { animation-delay: 0.08s; }
  .card > :nth-child(2) { animation-delay: 0.16s; }
  .card > :nth-child(3) { animation-delay: 0.22s; }
  .card > :nth-child(4) { animation-delay: 0.3s; }
  footer { animation: rise 0.8s 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .card:focus-within { box-shadow: 0 34px 70px -34px var(--card-shadow), 0 0 120px -30px var(--card-glow), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
  .card::before { animation: spin-ring 10s linear infinite; }

  .badge::after { animation: sheen 7s ease-in-out 1.4s infinite; }

  input { transition: border-color 0.2s ease, box-shadow 0.25s ease; }
  .field .ic { transition: color 0.2s ease; }
  .field.shake { animation: shake 0.42s ease; }

  button { transition: transform 0.15s ease, box-shadow 0.25s ease, filter 0.2s ease, background 0.3s ease; }
  button .arrow { transition: transform 0.2s ease; }
  button:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 20px 36px -12px var(--btn-glow); }
  button:hover:not(:disabled) .arrow { transform: translateX(4px); }
  button:hover:not(:disabled)::after { transition: transform 0.7s ease; transform: translateX(130%); }
  button:active:not(:disabled) { transform: translateY(0) scale(0.985); }
  .spin { animation: turn 0.75s linear infinite; }
  .card[data-state="going"] button { animation: bloom 0.9s ease-out; }
  .card[data-state="going"] button::after { transform: none; animation: sheen 1.4s ease-in-out infinite; }
  .check path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.45s 0.05s ease-out forwards; }

  .said:not(:empty) { animation: pop 0.3s ease both; }
}
