/* ============================================
   SCALEMATIK — SHARED STYLES
   ============================================ */

:root {
  --bg-primary: #1C1C1E;
  --bg-secondary: #232326;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-border: rgba(255, 255, 255, 0.08);

  --accent: #00C2CB;
  --accent-bg: rgba(0, 194, 203, 0.15);
  --accent-border: rgba(0, 194, 203, 0.4);

  --text-primary: #F9F9F9;
  --text-secondary: rgba(249, 249, 249, 0.65);
  --text-muted: rgba(249, 249, 249, 0.5);
  --text-faint: rgba(249, 249, 249, 0.4);

  --pyg-navy: #1B2C4F;
  --pyg-text: #7FB1FF;
  --reelmatik-purple: #4A2D6B;
  --reelmatik-text: #C9A8FF;
  --reelmatik-accent: #A8E63C;

  --max-width: 1100px;
  --radius-card: 12px;
  --radius-btn: 8px;

  --prose-max: 640px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  background-attachment: fixed;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.2s ease;
}

a:hover {
  opacity: 0.85;
}

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

ul,
ol {
  list-style: none;
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

section {
  padding: 100px 0;
}

@media (max-width: 768px) {
  section {
    padding: 72px 0;
  }
  .container {
    padding: 0 24px;
  }
}

.section-alt {
  background-color: rgba(255, 255, 255, 0.02);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1,
h2,
h3,
h4 {
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

h1 {
  font-size: 50px;
  letter-spacing: -0.6px;
}

h2 {
  font-size: 36px;
  letter-spacing: -0.4px;
}

h3 {
  font-size: 20px;
}

@media (max-width: 1024px) {
  h1 { font-size: 44px; }
  h2 { font-size: 32px; }
}

@media (max-width: 768px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  h3 { font-size: 19px; }
}

p {
  color: var(--text-secondary);
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 16px;
}

.accent-text {
  color: var(--accent);
}

.lead {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 680px;
  line-height: 1.65;
}

@media (max-width: 768px) {
  .lead {
    font-size: 16px;
  }
}

/* Body paragraph max-width — keep prose comfortable to read */
.content-block p,
.about-prose p,
.section-intro p,
.connect-outro,
.footer-cta p,
.divisions-callout p,
.contact-calendar p,
.contact-note p {
  max-width: var(--prose-max);
}

.section-intro p,
.footer-cta p,
.contact-calendar p {
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(28, 28, 30, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.logo-accent {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  font-size: 13px;
  color: rgba(249, 249, 249, 0.7);
  font-weight: 400;
}

.main-nav a:hover {
  color: var(--text-primary);
  opacity: 1;
}

.main-nav a.active {
  color: var(--text-primary);
}

.nav-cta {
  background-color: var(--accent);
  color: var(--bg-primary) !important;
  padding: 9px 18px;
  border-radius: var(--radius-btn);
  font-weight: 500;
}

.nav-cta:hover {
  filter: brightness(1.08);
  opacity: 1;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
}

@media (max-width: 768px) {
  .header-inner {
    padding: 16px 20px;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .main-nav {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(28, 28, 30, 0.98);
    backdrop-filter: blur(14px);
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
    padding: 16px 24px 24px;
  }
  .main-nav.is-open {
    display: flex;
  }
  .main-nav a {
    padding: 14px 0;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
    font-size: 15px;
  }
  .main-nav a:last-child {
    border-bottom: none;
  }
  .nav-cta {
    display: inline-block;
    align-self: flex-start;
    margin-top: 8px;
  }
}

/* ============================================
   HERO
   ============================================ */

.hero {
  padding: 120px 0 100px;
  position: relative;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 880px;
  margin-bottom: 24px;
}

.hero .lead {
  margin-bottom: 36px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .hero {
    padding: 80px 0 64px;
  }
}

/* Home hero — radial glow + network SVG */

.home-hero {
  overflow: hidden;
}

.home-hero h1 {
  position: relative;
  display: inline-block;
}

.home-hero h1::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -8%;
  width: 70%;
  height: 220%;
  background: radial-gradient(ellipse at center, rgba(0, 194, 203, 0.22) 0%, rgba(0, 194, 203, 0) 65%);
  transform: translateY(-50%);
  z-index: -1;
  pointer-events: none;
  filter: blur(30px);
}

.hero-network {
  position: absolute;
  right: -60px;
  top: 40px;
  width: 520px;
  height: auto;
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .hero-network {
    width: 380px;
    right: -100px;
    opacity: 0.35;
  }
}

@media (max-width: 768px) {
  .hero-network {
    display: none;
  }
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: filter 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  line-height: 1.3;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--bg-primary);
}

.btn-primary:hover {
  filter: brightness(1.08);
  opacity: 1;
  box-shadow: 0 8px 24px rgba(0, 194, 203, 0.25);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(249, 249, 249, 0.3);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: rgba(249, 249, 249, 0.6);
  opacity: 1;
}

/* ============================================
   SOCIAL PROOF BAR
   ============================================ */

.social-proof {
  background-color: var(--accent-bg);
  border-top: 0.5px solid var(--accent-border);
  border-bottom: 0.5px solid var(--accent-border);
  padding: 22px 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.social-proof strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ============================================
   PILLAR
   ============================================ */

.pillar {
  margin-top: 72px;
}

.pillar:first-of-type {
  margin-top: 0;
}

.pillar-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 0.5px solid rgba(0, 194, 203, 0.2);
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.pillar-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
  box-shadow: 0 0 18px rgba(0, 194, 203, 0.2);
}

.pillar-name {
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.pillar-tagline {
  color: var(--text-muted);
  font-size: 14px;
  font-style: italic;
}

/* ============================================
   SERVICE CARDS / GRIDS
   ============================================ */

.card-grid {
  display: grid;
  gap: 18px;
}

.card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.card-grid-full {
  grid-template-columns: 1fr;
}

@media (max-width: 1024px) {
  .card-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .card-grid-3,
  .card-grid-4 {
    grid-template-columns: 1fr;
  }
}

.service-card {
  background: var(--bg-card);
  border: 0.5px solid var(--bg-card-border);
  border-radius: var(--radius-card);
  padding: 28px 26px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
  color: inherit;
}

.service-card:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 194, 203, 0.15);
  opacity: 1;
}

.service-card.detail {
  padding: 32px 30px;
}

.service-card-icon {
  display: block;
  margin-bottom: 18px;
  color: var(--accent);
  line-height: 0;
}

.service-card-icon svg {
  width: 36px;
  height: 36px;
  display: block;
  stroke: currentColor;
}

.service-card-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}

.service-card.detail .service-card-title {
  font-size: 22px;
}

.service-card-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

.service-card.detail .service-card-desc {
  font-size: 16px;
}

/* ============================================
   SECTION HEADERS (centered intro)
   ============================================ */

.section-intro {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 56px;
}

.section-intro h2 {
  margin-bottom: 16px;
}

.section-intro p {
  color: var(--text-secondary);
  font-size: 17px;
}

/* ============================================
   DIVISIONS
   ============================================ */

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

@media (max-width: 1024px) {
  .divisions-grid {
    grid-template-columns: 1fr;
  }
}

.division-card {
  border-radius: var(--radius-card);
  padding: 32px;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.division-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 194, 203, 0.12);
}

.division-card.pyg {
  background-color: var(--pyg-navy);
}

.division-card.reelmatik {
  background-color: var(--reelmatik-purple);
}

.division-card.healthcare {
  background-color: rgba(255, 255, 255, 0.06);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
}

.division-title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.division-card .division-body {
  color: rgba(249, 249, 249, 0.8);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: auto;
  padding-bottom: 20px;
  max-width: none;
}

.division-link {
  font-size: 14px;
  font-weight: 500;
  margin-top: auto;
}

.division-card.pyg .division-link {
  color: var(--pyg-text);
}

.division-card.reelmatik .division-link {
  color: var(--reelmatik-text);
}

.division-card .division-muted {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: auto;
}

.division-logo,
.division-reelmatik-logo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 0 18px;
  object-fit: contain;
}

