/* ==========================================================================
   UhAI Intelligence — Components
   ========================================================================== */

/* ---------------------------------------------------------------------- */
/* Buttons                                                                  */
/* ---------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: 0.01em;
  padding: 0.95rem 1.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: transform var(--dur-base) var(--ease-out-quart), box-shadow var(--dur-base) var(--ease-out-quart), background var(--dur-base), color var(--dur-base), border-color var(--dur-base);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); }

.btn-primary {
  position: relative;
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 12px 30px -10px rgba(30,136,229,0.55);
  overflow: hidden;
}
.btn-primary::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.35) 48%, transparent 66%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease-out-quart);
}
.btn-primary:hover {
  box-shadow: 0 18px 44px -8px rgba(30,136,229,0.65), 0 0 0 5px rgba(30,136,229,0.12);
  color: #fff;
}
.btn-primary:hover::before { transform: translateX(120%); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}
.btn-outline:hover { border-color: var(--color-sky-500); color: var(--color-sky-600); background: var(--bg-soft-blue); }

.btn-ghost-light {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: rgba(255,255,255,0.25);
  backdrop-filter: blur(6px);
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.16); color: #fff; }

.btn-white {
  background: #fff;
  color: var(--color-navy-900);
}
.btn-white:hover { color: var(--color-navy-900); box-shadow: 0 18px 40px -10px rgba(0,0,0,0.35); }

.btn-sm { padding: 0.6rem 1.2rem; font-size: var(--fs-xs); }
.btn-lg { padding: 1.1rem 2.1rem; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-icon-circle {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-soft-blue); border: 1px solid var(--border-glass);
  color: var(--color-navy-900);
  transition: all var(--dur-base) var(--ease-out-quart);
}
.btn-icon-circle:hover { background: var(--gradient-accent); color: #fff; transform: translateY(-3px); }

/* ---------------------------------------------------------------------- */
/* Site Header / Navigation                                                 */
/* ---------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.35rem 0;
  background: rgba(255,255,255,0.4);
  transition: all var(--dur-base) var(--ease-out-quart);
}
:root[data-theme="dark"] .site-header { background: rgba(7,11,20,0.3); }
.site-header.is-scrolled {
  padding: 0.65rem 0;
  background: var(--nav-bg);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
}
.brand-mark { width: 42px; height: 42px; flex: none; }
.brand-lockup { height: 44px; width: auto; }
.brand-name { line-height: 1.1; }
.brand-name small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--color-green-500); }

.main-nav { display: flex; align-items: center; gap: 0.25rem; }
.main-nav > ul { display: flex; align-items: center; gap: 0.2rem; }
.nav-link {
  position: relative;
  display: flex; align-items: center; gap: 0.3rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.92rem; font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--dur-fast) ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 1rem; right: 1rem; bottom: 0.35rem;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out-quart);
}
.nav-link:hover, .nav-link.is-active { color: var(--color-sky-600); background: var(--bg-soft-blue); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-link .chev { width: 14px; height: 14px; transition: transform var(--dur-fast); }
.has-mega:hover .chev, .has-mega:focus-within .chev { transform: rotate(180deg); }

.nav-actions { display: flex; align-items: center; gap: 0.6rem; position: relative; z-index: 1002; }

.search-toggle, .nav-burger {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: var(--bg-surface);
  color: var(--text-primary);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--dur-fast);
}
.search-toggle:hover { background: var(--gradient-accent); color: #fff; border-color: transparent; box-shadow: 0 6px 18px -4px rgba(30,136,229,0.5); }

.nav-burger { display: none; flex-direction: column; gap: 4px; }
.nav-burger span { width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: all var(--dur-fast); }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* When the mobile drawer is open, action buttons sit above a light panel —
   force the "scrolled" (solid, dark-icon) look regardless of scroll position. */
.site-header.menu-open .nav-burger,
.site-header.menu-open .search-toggle {
  background: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--text-primary);
}

