/* PersonixHealth shared styles - index.html is design source of truth */

:root {
  --primary-color: #d63031;
  --primary-hover: #c0392b;
  --primary-light: #f8d7da;
  --secondary-color: #2c3e50;
  --accent-color: #3498db;
  --background-color: #f8f9fa;
  --text-color: #333333;
  --muted: #666;
  --card: #ffffff;
  --border: #eaeaea;
  --shadow: 0 10px 40px rgba(0,0,0,0.10);
  --radius: 14px;
  --vive-banner-height: 28px; /* sync with .top-header top */
  --header-stack-height: 102px; /* banner (28px) + header (~74px) */
  --scroll-margin-anchor: 110px; /* clear header for #hash links */

  /* Spacing scale */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 48px;
  --space-2xl: 74px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-padding-top: var(--scroll-margin-anchor); }
body {
  font-family: 'DM Sans', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: #fff;
  padding-top: var(--header-stack-height); /* reserve space for fixed header */
  overflow-x: hidden;
}
a { color: inherit; }

/* Video pause button - reusable across pages */
.hero-pause-btn {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  background: rgba(0,0,0,0.55);
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.hero-pause-btn:hover { background: rgba(0,0,0,0.75); }
.hero-pause-btn:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* Skip-to-content link - hidden until focused */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  background: var(--primary-color);
  color: white;
  padding: 12px 24px;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 20px); }

/* ViVE 2026 Banner - site-wide, fixed, entire bar clickable */
.vive-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--vive-banner-height);
  background-color: #e74c3c;
  color: white;
  box-sizing: border-box;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100; /* above header/dropdowns so hover receives events */
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.3s ease;
}
.vive-banner.is-hidden { transform: translateY(-100%); }
.vive-banner.is-hover,
.vive-banner:hover,
.vive-banner:focus {
  background-color: #922b21; /* darker burgundy shade on hover/focus */
}
.vive-banner:focus { outline: 2px solid rgba(255,255,255,0.6); outline-offset: 2px; }
.vive-banner:focus-visible { outline: 2px solid rgba(255,255,255,0.6); outline-offset: 2px; }
.vive-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-xs);
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4px 20px;
  box-sizing: border-box;
}
.vive-banner .vive-banner-left,
.vive-banner .vive-banner-right {
  margin: 0;
  font-size: clamp(0.7rem, 1.5vw, 0.85rem);
}
.vive-banner .vive-banner-left { font-weight: 600; }
.vive-banner .vive-banner-right { font-weight: 700; }

/* Breadcrumb */
.breadcrumb-wrap {
  padding: 6px 0;
}
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-color);
  list-style: none;
  margin: 0;
  padding: 0;
}
.breadcrumb li { display: flex; align-items: center; gap: 6px; }
.breadcrumb li:not(:last-child)::after { content: '\203a'; color: #767676; font-weight: 700; }
.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb a:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; border-radius: 3px; }
.breadcrumb [aria-current="page"] { color: var(--muted); font-weight: 600; }

#contact { scroll-margin-top: var(--scroll-margin-anchor); }

/* Header - fixed below banner, never scrolls */
.top-header {
  background: white;
  padding: 14px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: fixed;
  top: var(--vive-banner-height);
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  transition: top 0.3s ease, transform 0.3s ease;
}
.top-header.is-hidden { transform: translateY(calc(-100% - var(--vive-banner-height))); }
.top-header-container {
  width: 100%;
  padding-left: 20px;
  padding-right: max(20px, calc((100% - 1200px) / 2 + 20px));
}
.top-header-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo-link { display: flex; align-items: center; flex-shrink: 0; }
.logo {
  height: clamp(32px, 4vw, 48px);
  width: auto;
}

/* Navigation */
.nav-main { display: flex; align-items: center; gap: 0; }
.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  justify-content: flex-start;
}
.nav-item { position: relative; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.2s ease;
}
.nav-link:hover,
.nav-item:hover > .nav-link,
.nav-item.is-keyboard-open > .nav-link,
.nav-item.is-expanded > .nav-link { color: var(--primary-color); }
.nav-link:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; border-radius: 4px; }
.nav-link-chevron { width: 12px; height: 12px; opacity: 0.7; }

