/* ================================================================
   Perfect Next SMC — Enterprise MedTech CSS Design System v3.0
   MOBILE-FIRST RESPONSIVE ARCHITECTURE
   ================================================================ */



/* ────────────────────────────────────────
   CSS DESIGN TOKENS
   ──────────────────────────────────────── */
:root {
  --bg-white:             #FFFFFF;
  --bg-slate:             #F8FAFC;
  --bg-dark:              #0F172A;
  --primary-blue:         #2563EB;
  --primary-blue-hover:   #1D4ED8;
  --primary-blue-light:   rgba(37, 99, 235, 0.08);
  --emerald-green:        #10B981;
  --emerald-glow:         rgba(16, 185, 129, 0.15);
  --text-dark:            #0F172A;
  --text-muted:           #475569;
  --text-light:           #94A3B8;
  --border-subtle:        rgba(15, 23, 42, 0.08);
  --border-glass:         rgba(255, 255, 255, 0.2);
  --shadow-sm:            0 4px 6px -1px rgba(15, 23, 42, 0.05);
  --shadow-diffused:      0 25px 50px -12px rgba(15, 23, 42, 0.06);
  --shadow-hover:         0 30px 60px -15px rgba(37, 99, 235, 0.14);
  --shadow-card:          0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(15,23,42,0.05);
  --font-family:          'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-xl:            1.25rem;
  --radius-2xl:           1.5rem;
  --radius-3xl:           2rem;
  --transition-fast:      0.18s ease;
  --transition-base:      0.28s ease;
  --transition-slow:      0.48s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ────────────────────────────────────────
   RESET & BASE
   ──────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  scroll-behavior: smooth;
  font-family: var(--font-family);
  background-color: var(--bg-white);
  color: var(--text-dark);
  letter-spacing: -0.015em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ────────────────────────────────────────
   TYPOGRAPHY
   ──────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.025em;
  color: var(--text-dark);
  font-weight: 800;
  line-height: 1.15;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ────────────────────────────────────────
   GLASS HEADER / NAVBAR
   ──────────────────────────────────────── */
.glass-header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  transition: box-shadow var(--transition-base), background var(--transition-base);
}

.glass-header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 4px 24px -2px rgba(15, 23, 42, 0.1);
}

/* ────────────────────────────────────────
   GLASS CARDS
   ──────────────────────────────────────── */
.glass-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-3xl);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-slow);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(37, 99, 235, 0.18);
}

.glass-card-dark {
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-3xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  color: #FFFFFF;
}

/* ────────────────────────────────────────
   GRADIENT ORBS
   ──────────────────────────────────────── */
.gradient-orb-blue {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.18) 0%, rgba(37, 99, 235, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(48px);
}

.gradient-orb-emerald {
  position: absolute;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.16) 0%, rgba(16, 185, 129, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(48px);
}

/* ────────────────────────────────────────
   KEYFRAME ANIMATIONS
   ──────────────────────────────────────── */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50%       { transform: translateY(-10px) rotate(0.4deg); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 0.85; transform: scale(1.06); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-float        { animation: floatSlow 7s ease-in-out infinite; }
.animate-pulse-glow   { animation: pulseGlow 4s ease-in-out infinite; }
.animate-fade-in      { animation: fadeIn 0.4s ease; }
.animate-fade-in-up   { animation: fadeInUp 0.6s ease; }

/* ────────────────────────────────────────
   NAVIGATION LINKS
   ──────────────────────────────────────── */
.nav-link {
  position: relative;
  transition: color var(--transition-fast);
  letter-spacing: -0.01em;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-blue);
  border-radius: 2px;
  transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--primary-blue); font-weight: 700; }

/* ────────────────────────────────────────
   BUTTONS
   ──────────────────────────────────────── */
.btn-primary {
  background: var(--primary-blue);
  color: #FFFFFF;
  font-weight: 700;
  padding: 11px 24px;
  border-radius: 9999px;
  border: 1.5px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-base);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-blue-hover);
  box-shadow: 0 12px 28px -6px rgba(37, 99, 235, 0.45);
  transform: translateY(-1.5px);
}