/* Mega menu */
.has-mega { position: relative; }
.mega-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translate(-50%, 8px);
  width: min(760px, 92vw);
  background: var(--bg-elevated);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-base) var(--ease-out-quart), transform var(--dur-base) var(--ease-out-quart), visibility var(--dur-base);
  z-index: 50;
}
/* Desktop-only: the mega-menu reveals on hover/focus here. Scoped to match
   the >1080px breakpoint below — on mobile this rule's higher specificity
   (two classes + a pseudo-class) would otherwise beat the mobile
   .mega-menu's `transform: none`, since tapping the trigger `<a>` still
   moves keyboard focus to it (preventDefault on click stops navigation,
   not focus), triggering :focus-within. The leftover `translate(-50%, 0)`
   then shifts the whole (now full-width, position:static) mobile submenu
   left by half its own width, shoving most of its content off-panel —
   exactly the garbled/clipped mobile menu this comment is preventing. */
@media (min-width: 1081px) {
  .has-mega:hover .mega-menu,
  .has-mega:focus-within .mega-menu {
    opacity: 1; visibility: visible; transform: translate(-50%, 0);
  }
}
.mega-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.35rem 1.5rem; }
.mega-item {
  display: flex; gap: 0.85rem; align-items: flex-start;
  padding: 0.75rem; border-radius: var(--radius-md);
  transition: background var(--dur-fast);
}
.mega-item:hover { background: var(--bg-soft-blue); }
.mega-item .mega-icon {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-accent); color: #fff;
}
.mega-item .mega-icon svg { width: 20px; height: 20px; }
.mega-item h4 { font-size: 0.95rem; margin: 0 0 0.15rem; }
.mega-item p { font-size: 0.8rem; margin: 0; color: var(--text-muted); }
.mega-foot {
  margin-top: 0.75rem; padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem;
}

@media (max-width: 1080px) {
  .main-nav { position: fixed; inset: 0 0 0 auto; width: min(380px, 86vw); height: 100vh;
    background: var(--bg-elevated); flex-direction: column; align-items: stretch;
    padding: 6rem 1.5rem 2rem; transform: translateX(100%); transition: transform var(--dur-slow) var(--ease-out-expo);
    overflow-y: auto; box-shadow: var(--shadow-xl);
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0.25rem; }
  .nav-link { color: var(--text-primary) !important; background: transparent !important; padding: 0.85rem 1rem; }
  .site-header:not(.is-scrolled) .nav-link { color: var(--text-primary); }
  .mega-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding: 0.5rem 0 0.5rem 1rem; display: none; width: auto; }
  .has-mega.is-expanded .mega-menu { display: block; }
  .mega-grid { grid-template-columns: 1fr; }
  .nav-burger { display: inline-flex; }
  .nav-overlay { position: fixed; inset: 0; background: rgba(5,10,20,0.55); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: all var(--dur-base); z-index: 999; }
  .nav-overlay.is-visible { opacity: 1; visibility: visible; }
}

/* ---------------------------------------------------------------------- */
/* Search overlay                                                          */
/* ---------------------------------------------------------------------- */
.search-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(5, 10, 20, 0.72);
  backdrop-filter: blur(10px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 8vh 1.5rem;
  opacity: 0; visibility: hidden;
  transition: all var(--dur-base) var(--ease-out-quart);
}
.search-overlay.is-open { opacity: 1; visibility: visible; }
.search-box {
  width: min(640px, 100%);
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--space-md);
  transform: translateY(-20px);
  transition: transform var(--dur-base) var(--ease-out-expo);
}
.search-overlay.is-open .search-box { transform: translateY(0); }
.search-box form { display: flex; align-items: center; gap: 0.75rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.85rem; }
.search-box input { flex: 1; border: none; background: transparent; font-size: 1.15rem; font-family: var(--font-display); color: var(--text-primary); outline: none; }
.search-box .search-hint { margin-top: 0.9rem; font-size: 0.8rem; color: var(--text-muted); }
.search-results { margin-top: 0.75rem; max-height: 40vh; overflow-y: auto; }
.search-results a { display: block; padding: 0.65rem 0.5rem; border-radius: var(--radius-sm); font-size: 0.92rem; }
.search-results a:hover { background: var(--bg-soft-blue); }
.search-close { border: none; background: var(--bg-surface-alt); width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }

