/* ============================================================
   DoseMate Landing Page — "The Clinical Ethereal" Design System
   Fonts: Plus Jakarta Sans (headings) · Manrope (body)
   Colors: Clinical Blue #0061A4, Dark #101319
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand Colors */
  --primary:          #0061A4;
  --primary-hero:     #197FE6;
  --primary-light:    #3991FA;
  --indigo:           #4F46E5;
  --indigo-light:     #818CF8;
  --emerald:          #10B981;
  --rose:             #F43F5E;
  --orange:           #F97316;
  --violet:           #8B5CF6;
  
  --accent-emerald:   #10B981;
  --accent-rose:      #F43F5E;
  --accent-violet:    #8B5CF6;
  --accent-indigo:    #4F46E5;

  /* Dark surface palette */
  --bg:               #101319;
  --surface:          #101319;
  --surface-low:      #131720;
  --surface-mid:      #181C25;
  --surface-high:     #212631;
  --surface-highest:  #2C3241;
  --outline:          rgba(255, 255, 255, 0.08);
  --outline-variant:  rgba(255, 255, 255, 0.15);

  /* Text */
  --on-surface:       #EAEBF1;
  --on-surface-var:   #ABB0BE;
  --on-surface-muted: #646A7A;

  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Nav height */
  --nav-h: 70px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Manrope', sans-serif;
  background: var(--bg);
  color: var(--on-surface);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* HTML5 Canvas Background overlay */
#ethereal-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: -1;
  pointer-events: none;
  opacity: 0.75;
}

/* ============================================================
   UTILITIES & REUSABLE STYLES
   ============================================================ */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hero));
  color: white;
  box-shadow: 0 4px 20px rgba(0, 97, 164, 0.4);
}
.btn-primary:hover { 
  box-shadow: 0 8px 32px rgba(0, 97, 164, 0.55);
  background: linear-gradient(135deg, #0072c3, #2f8ffc);
}

.btn-secondary {
  background: var(--surface-high);
  color: var(--on-surface);
  border: 1px solid var(--outline-variant);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-secondary:hover { background: var(--surface-highest); }
.btn-large { padding: 16px 32px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-small { padding: 8px 16px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-full { width: 100%; justify-content: center; }

/* ============================================================
   SPA ROUTER TRANSITIONS
   ============================================================ */
.app-main {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.app-main.fade-out {
  opacity: 0;
  transform: translateY(8px);
}

.app-main.fade-in {
  opacity: 0;
  transform: translateY(-8px);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(16, 19, 25, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--outline);
}
.nav-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--on-surface);
  letter-spacing: -0.3px;
  transition: opacity 0.2s;
}
.nav-brand.active-brand {
  color: var(--primary-light);
}
.nav-logo { width: 34px; height: 34px; border-radius: 8px; overflow: hidden; }
.nav-logo img { width: 100%; height: 100%; object-fit: cover; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}
.nav-links a {
  text-decoration: none;
  color: var(--on-surface-var);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s, text-shadow 0.2s;
  position: relative;
  padding: 6px 0;
}
.nav-links a:hover, .nav-links a.active { 
  color: var(--on-surface);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; width: 0; height: 2px;
  background: var(--primary-light);
  transition: width 0.25s ease;
  border-radius: var(--radius-full);
}
.nav-links a.active::after {
  width: 100%;
}

.nav-cta { margin-left: 20px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--on-surface); border-radius: 2px; transition: 0.3s; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

/* Blur blobs in background */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  animation: blobFloat 12s ease-in-out infinite;
  pointer-events: none;
}
.blob-1 {
  width: 500px; height: 500px;
  top: -150px; right: -50px;
  background: radial-gradient(circle, rgba(0, 97, 164, 0.22) 0%, transparent 70%);
  animation-delay: 0s;
}
.blob-2 {
  width: 400px; height: 400px;
  bottom: -100px; left: -80px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.18) 0%, transparent 70%);
  animation-delay: 3s;
}
.blob-3 {
  width: 300px; height: 300px;
  top: 35%; left: 30%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
  animation-delay: 6s;
}
@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(25px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black, transparent);
  pointer-events: none;
}