.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.65; cursor: not-allowed; }

.btn-outline {
  background: transparent;
  color: var(--text-dark);
  font-weight: 700;
  padding: 11px 24px;
  border-radius: 9999px;
  border: 1.5px solid rgba(15, 23, 42, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-base);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.btn-outline:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
  background: var(--primary-blue-light);
}

/* ────────────────────────────────────────
   CUSTOM SCROLLBAR
   ──────────────────────────────────────── */
::-webkit-scrollbar       { width: 8px; }
::-webkit-scrollbar-track { background: #F1F5F9; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* ────────────────────────────────────────
   FORM INPUTS
   ──────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  font-family: var(--font-family);
  font-size: 0.875rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ────────────────────────────────────────
   SELECTION & FOCUS
   ──────────────────────────────────────── */
::selection { background: rgba(37, 99, 235, 0.15); color: var(--text-dark); }
:focus-visible { outline: 2px solid var(--primary-blue); outline-offset: 3px; border-radius: 4px; }

/* ────────────────────────────────────────
   TABLE BASE
   ──────────────────────────────────────── */
table { border-collapse: collapse; width: 100%; }
th { letter-spacing: 0.06em; font-size: 0.7rem; }


/* ================================================================
   ██   ██  ██████  ██████  ██ ██      ███████
   ███ ███ ██    ██ ██   ██ ██ ██      ██
   ██ ███ ██    ██ ██████  ██ ██      █████
   ██  ██ ██    ██ ██   ██ ██ ██      ██
   ██  ██  ██████  ██████  ██ ███████ ███████
   MOBILE OPTIMIZATIONS — max-width: 639px
   DESKTOP IS COMPLETELY UNTOUCHED BY THESE RULES
   ================================================================ */
@media (max-width: 639px) {

  /* ── Disable heavy animations for performance ── */
  .animate-float      { animation: none !important; }
  .animate-pulse-glow { animation: none !important; }

  /* ── Hide decorative orbs (perf + visual clutter) ── */
  .gradient-orb-blue,
  .gradient-orb-emerald { display: none !important; }

  /* ══════════════════════════════════════════════
     SECTION VERTICAL RHYTHM — tight and snappy
     ══════════════════════════════════════════════ */
  main .py-28, main .py-24, main .py-20 {
    padding-top: 1.75rem !important;
    padding-bottom: 1.75rem !important;
  }
  main .py-16 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
  main .py-14 {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
  }
  main .py-10, main .py-12 {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
  }

  /* ══════════════════════════════════════════════
     CARD INTERNAL PADDING — compact cards
     ══════════════════════════════════════════════ */
  main .p-12 { padding: 1rem !important; }
  main .p-10 { padding: 1rem !important; }
  main .p-8  { padding: 0.875rem !important; }
  main .p-6  { padding: 0.75rem !important; }

  /* ══════════════════════════════════════════════
     GRID GAPS — tight grid
     ══════════════════════════════════════════════ */
  main .gap-12 { gap: 0.75rem !important; }
  main .gap-10 { gap: 0.75rem !important; }
  main .gap-8  { gap: 0.625rem !important; }
  main .gap-6  { gap: 0.5rem !important; }

  /* ══════════════════════════════════════════════
     BOTTOM MARGINS — compressed
     ══════════════════════════════════════════════ */
  main .mb-16 { margin-bottom: 1.25rem !important; }
  main .mb-14 { margin-bottom: 1rem !important; }
  main .mb-12 { margin-bottom: 1rem !important; }
  main .mb-10 { margin-bottom: 0.75rem !important; }
  main .mb-8  { margin-bottom: 0.625rem !important; }

  /* ══════════════════════════════════════════════
     SPACE-Y STACKS — much tighter
     ══════════════════════════════════════════════ */
  main .space-y-28 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.75rem !important; }
  main .space-y-14 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem !important; }
  main .space-y-10 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem !important; }
  main .space-y-8  > :not([hidden]) ~ :not([hidden]) { margin-top: 0.625rem !important; }
  main .space-y-6  > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem !important; }
  main .space-y-4  > :not([hidden]) ~ :not([hidden]) { margin-top: 0.375rem !important; }

  /* ══════════════════════════════════════════════
     TYPOGRAPHY — aggressive scale-down
     ══════════════════════════════════════════════ */
  main .text-6xl {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }
  main .text-5xl {
    font-size: 1.375rem !important;
    line-height: 1.2 !important;
  }
  main .text-4xl {
    font-size: 1.25rem !important;
    line-height: 1.25 !important;
  }
  main .text-3xl {
    font-size: 1.125rem !important;
    line-height: 1.3 !important;
  }
  main .text-2xl {
    font-size: 1rem !important;
    line-height: 1.3 !important;
  }
  main .text-xl {
    font-size: 0.9375rem !important;
  }
  main .text-lg {
    font-size: 0.8125rem !important;
  }

  /* ══════════════════════════════════════════════
     CARD APPEARANCE — compact, flat, crisp
     ══════════════════════════════════════════════ */
  main .rounded-3xl { border-radius: 0.75rem !important; }
  main .rounded-2xl { border-radius: 0.625rem !important; }

  .glass-card,
  .glass-card-dark { border-radius: 0.75rem !important; }

  /* Disable card hover lift on mobile (touch UX) */
  .glass-card:hover {
    transform: none !important;
    box-shadow: var(--shadow-card) !important;
  }

  /* ── Card internal headings inside cards ── */
  main .glass-card h4,
  main .glass-card-dark h4 {
    font-size: 0.9375rem !important;
    margin-bottom: 0.375rem !important;
  }

  /* ── Card descriptions inside cards ── */
  main .glass-card p,
  main .glass-card-dark p {
    font-size: 0.75rem !important;
    line-height: 1.5 !important;
    margin-bottom: 0.5rem !important;
  }

  /* ── Card icon boxes ── */
  main .glass-card .w-14 {
    width: 2rem !important;
    height: 2rem !important;
  }
  main .glass-card .w-14 i,
  main .glass-card .w-14 svg {
    width: 1rem !important;
    height: 1rem !important;
  }

  /* ── Checklist items inside cards ── */
  main .glass-card ul,
  main .glass-card-dark ul {
    font-size: 0.6875rem !important;
  }
  main .glass-card ul li,
  main .glass-card-dark ul li {
    gap: 0.375rem !important;
  }

  /* ── Card footer dividers ── */
  main .glass-card .mt-8,
  main .glass-card-dark .mt-8 {
    margin-top: 0.75rem !important;
  }
  main .glass-card .pt-6,
  main .glass-card-dark .pt-6 {
    padding-top: 0.5rem !important;
  }

  /* ══════════════════════════════════════════════
     COMPARISON CARDS (Problem vs Solution)
     ══════════════════════════════════════════════ */
  main .glass-card .space-y-4 > :not([hidden]) ~ :not([hidden]),
  main .glass-card-dark .space-y-4 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0.5rem !important;
  }
  main .glass-card .space-y-3 > :not([hidden]) ~ :not([hidden]),
  main .glass-card-dark .space-y-3 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0.375rem !important;
  }

  /* Check/X icons in comparison lists */
  main .w-6.h-6.rounded-full {
    width: 1.125rem !important;
    height: 1.125rem !important;
  }
  main .w-6.h-6.rounded-full i {
    width: 0.75rem !important;
    height: 0.75rem !important;
  }

  /* ══════════════════════════════════════════════
     PROCESS TIMELINE CARDS (01,02,03,04)
     ══════════════════════════════════════════════ */
  main .glass-card .w-12.h-12.rounded-full {
    width: 2rem !important;
    height: 2rem !important;
    font-size: 0.75rem !important;
  }

  /* ══════════════════════════════════════════════
     BUTTONS — slim, proportional
     ══════════════════════════════════════════════ */
  .btn-primary,
  .btn-outline {
    font-size: 0.8125rem !important;
    padding: 9px 16px !important;
    gap: 5px !important;
  }

  /* ══════════════════════════════════════════════
     TABLE: horizontal scroll on mobile
     ══════════════════════════════════════════════ */
  .overflow-x-auto {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ══════════════════════════════════════════════
     STAT COUNTERS — compact
     ══════════════════════════════════════════════ */
  .stat-counter { font-size: 1.125rem !important; }
  .hero-stat-value { font-size: 1rem !important; }

  /* ══════════════════════════════════════════════
     SERVICE PILLAR SECTIONS
     ══════════════════════════════════════════════ */
  .pillar-spec-card { display: none; }

  /* ══════════════════════════════════════════════
     MOBILE CONTACT STRIP
     ══════════════════════════════════════════════ */
  .mobile-contact-strip { display: flex !important; }

  /* ══════════════════════════════════════════════
     PAGE HERO SECTIONS — compact
     ══════════════════════════════════════════════ */
  main .hero-section-inner {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }

  /* ══════════════════════════════════════════════
     TRUST RIBBON BADGES
     ══════════════════════════════════════════════ */
  .trust-badge-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  /* ══════════════════════════════════════════════
     LEGAL PAGE TOC
     ══════════════════════════════════════════════ */
  .toc-description { display: none; }

  /* ══════════════════════════════════════════════
     SECTION HEADERS
     ══════════════════════════════════════════════ */
  main .text-center .max-w-3xl,
  main .text-center .max-w-2xl { max-width: 100%; }

  /* ══════════════════════════════════════════════
     MOBILE MENU
     ══════════════════════════════════════════════ */
  #mobile-menu .btn-primary { width: 100%; justify-content: center; }

  /* ══════════════════════════════════════════════
     FORMS — compact
     ══════════════════════════════════════════════ */
  main label { margin-bottom: 0.25rem !important; }
  main textarea { min-height: 80px; }

  /* ══════════════════════════════════════════════
     FOOTER — dramatically compact
     ══════════════════════════════════════════════ */
  footer {
    padding-top: 1.25rem !important;
    padding-bottom: 0.75rem !important;
  }
  footer .pt-16, footer .pt-10 { padding-top: 0 !important; }
  footer .pb-12, footer .pb-8 { padding-bottom: 0.5rem !important; }
  footer .pt-8 { padding-top: 0.75rem !important; }
  footer .gap-10, footer .gap-x-6, footer .gap-y-10 {
    gap: 0.75rem !important;
  }

  /* ══════════════════════════════════════════════
     CTA BANNER SECTION — tighter
     ══════════════════════════════════════════════ */
  main section .py-4 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }

  /* ══════════════════════════════════════════════
     HORIZONTAL PADDING — tighter page edges
     ══════════════════════════════════════════════ */
  main .px-4 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }

  /* ══════════════════════════════════════════════
     ICON SIZES — proportional scaling
     ══════════════════════════════════════════════ */
  main .w-7.h-7 { width: 1.25rem !important; height: 1.25rem !important; }
}

