/* Capsula+ Design System v2 */
:root {
  --violet: #6B4FE8;
  --violet-soft: #EEEBFF;
  --violet-deep: #5840C7;
  --violet-ink: #3E2C9E;
  --sage: #5FBFA3;
  --sage-soft: #E6F5F0;
  --sage-deep: #3E8671;
  --amber: #F4A261;
  --amber-soft: #FEF3E5;
  --amber-deep: #B57130;
  --coral: #E76F51;
  --coral-soft: #FDEDE8;
  --coral-deep: #B04D34;
  --cream: #FAFAF7;
  --cream-alt: #F6F4EF;
  --white: #FFFFFF;
  --ink: #1A1D2E;
  --ink-2: #575B70;
  --ink-3: #9194A7;
  --border: #ECEAE3;
  --border-soft: #F3F1EA;

  --shadow-sm: 0 1px 2px rgba(26, 29, 46, 0.04);
  --shadow: 0 4px 20px rgba(26, 29, 46, 0.06), 0 1px 3px rgba(26, 29, 46, 0.04);
  --shadow-lg: 0 20px 60px -10px rgba(26, 29, 46, 0.12), 0 4px 20px rgba(26, 29, 46, 0.06);
  --shadow-violet: 0 8px 24px -6px rgba(107, 79, 232, 0.35), 0 2px 6px rgba(107, 79, 232, 0.15);
  --shadow-card-raised: 0 1px 0 rgba(255,255,255,0.9) inset, 0 12px 32px -8px rgba(26, 29, 46, 0.08), 0 2px 6px rgba(26, 29, 46, 0.04);
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-feature-settings: 'ss01', 'cv11';
  position: relative;
  min-height: 100vh;
}

/* GRAIN TEXTURE OVERLAY — gives depth without being obvious */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 2; }

.font-serif {
  font-family: 'Fraunces', Georgia, serif;
  font-optical-sizing: auto;
  font-variation-settings: 'opsz' 96, 'SOFT' 40;
  letter-spacing: -0.025em;
}
.font-serif-tight { letter-spacing: -0.04em; }

.font-mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-feature-settings: 'zero', 'ss01';
}

*:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ============ LOGO ============ */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.03em;
  font-variation-settings: 'opsz' 72;
}
.logo-mark {
  width: 32px;
  height: 32px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.logo-plus {
  color: var(--violet);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 1;
  margin-left: 0;
  margin-top: -4px;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  position: relative;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(180deg, #7d63ec 0%, var(--violet) 100%);
  color: white;
  box-shadow: var(--shadow-violet), 0 1px 0 rgba(255,255,255,0.2) inset;
}
.btn-primary:hover {
  background: linear-gradient(180deg, var(--violet) 0%, var(--violet-deep) 100%);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -6px rgba(107, 79, 232, 0.45), 0 2px 6px rgba(107, 79, 232, 0.2), 0 1px 0 rgba(255,255,255,0.2) inset;
}

.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--cream-alt);
  border-color: var(--ink-3);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
}
.btn-ghost:hover {
  background: var(--cream-alt);
  color: var(--ink);
}

/* ============ CHIPS ============ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--ink-2);
  transition: all 0.15s;
  cursor: pointer;
  text-decoration: none;
}
.chip:hover {
  background: var(--violet-soft);
  color: var(--violet-ink);
  border-color: transparent;
  transform: translateY(-1px);
}

/* ============ BADGES ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.badge-success { background: var(--sage-soft); color: var(--sage-deep); }
.badge-warn { background: var(--amber-soft); color: var(--amber-deep); }
.badge-danger { background: var(--coral-soft); color: var(--coral-deep); }
.badge-info { background: var(--violet-soft); color: var(--violet-ink); }

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============ ICONS ============ */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }
.icon-2xl { width: 48px; height: 48px; }

/* SVG / iconify-icon must fill parent */
.icon > svg,
.icon svg,
.icon > iconify-icon,
iconify-icon {
  width: 100%;
  height: 100%;
  display: inline-block;
  vertical-align: middle;
}

/* Duotone icon helper — primary stroke, accent fill */
.icon-duotone [data-fill] { opacity: 0.15; }

/* ============ NAV ============ */
.nav-link {
  position: relative;
  padding: 8px 4px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.15s;
  text-decoration: none;
}
.nav-link:hover, .nav-link.active { color: var(--ink); }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--violet);
  border-radius: 2px;
}

