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

:root {
  --brand-50: #f6f3ff;
  --brand-100: #ede8ff;
  --brand-200: #dcd3ff;
  --brand-300: #c4b5fd;
  --brand-400: #a78bfa;
  --brand-500: #8b5cf6;
  --brand-600: #7c3aed;
  --brand-700: #6d28d9;
  --ink-900: #15151f;
  --ink-800: #1f1f2c;
  --ink-700: #2a2a3c;
  --ink-600: #3d3d52;
  --ink-500: #6b6b80;
  --ink-400: #9a9ab0;
  --ink-300: #c5c5d6;
  --ink-200: #e4e4ee;
  --ink-100: #f2f2f8;
  --canvas: #f4f6fb;
  --red-500: #ef4444;
  --red-400: #f87171;
  --red-50: #fef2f2;
  --shadow-card: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-card-lg: 0 8px 28px rgba(16, 24, 40, 0.08);
  --shadow-focus: 0 0 0 4px rgba(139, 92, 246, 0.12);
  --radius-card: 24px;
  --radius-btn: 12px;
  --radius-field: 12px;
  --radius-radio: 16px;
}

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--canvas);
  color: var(--ink-900);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

*:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand-500);
  border-radius: 8px;
}

button {
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

input {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

/* ===== Header ===== */
.site-header {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 2.5rem 1rem;
}

@media (max-width: 640px) {
  .site-header {
    padding: 2rem 1rem;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.brand-icon {
  color: var(--brand-600);
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.brand-ecomm {
  color: var(--ink-900);
}

.brand-infinity {
  color: var(--brand-600);
}

/* ===== Main / Form Card ===== */
.main {
  display: flex;
  justify-content: center;
  padding: 0 1rem 4rem;
}

.form-card {
  width: 100%;
  max-width: 820px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--ink-200);
  box-shadow: var(--shadow-card-lg);
  overflow: hidden;
}

@media (min-width: 640px) {
  .form-card {
    border-radius: var(--radius-card);
  }
}

/* ===== Progress Bar ===== */
.progress-track {
  height: 6px;
  width: 100%;
  background: var(--brand-50);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--brand-500);
  width: 16.6%;
  border-radius: 0 6px 6px 0;
  transition: width 0.5s ease-out;
}

/* ===== Step Sections ===== */
.step {
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.35s ease-out both;
}

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

.step-body {
  padding: 2.5rem 1.5rem 0;
}

@media (min-width: 640px) {
  .step-body {
    padding: 2.5rem 2.5rem 0;
  }
}

.step-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-600);
  margin-bottom: 0.5rem;
}

.step-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1.25;
}

@media (min-width: 640px) {
  .step-title {
    font-size: 1.75rem;
  }
}

.step-desc {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  color: var(--ink-500);
}

.step-body > .radio-group,
.step-body > .form-grid,
.step-body > .booking-card {
  margin-top: 1.75rem;
}

/* ===== Radio Cards ===== */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.radio-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-radius: var(--radius-radio);
  border: 1px solid var(--ink-200);
  background: #fff;
  padding: 1rem 1.25rem;
  text-align: left;
  transition: all 0.2s ease;
}

.radio-card:hover {
  border-color: var(--brand-300);
  background: rgba(246, 243, 255, 0.4);
}

.radio-card.selected {
  border-color: var(--brand-500);
  background: var(--brand-50);
  box-shadow: var(--shadow-focus);
}

.radio-dot {
  flex-shrink: 0;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  border: 2px solid var(--ink-300);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.radio-card.selected .radio-dot {
  border-color: var(--brand-600);
  background: var(--brand-600);
}

.radio-card.selected .radio-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  /* check mark via SVG mask */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
  background: #fff;
  border-radius: 0;
  width: 12px;
  height: 12px;
}

.radio-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-700);
}

@media (min-width: 640px) {
  .radio-label {
    font-size: 1rem;
  }
}

.radio-card.selected .radio-label {
  color: var(--ink-900);
}

/* ===== Step Footer / Buttons ===== */
.step-footer {
  margin-top: 2rem;
  padding: 1rem 1.5rem 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ink-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 640px) {
  .step-footer {
    padding: 1rem 2.5rem 2.5rem;
  }
}

.step-footer-col {
  flex-direction: column;
  gap: 0.75rem;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.footer-right {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--ink-500);
}

.privacy-note svg {
  color: var(--brand-500);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  transition: all 0.2s ease;
  user-select: none;
  border: none;
  font-size: 0.9375rem;
}

.btn-primary {
  background: var(--ink-900);
  color: #fff;
  padding: 0.875rem 1.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.btn-primary:hover:not(:disabled) {
  background: var(--ink-800);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary:disabled {
  background: var(--ink-200);
  color: var(--ink-400);
  cursor: not-allowed;
}

.btn-secondary {
  background: #fff;
  color: var(--ink-700);
  border: 1px solid var(--ink-200);
  padding: 0.875rem 1.25rem;
}

.btn-secondary:hover {
  background: var(--ink-100);
}

.btn-secondary:active {
  transform: scale(0.98);
}

/* ===== Form Fields (Step 4) ===== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-field-full {
  grid-column: 1 / -1;
}

.field-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-700);
}

.req {
  color: var(--brand-600);
}

.field-input {
  width: 100%;
  border-radius: var(--radius-field);
  border: 1px solid var(--ink-200);
  background: #fff;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  color: var(--ink-900);
  transition: all 0.2s ease;
}

.field-input::placeholder {
  color: var(--ink-400);
}

.field-input:focus {
  border-color: var(--brand-500);
  box-shadow: var(--shadow-focus);
  outline: none;
}

.field-input.error {
  border-color: var(--red-400);
  background: rgba(254, 242, 242, 0.4);
}

.field-helper {
  font-size: 0.75rem;
  color: var(--ink-500);
}

.field-error {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--red-500);
}

/* ===== Booking Card (Step 5) ===== */
.booking-card {
  border-radius: var(--radius-radio);
  border: 1px solid var(--ink-100);
  background: #fff;
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

@media (min-width: 640px) {
  .booking-card {
    padding: 1.5rem;
  }
}

.booking-header {
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--ink-100);
}

.booking-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.booking-title-row svg {
  color: var(--brand-600);
}

.booking-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-900);
}

