@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #eef2f7;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --accent-blue: #007aff;
  --accent-green: #34c759;
  --font-family-title: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-family-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  
  /* Neomorphic parameters */
  --clay-shadow-out: 10px 10px 20px rgba(163, 177, 198, 0.3), -10px -10px 20px rgba(255, 255, 255, 0.95);
  --clay-shadow-in: inset 3px 3px 7px rgba(163, 177, 198, 0.35), inset -3px -3px 7px rgba(255, 255, 255, 0.85);
  --glass-shadow: 0 15px 35px rgba(0, 52, 104, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body, *, *::before, *::after {
  -webkit-overflow-scrolling: touch;
}

html, body, .intake-card, .slides-wrapper, .tags-grid, .guideline-card-list, div, textarea, input {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.intake-card::-webkit-scrollbar,
.slides-wrapper::-webkit-scrollbar,
.tags-grid::-webkit-scrollbar,
div::-webkit-scrollbar,
textarea::-webkit-scrollbar,
input::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

body {
  scrollbar-width: none;
  -ms-overflow-style: none;
  background-color: var(--bg-primary);
  font-family: var(--font-family-body);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.25rem;
}

/* Background image setup */
.bg-backdrop {
  position: fixed;
  inset: 0;
  z-index: -50;
  background-image: url('background.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  pointer-events: none;
}

.main-intake-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 440px;
}

.intake-card {
  max-width: 440px;
  width: 100%;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(25px) saturate(140%);
  -webkit-backdrop-filter: blur(25px) saturate(140%);
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 36px;
  box-shadow: 0 16px 40px rgba(31, 38, 135, 0.12), inset 1px 1px 1px rgba(255, 255, 255, 0.9);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  min-height: clamp(400px, 72vh, 540px);
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
}

@keyframes card-entrance {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Top Progress Bar & Header */
.intake-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.biz-logo-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.biz-logo-icon {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  box-shadow: var(--clay-shadow-out);
}

.step-tracker-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.progress-track {
  height: 6px;
  width: 100%;
  background: rgba(163, 177, 198, 0.25);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 1.5rem;
}

.progress-bar {
  height: 100%;
  width: 9%;
  background: linear-gradient(90deg, #007aff, #34c759);
  border-radius: 10px;
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Typeform slide content container */
.slides-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 1.5rem;
}

/* Smooth question animation logic matching Luxury Consignment */
.slide {
  position: absolute;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slide.active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.question-title {
  font-size: clamp(1.2rem, 3.8vw, 1.5rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

/* Neomorphic Inputs */
.clay-input {
  width: 100%;
  padding: 1.15rem 1.35rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.35);
  box-shadow: inset 3px 3px 6px rgba(163, 177, 198, 0.25), inset -3px -3px 6px rgba(255, 255, 255, 0.8);
  font-family: var(--font-family-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  outline: none;
  transition: all 0.3s ease;
}

.clay-input:focus {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(0, 122, 255, 0.4);
  box-shadow: inset 3px 3px 6px rgba(163, 177, 198, 0.15), inset -3px -3px 6px rgba(255, 255, 255, 0.8), 0 0 12px rgba(0, 122, 255, 0.05);
}

/* Claymorphic Liquid Glass Textarea */
.clay-textarea-wrap {
  position: relative;
  width: 100%;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(240, 246, 255, 0.55));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  box-shadow: inset 4px 4px 10px rgba(163, 177, 198, 0.35), inset -4px -4px 10px rgba(255, 255, 255, 0.95), 0 8px 25px rgba(0, 122, 255, 0.06);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.clay-textarea-wrap:focus-within {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 122, 255, 0.55);
  box-shadow: inset 2px 2px 6px rgba(163, 177, 198, 0.2), inset -2px -2px 6px rgba(255, 255, 255, 1), 0 12px 32px rgba(0, 122, 255, 0.16);
  transform: translateY(-1px);
}

.clay-textarea-liquid {
  width: 100%;
  min-height: 135px;
  padding: 1.25rem 2.8rem 1.25rem 1.35rem;
  border: none;
  background: transparent;
  font-family: var(--font-family-body);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  resize: none;
  line-height: 1.6;
  box-sizing: border-box;
  display: block;
}

.clay-textarea-liquid::placeholder {
  color: rgba(71, 85, 105, 0.55);
  font-weight: 500;
}

.clay-mic-btn {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 122, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: all 0.25s ease;
  z-index: 10;
}

.clay-mic-btn:hover {
  transform: scale(1.08);
  background: #ffffff;
  border-color: var(--accent-blue);
  box-shadow: 0 6px 16px rgba(0, 122, 255, 0.2);
}

.clay-mic-btn.recording {
  background: #ff3b30 !important;
  border-color: #ff3b30 !important;
  color: white;
  box-shadow: 0 0 16px rgba(255, 59, 48, 0.5);
  animation: pulse-mic 1.2s infinite alternate ease-in-out;
}

@keyframes pulse-mic {
  0% { transform: scale(1); box-shadow: 0 0 10px rgba(255, 59, 48, 0.4); }
  100% { transform: scale(1.12); box-shadow: 0 0 20px rgba(255, 59, 48, 0.7); }
}

.dictation-status {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ff3b30;
  margin-top: 0.5rem;
  text-align: right;
  animation: fade-in 0.3s ease;
}

/* Brand Pills with Official Logo Badges */
.bounty-pill {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.65);
  border: 1.5px solid rgba(0, 122, 255, 0.16);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--clay-shadow-out);
  -webkit-tap-highlight-color: transparent;
  height: 52px;
}

.bounty-pill:hover {
  transform: translateY(-1px) scale(1.02);
  border-color: #e5b342;
  background: rgba(255, 255, 255, 0.9);
}

.bounty-pill.selected {
  background: #ffffff !important;
  border: 1.5px solid #e5b342 !important;
  color: var(--text-primary);
  box-shadow: 0 4px 18px rgba(229, 179, 66, 0.25), inset 1px 1px 2px rgba(255, 255, 255, 1);
}

.bounty-logo-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 4px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.bounty-logo-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.bounty-logo-img[src*="davidyurman"] {
  transform: scale(0.92);
}

.bounty-pill:hover .bounty-logo-wrap {
  transform: scale(1.06);
  border-color: #e5b342;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.bounty-pill.selected .bounty-logo-wrap {
  background: #ffffff;
  border-color: #e5b342;
  box-shadow: 0 0 10px rgba(229, 179, 66, 0.35);
  transform: scale(1.08);
}

.tags-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.span-full-center {
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  max-width: 280px;
}

.tag-option {
  padding: 0.9rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.3);
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--clay-shadow-out);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
}

.tag-option:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(0, 122, 255, 0.4);
  background: rgba(255, 255, 255, 0.55);
}

.tag-option.selected {
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.15), rgba(52, 199, 89, 0.08));
  border-color: var(--accent-blue);
  color: #004fb4;
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.16), inset 1px 1px 2px rgba(255, 255, 255, 0.9);
}