.hero-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  background: rgba(0, 97, 164, 0.08);
  border: 1px solid rgba(0, 97, 164, 0.2);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 24px;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--accent-emerald); }
  50% { opacity: 0.6; box-shadow: 0 0 16px var(--accent-emerald); }
}

.hero-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--on-surface);
  margin-bottom: 20px;
}
.hero-gradient {
  background: linear-gradient(135deg, var(--primary-hero), var(--indigo-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 17px;
  line-height: 1.65;
  color: var(--on-surface-var);
  max-width: 500px;
  margin-bottom: 36px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.hero-social-proof {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rating-stars { color: #FBBF24; font-size: 17px; letter-spacing: 2px; }
.rating-text { font-size: 13px; color: var(--on-surface-muted); font-weight: 600; }

/* ===== PHONE MOCKUP ===== */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.phone-wrapper {
  position: relative;
  width: 290px;
}
.phone-glow {
  position: absolute;
  inset: -30px;
  background: radial-gradient(ellipse, rgba(0, 97, 164, 0.25) 0%, transparent 70%);
  pointer-events: none;
  animation: glowPulse 4s ease infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.03); }
}
.phone-frame {
  width: 290px;
  height: 560px;
  background: #0d0f14;
  border-radius: 40px;
  border: 11px solid #1f232e;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 24px 64px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.08);
  animation: phoneFloat 6s ease-in-out infinite;
}
@keyframes phoneFloat {
  0%, 100% { transform: translateY(0px) rotate(0.3deg); }
  50% { transform: translateY(-12px) rotate(-0.3deg); }
}

/* iPhone Notch Dynamic Island style */
.phone-frame::before {
  content: '';
  position: absolute;
  top: 11px; left: 50%;
  transform: translateX(-50%);
  width: 84px; height: 22px;
  background: #000000;
  border-radius: 11px;
  z-index: 10;
}
.phone-screen {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #101319;
}
.hero-phone-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Micro-animation Floating cards */
.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(22, 26, 35, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  white-space: nowrap;
  animation: floatIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  pointer-events: none;
}
.float-card-top { top: 90px; left: -60px; animation-delay: 0.3s; }
.float-card-bottom { bottom: 110px; right: -50px; animation-delay: 0.6s; }

@keyframes floatIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.float-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,97,164,0.15);
  color: var(--primary-light);
  font-size: 15px;
  flex-shrink: 0;
}
.float-content { display: flex; flex-direction: column; }
.float-title { font-size: 12px; font-weight: 800; color: var(--on-surface); }
.float-sub { font-size: 10.5px; color: var(--on-surface-var); }

/* ============================================================
   PROMINENT FEATURES SECTION
   ============================================================ */
.features-highlight {
  padding: 100px 0;
  position: relative;
}
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--outline);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  color: var(--on-surface-var);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}
.section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  color: var(--on-surface);
  margin-bottom: 12px;
}
.section-sub { font-size: 16px; color: var(--on-surface-var); max-width: 600px; margin: 0 auto; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-card {
  background: rgba(24, 28, 37, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--outline);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.15);
}
.feature-icon-badge {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 4px;
}
.feature-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--on-surface);
}
.feature-desc { font-size: 14.5px; line-height: 1.65; color: var(--on-surface-var); }

/* ============================================================
   INTERACTIVE SHOWCASE SECTION
   ============================================================ */