/* ============ SEARCH ============ */
.search-input {
  width: 100%;
  padding: 18px 64px 18px 60px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 16px;
  color: var(--ink);
  transition: all 0.2s;
  box-shadow: var(--shadow-sm), 0 1px 0 rgba(255,255,255,0.9) inset;
}
.search-input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 4px var(--violet-soft), var(--shadow);
  outline: none;
}
.search-input::placeholder { color: var(--ink-3); }

/* ============ HEADER ============ */
.app-header {
  background: rgba(250, 250, 247, 0.72);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid rgba(236, 234, 227, 0.6);
  position: sticky;
  top: 0;
  z-index: 50;
}

.container-app {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ HERO ============ */
.hero-bg {
  position: relative;
  overflow: hidden;
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto auto;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(107, 79, 232, 0.18) 0%, transparent 55%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: auto auto -20% -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(95, 191, 163, 0.15) 0%, transparent 55%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

/* Aurora — for hero-card, CTA sections */
.aurora {
  position: relative;
  overflow: hidden;
}
.aurora::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 80% 10%, rgba(107, 79, 232, 0.15), transparent 70%),
    radial-gradient(ellipse 60% 40% at 10% 90%, rgba(95, 191, 163, 0.12), transparent 70%),
    radial-gradient(ellipse 50% 40% at 60% 60%, rgba(244, 162, 97, 0.08), transparent 60%);
  pointer-events: none;
}

/* Floating capsule decoration */
.float-capsule {
  position: absolute;
  pointer-events: none;
  filter: drop-shadow(0 20px 40px rgba(107, 79, 232, 0.2));
  animation: floaty 6s ease-in-out infinite;
}
.float-capsule-2 {
  animation-delay: 2s;
  animation-duration: 8s;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-12deg); }
  50% { transform: translateY(-20px) rotate(-8deg); }
}

/* ============ CARDS ============ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
  position: relative;
}
.card-raised {
  box-shadow: var(--shadow-card-raised);
  border-color: transparent;
  background: linear-gradient(180deg, #ffffff 0%, #fcfbf8 100%);
}
.card-hover:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--violet-soft);
}

/* Tile — editorial feel */
.tile {
  position: relative;
  background: var(--white);
  border-radius: 24px;
  padding: 28px;
  border: 1px solid var(--border);
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
}
.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  pointer-events: none;
  transition: opacity 0.25s;
  opacity: 0;
  background: linear-gradient(135deg, rgba(107, 79, 232, 0.04), transparent 40%);
}
.tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--violet-soft);
}
.tile:hover::after { opacity: 1; }
.tile-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.tile-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.5), transparent);
  border-radius: 14px;
}

/* ============ Section headings ============ */
.section-title {
  font-family: 'Fraunces', serif;
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
  font-variation-settings: 'opsz' 96;
}
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--violet);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--violet);
  border-radius: 2px;
}

/* ============ Compat row ============ */
.compat-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.compat-row:last-child { border-bottom: none; }
.compat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--cream-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============ Price card ============ */
.price-card {
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--white);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.price-card:hover {
  border-color: var(--violet);
  box-shadow: var(--shadow);
}
.price-card.featured {
  border: 1px solid var(--violet);
  background: linear-gradient(180deg, var(--violet-soft) 0%, var(--white) 35%);
  box-shadow: 0 8px 24px -8px rgba(107, 79, 232, 0.2);
}

/* ============ Rec cards ============ */
.rec-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: 18px;
  background: var(--cream-alt);
  transition: all 0.2s;
  border: 1px solid transparent;
}
.rec-card:hover {
  background: var(--violet-soft);
  border-color: rgba(107, 79, 232, 0.15);
}
.rec-icon-wrap {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--violet);
  box-shadow: var(--shadow-sm);
}

/* ============ Animations ============ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards; }
.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }
.fade-in-delay-4 { animation-delay: 0.4s; }

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}
.pulse-dot { animation: pulseDot 2s ease-in-out infinite; }

/* ============ Sticky CTA mobile ============ */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  z-index: 40;
  display: none;
}
@media (max-width: 768px) {
  .sticky-cta { display: flex; gap: 8px; }
}

/* ============ Divider & misc ============ */
.divider {
  height: 1px;
  background: var(--border);
  margin: 48px 0;
  border: none;
}

