/* index.css */

/* Custom Color System & Design Tokens */
:root {
  --font-primary: 'Plus Jakarta Sans', sans-serif;
  --font-serif: 'Playfair Display', serif;
  
  --primary-base: 242; /* Indigo HSL base */
  --color-primary: hsl(var(--primary-base), 85%, 60%);
  --color-primary-dark: hsl(var(--primary-base), 80%, 48%);
  --color-primary-light: hsl(var(--primary-base), 90%, 94%);
  --color-primary-glow: hsla(var(--primary-base), 85%, 60%, 0.15);
  
  --color-dark: #121826;
  --color-text-main: #232d42;
  --color-text-muted: #5e6b82;
  --color-border: #e2e8f0;
  --color-bg-card: rgba(255, 255, 255, 0.85);
  --color-bg-page: #f8fafc;
  
  --color-error: #ef4444;
  --color-error-light: #fef2f2;
  --color-success: #10b981;
  --color-success-light: #ecfdf5;
  
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
  
  --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.05), 0 0 1px 0 rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 30px 60px -20px rgba(99, 102, 241, 0.15);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-primary);
}

body {
  background-color: var(--color-bg-page);
  color: var(--color-text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
  padding: 2rem 1rem;
}

/* Premium Background Effects */
.glass-bg-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: floatOrb 20s infinite alternate ease-in-out;
}

.orb-1 {
  width: 50vw;
  height: 50vh;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, rgba(168, 85, 247, 0) 70%);
  top: -10%;
  right: -10%;
}

.orb-2 {
  width: 60vw;
  height: 60vh;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, rgba(6, 182, 212, 0) 70%);
  bottom: -10%;
  left: -10%;
  animation-delay: -10s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(8%, 8%) scale(1.1); }
}

/* Main Container & Card */
.app-container {
  width: 100%;
  max-width: 800px;
  position: relative;
  z-index: 10;
}

.form-card {
  background: var(--color-bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--border-radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-premium);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.form-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 255, 255, 0.8);
}

/* Header Styling */
.form-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.logo-wrapper {
  margin-bottom: 1.5rem;
}

.brand-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 50%;
  padding: 8px;
  background: white;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.main-title {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--color-text-muted);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

/* Stepper Indicator */
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
  position: relative;
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  position: relative;
  cursor: default;
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--color-border);
  color: var(--color-text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  font-size: 0.95rem;
}

.step-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition-smooth);
}

.step-line {
  flex-grow: 1;
  height: 2px;
  background: var(--color-border);
  margin: 0 1rem;
  margin-top: -20px;
  z-index: 1;
  transition: var(--transition-smooth);
}

.step-indicator.active .step-num {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  box-shadow: 0 0 0 4px var(--color-primary-glow);
}

.step-indicator.active .step-label {
  color: var(--color-primary);
}

.step-indicator.completed .step-num {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.step-indicator.completed .step-label {
  color: var(--color-primary-dark);
}

.step-line.filled {
  background: var(--color-primary);
}

/* Form Sections */
.form-step {
  display: none;
  animation: slideFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-step.active {
  display: block;
}

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

.section-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 1.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary-light);
}

/* Inputs & Form Elements */
.input-group {
  margin-bottom: 1.5rem;
}

.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 0.5rem;
}

.required-field label::after {
  content: " *";
  color: var(--color-error);
}

input[type="text"],
input[type="email"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--color-border);
  background: white;
  color: var(--color-text-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%235e6b82' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  background-size: 1.25rem;
  padding-right: 3rem;
}

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

/* Checkboxes */
.checkbox-group {
  margin-top: 1.5rem;
}

.custom-checkbox {
  display: flex;
  align-items: flex-start;
  position: relative;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: relative;
  height: 20px;
  width: 20px;
  background-color: white;
  border: 2px solid var(--color-border);
  border-radius: 4px;
  margin-right: 0.75rem;
  flex-shrink: 0;
  transition: var(--transition-fast);
  margin-top: 2px;
}

.custom-checkbox:hover input ~ .checkmark {
  border-color: var(--color-primary);
}

.custom-checkbox input:checked ~ .checkmark {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-main);
  line-height: 1.4;
}

.checkbox-text a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.checkbox-text a:hover {
  text-decoration: underline;
}

/* Radio Cards */
.radio-cards-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.5rem;
}

.radio-card {
  position: relative;
  cursor: pointer;
}

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

.radio-card-content {
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  padding: 1rem;
  background: white;
  display: flex;
  align-items: center;
  transition: var(--transition-smooth);
}

.radio-custom-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  margin-right: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.radio-custom-dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
  display: none;
}

.radio-card input:checked ~ .radio-card-content {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  box-shadow: 0 4px 12px var(--color-primary-glow);
}