.showcase-section {
  padding: 100px 0;
  background: linear-gradient(180deg, transparent, rgba(0, 97, 164, 0.02), transparent);
}
.showcase-header {
  text-align: center;
  margin-bottom: 56px;
}
.showcase-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.showcase-menu {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.showcase-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 24px;
  background: rgba(20, 24, 32, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.showcase-item:hover {
  background: rgba(25, 30, 40, 0.5);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(4px);
}
.showcase-item.active {
  background: rgba(24, 28, 37, 0.85);
  border-color: rgba(0, 97, 164, 0.45);
  box-shadow: 0 8px 32px rgba(0, 97, 164, 0.15);
}
.showcase-item-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.showcase-item.active .showcase-item-dot {
  transform: scale(1.4);
  box-shadow: 0 0 10px currentColor;
}
.showcase-item-content { display: flex; flex-direction: column; gap: 4px; }
.showcase-item-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--on-surface-muted); letter-spacing: 0.8px; }
.showcase-item.active .showcase-item-label { color: var(--primary-light); }
.showcase-item-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; font-weight: 700; color: var(--on-surface); }
.showcase-item-desc { font-size: 13.5px; line-height: 1.6; color: var(--on-surface-muted); height: 0; overflow: hidden; opacity: 0; transition: all 0.3s ease; }
.showcase-item.active .showcase-item-desc { height: auto; opacity: 1; margin-top: 4px; }

/* Interactive Showcase Phone Mockup */
.showcase-mockup {
  display: flex;
  justify-content: center;
  position: relative;
}
.showcase-mockup .mockup-frame {
  width: 270px;
  height: 520px;
  background: #0d0f14;
  border-radius: 36px;
  border: 10px solid #1f232e;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  position: relative;
  z-index: 2;
}
.showcase-mockup .mockup-screen {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #101319;
}
.showcase-mockup .mockup-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease-in-out;
}
.mockup-reflection {
  position: absolute;
  top: 10px; right: 10px; bottom: 10px; left: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.03), transparent 60%);
  border-top-right-radius: 26px;
  border-bottom-right-radius: 26px;
  z-index: 3;
  pointer-events: none;
}

/* ============================================================
   ONBOARDING GUIDANCE SECTION
   ============================================================ */
.onboarding-section {
  padding: 100px 0;
  position: relative;
}
.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.onboarding-step-card {
  background: rgba(20, 24, 32, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--outline);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.onboarding-step-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 97, 164, 0.3);
}
.onboarding-step-card .step-num {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(0, 97, 164, 0.1);
  border: 1px solid rgba(0, 97, 164, 0.3);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px; font-weight: 800;
  color: var(--primary-light);
  box-shadow: 0 0 15px rgba(0, 97, 164, 0.15);
}
.step-card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--on-surface);
}
.step-card-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--on-surface-var);
}

/* ============================================================
   STATS COUNTER
   ============================================================ */
.stats-section {
  padding: 80px 0;
  position: relative;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--outline);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--outline);
}
.stat-item {
  background: rgba(24, 28, 37, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 44px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease;
}
.stat-item:hover { background: rgba(28, 33, 44, 0.7); }
.stat-row { display: flex; align-items: baseline; gap: 2px; line-height: 1; }
.stat-number { font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(38px, 4.5vw, 56px); font-weight: 800; color: var(--on-surface); }
.stat-suffix { font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(20px, 2.5vw, 32px); font-weight: 800; color: var(--primary-light); }
.stat-label { font-size: 13px; font-weight: 600; color: var(--on-surface-var); text-align: center; }

/* ============================================================
   DOWNLOAD SECTION
   ============================================================ */
.download-section {
  padding: 100px 0;
  position: relative;
}
.download-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  z-index: 2;
  position: relative;
}
.download-app-icon {
  width: 80px; height: 80px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px var(--outline);
  margin-bottom: 8px;
}
.download-app-icon img { width: 100%; height: 100%; object-fit: cover; }
.download-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--on-surface);
}
.download-sub { font-size: 16px; color: var(--on-surface-var); }
.download-buttons { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }

