/* ============================================
   NEXA PHOTOBOOTH — Design System
   Color Palette: Deep Indigo / Violet / Slate
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
  /* Primary */
  --primary:        #4F46E5;
  --primary-dark:   #3730A3;
  --primary-darker: #1E1B6E;
  --primary-light:  #818CF8;
  --primary-pale:   #EEF2FF;

  /* Accent */
  --accent:         #7C3AED;
  --accent-dark:    #5B21B6;
  --accent-light:   #A78BFA;
  --accent-pale:    #F5F3FF;

  /* Neutral */
  --black:          #000000;
  --near-black:     #0F0F1A;
  --dark:           #1E1B2E;
  --charcoal:       #2D2B3D;
  --gray-dark:      #4B4869;
  --gray:           #6B6890;
  --gray-mid:       #9896B8;
  --gray-light:     #C4C3D8;
  --border:         #E2E1F0;
  --white:          #FFFFFF;
  --surface:        #F8F7FF;
  --surface-alt:    #F0EFFE;

  /* Semantic */
  --success:        #059669;
  --warning:        #D97706;
  --error:          #DC2626;

  /* Shadows */
  --shadow-sm:      rgba(79, 70, 229, 0.12) 0px 2px 8px 0px, rgba(0,0,0,0.06) 0px 1px 3px 0px;
  --shadow-md:      rgba(79, 70, 229, 0.18) 0px 4px 16px 0px, rgba(0,0,0,0.08) 0px 2px 6px 0px;
  --shadow-lg:      rgba(79, 70, 229, 0.22) 0px 8px 32px 0px, rgba(0,0,0,0.10) 0px 4px 12px 0px;
  --shadow-card:    rgba(79, 70, 229, 0.08) 0px 4px 24px 0px;

  /* Border Radius */
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      16px;
  --radius-xl:      24px;
  --radius-pill:    999px;

  /* Spacing */
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 20px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;
  --space-9: 56px;
  --space-10: 64px;
  --space-11: 80px;
  --space-12: 96px;

  /* Typography */
  --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Transitions */
  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-primary);
  background-color: var(--white);
  color: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: var(--font-primary); }
input, textarea, select { font-family: var(--font-primary); }

/* ── Container ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-7);
}

/* ── Typography ── */
.h1 { font-size: 56px; font-weight: 800; line-height: 1.15; letter-spacing: -0.5px; }
.h2 { font-size: 40px; font-weight: 700; line-height: 1.2; }
.h3 { font-size: 28px; font-weight: 700; line-height: 1.3; }
.h4 { font-size: 20px; font-weight: 700; line-height: 1.4; }
.h5 { font-size: 18px; font-weight: 600; line-height: 1.4; }
.body-lg { font-size: 18px; font-weight: 400; line-height: 1.7; }
.body { font-size: 16px; font-weight: 400; line-height: 1.7; }
.body-sm { font-size: 14px; font-weight: 400; line-height: 1.6; }
.caption { font-size: 12px; font-weight: 500; line-height: 1.5; }
.label { font-size: 13px; font-weight: 600; letter-spacing: 0.5px; }

.text-primary { color: var(--primary); }
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--gray); }
.text-white   { color: var(--white); }
.text-dark    { color: var(--dark); }
.text-center  { text-align: center; }

/* ── Gradient Text ── */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 28px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-primary);
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent-dark) 100%);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}
.btn-primary:disabled {
  background: var(--gray-light);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: transparent;
  color: var(--dark);
  border: 2px solid var(--dark);
}
.btn-secondary:hover {
  background: var(--primary-pale);
  border-color: var(--primary);
  color: var(--primary);
}
.btn-secondary:active {
  background: rgba(79, 70, 229, 0.15);
}
.btn-secondary:disabled {
  border-color: var(--gray-light);
  color: var(--gray-light);
  cursor: not-allowed;
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: none;
  padding: 0 16px;
}
.btn-ghost:hover {
  background: var(--primary-pale);
}

.btn-sm {
  height: 38px;
  padding: 0 20px;
  font-size: 14px;
}

.btn-lg {
  height: 56px;
  padding: 0 36px;
  font-size: 16px;
}

.btn-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--dark);
  border: 2px solid var(--border);
}
.btn-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-pale);
}

.btn-full { width: 100%; }

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.badge-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--white);
}
.badge-soft {
  background: var(--primary-pale);
  color: var(--primary);
  border: 1px solid rgba(79, 70, 229, 0.2);
}
.badge-accent {
  background: var(--accent-pale);
  color: var(--accent);
  border: 1px solid rgba(124, 58, 237, 0.2);
}
.badge-success {
  background: #ECFDF5;
  color: var(--success);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: var(--space-5);
  transition: all var(--transition);
}
.card:hover {
  border-color: rgba(79, 70, 229, 0.3);
  box-shadow: var(--shadow-card);
}
.card-elevated {
  box-shadow: var(--shadow-card);
  border-color: transparent;
}
.card-elevated:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ── Form Elements ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--dark);
  font-size: 15px;
  font-family: var(--font-primary);
  transition: all var(--transition);
  outline: none;
}
.form-textarea {
  height: auto;
  padding: 14px 16px;
  resize: vertical;
  min-height: 120px;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--gray-mid); }
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.form-input:disabled,
.form-select:disabled {
  background: var(--surface);
  color: var(--gray-mid);
  border-color: var(--border);
  cursor: not-allowed;
}
.form-input.error,
.form-select.error { border-color: var(--error); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1); }
.form-hint { font-size: 12px; color: var(--gray); }
.form-error { font-size: 12px; color: var(--error); }

/* ── Section ── */
.section {
  padding: var(--space-12) 0;
}
.section-sm {
  padding: var(--space-8) 0;
}
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-8);
}
.section-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-2);
}

/* ── Divider ── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: var(--space-5) 0;
}

/* ── Overlay / Modal ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 26, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}
.overlay.active {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-7);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform var(--transition-slow);
}
.overlay.active .modal {
  transform: translateY(0);
}

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--dark);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  animation: slideInRight 0.3s ease;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--error); }
.toast.warning { background: var(--warning); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Spinner ── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-alt) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Utility ── */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 12px; }
.gap-3 { gap: 16px; }
.gap-4 { gap: 24px; }
.gap-5 { gap: 32px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Responsive ── */
@media (max-width: 1023px) {
  .container { padding: 0 var(--space-5); }
  .h1 { font-size: 40px; }
  .h2 { font-size: 32px; }
  .section { padding: var(--space-10) 0; }
}

@media (max-width: 767px) {
  .container { padding: 0 var(--space-3); }
  .h1 { font-size: 32px; }
  .h2 { font-size: 26px; }
  .h3 { font-size: 22px; }
  .section { padding: var(--space-8) 0; }
  .section-header { margin-bottom: var(--space-6); }
  .btn-lg { height: 52px; font-size: 15px; }
  .modal { padding: var(--space-5); }
  .toast-container { left: 16px; right: 16px; bottom: 16px; }
  .toast { min-width: unset; }
}