hr { border: none; border-top: 1px solid var(--border); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(145, 148, 167, 0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(145, 148, 167, 0.5); }

h1, h2, h3 { line-height: 1.12; }

/* Display serif outbreak — for hero headline */
.display-serif {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
}
.display-serif em {
  font-style: italic;
  font-weight: 300;
  color: var(--violet);
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}

/* Pharmacy row in price sidebar */
.pharm-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
}

/* Trust indicator row */
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--ink-2);
}

/* Hero phone mockup */
.phone-frame {
  position: relative;
  width: 280px;
  height: 560px;
  border-radius: 42px;
  background: linear-gradient(160deg, #2a2d42 0%, #1A1D2E 100%);
  padding: 10px;
  box-shadow:
    0 40px 80px -20px rgba(26, 29, 46, 0.35),
    0 20px 40px -10px rgba(107, 79, 232, 0.2),
    0 1px 0 rgba(255,255,255,0.15) inset;
}
.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--cream);
  border-radius: 32px;
  overflow: hidden;
  position: relative;
}
.phone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 24px;
  background: #0a0c15;
  border-radius: 100px;
  z-index: 3;
}

/* Split heading layout */
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ============ DARK SECTION (contrast moment) ============ */
.dark-section {
  background: #0F111A;
  color: rgba(255,255,255,0.9);
  position: relative;
  overflow: hidden;
  border-radius: 40px;
}
.dark-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 20%, rgba(107, 79, 232, 0.35), transparent 60%),
    radial-gradient(ellipse 50% 30% at 80% 80%, rgba(95, 191, 163, 0.25), transparent 60%),
    radial-gradient(ellipse 40% 30% at 60% 40%, rgba(244, 162, 97, 0.12), transparent 60%);
  pointer-events: none;
}
.dark-section::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.8;
}
.dark-section > * { position: relative; z-index: 2; }

.dark-section .eyebrow { color: #9E86F5; }
.dark-section .eyebrow::before { background: #9E86F5; }

.stat-number {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
  letter-spacing: -0.05em;
  line-height: 0.9;
  font-size: clamp(56px, 8vw, 96px);
  background: linear-gradient(180deg, #ffffff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin-top: 8px;
  letter-spacing: 0.01em;
}

/* ============ BENTO GRID ============ */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 16px;
}
.bento > * { min-width: 0; }
.bento-lg { grid-column: span 2; grid-row: span 2; }
.bento-wide { grid-column: span 2; }
.bento-tall { grid-row: span 2; }
@media (max-width: 768px) {
  .bento { grid-template-columns: 1fr; }
  .bento-lg, .bento-wide, .bento-tall { grid-column: auto; grid-row: auto; }
}

.bento-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
}
.bento-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--violet-soft);
}
.bento-card-dark {
  background: linear-gradient(145deg, #1A1D2E 0%, #2a2d42 100%);
  color: white;
  border-color: rgba(255,255,255,0.08);
}
.bento-card-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 80% 10%, rgba(107, 79, 232, 0.3), transparent 70%);
  pointer-events: none;
}
.bento-card-dark:hover { border-color: rgba(255,255,255,0.15); }

.bento-card-violet {
  background: linear-gradient(145deg, var(--violet) 0%, var(--violet-deep) 100%);
  color: white;
  border: none;
}
.bento-card-violet::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 30% 20%, rgba(255,255,255,0.15), transparent 70%);
  pointer-events: none;
}

/* ============ HERO ILLUSTRATION COMPOSITION ============ */
.hero-scene {
  position: relative;
  width: 100%;
  min-height: 560px;
  perspective: 1200px;
}
@media (max-width: 1024px) {
  .hero-scene { display: none; }
}
.hero-capsule {
  position: absolute;
  filter: drop-shadow(0 20px 40px rgba(107, 79, 232, 0.25));
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
  animation: floatWobble 8s ease-in-out infinite;
}
.hero-capsule:nth-child(2) { animation-delay: -2s; animation-duration: 10s; }
.hero-capsule:nth-child(3) { animation-delay: -4s; animation-duration: 12s; }
.hero-capsule:nth-child(4) { animation-delay: -6s; animation-duration: 9s; }

@keyframes floatWobble {
  0%, 100% { transform: translate(0, 0) rotate(var(--r, 0deg)); }
  25% { transform: translate(8px, -12px) rotate(calc(var(--r, 0deg) + 2deg)); }
  50% { transform: translate(-4px, -20px) rotate(calc(var(--r, 0deg) - 1deg)); }
  75% { transform: translate(-10px, -8px) rotate(calc(var(--r, 0deg) + 1deg)); }
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle 300px at 60% 50%, rgba(107, 79, 232, 0.2), transparent 60%),
    radial-gradient(circle 240px at 30% 70%, rgba(95, 191, 163, 0.18), transparent 60%);
  filter: blur(20px);
}