/* Dropdowns */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 580px;
  max-width: calc(100vw - 20px);
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  padding: 31px 0;
  margin-top: 4px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1050; /* between header (1000) and banner (1100) */
  list-style: none;
  margin: 0;
}
@media (min-width: 1025px) {
  .nav-item:hover .dropdown-menu,
  .nav-item.is-keyboard-open .dropdown-menu { opacity: 1; visibility: visible; }
}
.dropdown-menu-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 31px;
  padding: 0 31px;
}
.dropdown-column h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary-color);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid #eee;
}
.dropdown-column ul { list-style: none; margin: 0; padding: 0; }
.dropdown-column li { margin-bottom: 4px; }
.dropdown-item {
  display: block;
  padding: 10px 0;
  min-height: 44px;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.dropdown-item:hover { color: var(--primary-color); }
.dropdown-item:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; border-radius: 3px; }

.dropdown-menu--company { min-width: 468px; }
.dropdown-menu--company .dropdown-menu-inner {
  grid-template-columns: 1fr;
  padding: 21px 26px 26px;
}
.dropdown-menu--company .dropdown-bubble {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 26px;
  margin-bottom: 4px;
}
.dropdown-menu--company .dropdown-bubble .dropdown-bubble-title { margin-bottom: 1px; }

.dropdown-bubble {
  display: block;
  padding: 11px 26px;
  min-height: 44px;
  color: var(--text-color);
  text-decoration: none;
  background: #f8f9fa;
  border-radius: 10px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 5px;
}
.dropdown-bubble:hover {
  background: #eee;
  box-shadow: inset 0 0 0 1px rgba(231, 76, 60, 0.2);
}
.dropdown-bubble:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
.dropdown-bubble-title { font-weight: 700; font-size: 0.95rem; display: block; margin-bottom: 1px; }
.dropdown-bubble-desc { font-size: 0.8rem; color: #666; font-weight: 400; line-height: 1.25; padding: 0; margin: 0; display: block; }
.dropdown-bubble--disabled {
  pointer-events: none;
  opacity: 0.45;
  cursor: default;
}
.dropdown-bubble--header .dropdown-bubble-title { margin-bottom: 0; }
.dropdown-bubble--header .dropdown-bubble-desc { display: none; }
.dropdown-separator { height: 1px; background: #ddd; margin: var(--space-sm) 0; }
.dropdown-bubble-table .dropdown-bubble:last-child { margin-bottom: 0; }

/* Platform, Solutions & Resources - wide dropdowns */
.dropdown-menu--platform,
.dropdown-menu--solutions,
.dropdown-menu--resources { min-width: 1019px; }
.dropdown-menu--platform .dropdown-menu-inner,
.dropdown-menu--solutions .dropdown-menu-inner,
.dropdown-menu--resources .dropdown-menu-inner {
  grid-template-columns: 1fr 1fr;
  padding: 21px 26px 26px;
}
.dropdown-menu--platform .dropdown-bubble,
.dropdown-menu--solutions .dropdown-bubble,
.dropdown-menu--resources .dropdown-bubble {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 26px;
  margin-bottom: 4px;
}
.dropdown-menu--platform .dropdown-bubble .dropdown-bubble-title,
.dropdown-menu--solutions .dropdown-bubble .dropdown-bubble-title,
.dropdown-menu--resources .dropdown-bubble .dropdown-bubble-title { margin-bottom: 1px; }

/* Nav toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text-color);
  line-height: 1;
  min-height: 44px;
  min-width: 44px;
}
.nav-toggle:focus { outline: 2px solid var(--primary-color); }
.nav-toggle:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }

/* Shared hero (about, leadership, subpages) */
.hero {
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  padding: 72px 0 54px;
}

/* Shared kicker pill (used in hero, solutions, resources) */
.kicker {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary-color);
  background: #f3f4f6;
  padding: var(--space-xs) var(--space-sm);
  border-radius: 999px;
  margin-bottom: 14px;
}

/* Fluid typography */
.hero h1 { font-family: 'DM Sans', sans-serif; font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.15; margin-bottom: 14px; }
.hero p { font-size: clamp(1rem, 2.5vw, 1.15rem); color: #444; max-width: 58ch; }

/* Section (about, leadership) */
.section { padding: clamp(48px, 8vw, 74px) 0; }
.section.alt { background: var(--background-color); }
.section h2 { font-family: 'DM Sans', sans-serif; font-size: clamp(1.5rem, 4vw, 2.1rem); margin-bottom: var(--space-md); line-height: 1.2; }
.section .lead { font-size: clamp(0.95rem, 2vw, 1.08rem); color: #444; max-width: 78ch; margin-bottom: 26px; }

/* Shared ghost button (solutions, about) */
.btn-ghost {
  background: white;
  border: 1px solid #e7e7e7;
  color: var(--text-color);
}
.btn-ghost:hover { border-color: rgba(231,76,60,0.35); }
.btn-ghost:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s ease;
  min-height: 44px;
}
.btn:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.btn-primary { background: var(--primary-color); color: white; }
.btn-primary:hover { background: var(--primary-hover); }

/* Shared CTA band (solutions, resources) */
.cta-band {
  background: var(--primary-color);
  color: white;
  padding: clamp(40px, 8vw, 64px) 24px;
  text-align: center;
}
.cta-band h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: var(--space-lg);
  color: white;
}
.cta-band .btn-primary {
  background: white;
  color: var(--primary-color);
  min-height: 48px;
  padding: 14px 28px;
}
.cta-band .btn-primary:hover { background: #f0f0f0; }

/* Section CTA (centered button block at end of sections) */
.section-cta {
  margin-top: 40px;
  text-align: center;
}

/* Footer */
.footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 30px 0;
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.footer-nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s;
}
.footer-nav a:hover { color: white; }
.footer-nav a:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
  border-radius: 3px;
}

