/* ScanTotal - Apple-Inspired Design System */
/* Pre-built utility CSS — zero external dependencies */

/* === RESET & BASE === */
*, ::before, ::after { box-sizing: border-box; border-width: 0; border-style: solid; border-color: #e5e5e5; }
*, ::before, ::after {
  --tw-ring-inset: ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgba(0,122,255,0.4);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
}
html { 
  line-height: 1.5; 
  -webkit-text-size-adjust: 100%; 
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { margin: 0; line-height: inherit; color: #1d1d1f; }
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: inherit; }
button, input, textarea, select { font-family: inherit; font-size: 100%; line-height: inherit; color: inherit; margin: 0; padding: 0; }
button { cursor: pointer; background-color: transparent; background-image: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
img, svg { display: block; vertical-align: middle; }
code { font-family: 'SF Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #86868b; opacity: 1; }
button, [role="button"] { cursor: pointer; }

/* === LAYOUT === */
.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* === GRID === */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gap-2 { gap: 0.5rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* === POSITIONING === */
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-50 { z-index: 50; }

/* === SIZING === */
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-full { width: 100%; }
.h-2 { height: 0.5rem; }
.h-3 { height: 0.75rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-16 { height: 4rem; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.min-h-\[100px\] { min-height: 100px; }
.min-w-max { min-width: max-content; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-6xl { max-width: 72rem; }
.max-h-32 { max-height: 8rem; }

/* === SPACING === */
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.pt-8 { padding-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-16 { margin-top: 4rem; }
.mt-20 { margin-top: 5rem; }
.-mt-0\.5 { margin-top: -0.125rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 0.75rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.5rem; }
.space-x-3 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.75rem; }
.space-x-6 > :not([hidden]) ~ :not([hidden]) { margin-left: 1.5rem; }
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }

/* === TYPOGRAPHY === */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: 'SF Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.text-center { text-align: center; }
.break-all { word-break: break-all; }
.opacity-90 { opacity: 0.9; }
.resize-none { resize: none; }
.tracking-tight { letter-spacing: -0.025em; }

/* === APPLE COLOR SYSTEM — mapped from old Tailwind names === */
.text-white { color: #fff; }
.text-slate-400 { color: #86868b; }
.text-slate-500 { color: #6e6e73; }
.text-slate-600 { color: #6e6e73; }
.text-slate-700 { color: #424245; }
.text-slate-800 { color: #1d1d1f; }
.text-blue-600 { color: #0071e3; }
.text-blue-700 { color: #0077ed; }
.text-blue-800 { color: #004de3; }
.text-green-500 { color: #34c759; }
.text-green-600 { color: #30b350; }
.text-green-700 { color: #248a3d; }
.text-green-800 { color: #1a7431; }
.text-red-600 { color: #ff3b30; }
.text-red-700 { color: #d70015; }
.text-red-800 { color: #c30010; }
.text-orange-800 { color: #c93400; }
.text-yellow-700 { color: #a05a00; }
.text-yellow-800 { color: #7a4500; }
.text-amber-500 { color: #ff9f0a; }

/* Backgrounds */
.bg-white { background-color: #fff; }
.bg-white\/30 { background-color: rgba(255,255,255,0.3); }
.bg-white\/50 { background-color: rgba(255,255,255,0.5); }
.bg-white\/80 { background-color: rgba(255,255,255,0.8); }
.bg-slate-50 { background-color: #f5f5f7; }
.bg-slate-100 { background-color: #f5f5f7; }
.bg-slate-200 { background-color: #e8e8ed; }
.bg-slate-500 { background-color: #6e6e73; }
.bg-blue-50 { background-color: #f0f5ff; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-blue-500 { background-color: #0071e3; }
.bg-blue-600 { background-color: #0071e3; }
.bg-green-50 { background-color: #f0fff4; }
.bg-green-100 { background-color: #dcfce7; }
.bg-green-300 { background-color: #86efac; }
.bg-green-500 { background-color: #34c759; }
.bg-red-50 { background-color: #fff5f5; }
.bg-red-100 { background-color: #fee2e2; }
.bg-red-300 { background-color: #fca5a5; }
.bg-red-500 { background-color: #ff3b30; }
.bg-orange-50 { background-color: #fff8f0; }
.bg-orange-100 { background-color: #ffedd5; }
.bg-orange-500 { background-color: #ff9500; }
.bg-yellow-50 { background-color: #fffdf0; }
.bg-yellow-100 { background-color: #fef9c3; }
.bg-yellow-300 { background-color: #fde047; }
.bg-yellow-500 { background-color: #ffcc00; }

/* Gradients */
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.from-slate-50 { --tw-gradient-from: #fbfbfd; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(251,251,253,0)); }
.from-slate-100 { --tw-gradient-from: #f5f5f7; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(245,245,247,0)); }
.from-green-50 { --tw-gradient-from: #f0fff4; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(240,255,244,0)); }
.to-blue-50 { --tw-gradient-to: #f0f5ff; }
.to-emerald-50 { --tw-gradient-to: #ecfdf5; }
.to-slate-200 { --tw-gradient-to: #e8e8ed; }

/* === BORDERS === */
.border { border-width: 1px; }
.border-2 { border-width: 2px; }
.border-b { border-bottom-width: 1px; }
.border-b-2 { border-bottom-width: 2px; }
.border-t { border-top-width: 1px; }
.border-dashed { border-style: dashed; }
.border-slate-200 { border-color: rgba(0,0,0,0.08); }
.border-slate-300 { border-color: #d2d2d7; }
.border-blue-200 { border-color: #bfdbfe; }
.border-blue-300 { border-color: #93c5fd; }
.border-blue-500 { border-color: #0071e3; }
.border-green-200 { border-color: rgba(52,199,89,0.25); }
.border-red-200 { border-color: #fecaca; }
.border-red-300 { border-color: #fca5a5; }
.border-orange-200 { border-color: #fed7aa; }
.border-orange-300 { border-color: #fdba74; }
.border-yellow-200 { border-color: #fde68a; }
.border-yellow-300 { border-color: #fde047; }

/* === BORDER RADIUS (Apple generous) === */
.rounded { border-radius: 0.375rem; }
.rounded-md { border-radius: 0.5rem; }
.rounded-lg { border-radius: 0.75rem; }
.rounded-xl { border-radius: 1rem; }
.rounded-2xl { border-radius: 1.25rem; }
.rounded-full { border-radius: 9999px; }

/* === SHADOWS (Apple soft layered) === */
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.shadow { box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06); }
.shadow-md { box-shadow: 0 4px 14px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04); }
.shadow-lg { box-shadow: 0 8px 28px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04); }
.shadow-xl { box-shadow: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04); }

/* === EFFECTS === */
.backdrop-blur-md { -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.cursor-pointer { cursor: pointer; }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1); transition-duration: 200ms; }
.transition-colors { transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1); transition-duration: 200ms; }
.animate-spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* === FOCUS === */
.focus\:ring-2:focus { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); }
.focus\:ring-blue-500:focus { --tw-ring-color: rgba(0,113,227,0.3); }
.focus\:border-blue-500:focus { border-color: #0071e3; }

/* === HOVER === */
.hover\:bg-blue-700:hover { background-color: #0077ed; }
.hover\:bg-blue-50\/50:hover { background-color: rgba(240,245,255,0.5); }
.hover\:border-blue-400:hover { border-color: #5eb0f6; }
.hover\:text-blue-600:hover { color: #0071e3; }
.hover\:text-blue-800:hover { color: #004de3; }
.hover\:text-slate-900:hover { color: #1d1d1f; }

/* === RESPONSIVE === */
@media (min-width: 640px) {
  .sm\:inline { display: inline; }
  .sm\:p-8 { padding: 2rem; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:text-5xl { font-size: 3.5rem; line-height: 1.05; }
  .sm\:text-left { text-align: left; }
}
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:col-span-2 { grid-column: span 2 / span 2; }
}
@media (min-width: 1024px) {
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

/* ============================
   APPLE COMPONENT STYLES
   ============================ */

/* Nav — Apple frosted glass */
.apple-nav {
  background: rgba(251,251,253,0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid rgba(0,0,0,0.1);
}

/* Tab bar — clean Apple segmented look */
.tab-button {
  color: #86868b;
  position: relative;
  border-bottom: 2.5px solid transparent;
  transition: all 0.2s cubic-bezier(0.25,0.1,0.25,1);
}
.tab-button:hover { color: #1d1d1f; background: rgba(0,0,0,0.02); }
.tab-active { color: #0071e3 !important; background: transparent !important; border-bottom-color: #0071e3 !important; box-shadow: none !important; }
.tab-icon { width: 20px; height: 20px; flex-shrink: 0; }
.tab-active .tab-icon { color: #0071e3; }

/* Main scanner card */
.apple-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.03);
  border: 0.5px solid rgba(0,0,0,0.06);
}

/* Primary button — Apple blue pill */
.apple-btn {
  background: #0071e3;
  color: #fff;
  border: none;
  border-radius: 980px;
  padding: 14px 28px;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25,0.1,0.25,1);
}
.apple-btn:hover { background: #0077ed; }
.apple-btn:active { transform: scale(0.98); opacity: 0.92; }

/* Input — Apple clean */
.apple-input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #d2d2d7;
  border-radius: 12px;
  font-size: 17px;
  color: #1d1d1f;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.apple-input:focus { border-color: #0071e3; box-shadow: 0 0 0 4px rgba(0,113,227,0.12); }
.apple-input::placeholder { color: #86868b; }

/* Dropzone — Apple upload */
.apple-dropzone {
  border: 2px dashed #d2d2d7;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25,0.1,0.25,1);
  background: #fbfbfd;
}
.apple-dropzone:hover { border-color: #0071e3; background: rgba(0,113,227,0.03); }
.drag-over { border-color: #0071e3 !important; background: rgba(0,113,227,0.04) !important; }

.dropzone-icon { width: 44px; height: 44px; color: #86868b; margin: 0 auto 14px; }
.section-icon { width: 48px; height: 48px; padding: 10px; background: rgba(0,113,227,0.08); border-radius: 14px; color: #0071e3; margin: 0 auto 16px; }
.step-icon { width: 56px; height: 56px; padding: 14px; background: rgba(0,113,227,0.08); border-radius: 16px; color: #0071e3; margin: 0 auto 16px; }

/* Privacy badge */
.privacy-badge {
  background: rgba(52,199,89,0.06);
  border: 1px solid rgba(52,199,89,0.15);
  border-radius: 14px;
}

/* Ad placeholder */
.ad-placeholder {
  background: #f5f5f7;
  border: 1.5px dashed #d2d2d7;
  border-radius: 14px;
}

/* Segmented toggle */
.apple-segmented {
  background: rgba(0,0,0,0.06);
  border-radius: 9px;
  padding: 2px;
}
.apple-segmented button {
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}

/* Step cards */
.step-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 0.5px solid rgba(0,0,0,0.06);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.25,0.1,0.25,1);
}
.step-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }

/* FAQ items */
.faq-item {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  border: 0.5px solid rgba(0,0,0,0.06);
  padding: 1.5rem 1.75rem;
  transition: box-shadow 0.2s;
}
.faq-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }

/* Footer */
.apple-footer {
  background: #f5f5f7;
  border-top: 0.5px solid rgba(0,0,0,0.1);
}

/* Result animation */
.result-card { animation: slideUp 0.4s cubic-bezier(0.25,0.1,0.25,1); }
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

/* Risk meter */
.risk-meter { height: 8px; border-radius: 4px; background: linear-gradient(to right, #34c759 0%, #ffcc00 50%, #ff3b30 100%); }
.risk-indicator { width: 12px; height: 12px; border-radius: 50%; border: 2px solid white; box-shadow: 0 0 4px rgba(0,0,0,0.3); }
