/* ====================================================
   Migration.co.id – Style Sheet
   Clean SaaS · Dark/Light Mode · Inter Font
   ==================================================== */

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

:root {
  /* --- Color Tokens (Light) --- */
  --bg-base:       #f5f5f7;
  --bg-card:       #ffffff;
  --bg-card-hover: #fafafa;
  --bg-input:      #f9f9fb;
  --bg-topbar:     rgba(255, 255, 255, 0.85);

  --text-primary:   #0d0d0d;
  --text-secondary: #6b6b80;
  --text-muted:     #a0a0b0;
  --text-inverse:   #ffffff;

  --border:         #e4e4ef;
  --border-focus:   #6c63ff;
  --border-input:   #dddde8;

  --accent:         #6c63ff;
  --accent-hover:   #5a52e0;
  --accent-light:   rgba(108, 99, 255, 0.08);
  --accent-glow:    rgba(108, 99, 255, 0.25);

  --success:        #22c55e;
  --success-light:  rgba(34, 197, 94, 0.1);
  --error:          #ef4444;
  --error-light:    rgba(239, 68, 68, 0.08);
  --warning:        #f59e0b;

  --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.05);
  --shadow-glow:  0 0 0 3px var(--accent-glow);

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  --duration-fast:   150ms;
  --duration-normal: 250ms;
  --duration-slow:   400ms;
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:   cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-base:       #0e0e11;
  --bg-card:       #18181f;
  --bg-card-hover: #1e1e27;
  --bg-input:      #12121a;
  --bg-topbar:     rgba(14, 14, 17, 0.88);

  --text-primary:   #f0f0f5;
  --text-secondary: #9090a8;
  --text-muted:     #5c5c70;

  --border:         #272733;
  --border-focus:   #8b82ff;
  --border-input:   #252535;

  --accent:         #8b82ff;
  --accent-hover:   #7a71f0;
  --accent-light:   rgba(139, 130, 255, 0.12);
  --accent-glow:    rgba(139, 130, 255, 0.22);

  --shadow-sm:    0 1px 3px rgba(0,0,0,.4);
  --shadow-md:    0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.6);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---------- Typography ---------- */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color var(--duration-slow) var(--ease-out),
              color var(--duration-slow) var(--ease-out);
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: var(--bg-topbar);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--border);
  max-width: 100%;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-icon {
  color: var(--accent);
}

.logo-text {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-accent {
  color: var(--accent);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.btn-icon:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Hero Section ---------- */
.hero {
  text-align: center;
  padding: 64px 24px 48px;
  max-width: 860px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  background: var(--accent-light);
  border: 1px solid var(--accent-glow);
  border-radius: var(--radius-full);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
  animation: fadeInDown var(--duration-slow) var(--ease-out);
}

.hero-title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 16px;
  animation: fadeInDown var(--duration-slow) var(--ease-out) 0.1s both;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #a855f7 60%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.0rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 640px;
  margin: 0 auto 28px;
  animation: fadeInDown var(--duration-slow) var(--ease-out) 0.2s both;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  animation: fadeInDown var(--duration-slow) var(--ease-out) 0.3s both;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-number {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* ---------- Container / Layout ---------- */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---------- Progress Bar ---------- */
.progress-bar-wrapper {
  padding: 4px 0 8px;
}

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--bg-card);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  z-index: 1;
}

.progress-step.active .step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.progress-step.done .step-dot {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step-text {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color var(--duration-normal);
}

.progress-step.active .step-text,
.progress-step.done .step-text {
  color: var(--text-primary);
}

.progress-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  max-width: 80px;
  margin-bottom: 22px;
  transition: background var(--duration-normal);
  position: relative;
  z-index: 0;
}

.progress-line.done {
  background: var(--success);
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: all var(--duration-normal) var(--ease-out);
  animation: slideInUp var(--duration-slow) var(--ease-out);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

/* ---------- Card Header ---------- */
.card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.section-number {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent-glow);
  border-radius: var(--radius-sm);
  padding: 3px 7px;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  margin-top: 2px;
}

.section-info {
  flex: 1;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.3;
}

.section-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.section-icon {
  color: var(--text-muted);
  padding: 6px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Steps Container ---------- */
.steps-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

@media (min-width: 640px) {
  .steps-container {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

/* ---------- Step Item ---------- */
.step-item {
  animation: slideInUp var(--duration-normal) var(--ease-out);
}

.step-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}

.step-label-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.step-depth-tag {
  font-size: 0.65rem;
  color: var(--text-muted);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 1px 6px;
}

/* ---------- Tom Select Overrides ---------- */
.ts-wrapper {
  width: 100%;
}

.ts-control {
  padding: 10px 14px !important;
  border: 1.5px solid var(--border-input) !important;
  border-radius: var(--radius-md) !important;
  background: var(--bg-input) !important;
  color: var(--text-primary) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 16px !important;
  font-weight: 450 !important;
  box-shadow: var(--shadow-sm) !important;
  transition: all var(--duration-fast) var(--ease-out) !important;
  min-height: 44px !important;
  display: flex !important;
  align-items: center !important;
}

.ts-control:hover {
  border-color: var(--text-muted) !important;
}

.ts-wrapper.focus .ts-control {
  border-color: var(--border-focus) !important;
  box-shadow: var(--shadow-glow) !important;
  background: var(--bg-card) !important;
}

.ts-dropdown {
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  background: var(--bg-card) !important;
  box-shadow: var(--shadow-lg) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 16px !important;
  margin-top: 4px !important;
  overflow: hidden !important;
}

.ts-dropdown .option {
  padding: 10px 14px !important;
  color: var(--text-primary) !important;
  cursor: pointer !important;
  transition: background var(--duration-fast) !important;
  border-radius: 0 !important;
}

.ts-dropdown .option:hover,
.ts-dropdown .option.active {
  background: var(--accent-light) !important;
  color: var(--accent) !important;
}

.ts-dropdown .option.selected {
  font-weight: 600 !important;
  color: var(--accent) !important;
}

.ts-dropdown-content::-webkit-scrollbar { width: 4px; }
.ts-dropdown-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

.ts-wrapper input::placeholder { color: var(--text-muted) !important; }
.ts-control input { font-size: 16px !important; }

[data-theme="dark"] .ts-control { border-color: var(--border-input) !important; }

/* ---------- Selection Summary ---------- */
.selection-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--success-light);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius-md);
  margin-top: 14px;
  animation: slideInUp var(--duration-normal) var(--ease-out);
}

