/* Shared tokens and building blocks for every page */
:root {
  color-scheme: dark;

  /* Monochrome night palette from the landing page */
  --bg: #0b0b0b;
  --s1: #101010;
  --s2: #151515;
  --s3: #1b1b1b;
  --s4: #242424;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);

  --text: #ededed;
  --text-2: #b9b9b9;
  --text-3: #8b8b8b;

  /* Red is the one accent (the landing's light streak and button dot) */
  --accent: #ff3b3b;
  --accent-hi: #ff5c5c;
  --accent-bg: #d6262c;      /* red behind white text, for contrast */
  --accent-ink: #ffffff;
  --accent-soft: rgba(255, 59, 59, 0.12);
  /* Cream is the main button colour, like "Join the club" */
  --cream: #e9e5dc;
  --cream-ink: #141210;
  --danger: #ff7a7a;
  --ok: #6eddb0;

  --font-display: 'Orbitron', 'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-ui: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- brand mark ---------- */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font: 700 14px/1 var(--font-display); letter-spacing: 0.04em; text-transform: uppercase;
}
.brand-mark { width: 34px; height: 34px; flex: none; object-fit: contain; }

/* ---------- buttons ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 20px;
  border: 1px solid transparent; border-radius: 4px;
  font: 500 12px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out),
              transform 0.3s var(--ease-out), opacity 0.2s, box-shadow 0.3s var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
/* Cream with a glowing red dot, like the landing's "Join the club" */
.btn-primary {
  background: var(--cream); color: var(--cream-ink);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 10px 30px -12px rgba(0, 0, 0, 0.9);
}
.btn-primary::before {
  content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-bg); box-shadow: 0 0 8px rgba(255, 42, 42, 0.8);
}
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.16); color: #d6d6d6; }
.btn-block { width: 100%; }
/* Buttons keep the landing's small spaced mono label everywhere */
.btn { font-size: 12px !important; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:not(:disabled):hover { background: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 36px -8px rgba(255, 255, 255, 0.35); }
  .btn-ghost:hover { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.4); color: #fff; }
}

/* Label roll: the label rolls up to reveal an identical copy */
.roll { display: inline-block; height: 1.25em; line-height: 1.25em; overflow: hidden; }
.roll > span { display: block; transition: transform 0.6s var(--ease-out); }
.roll > span::after { content: attr(data-text); display: block; }
@media (hover: hover) and (pointer: fine) {
  .btn:not(:disabled):hover .roll > span { transform: translateY(-50%); }
}

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- form fields ---------- */
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }
.field .error { font-size: 12.5px; color: var(--danger); min-height: 0; }
.field .error:empty { display: none; }

.input {
  width: 100%; height: 46px; padding: 0 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-2); border-radius: 6px;
  outline: none;
  transition: border-color 0.25s var(--ease-out), background-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.input::placeholder { color: #6e6e6e; }
.input:hover { border-color: rgba(255, 255, 255, 0.22); }
.input:focus { border-color: rgba(233, 229, 220, 0.7); background: rgba(255, 255, 255, 0.05); box-shadow: 0 0 0 4px rgba(233, 229, 220, 0.08); }
.input[aria-invalid='true'] { border-color: var(--danger); }
.input[type='date'] { padding-right: 10px; }
.input[type='date']::-webkit-calendar-picker-indicator { filter: invert(0.8); cursor: pointer; }

.input-wrap { position: relative; }
.input-wrap .input { padding-right: 48px; }
.input-wrap .input-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; display: grid; place-items: center;
  background: none; border: 0; border-radius: 10px; color: var(--text-3);
}
.input-wrap .input-btn:hover { color: var(--text); }

.form-error {
  padding: 10px 12px; border-radius: var(--r-md);
  background: rgba(255, 122, 122, 0.1); border: 1px solid rgba(255, 122, 122, 0.25);
  color: #ffb3b3; font-size: 13.5px;
}
.form-error:empty { display: none; }

/* ---------- avatars ---------- */
.avatar { border-radius: 50%; object-fit: cover; background: var(--s3); flex: none; }

/* ---------- entrepreneur level tag (next to usernames) ---------- */
.level-tag {
  display: inline-flex; align-items: center; gap: 5px; align-self: center;
  height: 20px; padding: 0 7px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line);
  font: 500 11px/1 var(--font-ui); color: var(--text-2); white-space: nowrap;
}

/* ---------- live dot ---------- */
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 rgba(110, 221, 176, 0.5); animation: pulse 2.4s var(--ease-out) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(110, 221, 176, 0.45); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(110, 221, 176, 0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