.hipaa-badge {
  display: inline-block;
  background-color: var(--accent-bg);
  color: var(--accent);
  border: 0.5px solid var(--accent-border);
  font-size: 9px;
  letter-spacing: 0.5px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.divisions-callout {
  margin-top: 36px;
  background: var(--bg-card);
  border: 0.5px solid var(--bg-card-border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-card);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.divisions-callout p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
  flex: 1 1 360px;
  max-width: none;
}

.divisions-callout p strong {
  color: var(--text-primary);
  font-weight: 500;
}

.divisions-callout .btn {
  flex-shrink: 0;
}

/* ============================================
   PROCESS LISTS (numbered steps)
   ============================================ */

.step-list {
  counter-reset: stepcounter;
  display: grid;
  gap: 22px;
  max-width: 820px;
}

.step-list li {
  counter-increment: stepcounter;
  position: relative;
  padding-left: 56px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.65;
}

.step-list li::before {
  content: counter(stepcounter);
  position: absolute;
  left: 0;
  top: -2px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid rgba(0, 194, 203, 0.35);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 500;
}

.step-list li strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ============================================
   FEATURE LIST (bulleted "what's included")
   ============================================ */

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 32px;
  max-width: 820px;
}

@media (max-width: 768px) {
  .feature-list {
    grid-template-columns: 1fr;
  }
}