/* ================================================================
   TABLET TWEAKS (640px – 1023px)
   ================================================================ */
@media (min-width: 640px) and (max-width: 1023px) {

  main .py-28 { padding-top: 4rem; padding-bottom: 4rem; }
  main .py-20 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  main .p-12  { padding: 2rem; }
  main .p-10  { padding: 1.75rem; }

  main .text-6xl { font-size: 2.75rem !important; line-height: 1.1 !important; }
  main .text-5xl { font-size: 2.5rem !important; }

  /* ── SPACE-Y STACKS ── */
  main .space-y-28 > :not([hidden]) ~ :not([hidden]) { margin-top: 4rem; }
}

/* ================================================================
   MOBILE-SPECIFIC UTILITY CLASSES
   (hidden/shown at breakpoints for layout control)
   ================================================================ */

/* Show only on mobile */
.mobile-only   { display: none; }
@media (max-width: 639px) {
  .mobile-only { display: block; }
  .mobile-flex { display: flex !important; }
}

/* Hide on mobile, show on desktop */
.desktop-only { display: block; }
@media (max-width: 639px) {
  .desktop-only { display: none !important; }
}

/* Hide on mobile, show on sm+ */
@media (max-width: 639px) {
  .mobile-contact-strip { display: flex; }
}
@media (min-width: 640px) {
  .mobile-contact-strip { display: none; }
}
