/*
 * Enmuse Health - Nationwide Psychoeducational Engine
 * Design Tokens & Responsive Stylesheet
 * Strict 0 CLS, High Contrast, Accessible WCAG AA
 */

:root {
  --navy-900: #0F172A;
  --navy-800: #1E293B;
  --navy-700: #334155;
  --teal-600: #0D9488;
  --teal-700: #0F766E;
  --teal-800: #115E59;
  --teal-50: #F0FDFA;
  --teal-100: #CCFBF1;
  --slate-50: #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-600: #475569;
  --slate-800: #1E293B;
  --amber-500: #F59E0B;
  --amber-50: #FFFBEB;
  --amber-900: #78350F;
  --white: #FFFFFF;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, Cambria, "Times New Roman", Times, serif;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--slate-50);
  color: var(--navy-800);
  line-height: 1.65;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--teal-600);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--teal-700);
  text-decoration: underline;
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--teal-600);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Announcement Banner */
.top-bar {
  background-color: var(--navy-900);
  color: var(--slate-300);
  font-size: 0.84rem;
  padding: 8px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.top-bar strong {
  color: var(--teal-100);
}

/* Navigation Header */
.site-nav {
  background: var(--white);
  border-bottom: 1px solid var(--slate-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
}

.brand-text-col {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teal-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--navy-700);
  font-size: 0.92rem;
  font-weight: 600;
}

.nav-links a:hover {
  color: var(--teal-600);
  text-decoration: none;
}

.clinic-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid var(--teal-100);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.clinic-pill-btn:hover {
  background-color: var(--teal-100);
  color: var(--teal-800);
  text-decoration: none;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-teal {
  background-color: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid var(--teal-100);
}

.badge-amber {
  background-color: var(--amber-50);
  color: var(--amber-900);
  border: 1px solid #FDE68A;
}

/* Primary Hero */
.hero-section {
  padding: 64px 0 48px;
  background: linear-gradient(180deg, var(--white) 0%, var(--slate-50) 100%);
  border-bottom: 1px solid var(--slate-200);
}

.hero-content {
  text-align: center;
  max-width: 840px;
  margin: 0 auto;
}

.hero-headline {
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 16px 0;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--navy-700);
  line-height: 1.6;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.author-pill-bar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background-color: var(--white);
  border: 1px solid var(--slate-200);
  padding: 6px 16px 6px 6px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  margin-top: 28px;
}

.author-pill-img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.author-pill-text {
  font-size: 0.85rem;
  color: var(--navy-800);
  font-weight: 600;
  text-align: left;
}

.author-pill-text span {
  display: block;
  font-size: 0.75rem;
  color: var(--slate-600);
  font-weight: 400;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
  line-height: 1.2;
}

.btn-primary {
  background-color: var(--teal-600);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.btn-primary:hover {
  background-color: var(--teal-700);
  color: var(--white);
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--navy-800);
  border: 1px solid var(--slate-300);
}

.btn-secondary:hover {
  background-color: var(--slate-100);
  color: var(--navy-900);
  text-decoration: none;
}

/* Section Containers */
.section {
  padding: 64px 0;
}

.section-alt {
  background-color: var(--white);
  border-top: 1px solid var(--slate-200);
  border-bottom: 1px solid var(--slate-200);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.02em;
  margin-top: 10px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--navy-700);
  margin-top: 12px;
}

/* Product Cards Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
  border-color: var(--teal-100);
}

.product-card-top {
  margin-bottom: 24px;
}

.product-card-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--navy-900);
  margin: 14px 0 10px;
  line-height: 1.3;
}

.product-card-subtitle {
  font-size: 0.95rem;
  color: var(--slate-600);
  line-height: 1.55;
  margin-bottom: 20px;
}

.module-checklist {
  list-style: none;
  margin: 20px 0;
  border-top: 1px solid var(--slate-100);
  padding-top: 16px;
}

.module-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--navy-700);
  margin-bottom: 12px;
  line-height: 1.45;
}

.module-checklist li svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--teal-600);
  margin-top: 2px;
}

.product-card-bottom {
  border-top: 1px solid var(--slate-200);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pricing-preview {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.pricing-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--teal-700);
}

.pricing-tier {
  font-size: 0.85rem;
  color: var(--slate-600);
}

/* Authority / About Section */
.authority-box {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: center;
}

.authority-img-col {
  text-align: center;
}

.authority-headshot {
  width: 220px;
  height: 220px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  margin: 0 auto 16px;
  box-shadow: var(--shadow-md);
  border: 3px solid var(--white);
}

.authority-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy-900);
}

.authority-creds {
  font-size: 0.85rem;
  color: var(--teal-600);
  font-weight: 700;
}

.authority-body h3 {
  font-size: 1.6rem;
  color: var(--navy-900);
  margin-bottom: 16px;
  font-weight: 800;
}

.authority-body p {
  color: var(--navy-700);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.authority-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.pillar-item {
  background: var(--slate-50);
  padding: 16px;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--teal-600);
}

.pillar-item strong {
  display: block;
  font-size: 0.9rem;
  color: var(--navy-900);
  margin-bottom: 4px;
}

.pillar-item span {
  font-size: 0.82rem;
  color: var(--slate-600);
}

/* Article Cards */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.article-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--teal-600);
}