.feature-list li {
  position: relative;
  padding-left: 22px;
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.55;
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============================================
   CONTENT BLOCKS
   ============================================ */

.content-block {
  max-width: 820px;
}

.content-block h2 {
  margin-bottom: 20px;
}

.content-block p {
  font-size: 17px;
  line-height: 1.75;
}

.content-block + .content-block {
  margin-top: 20px;
}

.about-prose p {
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 1.3em;
  color: var(--text-secondary);
}

/* ============================================
   PAIRS WELL WITH
   ============================================ */

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

@media (max-width: 768px) {
  .pairs-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   CONNECT STACK (Systems page step list)
   ============================================ */

.connect-block {
  background: var(--bg-card);
  border: 0.5px solid var(--bg-card-border);
  border-radius: var(--radius-card);
  padding: 44px;
}

@media (max-width: 768px) {
  .connect-block {
    padding: 28px;
  }
}

.connect-outro {
  margin-top: 32px;
  font-size: 16px;
  color: var(--text-secondary);
  padding-top: 26px;
  border-top: 0.5px solid var(--bg-card-border);
  line-height: 1.7;
}

/* ============================================
   CTA BLOCK
   ============================================ */

.cta-block {
  text-align: center;
  padding: 96px 24px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 0.5px solid var(--bg-card-border);
  border-bottom: 0.5px solid var(--bg-card-border);
}

.cta-block h2 {
  margin-bottom: 14px;
}

.cta-block p {
  margin: 0 auto 28px;
  max-width: 560px;
}

/* ============================================
   CONTACT PAGE
   ============================================ */

.contact-calendar {
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: center;
}

.contact-calendar h2 {
  font-size: 30px;
  margin-bottom: 12px;
}

.contact-calendar p {
  margin-bottom: 28px;
  color: var(--text-secondary);
  font-size: 17px;
}

.contact-calendar iframe {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  display: block;
}

.contact-note {
  background: var(--bg-card);
  border: 0.5px solid var(--bg-card-border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-card);
  padding: 32px;
  max-width: 760px;
  margin: 0 auto;
}

.contact-note h2 {
  font-size: 20px;
  margin-bottom: 12px;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  margin-top: 24px;
  background-color: var(--bg-primary);
  border-top: 0.5px solid var(--bg-card-border);
}

.footer-cta {
  text-align: center;
  padding: 80px 24px;
  background: rgba(255, 255, 255, 0.02);
}

.footer-cta h2 {
  margin-bottom: 14px;
}

.footer-cta p {
  margin: 0 auto 28px;
  color: var(--text-secondary);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 32px;
  border-top: 0.5px solid var(--bg-card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--text-faint);
}

.footer-brand {
  letter-spacing: 0.5px;
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 13px;
}

.footer-links a:hover {
  color: var(--text-primary);
  opacity: 1;
}

@media (max-width: 600px) {
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 24px;
  }
}
