/* =======================================================
   NEXTGEN DESIGN — CLIENT TESTIMONIAL FORM
   styles.css
   ======================================================= */

/* -------------------------------------------------------
   1. DESIGN TOKENS
   ------------------------------------------------------- */
:root {
  /* Backgrounds */
  --bg-base:        #080810;
  --bg-surface:     #0E0E1C;
  --bg-card:        #111122;
  --bg-elevated:    #17172A;
  --bg-input:       #1A1A30;

  /* Purple palette */
  --purple-100: #EDE9FE;
  --purple-200: #C4B5FD;
  --purple-300: #A78BFA;
  --purple-400: #9061F9;
  --purple-500: #7C3AED;   /* primary */
  --purple-600: #6D28D9;
  --purple-glow: rgba(124, 58, 237, 0.25);

  /* Borders */
  --border-subtle:  rgba(124, 58, 237, 0.12);
  --border-card:    rgba(124, 58, 237, 0.18);
  --border-input:   rgba(124, 58, 237, 0.22);
  --border-focus:   rgba(124, 58, 237, 0.70);

  /* Text */
  --text-primary:   #EEEAF8;
  --text-secondary: #9090AE;
  --text-muted:     #5A5A78;
  --text-accent:    var(--purple-300);

  /* State */
  --success:  #10B981;
  --error:    #F87171;
  --error-bg: rgba(248, 113, 113, 0.08);

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Outfit', 'Segoe UI', system-ui, sans-serif;

  /* Radii */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-card:  0 2px 40px rgba(0, 0, 0, 0.5), 0 1px 0 var(--border-card) inset;
  --shadow-input: 0 0 0 3px var(--purple-glow);
  --shadow-btn:   0 8px 40px rgba(124, 58, 237, 0.45);
  --shadow-glow:  0 0 60px rgba(124, 58, 237, 0.15);

  /* Transitions */
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:  cubic-bezier(0, 0, 0.2, 1);
  --ease-in:   cubic-bezier(0.4, 0, 1, 1);
  --t-fast:    0.15s var(--ease);
  --t-base:    0.25s var(--ease);
  --t-slow:    0.45s var(--ease-out);
}


/* -------------------------------------------------------
   2. RESET & BASE
   ------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-base);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
}

/* Radial glow on background */
body::after {
  content: '';
  position: fixed;
  top: -20vh;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.08) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; display: block; }
input, textarea, select { font-family: inherit; }
fieldset { border: none; }

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


/* -------------------------------------------------------
   3. LAYOUT
   ------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.25rem;
  position: relative;
  z-index: 1;
}


/* -------------------------------------------------------
   4. HEADER
   ------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 16, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.875rem 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.logo-mark {
  flex-shrink: 0;
  border-radius: 9px;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
}

.logo-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.header-tag {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid var(--border-card);
  padding: 0.25rem 0.75rem;
  border-radius: var(--r-pill);
}


/* -------------------------------------------------------
   5. PROGRESS BAR — lives inside sticky header
   ------------------------------------------------------- */
.progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border-subtle);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--purple-500), var(--purple-300));
  transition: width 0.25s var(--ease);
}


/* -------------------------------------------------------
   6. HERO
   ------------------------------------------------------- */
.hero {
  text-align: center;
  padding: 3.5rem 0 2.5rem;
  animation: heroReveal 0.8s var(--ease-out) both;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple-300);
  margin-bottom: 1rem;
  display: inline-block;
  position: relative;
  padding: 0 1.5rem;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 1px;
  background: var(--purple-500);
  opacity: 0.6;
}
.hero-eyebrow::before { left: 0; }
.hero-eyebrow::after  { right: 0; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.hero-title em {
  font-style: italic;
  color: var(--purple-300);
}

.hero-subtitle {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-pill);
  padding: 0.375rem 0.875rem;
}

.meta-chip svg { opacity: 0.7; flex-shrink: 0; }


/* -------------------------------------------------------
   7. FORM SECTIONS
   ------------------------------------------------------- */
#testimonial-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 5rem;
}

.form-section {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  padding: 2rem 2rem 2.25rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  animation: sectionReveal 0.6s var(--ease-out) forwards;
}