.store-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: rgba(28, 33, 44, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--on-surface);
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 190px;
}
.store-btn:hover {
  transform: translateY(-3px);
  background: rgba(36, 42, 56, 0.85);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.store-btn-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.store-btn-text { display: flex; flex-direction: column; text-align: left; }
.store-sub { font-size: 10px; color: var(--on-surface-muted); font-weight: 600; }
.store-name { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; font-weight: 800; }
.download-free { font-size: 12px; color: var(--on-surface-muted); font-weight: 600; }

/* ============================================================
   SUBPAGES GLOBAL LAYOUT (Features, Legal, Contact)
   ============================================================ */
.subpage-hero {
  position: relative;
  padding: 100px 0 60px;
  text-align: center;
  overflow: hidden;
}
.subpage-blob {
  position: absolute;
  top: -50px; left: 50%;
  transform: translateX(-50%);
  width: 400px; height: 250px;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
}
.subpage-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--on-surface);
  margin-bottom: 12px;
  z-index: 2;
  position: relative;
}
.subpage-subtitle {
  font-size: 16px;
  color: var(--on-surface-var);
  max-width: 600px;
  margin: 0 auto;
  z-index: 2;
  position: relative;
}

/* ===== FEATURES DETAIL SUBPAGE ===== */
.features-detail-section {
  padding: 40px 0 100px;
}
.detail-feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  margin-bottom: 100px;
}
.detail-feature-row.reverse {
  direction: rtl;
}
.detail-feature-row.reverse .detail-feature-text {
  direction: ltr; /* Reset text direction */
}
.detail-feature-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.detail-badge {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary-light);
  letter-spacing: 1px;
}
.detail-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--on-surface);
}
.detail-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--on-surface-var);
}
.detail-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 20px;
}
.detail-list li {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--on-surface-var);
}
.detail-list code {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--outline);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  color: var(--on-surface);
}

.detail-feature-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.detail-visual-img {
  width: 260px;
  border-radius: 36px;
  border: 4px solid #1f232e;
  box-shadow: 0 20px 48px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}
.detail-visual-img:hover {
  transform: scale(1.02);
}

/* Features page scroll reveal animation */
.reveal-row {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-row.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== LEGAL PAGES (Privacy, Terms, EULA) ===== */
.legal-content-section {
  padding: 20px 0 100px;
}
.legal-container {
  max-width: 860px;
}
.legal-card {
  background: rgba(24, 28, 37, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--outline);
  border-radius: var(--radius-xl);
  padding: 48px;
}
.legal-lead {
  font-size: 16px;
  line-height: 1.7;
  color: var(--on-surface);
  margin-bottom: 32px;
}
.legal-card h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--on-surface);
  margin-top: 36px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--outline);
  padding-bottom: 8px;
}
.legal-card p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--on-surface-var);
  margin-bottom: 16px;
}
.legal-card ul {
  padding-left: 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-card ul li {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--on-surface-var);
}
.legal-link {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;
  transition: text-decoration 0.2s;
}
.legal-link:hover {
  text-decoration: underline;
}
.legal-card code {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  color: var(--on-surface);
  font-size: 13.5px;
}

/* ===== CONTACT US PAGE ===== */
.contact-section {
  padding: 20px 0 100px;
}
.contact-container {
  max-width: 1060px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 40px;
}

.contact-card {
  background: rgba(24, 28, 37, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--outline);
  border-radius: var(--radius-xl);
  padding: 36px;
  height: 100%;
}

.info-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: rgba(24, 28, 37, 0.4);
  border-color: rgba(255,255,255,0.06);
  height: auto;
  margin-bottom: 32px;
}
.info-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: rgba(0, 97, 164, 0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.info-text h3 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; font-weight: 800; color: var(--on-surface); margin-bottom: 6px; }
.email-link { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 20px; font-weight: 700; color: var(--primary-light); text-decoration: none; word-break: break-all; }
.email-link:hover { text-decoration: underline; }
.email-desc { font-size: 12.5px; color: var(--on-surface-muted); margin-top: 6px; }

