@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);
}

/* ─────────────────────────────────────────────────────────
   PREMIUM ENTRANCE SPLASH SCREEN
   Luxury logo load — cinematic dissolve
───────────────────────────────────────────────────────── */

@keyframes splash-gem-in {
  0%   { opacity: 0; transform: scale(0.35) rotate(-18deg); filter: blur(12px); }
  50%  { opacity: 1; transform: scale(1.12) rotate(4deg); filter: blur(0px); }
  65%  { transform: scale(0.96) rotate(-2deg); }
  80%  { transform: scale(1.04) rotate(1deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); filter: blur(0px); }
}

@keyframes splash-fade-up {
  0%   { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes splash-exit {
  0%   { opacity: 1; transform: scale(1); }
  30%  { opacity: 1; transform: scale(1.03); }
  100% { opacity: 0; transform: scale(1.08); pointer-events: none; }
}

.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #dbeafe 0%, #eff6ff 40%, #bfdbfe 100%);
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.splash-screen.exit {
  animation: splash-exit 0.75s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}

.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
  padding: 2rem;
}

.splash-gem {
  font-size: 5rem;
  line-height: 1;
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: splash-gem-in 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.15s forwards;
  filter: drop-shadow(0 16px 32px rgba(0, 80, 200, 0.22));
}

.splash-title {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: clamp(1.55rem, 6vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  opacity: 0;
  margin-bottom: 0.5rem;
  animation: splash-fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.82s forwards;
}

.splash-tagline {
  font-size: 0.92rem;
  font-weight: 600;
  color: #475569;
  opacity: 0;
  letter-spacing: 0.01em;
  margin-bottom: 2.25rem;
  animation: splash-fade-up 0.55s cubic-bezier(0.16, 1, 0.3, 1) 1.05s forwards;
}

.splash-wordmark {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0;
  color: rgba(71, 85, 105, 0.55);
  animation: splash-fade-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) 1.25s forwards;
}

* {
  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, 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;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.25rem 1rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  margin: 0;
  width: 100%;
}

/* 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;
  justify-content: center;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.intake-card {
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 36px;
  box-shadow: 0 20px 48px -10px rgba(0, 52, 104, 0.12), 0 2px 10px rgba(0, 0, 0, 0.04), inset 0 1.5px 2px rgba(255, 255, 255, 0.95);
  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);
}

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

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

.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.76rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.progress-track-inline {
  width: 60px;
  height: 6px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.progress-bar {
  height: 100%;
  width: 16.66%;
  background: linear-gradient(90deg, #34c759, #30d158);
  border-radius: 20px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.helper-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 122, 255, 0.15);
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* Slide Questionnaire System */
.slides-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slide {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  animation: slide-fade-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slide.active {
  display: flex;
}

@keyframes slide-fade-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.question-title {
  font-family: var(--font-family-title);
  font-size: clamp(1.4rem, 4.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1.25;
}

/* How It Works List Card */
.how-it-works-card {
  background: rgba(255, 255, 255, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 1rem 1.15rem;
  box-shadow: 0 6px 20px rgba(0, 52, 104, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-align: left;
  margin-top: 0.75rem;
}

.how-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.how-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.how-step-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

/* Inputs & Form Elements */
.clay-input {
  width: 100%;
  padding: 1.1rem 1.25rem;
  border-radius: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.55);
  font-family: var(--font-family-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  box-shadow: var(--clay-shadow-in);
  transition: all 0.25s ease;
}

.clay-input:focus {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15), var(--clay-shadow-in);
}

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

.tag-option {
  padding: 0.85rem 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.35);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--clay-shadow-out);
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
}

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

.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);
}

.tag-icon {
  font-size: 1.1rem;
}

.deposit-box {
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid rgba(0, 122, 255, 0.2);
  border-radius: 20px;
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--clay-shadow-out);
}

.deposit-val {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent-blue);
  letter-spacing: -0.03em;
}

/* 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;
}

.success-home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 50px;
  background: rgba(0, 122, 255, 0.1);
  color: var(--accent-blue);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.success-home-btn:hover {
  background: rgba(0, 122, 255, 0.18);
  transform: translateY(-1px);
}

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

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

.btn-back {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  visibility: hidden;
}

.btn-back:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
}

.btn-back:active {
  transform: scale(0.96);
}

.btn-next {
  background: var(--text-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  margin-left: auto;
}

.btn-next:hover {
  background: #1e293b;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

.btn-next:active {
  transform: scale(0.96);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
}

.keyboard-hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-secondary);
  opacity: 0.6;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
  white-space: nowrap;
}

.powered-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1.1rem;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.powered-badge strong {
  color: var(--text-primary);
  font-weight: 800;
}

/* Mobile-First Responsiveness & Keyboard Hint Overlap Protection */
@media (max-width: 640px), (hover: none), (pointer: coarse) {
  .keyboard-hint {
    display: none !important;
  }

  .intake-card {
    padding: 1.45rem 1.25rem;
    border-radius: 32px;
  }
}
