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

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.page {
  display: flex;
  min-height: 100vh;
}

/* ─── Left Panel ─── */
.left-panel {
  width: 50%;
  background: #0a0d26;
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 9999px;
  background: #db2777;
  opacity: 0.2;
  filter: blur(60px);
  pointer-events: none;
}

.glow-top {
  top: -10%;
  left: 74.44%;
  right: -10%;
  bottom: 81.56%;
}

.bg-decoration {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.glow-bottom {
  top: 60.22%;
  left: -19.31%;
  right: 83.75%;
  bottom: 11.33%;
}

.left-top {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.brand-logo {
  width: 135px;
  height: 30.6px;
}

.hero-text {
  margin-top: 32px;
}

.hero-text h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 46.8px;
  line-height: 1.13;
  color: #fff;
}

.hero-text .accent {
  color: #ff3b6a;
}

.hero-text .subtitle {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.7;
  color: #c9cdd4;
  margin-top: 12px;
  max-width: 468px;
}

/* Checklist + Mascot wrapper */
.checklist-wrapper {
  display: flex;
  align-items: flex-start;
  position: relative;
  z-index: 1;
  margin-top: 18px;
  flex: 1;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 360px;
  flex-shrink: 0;
  padding-bottom: 14px;
}

.checklist-item {
  display: flex;
  gap: 14.4px;
  align-items: flex-start;
}

.check-icon {
  color: #ff3b6a;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 19.8px;
  line-height: 21.6px;
  flex-shrink: 0;
  width: 21.6px;
  text-align: center;
  margin-top: 0.9px;
}

.checklist-item strong {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14.4px;
  line-height: 21.6px;
  color: #fff;
  display: block;
}

.checklist-item p {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 12.6px;
  line-height: 19.8px;
  color: #c9cdd4;
  margin-top: 2.7px;
}

.checklist-heading {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14.4px;
  line-height: 21.6px;
  color: #fff;
  margin-top: 18px;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

.bottom-section .checklist-heading {
  color: #1a1a2e;
}

/* Mascot */
.mascot {
  flex-shrink: 0;
  width: 240px;
  pointer-events: none;
  margin-left: auto;
  margin-right: -18px;
  margin-bottom: -14.4px;
}

.mascot-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.07)) drop-shadow(0 0 40px rgba(255, 255, 255, 0.04));
}

/* Rating Badges */
.rating-badges {
  position: relative;
  z-index: 1;
  margin-top: 20px;
}

.rating-badges-img {
  height: 32.4px;
  width: auto;
  object-fit: contain;
}

/* Copyright */
.copyright {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 9.4px;
  line-height: 14.9px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #e6e6e6;
  position: relative;
  z-index: 1;
  margin-top: 12px;
}

/* ─── Right Panel ─── */
.right-panel {
  width: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 58px;
  position: relative;
  min-height: 100vh;
}

/* Form Container */
.form-container {
  width: 100%;
  max-width: 403.2px;
  margin-top: auto;
  margin-bottom: auto;
  padding: 28px 0;
}

.form-header h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 23px;
  line-height: 1.2;
  color: #111827;
}

.form-header p {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.5;
  color: #6b7280;
  margin-top: 7.2px;
}

/* Progress */
.progress-section {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.steps-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 14.9px;
  line-height: 22.3px;
  color: #9ca3af;
  border: 2px solid #e5e7eb;
  transition: all 0.3s ease;
}

.step-circle.active {
  background: #ff3b6a;
  border-color: #ff3b6a;
  color: #fff;
  font-weight: 700;
}

.step-circle.completed {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.progress-track {
  height: 5.4px;
  background: #f3f4f6;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #ff3b6a;
  border-radius: 9999px;
  width: 0%;
  transition: width 0.4s ease;
}

#demo-form {
  position: relative;
  overflow: hidden;
}

/* Form Steps */
.form-step {
  display: none;
  flex-direction: column;
  gap: 20px;
  margin-top: 22px;
  position: relative;
}

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

/* Fields */
.fields-grid.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fields-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-group label {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 11.2px;
  line-height: 14.9px;
  text-transform: uppercase;
  color: #6b7280;
}

.field-group input,
.field-group select {
  width: 100%;
  padding: 9px 14px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 14.9px;
  line-height: 17.6px;
  color: #111827;
  outline: none;
  transition: border-color 0.2s ease;
}

/* Checkbox Group */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 13.5px;
  line-height: 18px;
  color: #374151;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 1.5px solid #d1d5db;
  border-radius: 4px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  background: #f9fafb;
  transition: all 0.15s ease;
}

.checkbox-label input[type="checkbox"]:checked {
  background: #ff3b6a;
  border-color: #ff3b6a;
}

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

.field-group input::placeholder {
  color: #9ca3af;
}