/* FAQ Accordion */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--on-surface);
  margin-bottom: 12px;
  padding-left: 4px;
}
.faq-item {
  background: rgba(24, 28, 37, 0.3);
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq-item:hover { border-color: rgba(255, 255, 255, 0.12); }
.faq-item.active { border-color: rgba(0, 97, 164, 0.35); }
.faq-trigger {
  width: 100%;
  padding: 18px 20px;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}
.faq-trigger span:first-child {
  font-size: 14px;
  font-weight: 700;
  color: var(--on-surface);
}
.faq-icon {
  font-size: 16px;
  font-weight: 800;
  color: var(--on-surface-muted);
  margin-left: 12px;
}
.faq-item.active .faq-icon { color: var(--primary-light); }
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
  padding: 0 20px;
}
.faq-item.active .faq-content {
  max-height: 200px; /* Safe upper bound */
  padding-bottom: 18px;
}
.faq-content p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--on-surface-var);
}

/* Interactive Form */
.form-card {
  position: relative;
  overflow: hidden;
}
.form-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 22px; font-weight: 800; color: var(--on-surface); margin-bottom: 6px; }
.form-sub { font-size: 13.5px; color: var(--on-surface-var); margin-bottom: 28px; }

.support-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 13px; font-weight: 700; color: var(--on-surface-var); }
.form-group input, .form-group select, .form-group textarea {
  background: rgba(16, 19, 25, 0.6);
  border: 1px solid var(--outline);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  color: var(--on-surface);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-group input::placeholder, .form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.2);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(0, 97, 164, 0.15);
}
.form-group select option {
  background: var(--surface-mid);
  color: var(--on-surface);
}

/* Interactive form overlay states */
.form-status-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 32, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10;
  padding: 32px;
}
.form-status-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.status-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  max-width: 320px;
}
.status-content.hidden { display: none; }

/* CSS Clinical Spinner */
.clinical-spinner {
  width: 48px; height: 48px;
  border: 3px solid rgba(0, 97, 164, 0.15);
  border-top: 3px solid var(--primary-light);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.status-text { font-size: 14px; font-weight: 700; color: var(--on-surface-var); }

.success-checkmark {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--accent-emerald);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
  animation: scaleIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}
@keyframes scaleIn {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.status-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 20px; font-weight: 800; color: var(--on-surface); }
.status-desc { font-size: 13.5px; line-height: 1.6; color: var(--on-surface-var); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--surface-low);
  border-top: 1px solid var(--outline);
  padding: 64px 0 32px;
  position: relative;
  z-index: 5;
}
.footer-top {
  display: flex;
  gap: 64px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; flex-direction: column; gap: 10px; max-width: 240px; }
.footer-logo { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; }
.footer-logo img { width: 100%; height: 100%; object-fit: cover; }
.footer-brand-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--on-surface);
}
.footer-tagline { font-size: 13px; color: var(--on-surface-muted); line-height: 1.5; }
.footer-links { display: flex; gap: 64px; margin-left: auto; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col-title { font-size: 12px; font-weight: 800; color: var(--on-surface-var); letter-spacing: 0.8px; text-transform: uppercase; }
.footer-col a { font-size: 14px; color: var(--on-surface-muted); text-decoration: none; transition: color 0.2s; }
.footer-col a:hover, .footer-col a.active { color: var(--on-surface); }
.footer-bottom {
  border-top: 1px solid var(--outline);
  padding-top: 24px;
  font-size: 13px;
  color: var(--on-surface-muted);
  text-align: center;
}

/* ============================================================
   REVEAL ANIMATIONS (Shared)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE DESIGN SYSTEM
   ============================================================ */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .showcase-grid { gap: 40px; }
  .detail-feature-row { gap: 40px; }
}