.form-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple-500), transparent);
  opacity: 0.5;
}

.form-section[data-section="1"] { animation-delay: 0.08s; }
.form-section[data-section="2"] { animation-delay: 0.16s; }
.form-section[data-section="3"] { animation-delay: 0.24s; }
.form-section[data-section="4"] { animation-delay: 0.32s; }
.form-section[data-section="5"] { animation-delay: 0.40s; }

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.section-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
  color: var(--purple-500);
  opacity: 0.2;
  user-select: none;
  flex-shrink: 0;
  margin-top: -0.25rem;
  letter-spacing: -0.05em;
}

.section-intro { flex: 1; }

.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.section-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 300;
}

.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.fields-grid .input-wrap:nth-child(3),
.fields-grid .input-wrap:nth-child(4) {
  grid-column: span 1;
}


/* -------------------------------------------------------
   8. INPUT FIELDS — FLOATING LABELS
   ------------------------------------------------------- */
.input-wrap {
  position: relative;
}

.input-wrap input,
.input-wrap textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border-input);
  border-radius: var(--r-md);
  padding: 1.5rem 1rem 0.6rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.5;
  transition: border-color var(--t-base), box-shadow var(--t-base), background var(--t-base);
  resize: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.input-wrap input::placeholder,
.input-wrap textarea::placeholder {
  color: transparent;
  user-select: none;
}

.input-wrap label {
  position: absolute;
  top: 1.1rem;
  left: 1rem;
  right: 1rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  pointer-events: none;
  transform-origin: left top;
  transition: transform var(--t-base), color var(--t-base), font-size var(--t-base);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Floated state: input has content or is focused */
.input-wrap input:focus + label,
.input-wrap input:not(:placeholder-shown) + label,
.input-wrap textarea:focus + label,
.input-wrap textarea:not(:placeholder-shown) + label {
  transform: translateY(-0.55rem) scale(0.72);
  color: var(--purple-300);
  font-size: 0.875rem;
}

.input-wrap input:focus,
.input-wrap textarea:focus {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-input);
  background: rgba(26, 26, 48, 0.9);
}

.input-wrap.has-error input,
.input-wrap.has-error textarea {
  border-color: var(--error);
  background: var(--error-bg);
}

.input-line {
  display: none; /* Unused - keeping for potential enhancement */
}

.textarea-wrap textarea {
  min-height: 120px;
}

.testimonial-wrap textarea {
  min-height: 160px;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
  padding: 0 0.25rem;
  line-height: 1.5;
}

.field-error {
  font-size: 0.75rem;
  color: var(--error);
  margin-top: 0.375rem;
  padding: 0 0.25rem;
  min-height: 1rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.field-error:not(:empty)::before {
  content: '!';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--error);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}

.req-star {
  color: var(--purple-300);
  font-style: normal;
}

.char-counter {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 0.375rem;
  padding-right: 0.25rem;
  transition: color var(--t-fast);
}

.char-counter.near-limit { color: var(--error); }


/* -------------------------------------------------------
   9. FIELDSET BASE
   ------------------------------------------------------- */
.fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.fieldset-legend {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: block;
  line-height: 1.5;
}

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


/* -------------------------------------------------------
   10. CHECKBOXES
   ------------------------------------------------------- */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.625rem;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
  padding: 0.625rem 0.875rem;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast), background var(--t-fast);
  user-select: none;
}

.check-item:hover {
  border-color: var(--border-input);
  background: var(--bg-input);
}

.check-item:has(input:checked) {
  border-color: var(--purple-500);
  background: rgba(124, 58, 237, 0.1);
}

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

.check-box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid var(--border-input);
  background: var(--bg-input);
  flex-shrink: 0;
  position: relative;
  transition: border-color var(--t-fast), background var(--t-fast);
}

.check-box::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 7px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: translate(-50%, -65%) rotate(-45deg) scale(0);
  transition: transform 0.15s var(--ease-out);
}

.check-item:has(input:checked) .check-box {
  background: var(--purple-500);
  border-color: var(--purple-500);
}

.check-item:has(input:checked) .check-box::after {
  transform: translate(-50%, -65%) rotate(-45deg) scale(1);
}

.check-label {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color var(--t-fast);
  line-height: 1.4;
}