.field-group input:focus,
.field-group select:focus {
  border-color: #ff3b6a;
}

.field-group input.error,
.field-group select.error {
  border-color: #ef4444;
}

.field-error {
  display: block;
  color: #ef4444;
  font-size: 12px;
  margin-top: 4px;
  font-family: 'Poppins', sans-serif;
}

/* Select Wrapper */
.select-wrapper {
  position: relative;
}

.select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  color: #4b5563;
  cursor: pointer;
}

.select-wrapper::after {
  content: '';
  position: absolute;
  right: 14.4px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background: url('assets/chevron-down.png') center/contain no-repeat;
  pointer-events: none;
}

/* Buttons */
.nav-buttons {
  display: flex;
  gap: 14.4px;
  padding-top: 8px;
}

.nav-buttons.two-buttons {
  justify-content: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7.2px;
  padding: 11px 21.6px;
  background: #ff3b6a;
  color: #fff;
  border: none;
  border-radius: 9999px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14.9px;
  line-height: 22.3px;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px #fbcfe8, 0 4px 6px -4px #fbcfe8;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  flex: 1.66;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px -3px #fbcfe8, 0 6px 8px -4px #fbcfe8;
}

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

.btn-full {
  width: 100%;
  flex: unset;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7.2px;
  padding: 11px 23.4px;
  background: transparent;
  color: #6b7280;
  border: 2px solid #f3f4f6;
  border-radius: 9999px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14.9px;
  line-height: 22.3px;
  cursor: pointer;
  transition: border-color 0.2s ease;
  flex: 1;
}

.btn-back:hover {
  border-color: #d1d5db;
}

.btn-back svg,
.btn-primary svg {
  flex-shrink: 0;
}

/* Scheduling Loader (shown while waiting for ChiliPiper to route) */
.scheduling-loader {
  text-align: center;
  padding: 40px 0;
}

.scheduling-loader .loader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #ff3b6a;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: scheduling-spin 0.8s linear infinite;
}

.scheduling-loader h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: #111827;
  margin-bottom: 8px;
}

.scheduling-loader p {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 22px;
  color: #6b7280;
}

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

/* Success Message */
.success-message {
  text-align: center;
  padding: 40px 0;
}

.success-icon {
  margin-bottom: 20px;
}

.success-message h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: #111827;
  margin-bottom: 8px;
}

.success-message p {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 24px;
  color: #6b7280;
}

/* Mobile Panda (hidden on desktop) */
.mobile-panda {
  display: none;
}

.hero-with-panda {
  display: contents;
}

/* Bottom Section (hidden on desktop, shown on mobile) */
.bottom-section {
  display: none;
}

/* Trust & Logos */
.trust-indicator {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 9.4px;
  line-height: 14.9px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #111827;
  text-align: center;
  padding-bottom: 10px;
}

.logo-carousel {
  width: 100%;
  position: relative;
  overflow: hidden;
  padding-bottom: 20px;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.logo-track {
  display: flex;
  gap: 28.8px;
  align-items: center;
  width: max-content;
  animation: scroll-logos 25s linear infinite;
}

.logo-item {
  width: 99px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-item img {
  max-width: 81px;
  max-height: 32px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.5;
}

@keyframes scroll-logos {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── Animations ─── */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-20px);
  }
}

.form-step.slide-in {
  animation: slideIn 0.3s ease forwards;
}

.form-step.slide-out {
  animation: slideOut 0.3s ease forwards;
  pointer-events: none;
}

/* ─── Responsive ─── */

/* Tablet - same structure, compact */
@media (max-width: 1024px) {
  .page {
    flex-direction: column;
    height: auto;
    overflow: auto;
  }

  .left-panel {
    width: 100%;
    padding: 32px 36px 24px;
  }

  .left-top {
    gap: 24px;
  }

  .hero-text {
    margin-top: 20px;
  }

  .hero-text h1 {
    font-size: 36px;
    line-height: 41.4px;
  }

  .hero-text .subtitle {
    font-size: 14px;
    line-height: 22px;
    margin-top: 10px;
  }

  .mascot {
    display: none;
  }

  .checklist-wrapper {
    margin-top: 20px;
    flex: unset;
  }

  .checklist {
    max-width: 100%;
    gap: 12px;
  }

  .checklist-item strong {
    font-size: 14px;
    line-height: 20px;
  }

  .checklist-item p {
    font-size: 12.5px;
    line-height: 18px;
  }

  .rating-badges {
    margin-top: 20px;
  }

  .copyright {
    margin-top: 12px;
  }

  .right-panel {
    width: 100%;
    padding: 0 36px;
  }

  .form-container {
    padding: 28px 0;
    margin-top: 0;
  }

  .progress-section {
    margin-top: 20px;
  }

  .form-step {
    margin-top: 20px;
    gap: 20px;
  }

  .trust-indicator {
    padding-bottom: 10px;
  }

  .logo-carousel {
    padding-bottom: 20px;
  }
}

