/* Voicebox Design System — PostAI Creator Survey 2026 */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-var.woff2') format('woff2');
}

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/fraunces-var.woff2') format('woff2');
}

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

:root {
  --gold: #C09A42;
  --gold-hover: #D3AD52;
  --gold-active: #A6832F;
  --gold-glow: rgba(192, 154, 66, 0.18);
  --text-primary: #F5F3F0;
  --text-secondary: #9C958E;
  --text-tertiary: #6F6862;
  --bg-darkest: #0A0908;
  --bg-base: #131211;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --success: #3FCB94;
  --warning: #FFDD00;
  --error: #F1685E;
  --info: #60A5FA;
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Fraunces', Georgia, serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-darkest);
  background-image:
    radial-gradient(ellipse 900px 480px at 50% -10%, rgba(192, 154, 66, 0.10), transparent 60%),
    radial-gradient(ellipse 700px 400px at 100% 15%, rgba(96, 165, 250, 0.04), transparent 55%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Progress Bar ── */
#progress-bar-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
}

#progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-active), var(--gold));
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(192, 154, 66, 0.5);
}

/* ── Header ── */
.site-header {
  background: rgba(10, 9, 8, 0.75);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.site-logo span {
  color: var(--gold);
}

.header-badge {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 9999px;
  letter-spacing: 0.01em;
}

/* ── Main Container ── */
.main-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 88px;
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 56px 0 44px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 20px;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  width: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.hero-eyebrow::after {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 600;
  font-optical-sizing: auto;
  color: var(--text-primary);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0 auto 28px;
  line-height: 1.65;
  max-width: 480px;
}

.hero-badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 14px 7px 12px;
  border-radius: 9999px;
}

.hero-badge svg {
  color: var(--gold);
  flex-shrink: 0;
}

/* ── Section Labels ── */
.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 10px;
}

/* ── Cards ── */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 12px 32px -16px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s;
}

.card:last-child {
  margin-bottom: 0;
}

.card-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ── Question ── */
.question-number {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  padding: 4px 10px;
  background: var(--gold-glow);
  border-radius: 6px;
}

.question-text {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  letter-spacing: -0.005em;
  margin-bottom: 6px;
}

.question-hint {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.55;
}

.hint-emphasis {
  color: var(--gold);
  font-weight: 500;
}

/* ── Contact Inputs ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 520px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-group.full-width {
  grid-column: 1 / -1;
}

label.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

label.field-label .optional {
  font-weight: 400;
  color: var(--text-tertiary);
  margin-left: 4px;
}

.text-input {
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 16px; /* 16px prevents iOS zoom */
  font-family: inherit;
  line-height: 1.4;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.text-input:hover {
  border-color: var(--border-strong);
}

.text-input::placeholder {
  color: var(--text-tertiary);
}

.text-input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.text-input.error {
  border-color: var(--error);
}

textarea.text-input {
  min-height: 120px;
  resize: vertical;
}

/* ── Choice Options (Radio / Checkbox styled as cards) ── */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-item {
  position: relative;
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.45;
  min-height: 48px; /* touch target */
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.option-label:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.option-label:hover .option-indicator {
  border-color: var(--gold-hover);
}

.option-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--text-secondary);
  background: transparent;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
}

.option-item input[type="checkbox"] ~ .option-label .option-indicator {
  border-radius: 6px;
}

.option-item input:checked ~ .option-label {
  background: var(--gold-glow);
  border-color: var(--gold);
  color: var(--text-primary);
}

.option-item input:checked ~ .option-label .option-indicator {
  background: var(--gold);
  border-color: var(--gold);
}

.option-item input:focus-visible ~ .option-label {
  border-color: var(--gold-hover);
}

.option-item input:focus-visible ~ .option-label .option-indicator {
  outline: 2px solid var(--gold-hover);
  outline-offset: 2px;
}

.option-item input:checked ~ .option-label .option-indicator::after {
  content: '';
  display: block;
}

.option-item input[type="radio"]:checked ~ .option-label .option-indicator::after {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-darkest);
}