.check-item:has(input:checked) .check-label {
  color: var(--text-primary);
}

/* Focus ring for accessibility */
.check-item:has(input:focus-visible) {
  outline: 2px solid var(--purple-300);
  outline-offset: 2px;
}


/* -------------------------------------------------------
   11. STAR RATING — individual word under each star
   ------------------------------------------------------- */
.star-fieldset { margin-bottom: 1.75rem; }

.star-widget {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

/* Row of 5 stars, evenly spaced */
.stars-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  max-width: 480px;
}

.star-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
  flex: 1;
  padding: 0.625rem 0.25rem 0.75rem;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
  user-select: none;
}

.star-btn:hover {
  border-color: var(--border-input);
  background: var(--bg-input);
  transform: translateY(-2px);
}

/* Hovered or selected state */
.star-btn.highlighted,
.star-btn.selected {
  border-color: #F59E0B;
  background: rgba(245, 158, 11, 0.07);
  transform: translateY(-2px);
}

.star-btn input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.star-icon {
  font-size: 2rem;
  line-height: 1;
  color: var(--border-input);
  transition: color var(--t-fast), transform var(--t-fast), filter var(--t-fast);
}

.star-btn.highlighted .star-icon,
.star-btn.selected .star-icon {
  color: #F59E0B;
  filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.5));
  transform: scale(1.12);
}

.star-word {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--t-fast);
}

.star-btn.highlighted .star-word,
.star-btn.selected .star-word {
  color: #F59E0B;
}

/* Live feedback text below the stars */
.star-feedback {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--purple-300);
  min-height: 1.2em;
  padding-left: 0.25rem;
  transition: opacity var(--t-fast);
}

/* Focus ring */
.star-btn:has(input:focus-visible) {
  outline: 2px solid var(--purple-300);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .stars-row { gap: 0.375rem; }
  .star-icon  { font-size: 1.625rem; }
  .star-word  { font-size: 0.58rem; }
  .star-btn   { padding: 0.5rem 0.125rem 0.625rem; }
}


/* -------------------------------------------------------
   12. RADIO CARDS (Recommendation)
   ------------------------------------------------------- */
.radio-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.radio-card {
  cursor: pointer;
  display: block;
}

.radio-card input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.radio-card-inner {
  padding: 1.25rem 1rem;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--r-lg);
  text-align: center;
  transition: border-color var(--t-base), background var(--t-base), transform var(--t-base), box-shadow var(--t-base);
}

.radio-card-inner:hover {
  border-color: var(--border-input);
  background: var(--bg-input);
  transform: translateY(-2px);
}

.radio-card:has(input:checked) .radio-card-inner {
  border-color: var(--purple-500);
  background: rgba(124, 58, 237, 0.1);
  box-shadow: 0 4px 24px var(--purple-glow);
  transform: translateY(-2px);
}

.radio-card-emoji {
  font-size: 1.75rem;
  margin-bottom: 0.625rem;
  line-height: 1;
}

.radio-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.radio-card-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.radio-card:has(input:focus-visible) .radio-card-inner {
  outline: 2px solid var(--purple-300);
  outline-offset: 2px;
}


/* -------------------------------------------------------
   13. FILE UPLOAD ZONE
   ------------------------------------------------------- */
.upload-zone {
  margin-top: 1.25rem;
  border: 2px dashed var(--border-input);
  border-radius: var(--r-lg);
  background: var(--bg-elevated);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t-base), background var(--t-base);
  position: relative;
  outline: none;
}

.upload-zone:hover,
.upload-zone:focus-visible {
  border-color: var(--purple-400);
  background: rgba(124, 58, 237, 0.06);
}

.upload-zone.drag-over {
  border-color: var(--purple-300);
  background: rgba(124, 58, 237, 0.12);
  box-shadow: 0 0 0 4px var(--purple-glow);
}

.upload-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.12);
  color: var(--purple-300);
  margin: 0 auto 0.875rem;
}

.upload-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.upload-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.875rem;
}

.upload-btn-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--purple-300);
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid var(--border-input);
  border-radius: var(--r-pill);
  padding: 0.375rem 1rem;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.file-preview {
  margin-top: 1.25rem;
}