/* Photo Widget Styling */
.photo-widget-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(240, 244, 250, 0.8));
  border: 1.5px solid rgba(0, 122, 255, 0.18);
  border-radius: 20px;
  box-shadow: var(--clay-shadow-out);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  user-select: none;
  text-align: center;
}

.photo-widget-button:hover {
  transform: scale(1.02) translateY(-1px);
  background: linear-gradient(145deg, rgba(255, 255, 255, 1), rgba(235, 242, 252, 0.95));
  border-color: var(--accent-blue);
  box-shadow: 0 8px 25px rgba(0, 122, 255, 0.12), var(--clay-shadow-out);
}

.photo-widget-emoji {
  font-size: 2.4rem;
  margin-bottom: 0.35rem;
  display: inline-block;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
  transition: transform 0.25s ease;
}

.photo-widget-button:hover .photo-widget-emoji {
  transform: scale(1.1) rotate(-3deg);
}

.photo-widget-text {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-blue);
}

.photo-upload-input {
  display: none;
}

.photo-preview-wrap {
  display: none;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--clay-shadow-out);
  margin-top: 0.5rem;
}

.photo-preview-wrap img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  border-radius: 18px;
}

.photo-preview-wrap .remove-photo {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.65);
  color: white;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Service Policy Agreement Checkbox Items */
.guideline-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}

.agreement-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.8rem 0.95rem;
  background: rgba(255, 255, 255, 0.65);
  border: 1.5px solid rgba(0, 122, 255, 0.14);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.agreement-item:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--accent-blue);
}

.agreement-checkbox {
  display: none;
}

.agreement-custom-check {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid #cbd5e1;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
  color: transparent;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.2s ease;
}

.agreement-checkbox:checked + .agreement-custom-check {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
  box-shadow: 0 3px 8px rgba(0, 122, 255, 0.3);
}

.agreement-text {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.35;
}

/* Success Check Icon */
.success-check-ring {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #34c759, #28a745);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 10px 25px rgba(52, 199, 89, 0.35);
}

.success-check-icon {
  font-size: 2.2rem;
  color: white;
  font-weight: 900;
}

/* Error Banner Toast */
.error-banner-toast {
  position: absolute;
  bottom: 85px;
  left: 20px;
  right: 20px;
  background: rgba(239, 68, 68, 0.92);
  backdrop-filter: blur(12px);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
  animation: shake 0.4s ease;
  z-index: 99;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* Bottom Navigation Footer */
.intake-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  gap: 1rem;
}

.nav-btn {
  padding: 0.75rem 1.65rem;
  border-radius: 50px;
  border: none;
  font-family: var(--font-family-body);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-back {
  background: rgba(255, 255, 255, 0.55);
  color: var(--text-primary);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05), var(--clay-shadow-out);
}

.btn-back:hover, .btn-back:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-primary);
}

.btn-next {
  background: linear-gradient(135deg, #007aff, #0056b3);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.38);
  margin-left: auto;
}

.btn-next:hover, .btn-next:active {
  transform: scale(0.97);
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.45);
}

.keyboard-hint {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-secondary);
  opacity: 0.6;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.powered-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.95rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 auto;
  text-align: center;
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  20%, 60% { transform: rotate(14deg); }
  40%, 80% { transform: rotate(-14deg); }
}

/* Mobile-First World-Class Responsiveness */
@media (max-width: 480px) {
  body {
    padding: 0.75rem 0.6rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }

  .main-intake-wrapper {
    max-width: 100%;
  }

  .intake-card {
    padding: 1.35rem 1.15rem;
    border-radius: 28px;
    min-height: auto;
  }

  .question-title {
    font-size: 1.35rem !important;
    line-height: 1.3 !important;
  }

  .tags-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .tag-option, .bounty-pill {
    padding: 0.75rem 0.85rem;
    border-radius: 22px;
    font-size: 0.88rem;
    min-height: 48px;
  }

  .clay-input {
    font-size: 1rem;
    padding: 0.9rem 1.1rem;
    border-radius: 20px;
  }

  .keyboard-hint {
    display: none !important;
  }
}