.radio-card input:checked ~ .radio-card-content .radio-custom-dot {
  border-color: var(--color-primary);
  background: var(--color-primary);
}

.radio-card input:checked ~ .radio-card-content .radio-custom-dot::after {
  display: block;
}

.radio-text {
  display: flex;
  flex-direction: column;
}

.radio-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-dark);
}

.radio-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* File Dropzones */
.file-dropzone {
  border: 2px dashed var(--color-border);
  border-radius: var(--border-radius-md);
  padding: 2rem;
  text-align: center;
  background: white;
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}

.file-dropzone:hover,
.file-dropzone.dragover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.file-dropzone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  width: 40px;
  height: 40px;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  transition: var(--transition-smooth);
}

.file-dropzone:hover .upload-icon {
  color: var(--color-primary);
  transform: translateY(-2px);
}

.dropzone-prompt .main-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 0.25rem;
}

.dropzone-prompt .main-text span {
  color: var(--color-primary);
}

.dropzone-prompt .sub-text {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Preview Containers */
.preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 10;
}

.image-preview {
  max-width: 100%;
  max-height: 180px;
  border-radius: var(--border-radius-sm);
  object-fit: contain;
  margin-bottom: 1rem;
  border: 1px solid var(--color-border);
}

.remove-file-btn {
  background: var(--color-error-light);
  color: var(--color-error);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

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

/* Validation Styling & Error Messages */
.error-msg {
  display: none;
  color: var(--color-error);
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.4rem;
}

.input-group.invalid input,
.input-group.invalid select,
.input-group.invalid textarea {
  border-color: var(--color-error);
  background: var(--color-error-light);
}

.input-group.invalid .checkmark {
  border-color: var(--color-error);
}

.input-group.invalid .error-msg {
  display: block;
}

/* Terms Display Block */
.terms-content {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  max-height: 280px;
  overflow-y: auto;
  font-size: 0.85rem;
  color: var(--color-text-main);
  margin-bottom: 1.25rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.terms-content h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 1rem 0 0.5rem 0;
  color: var(--color-dark);
}

.terms-content h3:first-of-type {
  margin-top: 0;
}

.terms-content ul {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.terms-content li {
  margin-bottom: 0.4rem;
}

/* Instruction boxes */
.instruction-box {
  background: var(--color-primary-light);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.instruction-box h3 {
  font-size: 1.1rem;
  color: var(--color-primary-dark);
  margin-bottom: 0.5rem;
}

.instruction-box p {
  font-size: 0.875rem;
  color: var(--color-text-main);
  margin-bottom: 1rem;
}

.external-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-primary);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px var(--color-primary-glow);
}

.external-link-btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

/* Navigation Buttons */
.form-navigation {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  outline: none;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
  color: white;
  box-shadow: 0 4px 15px var(--color-primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px hsla(var(--primary-base), 85%, 60%, 0.3);
}

.btn-secondary {
  background: white;
  border: 1px solid var(--color-border);
  color: var(--color-text-main);
}

.btn-secondary:hover {
  background: var(--color-bg-page);
  border-color: var(--color-text-muted);
}

.hidden {
  display: none !important;
}

/* Loading & Submission Overlay */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  animation: fadeIn 0.3s ease;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--color-primary-light);
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

/* Success Screen Design */
.success-screen {
  text-align: center;
  padding: 2rem 0;
  animation: scaleUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-icon-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 2rem auto;
}

.success-circle {
  stroke: var(--color-success);
  stroke-width: 2;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-miterlimit: 10;
  animation: strokeCircle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-check {
  transform-origin: 50% 50%;
  stroke: var(--color-success);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: strokeCheck 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

.success-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--color-success-light);
  z-index: -1;
  animation: pulseScale 1.5s infinite ease-out 0.9s;
}

@keyframes strokeCircle {
  100% { stroke-dashoffset: 0; }
}

@keyframes strokeCheck {
  100% { stroke-dashoffset: 0; }
}

@keyframes pulseScale {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.success-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 0.75rem;
}

.success-message {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.success-info-card {
  background: var(--color-success-light);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  max-width: 500px;
  margin: 0 auto 2.5rem auto;
  font-size: 0.925rem;
  line-height: 1.6;
  color: #065f46;
}

.email-subject-tag {
  display: block;
  margin-top: 0.5rem;
  font-family: monospace;
  background: white;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.15);
  font-weight: bold;
}

/* Responsiveness adjustments */
@media (max-width: 768px) {
  .form-card {
    padding: 2rem 1.5rem;
  }
  
  .grid-2-col {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .radio-cards-group {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .stepper {
    margin-bottom: 2rem;
  }
  
  .step-label {
    display: none;
  }
  
  .step-line {
    margin-top: -20px;
  }
}