.file-thumb {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-md);
  padding: 0.625rem 0.875rem;
  animation: fadeIn 0.3s var(--ease-out);
}

.file-thumb img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-subtle);
}

.file-name {
  font-size: 0.775rem;
  color: var(--text-secondary);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-file {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.125rem 0.25rem;
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
  flex-shrink: 0;
}

.remove-file:hover {
  color: var(--error);
  background: var(--error-bg);
}


/* -------------------------------------------------------
   14. CONSENT
   ------------------------------------------------------- */
.consent-section {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-card);
  opacity: 0;
  animation: sectionReveal 0.6s 0.48s var(--ease-out) forwards;
}

.consent-icon {
  color: var(--purple-300);
  display: flex;
  align-items: center;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  cursor: pointer;
  user-select: none;
}

.consent-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.consent-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border-input);
  background: var(--bg-input);
  margin-top: 0.1rem;
  position: relative;
  transition: all var(--t-base);
}

.consent-check::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 8px;
  border-left: 2.5px solid white;
  border-bottom: 2.5px solid white;
  transform: translate(-50%, -65%) rotate(-45deg) scale(0);
  transition: transform 0.15s var(--ease-out);
}

.consent-label:has(input:checked) .consent-check {
  background: var(--purple-500);
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px var(--purple-glow);
}

.consent-label:has(input:checked) .consent-check::after {
  transform: translate(-50%, -65%) rotate(-45deg) scale(1);
}

.consent-label:has(input:focus-visible) .consent-check {
  outline: 2px solid var(--purple-300);
  outline-offset: 2px;
}

.consent-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.consent-section.has-error .consent-check {
  border-color: var(--error);
}


/* -------------------------------------------------------
   15. SUBMIT BUTTON
   ------------------------------------------------------- */
.submit-section {
  text-align: center;
  opacity: 0;
  animation: sectionReveal 0.6s 0.56s var(--ease-out) forwards;
}

.submit-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, var(--purple-400) 0%, var(--purple-600) 100%);
  color: white;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 1rem 2.5rem;
  border-radius: var(--r-pill);
  border: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--t-base), box-shadow var(--t-base);
  min-width: 220px;
}

.submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--purple-300) 0%, var(--purple-500) 100%);
  opacity: 0;
  transition: opacity var(--t-base);
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-btn);
}

.submit-btn:hover::before { opacity: 1; }

.submit-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.submit-btn:focus-visible {
  outline: 3px solid var(--purple-300);
  outline-offset: 3px;
}

.btn-content {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  position: relative;
  z-index: 1;
}

.btn-arrow {
  transition: transform var(--t-base);
  flex-shrink: 0;
}

.submit-btn:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-loading {
  display: none;
  align-items: center;
  gap: 0.625rem;
  position: relative;
  z-index: 1;
}

.submit-btn.loading .btn-content { display: none; }
.submit-btn.loading .btn-loading { display: flex; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.submit-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.submit-note svg { flex-shrink: 0; opacity: 0.6; }


/* -------------------------------------------------------
   16. SUCCESS OVERLAY
   ------------------------------------------------------- */
.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(8, 8, 16, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow-y: auto;
}

.success-overlay[hidden] { display: none; }

.success-bg-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: orbFloat 8s ease-in-out infinite;
}

.orb-1 {
  width: 300px;
  height: 300px;
  top: -80px;
  left: -80px;
  background: rgba(124, 58, 237, 0.12);
  animation-delay: 0s;
}

.orb-2 {
  width: 200px;
  height: 200px;
  bottom: 10%;
  right: -60px;
  background: rgba(167, 139, 250, 0.1);
  animation-delay: -3s;
}

.orb-3 {
  width: 150px;
  height: 150px;
  top: 60%;
  left: 20%;
  background: rgba(124, 58, 237, 0.08);
  animation-delay: -6s;
}

.success-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
  width: 100%;
  text-align: center;
  animation: successReveal 0.7s var(--ease-out) both;
}

.success-check-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  color: var(--success);
}

.success-check-svg {
  width: 80px;
  height: 80px;
}

.check-circle-anim {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: drawCircle 0.7s 0.2s var(--ease-out) forwards;
}

.check-path-anim {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: drawCheck 0.4s 0.7s var(--ease-out) forwards;
}