/* ==================== RESPONSIVE ==================== */

/* Mobile / Tablet — hamburger kicks in at 1024px */
@media (max-width: 1024px) {
  :root {
    --vive-banner-height: 44px; /* taller when banner wraps */
    --header-stack-height: 104px; /* banner (44px) + header (~60px at 768px) */
  }
  .vive-banner-inner { flex-direction: column; text-align: center; gap: 0; padding: 4px 16px; }
  .vive-banner .vive-banner-left,
  .vive-banner .vive-banner-right { font-size: 0.75rem; }

  .top-header { padding: 8px 0; }
  .logo { height: clamp(28px, 8vw, 40px); }
  .nav-main { flex-direction: column; align-items: flex-end; position: relative; }
  .nav-list {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: calc(100vw - 40px);
    max-width: 400px;
  }
  .nav-list.is-open {
    display: flex;
    flex-direction: column;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    margin-top: var(--space-md);
    overflow: hidden;
  }
  .nav-item { border-bottom: 1px solid #eee; }
  .nav-item:last-child { border-bottom: none; }
  .nav-link { padding: 16px 20px; min-height: 44px; }
  .dropdown-menu {
    position: static;
    transform: none;
    min-width: auto;
    box-shadow: none;
    padding: 0;
    margin: 0;
    opacity: 1;
    visibility: hidden;
    background: #f8f9fa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, visibility 0s 0.3s;
  }
  .nav-item.is-expanded .dropdown-menu { max-height: 500px; visibility: visible; transition: max-height 0.3s ease, visibility 0s 0s; }
  .nav-item.is-expanded .dropdown-menu--platform,
  .nav-item.is-expanded .dropdown-menu--solutions,
  .nav-item.is-expanded .dropdown-menu--resources,
  .nav-item.is-expanded .dropdown-menu--company { max-height: 800px; }
  .dropdown-menu-inner {
    grid-template-columns: 1fr;
    padding: 12px 20px 16px;
    gap: 16px;
  }
  .dropdown-column h4 { margin-bottom: var(--space-xs); }
  .nav-toggle { display: block; }
}

/* Small phones — after 768px so these overrides take effect */
@media (max-width: 640px) {
  .vive-banner .vive-banner-left,
  .vive-banner .vive-banner-right { font-size: 0.7rem; }
  .sol-visual-frame { min-height: 180px; }
}

/* Small desktop — constrain dropdowns */
@media (min-width: 1025px) and (max-width: 1200px) {
  .dropdown-menu--platform,
  .dropdown-menu--solutions,
  .dropdown-menu--resources { min-width: min(700px, calc(100vw - 40px)); }
}

/* Large desktop */
@media (min-width: 1440px) {
  .container { max-width: 1320px; }
  .top-header-container { padding-right: max(20px, calc((100% - 1320px) / 2 + 20px)); }
}

/* Reduced motion - WCAG 2.1 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