/* ---------------------------------------------------------------------- */
/* Cards                                                                    */
/* ---------------------------------------------------------------------- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: transform var(--dur-base) var(--ease-out-quart), box-shadow var(--dur-base) var(--ease-out-quart), border-color var(--dur-base);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), 0 0 32px -12px rgba(30,136,229,0.22);
  border-color: rgba(30,136,229,0.18);
}

.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
}

/* Cards placed on a fixed dark-navy backdrop (independent of the global
   light/dark theme) need a dark glass treatment, not the theme-driven one. */
.bg-navy .card-glass {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

/* Soft-tint icon badges — premium "health app" look. Default state stays
   calm and gradient-free; a colored gradient + glow only appears on
   hover/interaction, so motion (not paint) carries the premium feel. */
.icon-tile {
  width: 56px; height: 56px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tint-sky);
  color: var(--tint-sky-icon);
  border: 1px solid rgba(30,136,229,0.14);
  margin-bottom: var(--space-sm);
  box-shadow: 0 1px 2px rgba(16,24,40,0.05);
  transition: background var(--dur-base) var(--ease-out-quart), color var(--dur-base) var(--ease-out-quart), box-shadow var(--dur-base) var(--ease-out-quart), transform var(--dur-base) var(--ease-out-quart);
}
.icon-tile i { font-size: 1.5rem; line-height: 1; }
.icon-tile svg { width: 26px; height: 26px; }
.icon-tile.green { background: var(--tint-green); color: var(--tint-green-icon); border-color: rgba(32,166,90,0.16); }
.icon-tile.navy { background: var(--tint-navy); color: var(--tint-navy-icon); border-color: rgba(7,26,61,0.12); }
.icon-tile.outline { background: var(--bg-soft-blue); color: var(--color-sky-600); box-shadow: none; border-color: rgba(30,136,229,0.25); }

.card:hover .icon-tile,
.icon-tile:hover {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 14px 30px -10px rgba(30,136,229,0.45), 0 0 0 6px rgba(30,136,229,0.1);
  transform: translateY(-3px) scale(1.05) rotate(-3deg);
}
.card:hover .icon-tile.green,
.icon-tile.green:hover {
  background: var(--gradient-green);
  box-shadow: 0 14px 30px -10px rgba(32,166,90,0.45), 0 0 0 6px rgba(32,166,90,0.1);
}
.card:hover .icon-tile.navy,
.icon-tile.navy:hover {
  background: var(--gradient-primary);
  box-shadow: 0 14px 30px -10px rgba(7,26,61,0.4), 0 0 0 6px rgba(7,26,61,0.08);
}

.feature-card h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.feature-card p { font-size: 0.92rem; margin-bottom: 0; }