.article-meta {
  font-size: 0.78rem;
  color: var(--slate-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.article-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.35;
  margin-bottom: 12px;
}

.article-summary {
  font-size: 0.92rem;
  color: var(--navy-700);
  line-height: 1.6;
  margin-bottom: 20px;
}

.article-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--teal-600);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Longform Article Typography & Content Engine */
.article-header {
  padding: 48px 0 32px;
  background-color: var(--white);
  border-bottom: 1px solid var(--slate-200);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--slate-400);
  margin-bottom: 16px;
}

.breadcrumbs a {
  color: var(--slate-600);
}

.breadcrumbs a:hover {
  color: var(--teal-600);
}

.article-main-title {
  font-size: clamp(2rem, 3.8vw, 2.7rem);
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.article-author-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--slate-100);
  font-size: 0.88rem;
  color: var(--slate-600);
}

.author-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--navy-900);
}

.author-chip img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
}

.article-body {
  padding: 48px 0;
  font-size: 1.08rem;
  line-height: 1.8;
  color: #27303f;
}

.article-body h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--navy-900);
  margin: 44px 0 16px;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.article-body h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy-900);
  margin: 32px 0 12px;
  line-height: 1.35;
}

.article-body p {
  margin-bottom: 22px;
}

.article-body ul, .article-body ol {
  margin: 18px 0 24px 28px;
}

.article-body li {
  margin-bottom: 10px;
  padding-left: 4px;
}

.callout-box {
  background-color: var(--teal-50);
  border-left: 4px solid var(--teal-600);
  padding: 24px 28px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 32px 0;
}

.callout-box h4 {
  font-size: 1.1rem;
  color: var(--teal-800);
  margin-bottom: 8px;
  font-weight: 800;
}

.callout-box p {
  font-size: 0.98rem;
  color: var(--teal-900, #134e4a);
  margin-bottom: 0;
  line-height: 1.6;
}

.warning-box {
  background-color: var(--amber-50);
  border-left: 4px solid var(--amber-500);
  padding: 24px 28px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 32px 0;
}

.warning-box h4 {
  font-size: 1.1rem;
  color: var(--amber-900);
  margin-bottom: 8px;
  font-weight: 800;
}

.warning-box p {
  font-size: 0.98rem;
  color: #92400e;
  margin-bottom: 0;
  line-height: 1.6;
}

/* Inline Conversion Banner */
.inline-cta-banner {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  margin: 48px 0;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.inline-cta-banner h3 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}

.inline-cta-banner p {
  font-size: 1rem;
  color: var(--slate-300);
  max-width: 640px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

/* Comparison Tables */
.table-responsive {
  overflow-x: auto;
  margin: 32px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}

.table-clinical {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.94rem;
  background-color: var(--white);
}

.table-clinical th {
  background-color: var(--navy-900);
  color: var(--white);
  padding: 14px 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.table-clinical td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--slate-200);
  vertical-align: top;
  line-height: 1.5;
}

.table-clinical tr:last-child td {
  border-bottom: none;
}

.table-clinical tr:nth-child(even) td {
  background-color: var(--slate-50);
}

/* Sticky Bottom Bar for Landing Pages */
.sticky-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 14px 20px;
  z-index: 99;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.15);
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.sticky-cta-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sticky-info {
  display: flex;
  flex-direction: column;
}

.sticky-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
}

.sticky-sub {
  font-size: 0.8rem;
  color: var(--slate-400);
}

/* Native Modal Dialog */
.waitlist-dialog {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: 520px;
  width: 92%;
  box-shadow: var(--shadow-xl);
  background: var(--white);
  color: var(--navy-800);
  margin: auto;
}

.waitlist-dialog::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-header {
  background-color: var(--navy-900);
  color: var(--white);
  padding: 24px 28px;
  position: relative;
}

.modal-header h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.modal-header p {
  font-size: 0.85rem;
  color: var(--slate-400);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 20px;
  background: none;
  border: none;
  color: var(--slate-400);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}

.modal-close-btn:hover {
  color: var(--white);
}

.modal-body {
  padding: 28px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--navy-900);
  background-color: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-select:focus {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px var(--teal-100);
}

.form-help {
  font-size: 0.76rem;
  color: var(--slate-600);
  margin-top: 4px;
}

.form-alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: none;
}

.form-alert-error {
  background-color: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

.form-alert-success {
  background-color: var(--teal-50);
  color: var(--teal-800);
  border: 1px solid var(--teal-100);
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 24px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-900);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.15s ease;
}

.faq-question:hover {
  background-color: var(--slate-50);
}

.faq-icon {
  font-size: 1.25rem;
  color: var(--teal-600);
  transition: transform 0.2s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 24px 20px;
  color: var(--navy-700);
  font-size: 0.96rem;
  line-height: 1.65;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Legal Disclaimer Box */
.disclaimer-box {
  background-color: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 40px auto 0;
  font-size: 0.82rem;
  color: var(--slate-600);
  line-height: 1.6;
}

.disclaimer-box strong {
  color: var(--navy-800);
}

/* Site Footer */
.site-footer {
  background-color: var(--navy-900);
  color: var(--slate-400);
  padding: 56px 0 32px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.88rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--slate-400);
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--teal-100);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--slate-400);
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .authority-box {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .authority-pillars {
    text-align: left;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hero-headline {
    font-size: 2rem;
  }
  .section {
    padding: 44px 0;
  }
  .sticky-cta-inner {
    flex-direction: column;
    text-align: center;
  }
  .sticky-cta-bar .btn {
    width: 100%;
  }
}