@media (max-width: 900px) {
  .showcase-grid { grid-template-columns: 1fr; gap: 48px; }
  .showcase-mockup { order: -1; }
  .showcase-item.active .showcase-item-desc { height: auto; opacity: 1; }
  
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 48px;
    padding: 40px 24px 60px;
  }
  .hero-subtitle { margin: 0 auto 36px; }
  .hero-actions { justify-content: center; }
  .hero-social-proof { justify-content: center; }
  .hero-visual { order: -1; }
  .phone-wrapper { transform: scale(0.9); }
  .float-card-top { left: -20px; }
  .float-card-bottom { right: -20px; }

  .features-grid { grid-template-columns: 1fr; }
  .onboarding-steps { grid-template-columns: 1fr; }
  .detail-feature-row { grid-template-columns: 1fr; gap: 32px; margin-bottom: 64px; }
  .detail-feature-row.reverse { direction: ltr; }
  .detail-feature-row.reverse .detail-feature-text { direction: ltr; }
  .detail-feature-visual { order: -1; }

  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; margin-left: auto; }

  .footer-top { flex-direction: column; gap: 32px; }
  .footer-links { gap: 32px; margin-left: 0; }
  .footer-brand { max-width: 100%; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .download-buttons { flex-direction: column; align-items: center; }
  .store-btn { width: 100%; max-width: 280px; }
  .hero-title { font-size: 36px; }
  .legal-card { padding: 24px; }
  .contact-card { padding: 24px; }
}

/* ============================================================
   CUSTOM LANGUAGE DROPDOWN PREMIUM STYLES
   ============================================================ */
.lang-selector-wrap {
  position: relative;
  display: inline-block;
  margin-left: auto; /* Push next to CTA on desktop */
  z-index: 110;
}

.lang-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--outline);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--on-surface-var);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
  outline: none;
}

.lang-dropdown-trigger:hover {
  border-color: var(--outline-variant);
  background: rgba(255, 255, 255, 0.08);
  color: var(--on-surface);
}

.lang-icon {
  font-size: 13px;
  display: flex;
  align-items: center;
}

.lang-arrow {
  font-size: 8px;
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.lang-selector-wrap.open .lang-arrow {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 190px;
  max-height: 300px;
  background: rgba(16, 19, 25, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  box-shadow: 
    0 16px 48px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 6px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 120;
}

/* Custom Sleek Scrollbar for Language Dropdown */
.lang-dropdown-menu::-webkit-scrollbar {
  width: 4px;
}
.lang-dropdown-menu::-webkit-scrollbar-track {
  background: transparent;
}
.lang-dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
}
.lang-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lang-selector-wrap.open .lang-dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-dropdown-item {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--on-surface-var);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.lang-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--on-surface);
}

.lang-dropdown-item.active {
  background: rgba(0, 97, 164, 0.15);
  color: var(--primary-light);
}

/* Make sure lang selector sits nicely on mobile next to toggle */
@media (max-width: 768px) {
  .lang-selector-wrap {
    margin-left: auto;
    margin-right: 16px;
  }
}

/* ============================================================
   USER TESTIMONIALS SECTION
   ============================================================ */
.testimonials-section {
  padding: 100px 0;
  position: relative;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.testimonial-card {
  background: rgba(20, 24, 32, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--outline);
  border-radius: var(--radius-xl);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 97, 164, 0.3);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.testimonial-rating {
  color: #FBBF24;
  font-size: 15px;
  letter-spacing: 1px;
}

.testimonial-text {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--on-surface);
  font-style: italic;
}

.testimonial-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto; /* Push to bottom of card */
  border-top: 1px solid var(--outline);
  padding-top: 16px;
}

.testimonial-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

.testimonial-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.testimonial-name {
  font-weight: 800;
  font-size: 14px;
  color: var(--on-surface);
}

.testimonial-role {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--on-surface-muted);
}

/* Adjust testimonials grid on responsive */
@media (max-width: 900px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}