.stat-card {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
}
.stat-number {
  font-family: var(--font-mono);
  font-size: clamp(2.1rem, 3vw, 2.85rem);
  font-weight: 600;
  background: var(--gradient-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  display: block;
  line-height: 1;
}
.stat-label { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.5rem; letter-spacing: 0.03em; text-transform: uppercase; }

/* ---------------------------------------------------------------------- */
/* Badges / pills / tags                                                   */
/* ---------------------------------------------------------------------- */
.tag {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.76rem; font-weight: 600;
  background: var(--bg-soft-blue); color: var(--color-sky-700);
  border: 1px solid var(--border-glass);
}
.tag.green { background: rgba(32,166,90,0.1); color: var(--color-green-700); }
.tag.navy { background: rgba(7,26,61,0.08); color: var(--color-navy-900); }
:root[data-theme="dark"] .tag.navy { background: rgba(255,255,255,0.08); color: #fff; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-green-500); box-shadow: 0 0 8px rgba(32,166,90,0.7); }

/* ---------------------------------------------------------------------- */
/* Forms                                                                    */
/* ---------------------------------------------------------------------- */
.form-field { margin-bottom: var(--space-md); }
.form-field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.45rem; color: var(--text-primary); }
.form-control {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-surface-alt);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.form-control:focus { outline: none; border-color: var(--color-sky-500); box-shadow: 0 0 0 4px rgba(30,136,229,0.14); }
textarea.form-control { resize: vertical; min-height: 140px; }
.form-check { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.85rem; color: var(--text-muted); }
.form-check input { margin-top: 0.2rem; }

.newsletter-form { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.newsletter-form input { flex: 1 1 220px; }
/* The footer's newsletter form sets its inputs to a near-transparent white
   background (see includes/footer.php) with white input text — but leaves
   the placeholder color at the browser default, which is a mid-gray meant
   for light backgrounds and is nearly unreadable against dark navy. Scoped
   to .site-footer specifically: news.php's copy of this same .newsletter-form
   sits on a light background and its default (dark-ish) placeholder color
   is already correct there, so this must not apply site-wide. */
.site-footer .newsletter-form input::placeholder { color: rgba(255,255,255,0.55); opacity: 1; }

/* ---------------------------------------------------------------------- */
/* Footer                                                                   */
/* ---------------------------------------------------------------------- */
.site-footer {
  background: var(--color-navy-950);
  color: rgba(255,255,255,0.72);
  padding-top: var(--space-2xl);
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: ""; position: absolute; inset: 0;
  background: var(--gradient-hero-dark); opacity: 0.6; pointer-events: none;
}
.site-footer .container-xl { position: relative; z-index: 1; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr; gap: var(--space-lg); padding-bottom: var(--space-xl); border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.9rem; max-width: 300px; }
.footer-motto { font-family: var(--font-display); color: var(--color-green-400); font-weight: 600; letter-spacing: 0.04em; margin-top: 0.75rem; }
.footer-col h5 { color: #fff; font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { color: rgba(255,255,255,0.65); font-size: 0.9rem; transition: color var(--dur-fast); }
.footer-col a:hover { color: var(--color-sky-400); }
.footer-social { display: flex; gap: 0.6rem; margin-top: 1rem; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.18); display: flex; align-items: center; justify-content: center; }
.footer-social a:hover { background: var(--gradient-accent); border-color: transparent; }
.footer-social svg { width: 16px; height: 16px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: var(--space-md) 0; flex-wrap: wrap; gap: 0.75rem; font-size: 0.82rem; color: rgba(255,255,255,0.5); }
.footer-bottom a { color: rgba(255,255,255,0.6); }
.footer-bottom a:hover { color: #fff; }
.footer-legal { display: flex; gap: 1.25rem; flex-wrap: wrap; }

@media (max-width: 992px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------- */
/* Breadcrumb / page header                                                */
/* ---------------------------------------------------------------------- */
.page-hero {
  background: var(--gradient-hero-light);
  color: var(--text-primary);
  padding: calc(var(--header-height) + 4rem) 0 var(--space-2xl);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}
:root[data-theme="dark"] .page-hero { background: var(--bg-body); }
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.breadcrumb a:hover { color: var(--color-sky-600); }
.page-hero h1 { color: var(--text-primary); max-width: 780px; font-family: var(--font-serif); font-weight: 500; }
.page-hero .lead { color: var(--text-secondary); max-width: 640px; }

/* ---------------------------------------------------------------------- */
/* Timeline                                                                 */
/* ---------------------------------------------------------------------- */
.timeline { position: relative; margin-left: 1rem; padding-left: 2.25rem; border-left: 2px solid var(--border-color); }
.timeline-item { position: relative; padding-bottom: var(--space-lg); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -2.5rem; top: 0.25rem;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gradient-accent);
  box-shadow: 0 0 0 5px var(--bg-body), 0 0 0 6px var(--border-color);
}
.timeline-year { font-family: var(--font-mono); color: var(--color-sky-600); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.3rem; }

/* ---------------------------------------------------------------------- */
/* Testimonials                                                             */
/* ---------------------------------------------------------------------- */
.testimonial-card { padding: var(--space-lg); }
.testimonial-quote { font-size: 1.15rem; color: var(--text-primary); font-family: var(--font-serif); font-weight: 500; line-height: 1.5; }
.testimonial-person { display: flex; align-items: center; gap: 0.85rem; margin-top: var(--space-md); }
.avatar-circle { width: 48px; height: 48px; border-radius: 50%; background: var(--gradient-primary); display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--font-display); font-weight: 700; }
.testimonial-person h5 { margin: 0; font-size: 0.95rem; }
.testimonial-person span { font-size: 0.8rem; color: var(--text-muted); }

/* ---------------------------------------------------------------------- */
/* Tabs / pills nav (services, products sub-nav)                           */
/* ---------------------------------------------------------------------- */
.pill-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pill-tabs button {
  padding: 0.6rem 1.2rem; border-radius: var(--radius-pill);
  border: 1px solid var(--border-color); background: var(--bg-surface);
  color: var(--text-secondary); font-weight: 600; font-size: 0.88rem;
  transition: all var(--dur-fast);
}
.pill-tabs button.is-active, .pill-tabs button:hover { background: var(--gradient-accent); color: #fff; border-color: transparent; }

/* ---------------------------------------------------------------------- */
/* Table of contents / anchor nav for long pages                           */
/* ---------------------------------------------------------------------- */
.anchor-nav { position: sticky; top: calc(var(--header-height) + 1rem); display: flex; flex-direction: column; gap: 0.3rem; }
.anchor-nav a { padding: 0.55rem 0.9rem; border-radius: var(--radius-sm); font-size: 0.88rem; color: var(--text-muted); border-left: 2px solid transparent; }
.anchor-nav a:hover, .anchor-nav a.is-active { color: var(--color-sky-600); border-left-color: var(--color-sky-500); background: var(--bg-soft-blue); }

/* ---------------------------------------------------------------------- */
/* 404                                                                      */
/* ---------------------------------------------------------------------- */
.error-page { min-height: 100svh; display: flex; align-items: center; }
.error-code { font-family: var(--font-display); font-size: clamp(6rem, 18vw, 12rem); font-weight: 700; line-height: 0.9; background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------------------------------------------------------------- */
/* Panel — light, premium replacement for full-bleed dark sections.        */
/* A soft off-white surface with a subtle glowing gradient outline,        */
/* used for the one "signature" moment per page instead of a navy block.   */
/* ---------------------------------------------------------------------- */
.panel-soft {
  background: linear-gradient(180deg, var(--bg-surface-alt) 0%, var(--bg-surface) 100%);
  border: 1px solid var(--border-color);
  position: relative;
}
.panel-soft::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: var(--gradient-border);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  pointer-events: none;
}

/* ---------------------------------------------------------------------- */
/* Floating shapes (hero decoration)                                       */
/* ---------------------------------------------------------------------- */
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
}
/* Softer glow for light backgrounds — a wash of color, not a solid splotch */
.blob-soft { opacity: 0.22; filter: blur(80px); }
:root[data-theme="dark"] .blob-soft { opacity: 0.3; }

/* ---------------------------------------------------------------------- */
/* Product mockups — device frames built entirely with CSS (no images)     */
/* ---------------------------------------------------------------------- */
.device-frame {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.device-frame-bar {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.85rem 1.1rem;
  background: var(--bg-surface-alt);
  border-bottom: 1px solid var(--border-color);
}
.device-frame-bar span:nth-child(-n+3) { width: 10px; height: 10px; border-radius: 50%; background: var(--border-color); flex: none; }
.device-frame-bar span:nth-child(1) { background: #f5605c; }
.device-frame-bar span:nth-child(2) { background: #f5bd4f; }
.device-frame-bar span:nth-child(3) { background: #34c749; }
.device-frame-bar span:nth-child(4) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device-frame-body { padding: 1.5rem; }

.ui-row { display: flex; gap: 1rem; }
.ui-col { flex: 1; }
.ui-bar { height: 12px; border-radius: 6px; background: var(--bg-surface-alt); margin-bottom: 0.6rem; }
.ui-bar.w-60 { width: 60%; } .ui-bar.w-40 { width: 40%; } .ui-bar.w-80 { width: 80%; } .ui-bar.w-100 { width: 100%; }
.ui-bar.accent { background: var(--gradient-accent); }
.ui-bar.green { background: var(--gradient-green); }
/* .ui-bar's plain (non-gradient) state matches --bg-surface-alt, the same
   token .ui-stat/.ui-block use for their own background — invisible when
   nested. A theme-relative overlay keeps it visible regardless of what's
   behind it. */
.ui-bar:not(.accent):not(.green) { background: rgba(7,26,61,0.08); }
:root[data-theme="dark"] .ui-bar:not(.accent):not(.green) { background: rgba(255,255,255,0.1); }
.ui-block { border-radius: var(--radius-sm); background: var(--bg-surface-alt); padding: 1rem; }
.ui-stat { display: flex; align-items: center; gap: 0.65rem; padding: 0.75rem; border-radius: var(--radius-sm); background: var(--bg-surface-alt); margin-bottom: 0.6rem; }
.ui-stat .dot { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--gradient-accent); color: #fff; flex: none; }
.ui-pill-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.ui-pill { padding: 0.35rem 0.85rem; border-radius: var(--radius-pill); background: var(--bg-surface-alt); font-size: 0.72rem; font-weight: 600; color: var(--text-muted); }
.ui-pill.is-active { background: var(--gradient-accent); color: #fff; }

/* Chat mockup (Clara AI) */
.chat-frame { display: flex; flex-direction: column; gap: 0.75rem; }
.chat-bubble { max-width: 78%; padding: 0.75rem 1rem; border-radius: var(--radius-md); font-size: 0.85rem; line-height: 1.5; }
.chat-bubble.bot { align-self: flex-start; background: var(--bg-surface-alt); border-bottom-left-radius: 4px; }
.chat-bubble.user { align-self: flex-end; background: var(--gradient-accent); color: #fff; border-bottom-right-radius: 4px; }
.chat-typing { display: inline-flex; gap: 4px; align-self: flex-start; padding: 0.75rem 1rem; background: var(--bg-surface-alt); border-radius: var(--radius-md); border-bottom-left-radius: 4px; }
.chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); animation: float-y 1.2s ease-in-out infinite; }
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }

/* Scan / imaging mockup (PneumoScan) */
.scan-frame { position: relative; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 4/3; background: radial-gradient(ellipse at center, #1a2436 0%, #060a12 75%); box-shadow: var(--shadow-xl), 0 0 60px -10px rgba(30,136,229,0.3); }
.scan-frame .scan-lung {
  position: absolute; inset: 12% 20%;
  border: 2px solid rgba(140, 200, 242, 0.5);
  border-radius: 45% 45% 40% 40% / 55% 55% 45% 45%;
}
.scan-frame .scan-heatmap {
  position: absolute; width: 46%; height: 40%; border-radius: 50%;
  background: radial-gradient(circle, rgba(229,72,77,0.85) 0%, rgba(245,165,36,0.55) 45%, transparent 75%);
  mix-blend-mode: screen;
  animation: pulse-glow 2.6s ease-in-out infinite;
}
.scan-frame .scan-box {
  position: absolute; border: 1.5px dashed var(--color-green-400);
  border-radius: 8px;
}
.scan-frame .scan-scanline {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(30,136,229,0.9), transparent);
  animation: scanline 3s linear infinite;
}
@keyframes scanline { 0% { top: 8%; } 100% { top: 92%; } }