.success-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple-300);
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid var(--border-card);
  border-radius: var(--r-pill);
  padding: 0.375rem 1rem;
  margin-bottom: 1.25rem;
}

.success-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.success-title em {
  font-style: italic;
  color: var(--purple-300);
}

.success-message {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: 2rem;
}

.success-next {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: left;
}

.success-next-title {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple-300);
  margin-bottom: 1rem;
}

.success-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.success-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid var(--border-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--purple-300);
  margin-top: 0.1rem;
}

/* Coming soon notice on success screen */
.coming-soon-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  background: rgba(124, 58, 237, 0.07);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: var(--r-lg);
  padding: 1.125rem 1.25rem;
  margin-bottom: 1.75rem;
  text-align: left;
}

.coming-soon-icon {
  flex-shrink: 0;
  color: var(--purple-300);
  margin-top: 0.1rem;
}

.coming-soon-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.coming-soon-text {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.success-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.success-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--purple-400), var(--purple-600));
  color: white;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: var(--r-pill);
  border: none;
  cursor: pointer;
  transition: transform var(--t-base), box-shadow var(--t-base);
  text-decoration: none;
}

.success-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--purple-glow);
}

.success-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.75rem 1.75rem;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--border-input);
  cursor: pointer;
  transition: border-color var(--t-base), color var(--t-base), background var(--t-base);
}

.success-btn-outline:hover {
  border-color: var(--purple-400);
  color: var(--text-primary);
  background: rgba(124, 58, 237, 0.06);
}


/* -------------------------------------------------------
   17. KEYFRAME ANIMATIONS
   ------------------------------------------------------- */
@keyframes heroReveal {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes sectionReveal {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes successReveal {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes drawCircle {
  to { stroke-dashoffset: 0; }
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

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

@keyframes orbFloat {
  0%, 100% { transform: translateY(0px) scale(1); }
  50%       { transform: translateY(-20px) scale(1.05); }
}


/* -------------------------------------------------------
   18. ACCESSIBILITY: REDUCED MOTION
   ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .form-section,
  .consent-section,
  .submit-section {
    opacity: 1;
    transform: none;
  }
}


/* -------------------------------------------------------
   19. RESPONSIVE — TABLET
   ------------------------------------------------------- */
@media (max-width: 640px) {

  .header-tag { display: none; }

  .hero { padding: 2rem 0 1.75rem; }

  .hero-title { font-size: 2.2rem; }

  .fields-grid {
    grid-template-columns: 1fr;
  }

  .form-section {
    padding: 1.5rem 1.25rem 1.75rem;
    border-radius: var(--r-lg);
  }

  .section-header { gap: 0.875rem; }

  .section-num { font-size: 2.25rem; }

  .section-title { font-size: 1.25rem; }

  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .radio-cards {
    grid-template-columns: 1fr;
    gap: 0.625rem;
  }

  .radio-card-inner {
    display: flex;
    align-items: center;
    text-align: left;
    gap: 1rem;
    padding: 1rem;
  }

  .radio-card-emoji {
    font-size: 1.5rem;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .star .star {
    font-size: 1.875rem;
  }

  .consent-section {
    padding: 1.25rem;
    border-radius: var(--r-lg);
  }

  .success-title { font-size: 2rem; }

  .success-actions {
    flex-direction: column;
    align-items: center;
  }

  .success-btn-primary,
  .success-btn-outline {
    width: 100%;
    justify-content: center;
  }
}


/* -------------------------------------------------------
   20. RESPONSIVE — MOBILE (small)
   ------------------------------------------------------- */
@media (max-width: 380px) {
  .container { padding: 0 1rem; }

  .hero-title { font-size: 1.9rem; }

  .meta-chip:last-child { display: none; }

  .submit-btn { width: 100%; }
}


/* -------------------------------------------------------
   21. PRINT STYLES
   ------------------------------------------------------- */
@media print {
  body::before,
  body::after,
  .site-header,
  .progress-track,
  .success-overlay { display: none !important; }

  body {
    background: white;
    color: black;
  }

  .form-section {
    border: 1px solid #ccc;
    box-shadow: none;
    page-break-inside: avoid;
  }
}
