/* =========================================================================
   Accelerating AI Conference — shared theme & components
   Brand lifted from acceleratingai.co.uk. To re-skin, edit the tokens in
   :root below — nothing else hard-codes a colour.
   ========================================================================= */

:root {
  /* Brand palette (from the conference site) */
  --bg: #191919;
  --surface: #1c1c1c;
  --surface-2: #1e1e1e;
  --surface-hover: #232323;
  --border: #464646;
  --border-soft: #2e2e2e;
  --blue: #0082ff;
  --blue-strong: #339dff;
  --white: #ffffff;
  --black: #000000;

  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.62);
  --text-faint: rgba(255, 255, 255, 0.4);

  /* Radii, shadows, motion */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 100px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-blue: 0 10px 30px rgba(0, 130, 255, 0.28);
  --ease: 0.3s ease;

  /* Type — Gotham first (matches the site if installed/hosted), then a
     clean geometric fallback so it always looks intentional. */
  --font: 'Gotham', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1130px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  color: var(--text);
  background-color: var(--bg);
  /* Signature blue radial glows (recreating the site's blue-round motif) */
  background-image:
    radial-gradient(circle at 85% -10%, rgba(0, 130, 255, 0.16), transparent 45%),
    radial-gradient(circle at 0% 110%, rgba(0, 130, 255, 0.12), transparent 40%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(28px, 5vw, 48px); }
h2 { font-size: clamp(24px, 4vw, 36px); }
h3 { font-size: clamp(20px, 3vw, 28px); }
p { margin: 0; }
a { color: var(--blue); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--blue-strong); }
img { max-width: 100%; height: auto; }

button { font-family: inherit; cursor: pointer; }
input, textarea, select, button { font-family: inherit; outline: none; }

/* ---- Layout ---- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
.center-screen {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 32px 20px 64px;
}

/* ---- Brand header ---- */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-logo { height: 42px; width: auto; display: block; }
@media (max-width: 480px) {
  .brand-logo { height: 30px; }
  .app-header .container { gap: 10px; }
}

.app-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(25, 25, 25, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.app-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 16px;
}

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 40px);
}

/* ---- Pills / badges ---- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--blue); font-size: 13px; font-weight: 500;
  color: var(--text); white-space: nowrap;
}
.pill-soft { border-color: var(--border); color: var(--text-muted); }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--blue);
  box-shadow: 0 0 0 0 rgba(0, 130, 255, 0.7); animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 130, 255, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(0, 130, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 130, 255, 0); }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 26px; border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 500; border: 1px solid transparent;
  transition: all var(--ease); text-align: center; white-space: nowrap;
  background: transparent; color: var(--text);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn-primary:not(:disabled):hover { background: transparent; color: var(--blue); }
.btn-white { background: var(--white); border-color: var(--white); color: var(--black); }
.btn-white:not(:disabled):hover { background: transparent; color: var(--white); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--white); }
.btn-block { width: 100%; }
.btn-lg { height: 56px; font-size: 17px; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; border-radius: var(--radius-sm); }

/* ---- Form controls ---- */
.field { margin-bottom: 18px; }
.label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; color: var(--text-muted); }
.input, .textarea, .select {
  width: 100%; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 15px; font-size: 16px; transition: border-color var(--ease);
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--blue); }
.textarea { resize: vertical; min-height: 110px; }

/* ---- Utilities ---- */
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.center { text-align: center; }
.hidden { display: none !important; }
.spinner {
  width: 22px; height: 22px; border: 2px solid var(--border);
  border-top-color: var(--blue); border-radius: 50%;
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 12px 20px; border-radius: var(--radius-pill); box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: all var(--ease); z-index: 100; font-size: 14px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: #ff5470; }

/* ---- Scale (poll input) ---- */
.scale-field { margin: 12px 0 8px; }
.scale-row { display: flex; flex-wrap: wrap; gap: 10px; }
.scale-btn {
  flex: 1 1 0; min-width: 48px; height: 76px; border-radius: var(--radius-md);
  background: var(--surface-2); border: 1.5px solid var(--border); color: var(--text);
  font-size: 26px; font-weight: 700; transition: all var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.scale-btn:hover { border-color: var(--blue-strong); }
.scale-btn.selected {
  background: var(--blue); border-color: var(--blue); color: #fff;
  transform: translateY(-3px); box-shadow: var(--shadow-blue);
}
.scale-ends {
  display: flex; justify-content: space-between; gap: 14px;
  margin-top: 18px; font-size: 14px; color: var(--text-muted);
}
.scale-ends span { display: inline-flex; align-items: center; gap: 7px; max-width: 47%; }
.scale-ends span:first-child::before { content: '\2190'; color: var(--text-faint); }
.scale-ends span:last-child::after { content: '\2192'; color: var(--text-faint); }

/* ---- Word cloud (poll input) ---- */
.word-input { display: flex; gap: 8px; }
.word-input .input { flex: 1; height: 52px; }
.word-input .btn-add { flex: 0 0 auto; height: 52px; }
.word-pool { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pool-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px;
  border-radius: var(--radius-pill); font-size: 15px; font-weight: 500;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
  transition: all var(--ease); -webkit-tap-highlight-color: transparent; cursor: pointer;
  animation: wcIn 0.3s ease;
}
.pool-pill:hover { border-color: var(--blue-strong); color: var(--text); }
.pool-pill.mine { background: rgba(0, 130, 255, 0.14); border-color: var(--blue); color: var(--text); cursor: default; }
.pool-pill i { color: var(--blue-strong); font-style: normal; font-weight: 700; }
.pool-pill b { font-weight: 700; font-size: 12px; color: var(--text-faint); }
.pool-pill.mine b { color: var(--blue-strong); }
.pool-pill.flash { animation: pillFlash 0.7s ease; }
@keyframes pillFlash { 0%, 100% { transform: scale(1); } 35% { transform: scale(1.14); } }

/* ---- Scale (dashboard average) ---- */
.scale-avg { display: flex; align-items: baseline; gap: 10px; margin-bottom: 20px; }
.scale-avg .avg { font-size: clamp(40px, 6vw, 56px); font-weight: 800; color: var(--blue); line-height: 1; font-variant-numeric: tabular-nums; }
.scale-avg .avg-max { font-size: 22px; color: var(--text-faint); }
.scale-avg .avg-cap { margin-left: auto; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }

/* ---- Word cloud (poll reveal + dashboard) ---- */
.wordcloud { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 18px; padding: 8px 0; }
.wc-item { font-weight: 700; line-height: 1.05; color: var(--text); transition: font-size 0.5s ease, opacity 0.5s ease; }
.wc-item.fresh { animation: wcIn 0.5s cubic-bezier(.22,.61,.36,1); color: var(--blue-strong); }
@keyframes wcIn { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: none; } }