/* ============ ANALOGS SPECIFIC ============ */
.analog-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--white);
  transition: all 0.2s;
  text-decoration: none;
  color: var(--ink);
}
.analog-card:hover {
  border-color: var(--violet);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.analog-viz {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

/* ============ ENHANCED PILL SVG ============ */
.pill-stack {
  position: relative;
  filter: drop-shadow(0 30px 50px rgba(107, 79, 232, 0.2));
}

/* Gradient borders for special cards */
.grad-border {
  position: relative;
  background: linear-gradient(var(--white), var(--white)) padding-box,
              linear-gradient(135deg, rgba(107, 79, 232, 0.3), rgba(95, 191, 163, 0.3)) border-box;
  border: 1px solid transparent;
}

/* Scroll reveal animation utility */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1), transform 0.8s cubic-bezier(0.4,0,0.2,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ MOBILE OPTIMIZATION ============ */
@media (max-width: 768px) {
  .container-app { padding: 0 18px; }

  /* Header compacts */
  .app-header .h-\[72px\] { height: 60px; }
  .logo { font-size: 19px; gap: 1px; }
  .logo-plus { font-size: 22px; }

  /* Hero — reduce display serif */
  .display-serif {
    letter-spacing: -0.04em !important;
    line-height: 0.98 !important;
  }

  /* Hero H1 on homepage */
  .hero-grid h1.display-serif {
    font-size: 48px !important;
    margin-bottom: 20px !important;
  }
  .hero-grid h1.display-serif .block {
    margin-left: 0 !important;
  }
  .hero-grid h1.display-serif .block.text-\[0\.55em\] {
    margin-left: 0 !important;
  }

  /* Hero left column spacing */
  .hero-scene { min-height: 0; }

  /* Dark stats heading */
  .dark-section h2.display-serif {
    font-size: 36px !important;
  }

  /* Cabinet CTA heading */
  h2.display-serif.text-5xl {
    font-size: 36px !important;
    line-height: 1.05 !important;
  }

  /* Section title */
  .section-title { font-size: 28px !important; }

  /* Generic padding reductions */
  section.py-20 { padding-top: 48px; padding-bottom: 48px; }
  section.py-16 { padding-top: 36px; padding-bottom: 36px; }
  section.py-14 { padding-top: 32px; padding-bottom: 32px; }
  section.py-12 { padding-top: 28px; padding-bottom: 28px; }

  /* Cards less padding */
  .card.p-10, .card.\!p-10 { padding: 24px !important; }
  .card.p-8, .card.\!p-8 { padding: 22px !important; }
  .dark-section.p-10, .dark-section.p-16 { padding: 28px 22px !important; }

  /* Drug hero */
  .display-serif.text-\[56px\] { font-size: 42px !important; }

  /* Hero grid */
  .hero-grid { gap: 32px !important; }
  section.hero-bg { padding-top: 24px; padding-bottom: 48px; }

  /* Trust pill */
  .trust-pill { padding: 6px 12px 6px 8px; font-size: 12px; }

  /* Phone frame scale if shown */
  .phone-frame {
    transform-origin: center top !important;
  }

  /* Eyebrow smaller */
  .eyebrow { font-size: 11px; }

  /* Buttons ensure tap target */
  .btn { min-height: 44px; }

  /* Mobile bento 1 col */
  .bento {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .bento-lg, .bento-wide, .bento-tall {
    grid-column: auto !important;
    grid-row: auto !important;
  }
  .bento-card { padding: 22px; min-height: 0; }

  /* Compat matrix — stay horizontal with smaller gap */
  .compat-row {
    grid-template-columns: 36px 1fr auto;
    gap: 12px;
    padding: 14px 0;
    align-items: center;
  }
  .compat-icon { width: 36px; height: 36px; }
  .compat-row > div .font-semibold { font-size: 15px; }
  .compat-row > div .text-sm { font-size: 12.5px; line-height: 1.35; }
  .compat-row > .badge { font-size: 11px; padding: 4px 8px; }

  /* Price cards */
  .price-card { padding: 16px; }

  /* Reviews row */
  .container-app .card .flex.items-center.gap-7 { gap: 16px; flex-direction: column; }

  /* Analog card */
  .analog-card { padding: 14px; gap: 12px; }
  .analog-viz { width: 48px; height: 48px; }

  /* Drug Hero buttons wrap nicely */
  .card .flex.items-center.gap-3.pt-6 {
    flex-wrap: wrap;
    gap: 10px !important;
  }

  /* Stat labels */
  .stat-label { font-size: 12px; }

  /* Editorial card images smaller */
  .card .aspect-\[16\/10\] .w-20 { width: 64px !important; height: 64px !important; }

  /* Footer grid */
  footer .grid.grid-cols-2.md\:grid-cols-5 {
    grid-template-columns: 1fr 1fr !important;
    gap: 28px !important;
  }
}

/* ============ SMALL MOBILE ============ */
@media (max-width: 420px) {
  .container-app { padding: 0 14px; }

  .hero-grid h1.display-serif {
    font-size: 40px !important;
  }

  .dark-section h2.display-serif {
    font-size: 30px !important;
  }

  h2.display-serif.text-5xl {
    font-size: 30px !important;
  }

  .section-title { font-size: 24px !important; }

  .display-serif.text-\[56px\] { font-size: 36px !important; }

  /* Stacking hero buttons */
  .hero-grid .flex.flex-wrap.gap-3 { flex-direction: column; align-items: stretch; }
  .hero-grid .flex.flex-wrap.gap-3 .btn { width: 100%; }

  /* Hero trust indicators smaller */
  .hero-grid .flex.flex-wrap.items-center.gap-x-7 { gap: 14px; font-size: 13px; }

  /* Compat row: badge under text at very narrow screens */
  .compat-row {
    grid-template-columns: 32px 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 2px;
  }
  .compat-row > .compat-icon { grid-row: span 2; width: 32px; height: 32px; }
  .compat-row > .badge {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
  }

  /* Drug hero card badges wrap nicely */
  .card.card-raised .flex.items-center.gap-2.flex-wrap { gap: 6px; }

  /* Dose table scrolls */
  .overflow-x-auto { margin: 0 -14px; padding: 0 14px; }

  /* Chip icons stay small */
  .chip { padding: 7px 12px; font-size: 13px; }
}

/* ============ MOBILE NAV BURGER ============ */
.burger {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  color: var(--ink);
}
.burger:hover { background: var(--cream-alt); }
.burger svg { width: 22px; height: 22px; }
@media (max-width: 768px) {
  .burger { display: inline-flex; }

  /* Collapse desktop nav */
  .app-header nav.md\:flex { display: none !important; }

  /* Hide search button on mobile (use burger instead) */
  .app-header .btn-ghost[title="Пошук"],
  .app-header .btn-ghost[title*="Пошук"] { display: none !important; }

  /* Shorten language button */
  .app-header .btn-ghost.text-sm { padding: 6px 8px; }

  /* My cabinet CTA smaller */
  .app-header .btn-primary { padding: 10px 14px; font-size: 13px; }
}

.mobile-menu {
  position: fixed;
  inset: 60px 0 0 0;
  background: var(--cream);
  z-index: 49;
  padding: 24px 20px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
}
.mobile-menu a:hover { background: var(--violet-soft); border-radius: 10px; }
.mobile-menu a .icon { color: var(--ink-3); }

/* Shine on hover */
.shine {
  position: relative;
  overflow: hidden;
}
.shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: rotate(25deg);
  transition: left 0.7s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
}
.shine:hover::after { left: 150%; }

/* Section separator */
.section-sep {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 32px 0;
}
.section-sep::before, .section-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============ SCROLLED HEADER ============ */
.app-header {
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.app-header.scrolled {
  background: rgba(250, 250, 247, 0.85);
  border-bottom-color: rgba(236, 234, 227, 0.9);
  box-shadow: 0 4px 20px rgba(26, 29, 46, 0.04);
}

/* ============ PARALLAX ============ */
.hero-capsule {
  transform: translate(0, var(--parallax-y, 0));
}

/* ============ PHONE 3D ============ */
.phone-frame {
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
  will-change: transform;
}

/* ============ 3D CANVAS (Three.js) ============ */
.three-canvas-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
}
.three-canvas-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* ============ ANIMATED MESH GRADIENT ============ */
.mesh-gradient {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: inherit;
}
.mesh-gradient::before {
  content: '';
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 20% 30%, rgba(107, 79, 232, 0.5) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(95, 191, 163, 0.4) 0%, transparent 45%),
    radial-gradient(circle at 60% 80%, rgba(244, 162, 97, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 10% 70%, rgba(231, 111, 81, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 90% 90%, rgba(155, 120, 255, 0.35) 0%, transparent 40%);
  filter: blur(40px);
  animation: meshFloat 14s ease-in-out infinite;
}
.mesh-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.8;
}
@keyframes meshFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(-8%, 4%) scale(1.1); }
  66% { transform: translate(6%, -6%) scale(1.05); }
}

