/* Right Click — hiring event scheduler
   ------------------------------------------------------------------ */

:root {
  --ink:        #0d1424;
  --ink-2:      #33405c;
  --muted:      #6b7896;
  --line:       #e3e7f0;
  --line-soft:  #edf0f6;
  --surface:    #ffffff;
  --bg:         #f5f7fb;
  --accent:     #2f5bff;
  --accent-dk:  #1f42d8;
  --accent-sft: #eef2ff;
  --ok:         #0f9d58;
  --ok-soft:    #e9f7ef;
  --danger:     #c8332c;
  --danger-sft: #fdeceb;
  --radius:     14px;
  --shadow-sm:  0 1px 2px rgba(13, 20, 36, .05);
  --shadow-md:  0 6px 24px -12px rgba(13, 20, 36, .18), 0 1px 3px rgba(13, 20, 36, .04);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Beats the display:flex/grid rules below so [hidden] always wins. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
}

.brand-mark svg { width: 17px; height: 17px; }

.brand-name {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.header-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Hero ---------- */

.hero { padding: 56px 0 36px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-sft);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(47, 91, 255, .5);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(47, 91, 255, .45); }
  70%  { box-shadow: 0 0 0 8px rgba(47, 91, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 91, 255, 0); }
}

h1 {
  font-size: clamp(32px, 6vw, 46px);
  font-weight: 700;
}

.hero-sub {
  color: var(--muted);
  font-weight: 500;
}

.lede {
  margin-top: 18px;
  max-width: 62ch;
  color: var(--ink-2);
  font-size: 17px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  margin: 32px 0 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.fact {
  background: var(--surface);
  padding: 16px 18px;
}

.fact dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.fact dd {
  margin: 4px 0 0;
  font-weight: 600;
  font-size: 15px;
}

/* ---------- Panel ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  padding: 8px 28px 28px;
  margin-bottom: 48px;
}

.step {
  padding: 28px 0;
  border-bottom: 1px solid var(--line-soft);
}

.step:last-of-type { border-bottom: 0; padding-bottom: 8px; }

.step-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.step-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.step h2 { font-size: 20px; font-weight: 650; }

.step-hint {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}

.step-hint strong { color: var(--ink-2); }

/* ---------- Fields ---------- */

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}

.field input::placeholder { color: #a7b0c4; }

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 91, 255, .14);
}

.field input.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(200, 51, 44, .12);
}

/* ---------- Legend ---------- */

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 12.5px;
  color: var(--muted);
}

.legend-item { display: inline-flex; align-items: center; gap: 7px; }

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.swatch-open   { background: var(--surface); }
.swatch-picked { background: var(--accent); border-color: var(--accent); }
.swatch-taken  { background: var(--line-soft); border-style: dashed; }

/* ---------- Slots ---------- */

.slot-groups { display: grid; gap: 22px; }

.loading {
  padding: 28px 0;
  color: var(--muted);
  font-size: 15px;
}

.slot-group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

/* Three 20-minute slots per hour, so a 3-up grid always fills the row evenly. */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.slot {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  font: inherit;
  text-align: left;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  transition: border-color .12s, background .12s, box-shadow .12s, transform .08s;
}

.slot:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-sft);
}

.slot:active:not(:disabled) { transform: translateY(1px); }

.slot:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 91, 255, .18);
}

.slot-time { font-weight: 650; font-size: 15px; }

.slot-meta { font-size: 12px; color: var(--muted); }

.slot[aria-checked="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(47, 91, 255, .8);
}

.slot[aria-checked="true"] .slot-meta { color: rgba(255, 255, 255, .82); }

.slot:disabled {
  cursor: not-allowed;
  background: var(--line-soft);
  border-style: dashed;
  color: #9aa4bb;
}

.slot:disabled .slot-time { text-decoration: line-through; }

/* Held back by the organisers - never on offer, so no "crossed off" line. */
.slot-blocked:disabled { border-style: dashed; }
.slot-blocked:disabled .slot-time { text-decoration: none; }

/* ---------- Submit ---------- */

.form-error {
  margin: 4px 0 0;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--danger);
  background: var(--danger-sft);
  border: 1px solid rgba(200, 51, 44, .22);
  border-radius: 10px;
}

.submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}

.summary-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.submit-summary strong {
  font-size: 16px;
  font-weight: 650;
}

.submit-summary strong.placeholder {
  color: var(--muted);
  font-weight: 500;
}

.btn-primary {
  padding: 13px 24px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .08s;
  box-shadow: 0 8px 18px -10px rgba(47, 91, 255, .9);
}

.btn-primary:hover:not(:disabled) { background: var(--accent-dk); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }

.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 91, 255, .3);
}

.btn-primary:disabled {
  background: #c7cede;
  box-shadow: none;
  cursor: not-allowed;
}

/* ---------- Confirmation ---------- */

.confirmation {
  padding: 40px 28px;
  text-align: center;
}

.check {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
}

.check svg { width: 26px; height: 26px; }

.confirmation h2 { font-size: 26px; }

.confirm-lede {
  margin-top: 8px;
  color: var(--ink-2);
}

.ticket {
  margin: 26px auto 0;
  max-width: 420px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.ticket-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.ticket-row:last-child { border-bottom: 0; }

.ticket-row span {
  font-size: 13px;
  color: var(--muted);
}

.ticket-row strong { font-size: 15px; font-weight: 650; text-align: right; }

.mono {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  letter-spacing: .06em;
}

.tips {
  max-width: 420px;
  margin: 24px auto 0;
  padding-left: 20px;
  text-align: left;
  color: var(--ink-2);
  font-size: 14.5px;
}

.tips li { margin-bottom: 6px; }

.confirm-foot {
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Admin ---------- */

.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 40px 0 24px;
}

.admin-head h1 { font-size: 28px; }

.admin-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.stat {
  flex: 1 1 150px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
}

.stat-value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }

.stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.roster {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 48px;
}

.roster-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.roster-row:last-child { border-bottom: 0; }

.roster-time {
  flex: none;
  width: 96px;
  font-weight: 650;
  font-size: 14.5px;
}

.roster-name { font-size: 15px; }

.roster-empty { color: #9aa4bb; font-style: italic; font-size: 14px; }
.roster-email { font-size: 12.5px; color: var(--muted); }
.roster-email-missing { color: #b58105; font-style: italic; }

.roster-remove {
  flex: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 7px;
  padding: 5px 11px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.roster-remove:hover:not(:disabled) { color: #b42318; border-color: #f0b4ae; background: #fff6f5; }
.roster-remove:disabled { opacity: .55; cursor: default; }

/* Waitlist */
.waitlist { margin-top: 22px; }
.label-optional {
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
}
.field-hint { margin: 7px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

.roster-code {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}

.btn-ghost {
  display: inline-block;
  padding: 10px 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.btn-ghost:hover { border-color: var(--ink-2); }

.key-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }

.key-form input {
  flex: 1 1 220px;
  padding: 11px 14px;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.key-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 91, 255, .14);
}

/* ---------- Responsive ---------- */

@media (max-width: 620px) {
  .hero { padding: 40px 0 28px; }
  .panel { padding: 4px 18px 22px; }
  .confirmation { padding: 32px 20px; }
  .field-row { grid-template-columns: 1fr; }
  .slot-grid { gap: 8px; }
  .slot { padding: 10px 9px; }
  .slot-time { font-size: 14px; }
  .slot-meta { font-size: 11px; }
  .submit-bar { flex-direction: column; align-items: stretch; }
  .btn-primary { width: 100%; }
  .roster-time { width: 84px; font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
