/* ---------------------------------------------------------------------------
   Client sign-in — SOLAREN midnight and gold, matching the public website.
   One centred card over a quiet sunrise. Every state the page can show
   (sign-in, invitation, chooser, account, expired, no access, closed,
   unavailable, not configured) uses the same card, so the look never breaks.
   Fonts and the logo are served from this folder; nothing loads from elsewhere.
--------------------------------------------------------------------------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/static/signin/inter.woff2") format("woff2"); }
@font-face { font-family: "DM Serif Display"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/signin/dm-serif.woff2") format("woff2"); }
@font-face { font-family: "DM Serif Display"; font-style: italic; font-weight: 400; font-display: swap; src: url("/static/signin/dm-serif-italic.woff2") format("woff2"); }

:root {
  --night: #040a13;
  --text: #eef2f6;
  --muted: #c0ccd7;
  --dim: #97a8b8;
  --line: rgba(160, 190, 215, .16);
  --line-gold: rgba(232, 188, 106, .32);
  --gold: #e8bc6a;
  --gold-3: #f7dca2;
  --gold-grad: linear-gradient(118deg, #fbe4b0 0%, #eebd6b 42%, #d39a48 78%, #b97d35 100%);
  --text-grad: linear-gradient(100deg, #fff0cc 0%, #f6d08a 35%, #ecbb68 68%, #f8dca6 100%);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sun: min(78vmin, 700px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--night); color: var(--text); overflow-x: hidden;
  font: 400 17px/1.6 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
:where(.button, .choice, .link, a):focus-visible { outline: 2px solid var(--gold-3); outline-offset: 4px; }
[hidden] { display: none !important; }

/* ---- the sky ---- */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(90% 60% at 50% 108%, #3a2817 0%, #13243a 42%, #081222 70%, #040a13 100%); }
.sky__stars i { position: absolute; width: var(--s); height: var(--s); border-radius: 50%; background: #eef4ff; box-shadow: 0 0 6px rgba(220, 235, 255, .8); opacity: .35; animation: si-twinkle var(--t, 5s) var(--d, 0s) ease-in-out infinite; }
.sky__stars i.b { background: #fff8e6; box-shadow: 0 0 8px 1px rgba(255, 236, 190, .9); }
.sky__stars i.b::before, .sky__stars i.b::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 1px; transform: translate(-50%, -50%); background: linear-gradient(90deg, transparent, rgba(255, 242, 210, .9), transparent); }
.sky__stars i.b::after { transform: translate(-50%, -50%) rotate(90deg); }
.sky__sun { position: absolute; left: 50%; bottom: 0; width: var(--sun); height: var(--sun); margin-left: calc(var(--sun) / -2); border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #fff1cc 0%, #f6cb7e 30%, #df9e4e 62%, #9a5f28 100%);
  box-shadow: 0 0 60px rgba(244, 190, 108, .45);
  transform: translateY(78%); animation: si-sunrise 3.2s var(--ease) both; }
.sky__sun::before { content: ""; position: absolute; inset: -55%; border-radius: 50%; background: radial-gradient(circle, rgba(246, 196, 116, .38), rgba(226, 150, 72, .14) 32%, transparent 62%); }
.sky__rays { position: absolute; inset: -80%; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 228, 170, .14) 0deg 1.4deg, transparent 1.4deg 10deg);
  -webkit-mask: radial-gradient(circle, transparent 30%, #000 32%, rgba(0, 0, 0, .4) 44%, transparent 60%); mask: radial-gradient(circle, transparent 30%, #000 32%, rgba(0, 0, 0, .4) 44%, transparent 60%);
  animation: si-spin 180s linear infinite; }
.sky__horizon { position: absolute; left: calc(50% - 130vmax); width: 260vmax; height: 60vh; bottom: -48vh; border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: linear-gradient(180deg, #06101b, #03080f 40%); border-top: 1px solid rgba(255, 226, 170, .6);
  box-shadow: 0 -24px 90px rgba(236, 170, 90, .25); }
.shoot { position: absolute; left: var(--x); top: var(--y); width: var(--len, 170px); height: 1.5px; border-radius: 2px; transform-origin: 100% 50%; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 246, 225, .95)); filter: drop-shadow(0 0 6px rgba(255, 226, 170, .8));
  animation: si-shoot var(--dur, 1.2s) cubic-bezier(.3, .1, .6, 1) forwards; }

/* ---- the firefly: a small warm light that follows a mouse ---- */
.firefly { position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; opacity: 0; transition: opacity .6s; }
.has-firefly .firefly { opacity: 1; }
.firefly i { position: absolute; border-radius: 50%; }
.firefly__glow { width: 300px; height: 300px; margin: -150px 0 0 -150px; background: radial-gradient(circle, rgba(255, 222, 150, .07) 0%, rgba(240, 190, 110, .03) 34%, transparent 62%); mix-blend-mode: screen; }
.firefly__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff3cf; box-shadow: 0 0 6px 2px rgba(255, 214, 140, .75), 0 0 16px 5px rgba(240, 184, 100, .28); animation: si-blink 2.6s ease-in-out infinite; }
@media (hover: none), (pointer: coarse) { .firefly { display: none; } }