/* ============ LOTTIE-STYLE ICON ANIMATIONS ============ */
.tool-card { position: relative; }
.tool-card-icon {
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.tool-card:hover .tool-card-icon {
  transform: translateY(-2px) rotate(-4deg);
}

/* Flask liquid swirl on hover */
.tool-card[data-anim="flask"]:hover .tool-card-icon svg {
  animation: flaskShake 0.6s ease-in-out;
}
@keyframes flaskShake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

/* Pill rotate on hover */
.tool-card[data-anim="pill"]:hover .tool-card-icon svg {
  animation: pillSpin 0.8s cubic-bezier(0.4,0,0.2,1);
}
@keyframes pillSpin {
  0% { transform: rotate(0); }
  100% { transform: rotate(180deg); }
}

/* Clock tick */
.tool-card[data-anim="clock"]:hover .tool-card-icon svg {
  animation: clockTick 1s ease-in-out;
}
@keyframes clockTick {
  0%, 100% { transform: rotate(0); }
  33% { transform: rotate(30deg); }
  66% { transform: rotate(-15deg); }
}

/* Sparkle pulse */
.tool-card[data-anim="sparkle"]:hover .tool-card-icon svg {
  animation: sparkle 0.7s ease-out;
}
@keyframes sparkle {
  0% { transform: scale(1) rotate(0); }
  50% { transform: scale(1.25) rotate(180deg); filter: drop-shadow(0 0 8px currentColor); }
  100% { transform: scale(1) rotate(360deg); }
}

/* Droplet bob */
.tool-card[data-anim="droplet"]:hover .tool-card-icon svg {
  animation: dropletBob 0.8s ease-in-out;
}
@keyframes dropletBob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.1); }
}