.summary-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.summary-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.summary-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.summary-path {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
}

/* ---------- Target Actions ---------- */
.target-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.btn-skip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.btn-skip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* ---------- Migration Overview ---------- */
.migration-overview {
  background: linear-gradient(135deg, var(--accent-light) 0%, rgba(168, 85, 247, 0.06) 100%);
  border: 1px solid var(--accent-glow);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 22px;
}

.overview-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.overview-from, .overview-to {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.overview-to {
  text-align: right;
}

.ov-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.ov-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-word;
}

.overview-arrow {
  color: var(--accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* ---------- Contact Form ---------- */
.contact-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .contact-form {
    grid-template-columns: 1fr 1fr;
  }
  .form-field:nth-child(1),
  .form-field:nth-child(2) {
    /* Name and Email side by side on row 1 */
  }
  .form-field:nth-child(3) {
    grid-column: 1 / -1;
  }
  @media (min-width: 768px) {
    .form-field:nth-child(3) {
      grid-column: 1 / 2;
    }
  }
  .form-field:last-of-type {
    grid-column: 1 / -1;
  }
  .form-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  @media (min-width: 640px) {
    .form-actions {
      flex-direction: row;
    }
    .form-actions > button {
      flex: 1;
    }
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.required {
  color: var(--error);
  margin-left: 2px;
}

.optional {
  font-weight: 400;
  color: var(--text-muted);
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--duration-fast);
}

.textarea-wrapper .input-icon {
  top: 14px;
  transform: none;
}

.form-input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 16px; /* Prevent iOS Safari auto-zoom on focus */
  transition: all var(--duration-fast) var(--ease-out);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

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

.form-input:focus {
  border-color: var(--border-focus);
  background: var(--bg-card);
  box-shadow: var(--shadow-glow);
}

.form-input:focus + .input-icon,
.form-input:focus ~ .input-icon,
.input-wrapper:focus-within .input-icon {
  color: var(--accent);
}

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

.form-textarea {
  resize: vertical;
  min-height: 82px;
  padding-top: 11px;
  line-height: 1.6;
}

.form-input.invalid {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

.form-error {
  font-size: 0.73rem;
  color: var(--error);
  font-weight: 500;
  min-height: 16px;
  display: block;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
  overflow: hidden;
  margin-top: 4px;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  opacity: 0;
  transition: opacity var(--duration-fast);
}

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

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

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

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  background: #25D366;
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
  overflow: hidden;
  margin-top: 4px;
}

.btn-whatsapp:hover {
  background: #128C7E;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
}

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.btn-secondary:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Success State ---------- */
.success-card {
  text-align: center;
  padding: 40px 28px;
}

.success-animation {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.success-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  animation: popIn 0.5s var(--ease-out);
  box-shadow: 0 0 0 8px var(--success-light);
}

.success-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.success-message {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 22px;
}

.success-message strong {
  color: var(--text-primary);
  font-weight: 700;
}

.success-summary {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: left;
  margin-bottom: 22px;
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.success-summary strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ---------- Footer ---------- */
.footer {
  padding: 24px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-brand {
  font-size: 0.875rem;
  font-weight: 700;
}

.footer-sep {
  color: var(--border);
}

.footer-copy,
.footer-year {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Utility Classes ---------- */
.hidden {
  display: none !important;
}

/* ---------- Animations ---------- */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes popIn {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

/* ---------- Responsive ---------- */
@media (max-width: 540px) {
  .hero { padding: 44px 20px 36px; }
  .hero-stats { gap: 16px; }
  .container { padding: 0 14px 50px; }
  .card { padding: 20px 18px; }
  .topbar { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
