/* Spectral — signup / sign-in page
   Palette taken from the logo: near-black ground, gold + bronze accents. */

:root {
  --bg:        #151515;
  --bg-card:   #1c1c1c;
  --bg-input:  #111111;
  --line:      #2e2a22;
  --line-hi:   #4a3f2a;
  --gold:      #f7d046;
  --gold-hi:   #ffe98a;
  --bronze:    #e0a83a;
  --brown:     #8b5a1e;
  --text:      #ece6d8;
  --muted:     #8d8574;
  --danger:    #e06a5a;
  --ok:        #8fc46a;
}

* { box-sizing: border-box; }

html {
  height: 100%;
}

body {
  margin: 0;
  /* `min-height: 100%` on body resolves against html's content height rather
     than the viewport, so there was no spare space to centre the card in.
     Viewport units give the grid a full-height box to centre within. */
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(1100px 600px at 50% -10%, #1f1a12 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: grid;
  place-items: center;
  padding: 32px 18px;
  -webkit-font-smoothing: antialiased;
}

/* ---------------- card ---------------- */

.card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 28px 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .03);
}

/* ---------------- brand ---------------- */

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.logo {
  image-rendering: pixelated;
  border-radius: 10px;
  border: 1px solid var(--line-hi);
  background: var(--bg);
}

.brand h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  background: linear-gradient(180deg, var(--gold-hi), var(--bronze));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------- form ---------------- */

.field {
  display: block;
  margin-bottom: 14px;
}

.field > span {
  display: block;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 11px 13px;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.field input::placeholder { color: #5f5849; }

.field input:focus {
  border-color: var(--bronze);
  box-shadow: 0 0 0 3px rgba(224, 168, 58, .14);
}

.hint {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------------- webhook block ---------------- */

.webhook {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  animation: reveal .22s ease-out;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

/* ---------------- buttons ---------------- */

.primary {
  width: 100%;
  margin-top: 6px;
  padding: 12px 16px;
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-weight: 600;
  letter-spacing: .03em;
  color: #1a1405;
  background: linear-gradient(180deg, var(--gold-hi), var(--bronze));
  cursor: pointer;
  transition: filter .15s, transform .06s;
}

.primary:hover:not(:disabled) { filter: brightness(1.07); }
.primary:active:not(:disabled) { transform: translateY(1px); }

.primary:disabled {
  opacity: .55;
  cursor: default;
}

.link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--gold);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link:hover { color: var(--gold-hi); }

/* ---------------- footer / status ---------------- */

.alt {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}

.status {
  margin: 14px 0 0;
  min-height: 20px;
  font-size: 13px;
  text-align: center;
  color: var(--muted);
}

.status.error   { color: var(--danger); }
.status.success { color: var(--ok); }

/* ---------------- logged in ---------------- */

.logged-in {
  text-align: center;
  animation: reveal .25s ease-out;
}

.logged-in .check {
  width: 54px;
  height: 54px;
  margin: 4px auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 26px;
  color: #14210c;
  background: linear-gradient(180deg, var(--gold-hi), var(--bronze));
}

.logged-in h2 {
  margin: 0 0 8px;
  font-size: 19px;
  letter-spacing: .04em;
}

.logged-in .hint { margin-bottom: 14px; }

[hidden] { display: none !important; }
