/* ===== DESIGN TOKENS — OnyxWorkz ===== */
:root {
  --bg-primary: #08080a;
  --bg-secondary: #0f0f12;
  --bg-card: rgba(255, 255, 255, 0.035);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --bg-input: rgba(255, 255, 255, 0.05);
  --bg-input-focus: rgba(255, 255, 255, 0.09);
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(212, 175, 55, 0.5);
  --text-primary: #f5f0e8;
  --text-secondary: #a8a29e;
  --text-muted: #78716c;
  --accent-gold: #d4af37;
  --accent-gold-dark: #b8941e;
  --accent-amber: #f59e0b;
  --accent-warm: #e8c872;
  --gradient-primary: linear-gradient(135deg, #d4af37 0%, #f5d280 40%, #e8c872 60%, #d4af37 100%);
  --gradient-card: linear-gradient(135deg, rgba(212, 175, 55, 0.06), rgba(245, 158, 11, 0.03));
  --shadow-glow: 0 0 40px rgba(212, 175, 55, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background ambient glow */
body::before {
  content: '';
  position: fixed;
  top: -30%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -20%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ===== BACK LINK ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  margin-bottom: 24px;
  transition: color var(--transition-fast);
}

.back-link:hover {
  color: var(--accent-gold);
}

/* ===== LAYOUT ===== */
.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ===== HERO HEADER ===== */
.form-hero {
  text-align: center;
  margin-bottom: 56px;
  animation: fadeInUp 0.7s ease-out;
}

/* ===== BRAND WORDMARK ===== */
.brand-wordmark {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  margin-bottom: 24px;
  user-select: none;
}

.brand-wordmark span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--accent-gold);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.form-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== PROGRESS BAR ===== */
.progress-bar-container {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 16px 0;
  margin: 0 -24px 40px;
  padding-left: 24px;
  padding-right: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-primary);
  border-radius: 100px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.progress-label span:last-child {
  color: var(--accent-gold);
  font-weight: 600;
}

/* ===== FORM SECTIONS (GLASS CARDS) ===== */
.form-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  margin-bottom: 28px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
  animation: fadeInUp 0.6s ease-out both;
}

.form-section:nth-child(2) { animation-delay: 0.08s; }
.form-section:nth-child(3) { animation-delay: 0.16s; }
.form-section:nth-child(4) { animation-delay: 0.24s; }
.form-section:nth-child(5) { animation-delay: 0.32s; }
.form-section:nth-child(6) { animation-delay: 0.4s; }
.form-section:nth-child(7) { animation-delay: 0.48s; }

.form-section:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-glow);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--gradient-card);
  border: 1px solid rgba(212, 175, 55, 0.12);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
}

.section-header p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== FORM FIELDS ===== */
.field-group {
  margin-bottom: 22px;
}

.field-group:last-child {
  margin-bottom: 0;
}

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

label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

label .required {
  color: var(--accent-amber);
  margin-left: 2px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-fast);
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus {
  background: var(--bg-input-focus);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

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

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}

.checkbox-item:hover {
  background: var(--bg-input-focus);
  border-color: rgba(212, 175, 55, 0.3);
}

.checkbox-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
  position: relative;
}

.checkbox-item input[type="checkbox"]:checked {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
}

.checkbox-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-item span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.checkbox-item:has(input:checked) {
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.3);
}

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

/* ===== RADIO BUTTONS ===== */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}

.radio-item:hover {
  background: var(--bg-input-focus);
  border-color: rgba(212, 175, 55, 0.3);
}

.radio-item input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
  position: relative;
}

.radio-item input[type="radio"]:checked {
  border-color: var(--accent-gold);
}

.radio-item input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-gold);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.radio-item span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.radio-item:has(input:checked) {
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.3);
}

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

/* ===== STYLE PREFERENCE CARDS ===== */
.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.style-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
  user-select: none;
}

.style-card:hover {
  background: var(--bg-input-focus);
  border-color: rgba(212, 175, 55, 0.3);
  transform: translateY(-2px);
}

.style-card input[type="radio"] {
  display: none;
}

.style-card .style-emoji {
  font-size: 1.8rem;
}

.style-card .style-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.style-card:has(input:checked) {
  background: rgba(212, 175, 55, 0.08);
  border-color: var(--accent-gold);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.12);
}

.style-card:has(input:checked) .style-label {
  color: var(--accent-gold);
}

/* ===== SUBMIT BUTTON ===== */
.submit-section {
  text-align: center;
  padding-top: 12px;
  animation: fadeInUp 0.6s ease-out 0.56s both;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 48px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: #08080a;
  background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold), var(--accent-warm));
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-warm), var(--accent-amber));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.35);
}

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

.btn-submit span {
  position: relative;
  z-index: 1;
}

.btn-submit:active {
  transform: translateY(0);
}

.submit-note {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===== SUCCESS OVERLAY ===== */
.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.success-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.success-card {
  text-align: center;
  padding: 56px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 90%;
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-overlay.visible .success-card {
  transform: scale(1);
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(245, 158, 11, 0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 2rem;
}

.success-card h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 12px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.success-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .page-wrapper {
    padding: 24px 16px 60px;
  }

  .form-section {
    padding: 24px 20px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

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

  .style-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .radio-group {
    flex-direction: column;
  }

  .progress-bar-container {
    margin: 0 -16px 28px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .btn-submit {
    width: 100%;
    justify-content: center;
  }
}