/* Mobile - new layout: hero → white card → checklist below */
@media (max-width: 640px) {
  .page {
    flex-direction: column;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    background: #0a0d26;
  }

  /* Reorder: hero(1) → form card(2) → bottom section(3) */
  .left-panel { order: 1; }
  .right-panel { order: 2; }
  .bottom-section { order: 3; }

  /* ── Left panel = compact hero only ── */
  .left-panel {
    width: 100%;
    padding: 28px 24px 0;
    overflow: visible;
  }

  /* Hide desktop-only elements inside left panel */
  .left-panel .checklist-heading,
  .left-panel .checklist-wrapper,
  .left-panel .rating-badges,
  .left-panel .copyright {
    display: none;
  }

  .left-top {
    gap: 12px;
  }

  .brand-logo {
    width: 130px;
    height: 30px;
  }

  .hero-with-panda {
    display: flex;
    align-items: flex-end;
    gap: 0;
    position: relative;
  }

  .hero-text {
    margin-top: 8px;
    flex: 1;
  }

  .hero-text h1 {
    font-size: 32.4px;
    line-height: 37.8px;
  }

  .hero-text .accent {
    display: inline;
  }

  .hero-text .subtitle {
    font-size: 13px;
    line-height: 20px;
    margin-top: 6px;
    max-width: 280px;
  }

  /* Show mobile panda */
  .mobile-panda {
    display: block;
    width: 140px;
    height: auto;
    flex-shrink: 0;
    margin-bottom: -20px;
    filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.07)) drop-shadow(0 0 40px rgba(255, 255, 255, 0.04));
    margin-right: -12px;
  }

  .bg-decoration {
    opacity: 0.4;
    bottom: -10px;
    z-index: 1;
  }

  /* ── Right panel = white floating card ── */
  .right-panel {
    width: calc(100% - 32px);
    margin: 20px auto 0;
    padding: 28px 24px 0;
    border-radius: 16px;
    background: #fff;
    position: relative;
    z-index: 2;
    min-height: auto;
  }

  .form-container {
    padding: 0 0 8px;
    margin-top: 0;
    margin-bottom: 0;
  }

  .form-header h2 {
    font-size: 22px;
    line-height: 28px;
  }

  .form-header p {
    font-size: 13px;
    line-height: 18px;
    margin-top: 4px;
  }

  .progress-section {
    margin-top: 16px;
  }

  .step-circle {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .progress-track {
    height: 5px;
  }

  .form-step {
    margin-top: 16px;
    gap: 16px;
  }

  .fields-grid.two-col:not(.two-col-always) {
    grid-template-columns: 1fr;
  }

  .field-group label {
    font-size: 11px;
  }

  .field-group input,
  .field-group select {
    font-size: 14px;
    padding: 11px 14px;
  }

  .nav-buttons {
    padding-top: 6px;
  }

  .btn-primary {
    font-size: 14px;
    padding: 13px 20px;
  }

  .btn-back {
    font-size: 14px;
    padding: 13px 20px;
  }

  .nav-buttons.two-buttons {
    flex-direction: column-reverse;
  }

  .btn-primary,
  .btn-back {
    flex: unset;
    width: 100%;
  }

  .trust-indicator {
    font-size: 9px;
    padding-top: 20px;
    padding-bottom: 10px;
  }

  .logo-carousel {
    padding-bottom: 20px;
  }

  .logo-item {
    width: 85px;
    height: 32px;
  }

  .logo-item img {
    max-width: 70px;
    max-height: 26px;
  }

  .logo-track {
    gap: 20px;
  }

  /* ── Bottom section = checklist + badges + copyright ── */
  .bottom-section {
    display: block;
    width: 100%;
    padding: 16px 24px 32px;
    background: #0a0d26;
  }

  .bottom-section .checklist-heading {
    color: #fff;
    margin-bottom: 14px;
  }

  .bottom-section .checklist {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 100%;
  }

  .bottom-section .checklist-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
  }

  .bottom-section .check-icon {
    color: #ff3b6a;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 22px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
  }

  .bottom-section .checklist-item strong {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    color: #fff;
    display: block;
  }

  .bottom-section .checklist-item p {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 20px;
    color: #c9cdd4;
    margin-top: 2px;
  }

  .bottom-section .rating-badges {
    margin-top: 24px;
  }

  .bottom-section .rating-badges-img {
    height: 32px;
    width: auto;
    object-fit: contain;
  }

  .bottom-section .copyright {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 9px;
    line-height: 14px;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: #e6e6e6;
    margin-top: 16px;
  }

  /* Checkbox group mobile */
  .checkbox-label {
    font-size: 12.5px;
  }

  .checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }
}