/* ---- layout: one centred column ---- */
.shell { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 96px 20px 40px; position: relative; }
.mark { position: absolute; top: 24px; left: 28px; display: flex; align-items: center; gap: 12px; }
.mark__logo { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); }
.mark__word { font: 650 16px/1 Inter; letter-spacing: .32em; background: var(--text-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.card {
  position: relative; width: min(100%, 460px); padding: 38px 36px 32px; text-align: center; border-radius: 30px;
  background: linear-gradient(180deg, rgba(18, 36, 56, .86), rgba(6, 15, 26, .92));
  border: 1px solid var(--line-gold);
  box-shadow: 0 50px 120px -40px #000, 0 0 0 1px rgba(255, 255, 255, .03) inset, 0 0 80px -30px rgba(232, 188, 106, .35);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  animation: si-rise .9s .15s var(--ease) both;
}
.card::before { content: ""; position: absolute; left: 12%; right: 12%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 228, 170, .9), transparent); }
.card__crest { position: relative; width: 76px; height: 76px; margin: 0 auto 20px; }
.card__crest img { position: relative; width: 100%; height: 100%; border-radius: 19px; box-shadow: 0 14px 34px rgba(0, 0, 0, .6); }
.card__halo { position: absolute; inset: -70%; border-radius: 50%; background: radial-gradient(circle, rgba(246, 200, 120, .38), transparent 62%); animation: si-halo 4s ease-in-out infinite; }

.state { display: block; }
.eyebrow { margin: 0 0 8px; font: 600 14px/1.4 Inter; letter-spacing: .04em; color: var(--gold); }
.title { margin: 0 0 12px; font: 650 30px/1.15 Inter; letter-spacing: -.03em; color: #f5f7fa; }
.title em { font-family: "DM Serif Display", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: 0; background: var(--text-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { margin: 0 0 26px; color: var(--muted); font-size: 16.5px; line-height: 1.65; }
.footnote { margin: 18px 0 0; color: var(--dim); font-size: 14.5px; line-height: 1.6; }
.secure { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; font-size: 14px; color: var(--dim); }
.secure svg { width: 15px; height: 15px; fill: none; stroke: var(--gold); stroke-width: 1.7; }

.button {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; padding: 0 24px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 16.5px/1.2 Inter; color: #1b1206; background: var(--gold-grad);
  box-shadow: 0 14px 44px -14px rgba(236, 184, 102, .75), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.button::after { content: ""; position: absolute; top: -40%; bottom: -40%; left: -40%; width: 26%; background: linear-gradient(90deg, transparent, rgba(255, 252, 240, .7), transparent); transform: skewX(-20deg); animation: si-sheen 7s 2s ease-in-out infinite; }
.button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 20px 54px -12px rgba(236, 184, 102, .9), inset 0 1px 0 rgba(255, 255, 255, .6); }
.button:disabled { opacity: .6; cursor: default; }
.button--quiet { color: var(--text); background: rgba(10, 25, 42, .7); border: 1px solid rgba(170, 200, 225, .26); box-shadow: none; min-height: 48px; font-size: 15px; }
.button--quiet::after { display: none; }
.button--quiet:hover:not(:disabled) { border-color: var(--line-gold); box-shadow: none; }

.choices { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; text-align: left; }
.choice { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 16px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(8, 20, 34, .75); color: var(--text); font: inherit; transition: border-color .2s, background .2s; }
.choice:hover:not(:disabled) { border-color: var(--line-gold); background: rgba(232, 188, 106, .06); }
.choice[aria-current="true"] { border-color: rgba(232, 188, 106, .6); background: rgba(232, 188, 106, .1); }
.choice__name { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.choice__role { font-size: 13.5px; color: var(--dim); white-space: nowrap; }

.panel { margin: 18px 0 0; padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: rgba(8, 20, 34, .6); text-align: left; }
.panel__title { margin: 0 0 8px; font: 600 16px/1.3 Inter; }
.panel__note { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; }
.panel__done { margin: 12px 0 0; color: #7fd6a4; font-size: 14.5px; }
.link { margin-top: 20px; background: none; border: 0; padding: 6px 4px; color: var(--gold-3); font: 600 15px Inter; cursor: pointer; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

.spinner { width: 34px; height: 34px; margin: 10px auto 18px; border-radius: 50%; border: 2px solid rgba(232, 188, 106, .2); border-top-color: var(--gold); animation: si-spin .9s linear infinite; }

.foot { margin: 0; color: var(--muted); font-size: 15px; }
.foot a { color: var(--gold-3); text-decoration: none; border-bottom: 1px solid rgba(247, 220, 162, .45); }
.tagline { margin: 0; color: var(--dim); font-size: 14px; }
.tagline em { font-family: "DM Serif Display", Georgia, serif; color: var(--gold-3); font-size: 17px; }

@keyframes si-spin { to { transform: rotate(360deg); } }
@keyframes si-twinkle { 0%, 100% { opacity: .15; } 50% { opacity: .75; } }
@keyframes si-sunrise { from { transform: translateY(100%); } to { transform: translateY(78%); } }
@keyframes si-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes si-halo { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes si-sheen { 0%, 80% { left: -40%; } 100% { left: 140%; } }
@keyframes si-blink { 0%, 100% { opacity: .55; transform: scale(.85); } 45% { opacity: 1; transform: scale(1.15); } }
@keyframes si-shoot { 0% { opacity: 0; transform: rotate(var(--a)) translateX(0); } 12% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--dist, 480px)); } }

/* ---- phones: calmer and roomier ---- */
@media (max-width: 640px) {
  :root { --sun: 130vw; }
  .sky__stars i:nth-child(3n) { display: none; }
  .sky__rays { display: none; }
  .shell { justify-content: flex-start; padding: 84px 16px 30px; gap: 18px; }
  .mark { top: 20px; left: 18px; }
  .card { padding: 30px 22px 26px; border-radius: 26px; }
  .title { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media (min-width: 641px) {
  .tagline { position: absolute; top: 34px; right: 30px; }
}

/* The used-or-expired invite link (2026-10-05): its second action is a mail link. */
a.button { text-decoration: none; margin-top: 12px; }