/* Camera snap */
.tool-card[data-anim="camera"]:hover .tool-card-icon svg {
  animation: cameraSnap 0.5s ease-out;
}
@keyframes cameraSnap {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.88); filter: brightness(0.85); }
}

/* Photo frame effect */
.photo-frame {
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  background: var(--cream-alt);
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.card:hover .photo-frame img { transform: scale(1.05); }

/* ============ Cmd+K SEARCH MODAL ============ */
.cap-search-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}
.cap-search-modal.is-open { display: flex; }
.cap-search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 21, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: fadeBackdrop 0.2s ease-out;
}
@keyframes fadeBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cap-search-panel {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 16px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 40px 80px -10px rgba(10, 12, 21, 0.4), 0 20px 40px -10px rgba(107, 79, 232, 0.2);
  overflow: hidden;
  animation: slideUpIn 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUpIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cap-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.cap-search-icon {
  width: 20px;
  height: 20px;
  color: var(--ink-3);
  flex-shrink: 0;
}
.cap-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 17px;
  color: var(--ink);
  background: transparent;
  font-family: inherit;
}
.cap-search-input::placeholder { color: var(--ink-3); }

.cap-search-kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 3px 8px;
  background: var(--cream-alt);
  border-radius: 6px;
  color: var(--ink-3);
  border: 1px solid var(--border);
}

.cap-search-results {
  max-height: 50vh;
  overflow-y: auto;
  padding: 8px;
}

.cap-search-group {
  margin-bottom: 8px;
}
.cap-search-group-label {
  padding: 10px 12px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.cap-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.12s;
}
.cap-search-item:hover,
.cap-search-item:focus-visible {
  background: var(--violet-soft);
  outline: none;
}
.cap-search-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 17px;
  flex-shrink: 0;
}
.cap-search-item-body { flex: 1; min-width: 0; }
.cap-search-item-title {
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cap-search-item-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}
.cap-search-item-kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-3);
  opacity: 0;
  transition: opacity 0.15s;
}
.cap-search-item:hover .cap-search-item-kbd { opacity: 1; }

.cap-search-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  background: var(--cream-alt);
}
.cap-search-hint {
  font-size: 11px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 5px;
}
.cap-search-hint kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 2px 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--ink-2);
}