.option-item input[type="checkbox"]:checked ~ .option-label .option-indicator::after {
  width: 11px;
  height: 9px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' stroke='%230A0908' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.option-item input:disabled ~ .option-label {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Multi-select limit hint */
.multi-select-hint {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: -6px;
  margin-bottom: 14px;
}

.multi-select-hint.at-limit {
  color: var(--gold);
}

/* ── Satisfaction Scale ── */
.scale-options {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.scale-item {
  flex: 1;
}

.scale-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.scale-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 4px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-strong);
  border-top: 3px solid var(--scale-accent, var(--border-strong));
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  min-height: 58px;
  justify-content: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.scale-item:nth-child(1) .scale-label { --scale-accent: #E2574C; }
.scale-item:nth-child(2) .scale-label { --scale-accent: #D9894E; }
.scale-item:nth-child(3) .scale-label { --scale-accent: var(--gold); }
.scale-item:nth-child(4) .scale-label { --scale-accent: #8FBF6A; }
.scale-item:nth-child(5) .scale-label { --scale-accent: #3FCB94; }

.scale-label:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.scale-number {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.scale-item input:checked ~ .scale-label {
  background: var(--gold-glow);
  border-color: var(--gold);
}

.scale-item input:checked ~ .scale-label .scale-number {
  color: var(--gold);
}

.scale-item input:focus-visible ~ .scale-label {
  outline: 2px solid var(--gold-hover);
  outline-offset: 2px;
}

.scale-labels-row {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.scale-end-label {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.3;
  max-width: 45%;
}

.scale-end-label:last-child {
  text-align: right;
}

/* ── Callout Box ── */
.callout {
  background: var(--gold-glow);
  border: 1px solid rgba(192, 154, 66, 0.35);
  border-radius: 12px;
  padding: 15px 18px;
  margin-bottom: 22px;
}

.callout p {
  font-size: 13.5px;
  color: #E4C77C;
  line-height: 1.55;
}

.callout strong {
  font-weight: 600;
  color: var(--gold-hover);
}

/* ── Honeypot (invisible) ── */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  tab-index: -1;
}

/* ── Submit Button ── */
.submit-section {
  margin-top: 36px;
  text-align: center;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, var(--gold-hover), var(--gold));
  color: #17140C;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.005em;
  padding: 0 34px;
  height: 50px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 8px 24px -8px rgba(192, 154, 66, 0.55);
  min-width: 210px;
  -webkit-tap-highlight-color: transparent;
}

.btn-submit:hover:not(:disabled) {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 10px 28px -6px rgba(192, 154, 66, 0.7);
  transform: translateY(-1px);
}

.btn-submit:active:not(:disabled) {
  background: linear-gradient(180deg, var(--gold), var(--gold-active));
  transform: scale(0.98) translateY(0);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-submit .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(23, 20, 12, 0.3);
  border-top-color: #17140C;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn-submit.loading .spinner {
  display: block;
}

.btn-submit.loading .btn-text {
  opacity: 0.7;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.submit-note {
  font-size: 12.5px;
  color: var(--text-tertiary);
  margin-top: 14px;
}

/* ── Error message inline ── */
.field-error {
  font-size: 12.5px;
  color: var(--error);
  margin-top: 6px;
  display: none;
}

.field-error.visible {
  display: block;
}

/* ── Success Screen ── */
#success-screen {
  display: none;
  text-align: center;
  padding: 88px 24px;
  max-width: 500px;
  margin: 0 auto;
}

#success-screen.visible {
  display: block;
}

.success-icon {
  width: 68px;
  height: 68px;
  background: rgba(63, 203, 148, 0.1);
  border: 1px solid rgba(63, 203, 148, 0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 26px;
  box-shadow: 0 0 0 8px rgba(63, 203, 148, 0.05);
}

.success-icon svg {
  color: var(--success);
}

.success-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.success-body {
  font-size: 15.5px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Toast / Alert ── */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1C1A17;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 13px 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  max-width: 90vw;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  text-align: center;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#toast.error {
  border-color: rgba(241, 104, 94, 0.5);
  color: #FF9089;
}

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: 36px 24px;
  color: var(--text-tertiary);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

/* ── Utility ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ── Mobile refinements ── */
@media (max-width: 640px) {
  .main-container {
    padding: 24px 16px 72px;
  }

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

  .card {
    padding: 20px 16px;
    margin-bottom: 12px;
    border-radius: 14px;
  }

  .scale-options {
    gap: 5px;
  }

  .scale-number {
    font-size: 15px;
  }

  .scale-label {
    padding: 10px 2px;
    min-height: 50px;
  }
}