.booking-subtitle {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--ink-500);
  margin-top: 0.25rem;
}

/* ===== Timezone Selector ===== */
.timezone-selector {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--ink-100);
}

.timezone-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-700);
}

.timezone-label svg {
  color: var(--brand-600);
}

.timezone-select {
  width: 100%;
  border-radius: var(--radius-field);
  border: 1px solid var(--ink-200);
  background-color: #fff;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  font-size: 0.9375rem;
  color: var(--ink-900);
  font-family: inherit;
  transition: all 0.2s ease;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6b80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.timezone-select:focus {
  border-color: var(--brand-500);
  box-shadow: var(--shadow-focus);
  outline: none;
}

/* ===== Calendar ===== */
.calendar {
  width: 100%;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.cal-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  width: 36px;
  border-radius: 8px;
  border: 1px solid var(--ink-200);
  color: var(--ink-600);
  background: #fff;
  transition: all 0.2s ease;
}

.cal-nav-btn:hover:not(:disabled) {
  background: var(--ink-100);
  color: var(--ink-900);
}

.cal-nav-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.cal-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.calendar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-900);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 0.5rem;
}

.cal-weekday {
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ink-400);
  padding: 0.25rem 0;
}

@media (min-width: 640px) {
  .cal-weekday {
    font-size: 0.75rem;
  }
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
}

.cal-day.available {
  color: var(--ink-800);
}

.cal-day.available:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}

.cal-day.available:active {
  transform: scale(0.95);
}

.cal-day.past {
  color: var(--ink-300);
  cursor: not-allowed;
}

.cal-day.selected {
  background: var(--brand-600);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transform: scale(1.02);
}

.cal-day.today:not(.selected) {
  box-shadow: inset 0 0 0 1px var(--brand-300);
}

.cal-day.empty {
  cursor: default;
}

/* ===== Time Slots ===== */
.time-slots {
  margin-top: 1.5rem;
  animation: fadeIn 0.35s ease-out both;
}

.time-slots-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.time-slots-header svg {
  color: var(--brand-600);
}

.time-slots-header-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-700);
}

.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
}

@media (min-width: 640px) {
  .time-slots-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.time-slot {
  border-radius: 12px;
  border: 1px solid var(--ink-200);
  background: #fff;
  color: var(--ink-700);
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.time-slot:hover {
  border-color: var(--brand-300);
  background: rgba(246, 243, 255, 0.5);
}

.time-slot:active {
  transform: scale(0.98);
}

.time-slot.selected {
  border-color: var(--brand-600);
  background: var(--brand-600);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ===== Success Screen (Step 6) ===== */
.success-wrap {
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (min-width: 640px) {
  .success-wrap {
    padding: 3rem 2.5rem;
  }
}

.success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  width: 64px;
  border-radius: 50%;
  background: var(--brand-50);
  margin-bottom: 1.5rem;
  color: var(--brand-600);
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  60% {
    transform: scale(1.03);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.success-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink-900);
}

@media (min-width: 640px) {
  .success-title {
    font-size: 1.75rem;
  }
}

.success-desc {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  color: var(--ink-500);
  max-width: 28rem;
}

.summary-card {
  width: 100%;
  max-width: 28rem;
  margin-top: 2rem;
  border-radius: var(--radius-radio);
  border: 1px solid var(--ink-100);
  background: rgba(242, 242, 248, 0.4);
  padding: 0 1.25rem;
  text-align: left;
}

.summary-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--ink-100);
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  width: 36px;
  border-radius: 8px;
  background: var(--brand-50);
  color: var(--brand-600);
}

.summary-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.summary-label {
  font-size: 0.75rem;
  color: var(--ink-500);
}

.summary-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-note {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--ink-500);
}

.email-note svg {
  color: var(--brand-500);
}

.success-wrap .btn {
  margin-top: 2rem;
}

/* ===== Thank You Message ===== */
.thank-you-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4rem 2rem;
  max-width: 32rem;
  margin: 0 auto;
  animation: fadeInUp 0.5s ease both;
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

.thank-you-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  width: 72px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand-600);
  margin-bottom: 1.5rem;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.thank-you-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink-900);
}

.thank-you-desc {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: var(--ink-500);
  max-width: 24rem;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .step-body {
    padding: 2rem 1.25rem 0;
  }
  .step-footer {
    padding: 1rem 1.25rem 2rem;
  }
  .step-title {
    font-size: 1.375rem;
  }
  .radio-card {
    padding: 0.875rem 1rem;
  }
  .btn-primary {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
  }
  .btn-secondary {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}
