*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --accent: #D63A28;
  --cream: #F5F1EB;
  --muted: #888;
  --border: #2a2a2a;
  --yes: #2d6a4f;
  --no: #1a1a1a;
  --font: -apple-system, 'Inter', 'Segoe UI', sans-serif;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font);
  overflow: hidden;
}

/* Progress bar */
#progress-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--border);
  z-index: 100;
}
#progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease;
  width: 0%;
}

/* App container */
#app {
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Steps */
.step {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
.step.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.step.exiting {
  opacity: 0;
  transform: translateY(-60px);
}

.step-inner {
  width: 100%;
  max-width: 560px;
}
.step-inner--legal {
  max-width: 640px;
}

/* Logo */
.logo {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
}
.logo span { color: var(--accent); }

/* Welcome / section headers */
h1 {
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}
h2 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}
.sub {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 32px;
}
.section-tag {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 20px;
}
.optional {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

/* Question number */
.q-num {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

/* Question label */
.q-label {
  display: block;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--cream);
}

/* Hint */
.q-hint {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

/* Text inputs */
.q-input {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border);
  color: var(--cream);
  font-size: 22px;
  font-family: var(--font);
  padding: 8px 0;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 24px;
}
.q-input:focus { border-color: var(--accent); }
.q-input::placeholder { color: #444; }
.q-input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.5); }
.q-input-sm { font-size: 18px; margin-bottom: 0; }

/* Buttons */
.btn-next {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s, opacity 0.2s;
}
.btn-next:hover { background: #b52e1f; }
.btn-next:disabled { opacity: 0.4; cursor: not-allowed; background: var(--accent); }
.btn-skip {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 14px 20px;
  font-size: 14px;
  cursor: pointer;
  margin-left: 10px;
  transition: border-color 0.2s;
}
.btn-skip:hover { border-color: var(--muted); color: var(--cream); }

.nav-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

.key-hint {
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 12px;
  font-weight: 400;
}

/* Choice grid (artista) */
.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.choice {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--cream);
  border-radius: 6px;
  padding: 12px 20px;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.choice:hover { border-color: var(--accent); }
.choice.selected {
  border-color: var(--accent);
  background: rgba(214, 58, 40, 0.12);
  color: var(--cream);
}

/* Yes/No */
.yn-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.yn-btn {
  flex: 1;
  min-width: 140px;
  max-width: 220px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--cream);
  border-radius: 8px;
  padding: 18px 24px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s, background 0.2s;
}
.yn-btn span {
  background: var(--border);
  color: var(--muted);
  border-radius: 4px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.yn-btn:hover { border-color: #555; }
.yn-btn.selected.yn-no { border-color: #555; background: rgba(255,255,255,0.06); }
.yn-btn.selected.yn-yes { border-color: var(--accent); background: rgba(214, 58, 40, 0.12); }

/* Legal box */
.legal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  font-size: 13px;
  color: #aaa;
  line-height: 1.6;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 16px;
}
.legal-box p { margin-bottom: 10px; }
.legal-box p:last-child { margin-bottom: 0; }
.legal-box strong { color: var(--cream); }

/* Checkbox */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: #ccc;
  line-height: 1.5;
  margin-bottom: 24px;
}
.check-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Signature pad */
.sig-container {
  position: relative;
  background: #1a1a1a;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  margin-bottom: 24px;
  overflow: hidden;
}
#signature-pad {
  display: block;
  width: 100%;
  height: 180px;
  cursor: crosshair;
  touch-action: none;
}
.sig-clear {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.sig-clear:hover { border-color: var(--muted); color: var(--cream); }

/* Success */
.success-icon {
  width: 64px;
  height: 64px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 28px;
}

/* Keyboard hint */
#kb-hint {
  position: fixed;
  bottom: 20px;
  right: 24px;
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
  opacity: 0.6;
}
kbd {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-family: var(--font);
}

/* Scrollable legal step on small screens */
.step-inner--legal { max-height: 90vh; overflow-y: auto; padding-right: 4px; }

/* Mobile tweaks */
@media (max-width: 480px) {
  .step { padding: 16px; align-items: flex-start; padding-top: 60px; }
  .q-label { font-size: 22px; }
  h1 { font-size: 30px; }
  h2 { font-size: 26px; }
  .yn-btn { max-width: 100%; }
  #kb-hint { display: none; }
}
