/* Roost Rush sign-in. Dark only, like the live map. Colors come from design/colors/tokens.json (ui.dark, dawn.glow,
   radar.display); the ring is the mark's four walls, rising from the east at the top right. */
:root {
  --bg: #0A0E14; --surface: #141B2D; --surface-raised: #1E2740;
  --text: #F4F1EA; --text-muted: #A9B1C6; --border: #2A3550; --border-strong: #6A7799;
  --accent: #FFD27A; --on-accent: #0A0E14; --accent-text: #F2A65A; --focus: #F4F1EA;
  --error: #FF9C8A;
  --ring-1: #02FD02; --ring-2: #04E9E7; --ring-3: #019FF4; --ring-4: #4A4AFF;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --ui: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  position: relative; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--text); font: 16px/1.5 var(--ui); overflow-x: hidden;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.display { font-family: var(--display); }
.mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- sky: dawn glow and a roost ring erupting from the east ---------- */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.glow {
  position: absolute; inset: 0;
  background: radial-gradient(90vmax 70vmax at 100% 0%, rgba(242,166,90,.55) 0%, rgba(232,116,59,.38) 16%,
    rgba(107,78,155,.30) 38%, rgba(43,47,107,.22) 58%, transparent 80%);
}
.ring {
  position: absolute; width: 150vmax; height: 150vmax; right: -75vmax; top: -75vmax; border-radius: 50%;
  background: radial-gradient(circle, transparent 0 41%, var(--ring-1) 41.5% 43%, var(--ring-2) 43% 45.5%,
    var(--ring-3) 45.5% 48%, var(--ring-4) 48% 50%, transparent 50%);
  opacity: .22; filter: blur(2px);
  animation: erupt 2.4s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes erupt { from { transform: scale(.35); opacity: .5; } to { transform: scale(1); opacity: .22; } }
@media (prefers-reduced-motion: reduce) { .ring { animation: none; } }

/* ---------- frame ---------- */
.bar, .panel, .foot { position: relative; z-index: 1; width: 100%; max-width: 1040px; margin-inline: auto; }
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: max(14px, env(safe-area-inset-top, 0px)) 14px;
}
.brand img { display: block; height: 24px; width: auto; }
.back { color: var(--text); font-weight: 700; text-decoration: none; padding: 10px 2px; }
.back:hover { color: var(--accent); }

.panel { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 20px; padding-block: 24px 40px; }
.step {
  display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 440px;
  padding: 28px; border-radius: 20px; background: rgba(20,27,45,.82); border: 1px solid var(--border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.eyebrow { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
h1 { margin: -6px 0 0; font-size: clamp(34px, 8vw, 48px); line-height: 1.02; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
h1:focus { outline: none; }
.lede { margin: 0; font-size: 17px; color: var(--text); max-width: 38ch; }
.addr { font-weight: 700; overflow-wrap: anywhere; color: var(--accent); }
.fine, .soon, .note { margin: 0; font-size: 14px; color: var(--text-muted); }
.soon { padding: 12px 14px; border-radius: 12px; background: var(--surface-raised); color: var(--text); }
.note { color: var(--text); }

form { display: flex; flex-direction: column; gap: 10px; }
label { font-weight: 700; font-size: 15px; }
input[type="email"] {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: 14px; font: 17px var(--ui);
  color: var(--text); background: var(--bg); border: 1.5px solid var(--border-strong);
}
input[type="email"]::placeholder { color: #7D869E; }
input[type="email"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input[aria-invalid="true"] { border-color: var(--error); }
.error { margin: 0; font-size: 15px; color: var(--error); font-weight: 700; }

.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px;
  border-radius: 14px; font-weight: 700; font-size: 17px; cursor: pointer; text-decoration: none;
}
.btn-primary { margin-top: 6px; border: 1.5px solid var(--accent); background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:disabled, .btn-ghost:disabled { cursor: progress; opacity: .65; }
.btn-ghost { border: 1.5px solid var(--border-strong); background: transparent; color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-raised); }
.btn-text { min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--accent-text); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.actions .btn-primary { margin-top: 0; }

.tips { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--text); font-size: 15px; }
.tips li::marker { color: var(--ring-2); }

.preview {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; max-width: 640px;
  padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--border-strong); background: rgba(10,14,20,.7);
  font-size: 14px; color: var(--text-muted);
}
.preview-states { display: flex; flex-wrap: wrap; gap: 6px; }
.preview-states button {
  min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-size: 13px; cursor: pointer;
}
.preview-states button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }

.foot { padding-block: 0 max(20px, env(safe-area-inset-bottom, 0px)); font-size: 13px; color: var(--text-muted); }

@media (max-width: 480px) {
  .panel { justify-content: flex-start; padding-top: 12px; }
  .step { padding: 22px 18px; }
  .btn-primary { width: 100%; }
}
.leave { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--border); }
.link { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: var(--text); }
.confirm { max-width: min(400px, calc(100vw - 32px)); padding: 24px; border-radius: 20px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); }
.confirm::backdrop { background: rgba(5,8,14,.7); }
.confirm h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.15; }
.confirm p { margin: 0 0 18px; color: var(--text-muted); }
.confirm .actions { justify-content: flex-end; }
.btn-danger { min-height: 52px; padding: 0 22px; border-radius: 14px; font-size: 17px; border: 1.5px solid var(--error); background: transparent; color: var(--error); font: inherit; font-weight: 700; cursor: pointer; }
.btn-danger:hover:not(:disabled) { background: var(--error); color: var(--bg); }
.foot a, .fine a { color: inherit; text-underline-offset: 3px; }

/* ---------- privacy and terms (/privacy, /terms): one readable column on the same sky ---------- */
.legal { max-width: 68ch; padding: 28px; border-radius: 20px; background: rgba(20,27,45,.88); border: 1px solid var(--border); }
.legal h1 { margin: 4px 0 6px; }
.legal h2 { margin: 28px 0 8px; font-family: var(--display); font-size: 21px; line-height: 1.2; }
.legal p, .legal li { font-size: 16px; line-height: 1.6; color: var(--text); }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--accent-text); text-underline-offset: 3px; }
.legal .short { padding: 14px 16px; border-radius: 12px; background: var(--surface-raised); }
.legal .short p:last-child, .legal .short ul:last-child { margin-bottom: 0; }
@media (max-width: 520px) { .legal { padding: 22px 18px; } }
