/* ==========================================================================
   PINNACLE ORBIT RCM - QUIET LUXURY DESIGN SYSTEM
   Editorial, Clean, Minimalist Healthcare Revenue Cycle Management Platform
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS & COLOR PALETTE
   -------------------------------------------------------------------------- */
:root {
  /* Color System: Warm Crisp White, Soft Beige & Champagne Gold */
  --paper: #FAF8F5;           /* Primary background: Warm Ivory White */
  --paper-card: #FFFFFF;      /* Card background: Pure crisp white */
  --paper-muted: #F4EFE6;     /* Secondary background: Soft warm linen beige */
  --paper-accent: #ECE4D5;    /* Accent background: Soft natural champagne beige */
  --paper-warm-glow: #FDFBF7; /* Softest warm highlights */
  
  --ink: #111B2B;             /* Primary text & headings: Deep Warm Obsidian Ink */
  --ink-soft: #4A463D;        /* Body copy: Warm Charcoal Espresso (no cold slate/silver) */
  --ink-light: #7A7467;       /* Subtitles / Meta text: Warm Sand Gray */
  
  --gold: #C59B27;            /* Rich Warm Champagne Gold Accent */
  --gold-soft: #E5C365;       /* Light Gold hover/highlight */
  --gold-bg: rgba(197, 155, 39, 0.09);
  --gold-border: rgba(197, 155, 39, 0.25);
  
  --line: #E8E2D5;            /* Warm linen hairline borders */
  --line-golden: #DFD5C3;     /* Rich warm golden border */
  --line-strong: #CFC5B2;     /* Strong warm border for focus states */

  /* Claim Status Colors */
  --status-paid-bg: rgba(27, 94, 82, 0.1);
  --status-paid-text: #1B5E52;
  --status-scrubbed-bg: rgba(197, 155, 39, 0.12);
  --status-scrubbed-text: #8C6A12;
  --status-submitted-bg: rgba(74, 70, 61, 0.1);
  --status-submitted-text: #4A463D;
  --status-appealed-bg: rgba(155, 44, 44, 0.1);
  --status-appealed-text: #9B2C2C;

  /* Typography */
  --font-serif: 'Newsreader', 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'IBM Plex Sans', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-brand: 'Playfair Display', 'Newsreader', Georgia, serif; /* logo wordmark */

  /* Shadows & Radius */
  --shadow-sm: 0 2px 5px rgba(27, 23, 15, 0.04);
  --shadow-md: 0 6px 20px rgba(27, 23, 15, 0.06);
  --shadow-lg: 0 14px 40px rgba(27, 23, 15, 0.09);
  --shadow-3d: 0 20px 45px -10px rgba(27, 23, 15, 0.12), 0 8px 20px -5px rgba(197, 155, 39, 0.1), 0 0 0 1px rgba(232, 226, 213, 0.8);
  --shadow-3d-hover: 0 30px 60px -12px rgba(27, 23, 15, 0.18), 0 12px 30px -6px rgba(197, 155, 39, 0.18);
  
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Layout */
  --container-max: 1160px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-3d: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --------------------------------------------------------------------------
   2. BASE RESETS
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Global visible focus state for keyboard users — only shows for keyboard
   navigation (:focus-visible), so mouse/touch interaction stays visually
   clean while accessibility is preserved. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.2;
}

.mono {
  font-family: var(--font-mono);
}

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

img, svg {
  max-width: 100%;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: var(--paper);
}
::-webkit-scrollbar-thumb {
  background: #D9D1C1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* Containers & Padding */
.container {
  max-width: var(--container-max);
  width: min(100%, var(--container-max));
  margin: 0 auto;
  padding-inline: 20px;
}

.section-padding {
  padding: 92px 0;
}

/* Section Header Component */
.section-head {
  max-width: 640px;
  margin-bottom: 52px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
  display: inline-block;
  font-weight: 600;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 500;
  color: var(--ink);
}

.section-head p {
  color: var(--ink-soft);
  margin-top: 12px;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   3. NAVIGATION BAR
   -------------------------------------------------------------------------- */
header.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 246, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.brand-logo-img {
  height: 46px;
  width: auto;
  display: block;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-brand);
  font-size: 1.1rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
  color: var(--ink);
}

.brand-suffix {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 3px;
}

.brand-wordmark-lg .brand-name {
  font-size: 1.5rem;
  font-weight: 900;
}

.brand-wordmark-lg .brand-suffix {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-top: 5px;
}

/* Groups everything right of the logo so spacing reads as ONE
   deliberate rhythm instead of three separately-justified blocks. */
.nav-right {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-weight: 500;
  white-space: nowrap;
}

.nav-cta-mobile {
  display: none;
}

.nav-links a {
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -4px;
  height: 1.5px;
  background: var(--gold);
  transition: right 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a:hover::after {
  right: 0;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  padding: 12px 24px;
  border-radius: var(--radius-xs);
  font-size: 0.88rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  background: #162749;
  border-color: #162749;
  box-shadow: var(--shadow-sm);
}

.btn-gold {
  background: var(--gold);
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: var(--radius-xs);
  font-size: 0.88rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--gold);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-gold:hover {
  background: #9E7538;
  border-color: #9E7538;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 12px 24px;
  border-radius: var(--radius-xs);
  font-size: 0.88rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: rgba(13, 27, 56, 0.03);
}

/* Minimal navbar buttons ("Meet the Founder", "Have a question?"): same look for both */
.nav-cta-desktop {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.nav-btn:hover {
  border-color: var(--gold);
  background: rgba(197, 155, 39, 0.07);
}

/* inside the mobile menu list: no underline-on-hover, no block link styling */
.nav-links a.nav-btn { display: inline-flex; }
.nav-links a.nav-btn::after { display: none; }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--ink);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   4. HERO SECTION (CLEAN, UNCONGESTED LAYOUT & TAGLINE)
   -------------------------------------------------------------------------- */
.hero {
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}

/* TAGLINE BADGE */
.hero-tagline-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px 9px 16px;
  border-radius: var(--radius-full);
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.hero-tagline-badge:hover {
  box-shadow: 0 8px 20px -6px rgba(197, 155, 39, 0.35);
  transform: translateY(-1px);
}

.tagline-orbit {
  position: relative;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.tagline-orbit .ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--gold-border);
  border-radius: 50%;
  animation: taglineSpin 5s linear infinite;
}

.tagline-dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  position: absolute;
  top: -1px;
  left: 50%;
  margin-left: -3px;
  box-shadow: 0 0 8px rgba(197, 155, 39, 0.7);
}

@keyframes taglineSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .tagline-orbit .ring { animation: none; }
}

/* --------------------------------------------------------------------------
   HERO — DECORATIVE ROTATING ORBIT RINGS (CSS-only, echoes the Revenue
   Cycle Orbit in the Process section). Sits behind the tagline/headline/
   lede on both desktop and mobile.
   -------------------------------------------------------------------------- */
.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-orbit-decor {
  position: absolute;
  top: 38%;
  left: 40%;
  width: clamp(300px, 38vw, 520px);
  height: clamp(300px, 38vw, 520px);
  transform: translate(-50%, -50%) rotateX(58deg);
  transform-style: preserve-3d;
  pointer-events: none;
  z-index: 0;
}

.hero-orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px dashed rgba(197, 155, 39, 0.55);
}

.hero-orbit-ring--mid {
  inset: 15%;
  border-style: solid;
  border-color: rgba(197, 155, 39, 0.32);
}

.hero-orbit-ring--inner {
  inset: 32%;
  border: 1px dashed rgba(17, 27, 43, 0.2);
}

.hero-orbit-spin {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: heroOrbitSpin 28s linear infinite;
}

.hero-orbit-spin--b {
  inset: 15%;
  animation-duration: 19s;
  animation-direction: reverse;
}

@keyframes heroOrbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-orbit-dot {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 16px rgba(197, 155, 39, 0.8);
}

.hero-orbit-dot--ink {
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  background: var(--ink);
  box-shadow: 0 0 8px rgba(17, 27, 43, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .hero-orbit-spin { animation: none; }
}

/* --------------------------------------------------------------------------
   PHI & HIPAA SECTION — continues the hero's orbit visual language into a
   warm-beige section. The orbit-sweep-line sits at the seam between hero
   and this section; phi-orbit-decor is the "settled" smaller ring. Both are
   enhanced by a scroll-scrubbed GSAP timeline in script.js when available,
   and degrade gracefully to their static CSS state otherwise.
   -------------------------------------------------------------------------- */
.phi-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-accent) 22%, var(--paper-accent) 100%);
  border-bottom: 1px solid var(--line-golden);
  padding: 96px 0 88px;
}

.orbit-sweep-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(197, 155, 39, 0) 0%,
    rgba(197, 155, 39, 0.7) 50%,
    rgba(197, 155, 39, 0) 100%);
  opacity: 0.9;
  pointer-events: none;
  z-index: 1;
}

.phi-orbit-decor {
  position: absolute;
  top: 8%;
  right: 6%;
  width: clamp(220px, 24vw, 360px);
  height: clamp(220px, 24vw, 360px);
  transform: rotateX(58deg);
  transform-style: preserve-3d;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

.phi-orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(197, 155, 39, 0.4);
}

.phi-orbit-ring--inner {
  inset: 20%;
  border-style: solid;
  border-color: rgba(17, 27, 43, 0.12);
}

.phi-orbit-spin {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: heroOrbitSpin 46s linear infinite;
}

.phi-orbit-dot {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(197, 155, 39, 0.6);
}

@media (prefers-reduced-motion: reduce) {
  .phi-orbit-spin { animation: none; }
}

.phi-head {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto 64px;
  text-align: center;
}

.phi-head h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  line-height: 1.25;
  margin: 14px 0 20px;
}

.phi-subhead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.phi-body {
  font-size: 0.98rem;
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 620px;
  margin: 0 auto;
}

.phi-pillars {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 48px;
  max-width: 880px;
  margin: 0 auto 64px;
}

.phi-pillar {
  flex: 1;
  text-align: center;
}

.phi-pillar-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 10px;
}

.phi-pillar h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.phi-pillar p {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.phi-pillar-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(180deg,
    rgba(197, 155, 39, 0) 0%,
    rgba(197, 155, 39, 0.45) 50%,
    rgba(197, 155, 39, 0) 100%);
  margin-top: 6px;
}

.phi-closing {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
  padding-top: 40px;
  border-top: 1px solid var(--line-golden);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink);
}

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

  .phi-orbit-decor {
    top: 4%;
    right: -8%;
    width: 220px;
    height: 220px;
    opacity: 0.45;
  }

  .phi-pillars {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  .phi-pillar-divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg,
      rgba(197, 155, 39, 0) 0%,
      rgba(197, 155, 39, 0.45) 50%,
      rgba(197, 155, 39, 0) 100%);
  }
}

.hero h1 {
  font-size: clamp(2.4rem, 4.2vw, 3.6rem);
  line-height: 1.12;
  margin-bottom: 18px;
  font-weight: 500;
  color: var(--ink);
}

.hero h1 span {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}

/* CONCISE HERO SUBTITLE - NO LONG PARAGRAPHS */
.hero p.lede {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 44ch;
  margin-bottom: 28px;
  line-height: 1.55;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 32px;
}

.hero-trust-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 56px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--ink-soft);
  position: relative;
  z-index: 2;
}

.hero-trust-bar span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-trust-bar svg {
  width: 15px;
  height: 15px;
  color: var(--gold);
}

/* 3D REALISTIC CLAIMS LEDGER CARD */
.ledger-wrapper {
  perspective: 1000px;
}

.ledger-card {
  background: var(--paper-card);
  border: 1px solid rgba(212, 216, 211, 0.9);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-3d);
  transform: rotateY(-3deg) rotateX(1.5deg);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ledger-card:hover {
  transform: rotateY(0deg) rotateX(0deg) translateY(-5px);
  box-shadow: var(--shadow-3d-hover);
}

.ledger-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: #FAF9F6;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ledger-head-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 600;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #22C55E;
  border-radius: 50%;
  display: inline-block;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.ledger-body {
  height: 310px;
  overflow: hidden;
  position: relative;
}

.ledger-disclaimer {
  padding: 10px 20px;
  border-top: 1px solid var(--line);
  background: #FAF9F6;
  font-size: 0.7rem;
  color: var(--ink-soft);
  text-align: center;
  font-style: italic;
}

.ledger-track {
  position: absolute;
  width: 100%;
  animation: scrollLedger 18s linear infinite;
}

.ledger-track:hover {
  animation-play-state: paused;
}

.ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
  background: var(--paper-card);
  transition: background 0.2s ease;
}

.ledger-row:hover {
  background: #FDFDFB;
}

.claim-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.claim-id {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink);
  font-weight: 600;
}

.claim-sub {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.status-paid {
  background: var(--status-paid-bg);
  color: var(--status-paid-text);
}

.status-scrubbed {
  background: var(--status-scrubbed-bg);
  color: var(--status-scrubbed-text);
}

.status-submitted {
  background: var(--status-submitted-bg);
  color: var(--status-submitted-text);
}

.status-appealed {
  background: var(--status-appealed-bg);
  color: var(--status-appealed-text);
}

@keyframes scrollLedger {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

/* --------------------------------------------------------------------------
   5. AR AGING BREAKDOWN SECTION (ELEGANT WARM BEIGE BACKGROUND - NO BLUE)
   -------------------------------------------------------------------------- */
.ar-section {
  background: var(--paper-accent);
  border-top: 1px solid var(--line-golden);
  border-bottom: 1px solid var(--line-golden);
  padding: 88px 0;
}

.ar-section .eyebrow {
  color: var(--gold);
}

.ar-section h2 {
  color: var(--ink);
}

.ar-section p {
  color: var(--ink-soft);
}

.ar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 44px;
}

.ar-card {
  background: var(--paper-card);
  border: 1px solid var(--line-golden);
  border-radius: var(--radius-sm);
  padding: 24px 18px;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.ar-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.ar-bucket {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 6px;
  font-weight: 600;
}

.ar-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  background: var(--gold-bg);
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 12px;
}

.ar-card h3 {
  color: var(--ink);
  font-size: 0.98rem;
  margin-bottom: 8px;
}

.ar-card p {
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   6. PROVIDER FINANCIAL CHALLENGES (PROBLEM VS SOLUTION)
   -------------------------------------------------------------------------- */
.challenges-section {
  background: var(--paper);
}

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

.challenge-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.challenge-problem {
  margin-bottom: 20px;
}

.problem-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #DC2626;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-weight: 600;
}

.problem-label svg {
  width: 14px;
  height: 14px;
}

.challenge-card h3 {
  font-size: 1.15rem;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 12px;
}

.solution-divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}

.challenge-solution p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* LEAKAGE CALCULATOR */
.calc-wrapper {
  margin-top: 60px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 44px 40px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.calc-info h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.calc-info p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 26px;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 500;
}

.slider-value {
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 600;
}

input[type=range].custom-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  outline: none;
  accent-color: var(--gold);
  cursor: pointer;
}

.calc-result-box {
  background: var(--paper-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 32px 28px;
  text-align: center;
}

.calc-result-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.calc-result-number {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 8px;
}

.calc-result-note {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   7. PROCESS SECTION (FROM ENCOUNTER TO PAYMENT)
   -------------------------------------------------------------------------- */
.process-section {
  background: var(--paper-card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.process-list {
  display: flex;
  flex-direction: column;
}

.process-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease;
}

.process-item:last-child {
  border-bottom: none;
}

.process-item .num {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--line-strong);
  font-weight: 600;
}

.process-item h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: var(--ink);
}

.process-item p {
  color: var(--ink-soft);
  font-size: 0.93rem;
  max-width: 62ch;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   8. SERVICES GRID
   -------------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold);
  margin-bottom: 16px;
  display: block;
  font-weight: 600;
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   9. EHR / PRACTICE MANAGEMENT INTEGRATION
   -------------------------------------------------------------------------- */
.ehr-section {
  background: var(--paper-muted);
}

.ehr-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.grid-more-note {
  display: table;
  margin: 28px auto 0;
  padding: 10px 24px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: rgba(197, 155, 39, 0.08);
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}

/* --------------------------------------------------------------------------
   10. SPECIALTIES WE SERVE
   -------------------------------------------------------------------------- */
.specialties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.specialty-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  padding: 24px 20px;
  border-radius: var(--radius-xs);
  transition: all var(--transition-fast);
}

.specialty-card:hover {
  border-color: var(--ink-soft);
  transform: translateY(-2px);
}

.specialty-card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.specialty-card p {
  font-size: 0.83rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   11. WHY PRACTICES TRUST PINNACLE ORBIT (PILLARS)
   -------------------------------------------------------------------------- */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.pillar-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  padding: 36px 30px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.pillar-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
}

.pillar-icon {
  width: 42px;
  height: 42px;
  background: var(--paper-muted);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  margin-bottom: 20px;
}

.pillar-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.pillar-card p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   12. TRUST SECTION (honest, no-track-record-yet positioning)
   -------------------------------------------------------------------------- */
.trust-section {
  background: var(--paper);
}

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

.trust-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  padding: 30px 26px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.trust-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
  transform: translateY(-3px);
}

.trust-card .pillar-icon {
  width: 42px;
  height: 42px;
  background: var(--paper-muted);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  margin-bottom: 18px;
}

.trust-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.trust-card p {
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   13. FREQUENTLY ASKED QUESTIONS (ACCORDION)
   -------------------------------------------------------------------------- */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item.active {
  border-color: var(--ink-soft);
}

.faq-question {
  width: 100%;
  padding: 22px 26px;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  gap: 16px;
}

.faq-icon {
  width: 18px;
  height: 18px;
  color: var(--ink-soft);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--gold);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 26px;
}

.faq-item.active .faq-answer {
  max-height: 200px;
  padding: 0 26px 24px;
}

.faq-answer p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   14. CTA BANNER (ELEGANT WARM LIGHT BEIGE BACKGROUND - NO BLUE)
   -------------------------------------------------------------------------- */
.cta-banner {
  background: var(--paper-accent);
  border-top: 1px solid var(--line-golden);
  border-bottom: 1px solid var(--line-golden);
  color: var(--ink);
  padding: 92px 0;
  text-align: center;
}

.cta-banner h2 {
  color: var(--ink);
  font-size: clamp(2rem, 3.8vw, 2.8rem);
  margin-bottom: 16px;
}

.cta-banner p {
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 0 auto 32px;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   15. FOOTER
   -------------------------------------------------------------------------- */
footer {
  padding: 64px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  font-size: 0.88rem;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 48px;
}

.foot-brand p {
  color: var(--ink-soft);
  margin-top: 14px;
  font-size: 0.88rem;
  max-width: 32ch;
}

.foot-col h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--ink);
}

.foot-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.foot-col a {
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.foot-col a:hover {
  color: var(--gold);
}

.foot-contact-item {
  display: flex;
  gap: 10px;
  color: var(--ink-soft);
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.foot-contact-item svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
}

.foot-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--ink-light);
  font-size: 0.82rem;
}

/* --------------------------------------------------------------------------
   16. MODAL DIALOG (FREE REVENUE AUDIT)
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(13, 27, 56, 0.6);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  max-width: 520px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  margin: auto;
}

.modal-backdrop.open .modal-card {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1;
}

.modal-title {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.modal-sub {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

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

.modal-alt-contact {
  text-align: center;
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.modal-alt-contact a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(197, 155, 39, 0.4);
  transition: border-color 0.2s ease;
}

.modal-alt-contact a:hover {
  border-color: var(--gold);
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--ink);
}

.form-input, .form-select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  background: var(--paper);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus, .form-select:focus {
  border-color: var(--ink);
  background: #FFFFFF;
}

.form-textarea {
  display: block;
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
  font-family: var(--font-sans);
}

.form-optional {
  font-weight: 400;
  color: var(--ink-light);
}

.form-error-msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(178, 58, 46, 0.35);
  background: rgba(178, 58, 46, 0.07);
  color: #8C2F22;
  font-size: 0.84rem;
  line-height: 1.5;
}

.form-error-msg[hidden] {
  display: none;
}

/* --------------------------------------------------------------------------
   MODAL SUCCESS STATE
   -------------------------------------------------------------------------- */
.modal-success {
  text-align: center;
  padding: 12px 4px 4px;
  animation: modalSuccessIn 0.4s ease;
}

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

.modal-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(90, 140, 90, 0.12);
  border: 1px solid rgba(90, 140, 90, 0.35);
  color: #4C7A4C;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-success-icon svg {
  width: 26px;
  height: 26px;
}

.modal-success .modal-title,
.modal-success .modal-sub {
  text-align: center;
}

.modal-success .modal-sub {
  margin-bottom: 24px;
}

/* --------------------------------------------------------------------------
   17. 3D TRANSFORMATIONS & TILT PHYSICS
   -------------------------------------------------------------------------- */
.tilt-3d {
  perspective: 1000px;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  will-change: transform;
}

.tilt-3d:hover {
  transform: translateY(-8px) rotateX(3deg) rotateY(-2deg);
  box-shadow: var(--shadow-3d-hover);
  border-color: var(--gold-border);
}

.btn-primary, .btn-gold, .btn-ghost {
  transform-style: preserve-3d;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease, background 0.3s ease;
}

.btn-primary:hover, .btn-gold:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 24px -5px rgba(197, 155, 39, 0.35);
}

.btn-primary:active, .btn-gold:active {
  transform: translateY(1px) scale(0.98);
}

/* --------------------------------------------------------------------------
   18. INTERACTIVE DENIAL & PROBLEM RESOLUTION MODAL / DRAWER
   -------------------------------------------------------------------------- */
.challenge-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.challenge-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.challenge-card:hover::after {
  opacity: 1;
}

.challenge-action-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--gold);
  font-weight: 600;
  margin-top: 16px;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  transition: all 0.25s ease;
}

.challenge-card:hover .challenge-action-badge {
  background: var(--gold);
  color: #FFFFFF;
  transform: translateX(4px);
}

/* Resolution Modal Styling */
.resolution-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 27, 43, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.resolution-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.resolution-modal-card {
  background: var(--paper-card);
  border: 1px solid var(--line-golden);
  border-radius: var(--radius-lg);
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  box-shadow: 0 25px 60px -10px rgba(17, 27, 43, 0.3), 0 0 0 1px rgba(197, 155, 39, 0.2);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.resolution-modal-backdrop.open .resolution-modal-card {
  transform: scale(1) translateY(0);
}

.resolution-modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: var(--paper-muted);
  border: 1px solid var(--line);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.resolution-modal-close:hover {
  background: var(--gold);
  color: #FFFFFF;
  border-color: var(--gold);
}

.modal-problem-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.modal-problem-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #DC2626;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 12px;
}

.modal-problem-header h2 {
  font-size: 1.65rem;
  color: var(--ink);
  line-height: 1.25;
}

.modal-section-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 16px;
  font-weight: 600;
}

.resolution-steps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.res-step-item {
  background: var(--paper-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px 18px;
  transition: all 0.25s ease;
}

.res-step-item:hover {
  border-color: var(--gold);
  background: var(--paper-card);
  box-shadow: var(--shadow-sm);
}

.res-step-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 6px;
  display: block;
}

.res-step-item h4 {
  font-size: 0.98rem;
  color: var(--ink);
  margin-bottom: 6px;
}

.res-step-item p {
  font-size: 0.84rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.resolution-metrics-bar {
  background: linear-gradient(135deg, var(--paper-accent) 0%, var(--paper-muted) 100%);
  border: 1px solid var(--line-golden);
  border-radius: var(--radius-sm);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.metric-pill-item {
  display: flex;
  flex-direction: column;
}

.metric-pill-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-light);
  text-transform: uppercase;
}

.metric-pill-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--gold);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   19. 3D REVENUE CYCLE PROCESS ORBIT SYSTEM
   -------------------------------------------------------------------------- */
.orbit-wrapper {
  margin-top: 40px;
  position: relative;
}

.orbit-controls-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
}

.orbit-tab-btn {
  background: var(--paper-muted);
  border: 1px solid var(--line-golden);
  color: var(--ink-soft);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.orbit-tab-btn.active {
  background: var(--ink);
  color: #FFFFFF;
  border-color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.orbit-tab-btn:hover:not(.active) {
  border-color: var(--gold);
  color: var(--ink);
}

/* 3D Orbit Visual Display */
.orbit-canvas {
  position: relative;
  width: 100%;
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  overflow: hidden;
}

.orbit-ring-outer {
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  border: 1.5px dashed rgba(197, 155, 39, 0.4);
  box-shadow: 0 0 35px rgba(197, 155, 39, 0.1), inset 0 0 35px rgba(197, 155, 39, 0.05);
  transform: rotateX(60deg) rotateZ(0deg);
  transform-style: preserve-3d;
  animation: orbitSpin 45s linear infinite;
  transition: animation-play-state 0.3s ease;
}

.orbit-canvas:hover .orbit-ring-outer {
  animation-play-state: paused;
}

@keyframes orbitSpin {
  from { transform: rotateX(60deg) rotateZ(0deg); }
  to { transform: rotateX(60deg) rotateZ(360deg); }
}

.orbit-ring-inner {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1px solid rgba(197, 155, 39, 0.25);
  transform: rotateX(60deg);
}

/* Central Glowing Hub */
.orbit-hub {
  position: absolute;
  z-index: 10;
  width: 165px;
  height: 165px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFFFFF 0%, #FAF8F5 60%, #ECE4D5 100%);
  border: 2px solid var(--gold);
  box-shadow: 0 15px 35px rgba(17, 27, 43, 0.15), 0 0 40px rgba(197, 155, 39, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.orbit-hub:hover {
  transform: scale(1.06);
  box-shadow: 0 20px 45px rgba(17, 27, 43, 0.2), 0 0 55px rgba(197, 155, 39, 0.45);
}

.hub-pulse {
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  margin-bottom: 6px;
  box-shadow: 0 0 10px var(--gold);
  animation: hubPulse 2s infinite;
}

@keyframes hubPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.hub-title {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 4px;
}

.hub-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

/* 9 Orbit Stage Nodes */
.orbit-node {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--paper-card);
  border: 2px solid var(--line-golden);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15;
  box-shadow: 0 6px 16px rgba(17, 27, 43, 0.1);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.orbit-node:hover, .orbit-node.active {
  background: var(--gold);
  color: #FFFFFF;
  border-color: #FFFFFF;
  transform: scale(1.3);
  box-shadow: 0 10px 25px rgba(197, 155, 39, 0.45);
}

.orbit-node-tooltip {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--ink);
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.orbit-node:hover .orbit-node-tooltip, .orbit-node.active .orbit-node-tooltip {
  opacity: 1;
}

/* Stage Detail Inspector Card Below Orbit */
.orbit-stage-detail {
  background: var(--paper-card);
  border: 1px solid var(--line-golden);
  border-radius: var(--radius-md);
  padding: 32px 36px;
  margin-top: 28px;
  box-shadow: var(--shadow-3d);
  display: grid;
  grid-template-columns: 0.3fr 1fr 0.4fr;
  gap: 32px;
  align-items: center;
  transition: all 0.35s ease;
}

.detail-stage-num {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  color: var(--gold);
  font-weight: 700;
  line-height: 1;
}

.detail-stage-info h3 {
  font-size: 1.35rem;
  color: var(--ink);
  margin-bottom: 8px;
}

.detail-stage-info p {
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.55;
}

.detail-stage-metric {
  background: var(--paper-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.detail-metric-val {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--gold);
  font-weight: 700;
}

.detail-metric-lbl {
  font-size: 0.75rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-top: 2px;
}

/* Orbit node number label + micro tag injected by script.js */
.orbit-node .node-num { pointer-events: none; }

.orbit-node-tooltip .tooltip-title {
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   19b. HERO CONTENT LAYERING
   -------------------------------------------------------------------------- */
.hero .container.hero-grid {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   21. SCROLL-TRIGGERED SECTION REVEALS (fade / slide / subtle 3D rotate)
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px) rotateX(6deg);
  transform-origin: top center;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0) rotateX(0deg);
}

.reveal-stagger.in { transition-delay: var(--reveal-delay, 0s); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { transition: none; transform: none; opacity: 1; }
}

section, .ar-section, .process-section, .ehr-section, .cta-banner {
  scroll-margin-top: 84px;
}

/* --------------------------------------------------------------------------
   22. FLIP CARDS — SERVICES SUITE (3D interactive detail reveal)
   -------------------------------------------------------------------------- */
.service-card {
  padding: 0;
  background: transparent;
  perspective: 1400px;
  border-radius: var(--radius-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  background: transparent;
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 240px;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
}

.service-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  padding: 36px 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.flip-front {
  background: var(--paper-card);
}

.flip-back {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  transform: rotateY(180deg);
  justify-content: center;
}

.flip-hint {
  margin-top: auto;
  padding-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-light);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.flip-hint svg {
  width: 12px;
  height: 12px;
  transition: transform 0.3s ease;
}

.service-card:hover .flip-hint svg {
  transform: translateX(3px);
}

.flip-back .back-metric {
  font-family: var(--font-mono);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--gold-soft);
  margin-bottom: 6px;
  line-height: 1;
}

.flip-back .back-metric-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(250, 248, 245, 0.55);
  margin-bottom: 16px;
}

.flip-back p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(250, 248, 245, 0.85);
}

.flip-back .flip-hint {
  color: rgba(250, 248, 245, 0.5);
}

/* --------------------------------------------------------------------------
   23. EHR / PRACTICE MANAGEMENT BADGES (static, hover-only emphasis)
   -------------------------------------------------------------------------- */
.ehr-badge {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.ehr-badge:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
  transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   24. MOUSE-TRACKING 3D TILT (pillars, specialties, AR cards, testimonials)
   -------------------------------------------------------------------------- */
.tilt-track {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  will-change: transform;
}

/* --------------------------------------------------------------------------
   20. RESPONSIVE MEDIA QUERIES
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-orbit-decor {
    left: 50%;
    top: 36%;
    width: clamp(260px, 68vw, 400px);
    height: clamp(260px, 68vw, 400px);
  }

  .ledger-card {
    transform: none;
  }

  .ar-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .challenges-grid, .services-grid, .pillars-grid, .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .calc-wrapper {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Revenue Cycle Orbit — tablet */
  .orbit-canvas {
    height: 440px;
    perspective: 1000px;
  }
  .orbit-ring-outer {
    width: 360px;
    height: 360px;
  }
  .orbit-ring-inner {
    width: 230px;
    height: 230px;
  }
  .orbit-hub {
    width: 140px;
    height: 140px;
    padding: 12px;
  }
  .hub-title { font-size: 0.92rem; }
  .orbit-node {
    width: 42px;
    height: 42px;
    font-size: 0.76rem;
  }
  .orbit-stage-detail {
    grid-template-columns: 0.35fr 1fr 0.45fr;
    padding: 26px 28px;
  }
}

/* Tablet / small laptop: the four links + two buttons no longer fit on one line,
   so the hamburger menu takes over (same menu as phones). */
@media (min-width: 769px) and (max-width: 1120px) {
  .nav-links {
    position: fixed;
    top: 71px;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    padding: 24px 28px;
    border-bottom: 1px solid var(--line);
    display: none;
    gap: 20px;
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 71px);
    overflow-y: auto;
  }
  .nav-links li { list-style: none; }
  .nav-links a { font-size: 1.02rem; display: block; }
  .nav-links.open { display: flex; }
  .mobile-toggle { display: block; }
  .nav-cta-desktop { display: none; }
  .nav-cta-mobile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
  }
  .nav-cta-mobile .nav-btn,
  .nav-links a.nav-btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    padding: 24px 28px;
    border-bottom: 1px solid var(--line);
    display: none;
    gap: 20px;
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 65px);
    overflow-y: auto;
  }

  .nav-links li {
    list-style: none;
  }

  .nav-links a {
    font-size: 1.02rem;
    display: block;
  }

  .nav-links.open {
    display: flex;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-cta-desktop {
    display: none;
  }

  .nav-cta-mobile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
  }

  .nav-cta-mobile .nav-btn,
  .nav-links a.nav-btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
  }

  .challenges-grid, .services-grid, .pillars-grid, .trust-grid, .ar-grid {
    grid-template-columns: 1fr;
  }

  .specialties-grid, .ehr-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-item {
    grid-template-columns: 50px 1fr;
    gap: 16px;
  }

  .foot-grid {
    grid-template-columns: 1fr;
  }

  .foot-bottom {
    flex-direction: column;
    gap: 8px;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  /* --------------------------------------------------------------------
     REVENUE CYCLE ORBIT — MOBILE
     Same orbit structure as desktop (nodes still ringed around a hub),
     just scaled down and flattened for small, touch-first screens.
     -------------------------------------------------------------------- */
  .orbit-canvas {
    height: 320px;
    perspective: 700px;
  }
  .orbit-ring-outer {
    width: 268px;
    height: 268px;
    transform: rotateX(45deg) rotateZ(0deg);
    animation-name: orbitSpinMobile;
  }
  .orbit-canvas:hover .orbit-ring-outer,
  .orbit-canvas:active .orbit-ring-outer {
    animation-play-state: paused;
  }
  @keyframes orbitSpinMobile {
    from { transform: rotateX(45deg) rotateZ(0deg); }
    to { transform: rotateX(45deg) rotateZ(360deg); }
  }
  .orbit-ring-inner {
    width: 172px;
    height: 172px;
    transform: rotateX(45deg);
  }
  .orbit-hub {
    width: 104px;
    height: 104px;
    padding: 8px;
    border-width: 1.5px;
  }
  .hub-title {
    font-size: 0.72rem;
    margin-bottom: 2px;
  }
  .hub-sub { font-size: 0.55rem; }
  .hub-pulse { width: 6px; height: 6px; }
  .orbit-node {
    width: 34px;
    height: 34px;
    font-size: 0.66rem;
    border-width: 1.5px;
  }
  .orbit-node:hover, .orbit-node.active {
    transform: scale(1.22);
  }
  .orbit-node-tooltip {
    display: none; /* tap-to-inspect replaces hover tooltips on touch screens */
  }
  .orbit-stage-detail {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 26px 22px;
    gap: 14px;
  }
  .detail-stage-num {
    font-size: 1.8rem;
  }
  .detail-stage-metric {
    justify-self: center;
    width: 100%;
    max-width: 220px;
  }
}

@media (max-width: 480px) {
  .brand-logo-img {
    height: 38px;
  }
  .brand-name {
    font-size: 0.92rem;
  }
  .brand-suffix {
    font-size: 0.58rem;
    letter-spacing: 0.18em;
  }
  .orbit-canvas {
    height: 270px;
  }
  .orbit-ring-outer {
    width: 220px;
    height: 220px;
  }
  .orbit-ring-inner {
    width: 140px;
    height: 140px;
  }
  .orbit-hub {
    width: 88px;
    height: 88px;
  }
  .hub-title { font-size: 0.64rem; }
  .hub-sub { font-size: 0.5rem; }
  .orbit-node {
    width: 30px;
    height: 30px;
    font-size: 0.6rem;
  }
}

/* --------------------------------------------------------------------------
   BACK TO TOP BUTTON
   -------------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.25s ease, visibility 0.3s;
  box-shadow: var(--shadow-sm);
  z-index: 90;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--gold);
}

@media (max-width: 480px) {
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }

  .modal-card {
    padding: 28px 22px;
    max-height: calc(100vh - 24px);
  }
  .modal-backdrop {
    padding: 12px;
  }
  .modal-title {
    font-size: 1.25rem;
  }
}

/* --------------------------------------------------------------------------
   26. REPORTING & REVENUE VISIBILITY — spreadsheet-style report demo
   Uses only existing design tokens. All classes are prefixed .rv-
   -------------------------------------------------------------------------- */
.rv-section {
  background: var(--paper-muted);
  border-bottom: 1px solid var(--line-golden);
}

.rv-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rv-window {
  background: var(--paper-card);
  border: 1px solid var(--line-golden);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* Title bar */
.rv-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.rv-file {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.rv-file svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--gold);
}

.rv-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Status chip: Ready → Generating → Analysis Complete / Report Updated */
.rv-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--paper-card);
  color: var(--ink-soft);
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.rv-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.rv-chip[data-state="open"],
.rv-chip[data-state="building"] {
  background: var(--gold-bg);
  border-color: var(--gold-border);
  color: var(--status-scrubbed-text);
}

.rv-chip[data-state="building"] .rv-chip-dot {
  animation: rvPulse 1.2s ease-in-out infinite;
}

.rv-chip[data-state="done"] {
  background: var(--status-paid-bg);
  border-color: rgba(27, 94, 82, 0.25);
  color: var(--status-paid-text);
}

@keyframes rvPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Demonstration-data label (always visible) */
.rv-demo-flag {
  padding: 7px 14px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--status-scrubbed-text);
  background: var(--gold-bg);
  border-bottom: 1px solid var(--gold-border);
}

.rv-progress {
  height: 2px;
  background: var(--line);
  overflow: hidden;
  transition: opacity 0.6s ease;
}

.rv-progress > span {
  display: block;
  height: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s linear;
}

.rv-progress[data-done="true"] {
  opacity: 0;
}

/* Sheet title strip */
.rv-sheetbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.rv-sheet-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.rv-sheet-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--ink-light);
}

/* Sheet body + tables */
.rv-body {
  min-height: 440px;
}

.rv-noscript {
  padding: 24px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.rv-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 440px;
}

.rv-panel[hidden] {
  display: none;
}

.rv-panel:focus-visible {
  outline-offset: -3px;
}

.rv-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.rv-t0 { min-width: 820px; }
.rv-t1 { min-width: 560px; }
.rv-t2 { min-width: 1000px; }
.rv-t2 th,
.rv-t2 td { padding-left: 10px; padding-right: 10px; }
.rv-t2 .rv-heads th { white-space: normal; line-height: 1.3; vertical-align: bottom; }
.rv-t2 .rv-heads th.rv-num { min-width: 92px; }

.rv-table th,
.rv-table td {
  padding: 10px 14px;
  text-align: left;
  font-weight: 400;
  white-space: nowrap;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.rv-table th:last-child,
.rv-table td:last-child {
  border-right: 0;
}

/* Column letters (A, B, C…) */
.rv-table .rv-letters th {
  padding: 4px 14px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--ink-light);
  background: var(--paper-muted);
}

/* Header row */
.rv-table .rv-heads th {
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 2px solid var(--line-golden);
}

.rv-table .rv-num {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink);
}

.rv-table .rv-mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.rv-table .rv-hot {
  color: var(--status-appealed-text);
}

.rv-table tbody td.rv-c1 {
  font-weight: 500;
  color: var(--ink);
}

/* Row-number gutter */
.rv-table .rv-rn {
  width: 40px;
  min-width: 40px;
  padding: 10px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-light);
  background: var(--paper-muted);
}

.rv-table .rv-letters th.rv-rn,
.rv-table .rv-heads th.rv-rn {
  padding: 4px 0;
}

.rv-table .rv-heads th.rv-rn {
  padding: 10px 0;
}

.rv-table tbody tr {
  background: var(--paper-card);
}

.rv-table tbody tr:nth-child(even) {
  background: var(--paper-warm-glow);
}

.rv-table tbody tr:hover {
  background: #FBF7EC;
}

.rv-table tbody tr.rv-total,
.rv-table tbody tr.rv-total:hover {
  background: #F7F0DC;
}

.rv-table tr.rv-total td {
  font-weight: 600;
  border-top: 2px solid var(--line-golden);
}

.rv-table tr.rv-total td.rv-rn {
  background: var(--paper-accent);
}

/* Patient aging meter */
.rv-aging {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rv-age-label {
  min-width: 98px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink);
}

.rv-meter {
  flex: 1;
  min-width: 90px;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--paper-accent);
  overflow: hidden;
}

.rv-meter i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: var(--radius-full);
  background: var(--gold);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.rv-meter.is-hot i {
  background: var(--status-appealed-text);
  opacity: 0.8;
}

/* Build-up animation states (only present while a sheet is generating) */
.rv-heads .rv-h {
  transition: opacity 0.35s ease;
}

.rv-table tbody tr {
  transition: opacity 0.4s ease;
}

.rv-panel.is-building .rv-heads .rv-h:not(.is-in),
.rv-panel.is-building tbody tr:not(.is-in) {
  opacity: 0;
}

.rv-panel.is-building tbody tr:not(.is-in) .rv-meter i {
  width: 0;
}

/* Sheet tabs (bottom bar) */
.rv-tabbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  background: var(--paper-muted);
  border-top: 1px solid var(--line-golden);
}

.rv-tabs {
  display: flex;
  gap: 2px;
  min-width: 0;
  margin-top: -1px;
  overflow-x: auto;
}

.rv-tab {
  appearance: none;
  border: 1px solid transparent;
  border-top: 0;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: transparent;
  padding: 11px 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.rv-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
}

.rv-tab[aria-selected="true"] {
  background: var(--paper-card);
  border-color: var(--line-golden);
  box-shadow: inset 0 -2px 0 var(--gold);
  color: var(--ink);
  font-weight: 600;
}

.rv-toggle {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 8px;
  flex: none;
  padding: 6px 12px;
  border: 1px solid var(--line-golden);
  border-radius: var(--radius-full);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  margin: 6px 0;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.rv-toggle:hover {
  color: var(--ink);
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.6);
}

.rv-toggle[hidden] {
  display: none;
}

.rv-toggle-icon svg {
  width: 11px;
  height: 11px;
  display: block;
}

/* Caption below the interface */
.rv-caption {
  max-width: 640px;
  margin: 48px auto 0;
  text-align: center;
}

.rv-caption h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
}

.rv-cadence {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--status-scrubbed-text);
}

.rv-support {
  margin-top: 14px;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* Responsive */
@media (max-width: 900px) {
  .rv-table .rv-rn {
    display: none;
  }

  .rv-table .rv-c1 {
    position: sticky;
    left: 0;
    z-index: 2;
    background: inherit;
    box-shadow: 1px 0 0 var(--line);
  }

  .rv-table .rv-letters th.rv-c1 {
    background: var(--paper-muted);
  }

  .rv-table .rv-heads th.rv-c1 {
    background: var(--paper);
  }
}

@media (max-width: 640px) {
  .rv-titlebar {
    padding: 10px 14px;
  }

  .rv-demo-flag {
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    padding: 7px 10px;
  }

  .rv-sheetbar {
    padding: 12px 14px 10px;
  }

  .rv-body,
  .rv-scroll {
    min-height: 400px;
  }

  .rv-table th,
  .rv-table td {
    padding: 9px 12px;
  }

  .rv-tabbar {
    padding: 0 8px;
    gap: 6px;
  }

  .rv-tab {
    padding: 11px 12px;
    font-size: 0.66rem;
  }

  .rv-toggle {
    padding: 9px;
  }

  .rv-toggle-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .rv-caption {
    margin-top: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rv-chip,
  .rv-chip-dot,
  .rv-progress,
  .rv-progress > span,
  .rv-heads .rv-h,
  .rv-table tbody tr,
  .rv-meter i,
  .rv-tab,
  .rv-toggle {
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 480px) {
  .rv-tab {
    padding: 11px 9px;
    font-size: 0.6rem;
    letter-spacing: 0.03em;
  }

  .rv-tabbar {
    padding: 0 6px;
    gap: 4px;
  }
}

/* Keep the nav logo and menu button off the screen edge on narrow viewports */
@media (max-width: 1200px) {
  .nav-container {
    padding-inline: 20px;
  }
}


/* ==========================================================================
   26. UNIFIED CARD DESIGN — every card grid on the site now follows the
   PHI & HIPAA pillar look: unboxed, centered, gold mono number, serif title,
   thin gold gradient dividers between cards. Larger than the PHI original so
   they read clearly; stacks vertically (with horizontal dividers) on mobile.
   ========================================================================== */
.ar-grid,
.challenges-grid,
.services-grid,
.specialties-grid,
.pillars-grid,
.trust-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  counter-reset: pc;
}

.ar-grid > *,
.challenges-grid > *,
.services-grid > *,
.specialties-grid > *,
.pillars-grid > *,
.trust-grid > * {
  flex: 0 0 33.3333%;
  max-width: 33.3333%;
  position: relative;
  counter-increment: pc;
  text-align: center;
  background-color: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  box-shadow: none;
  padding: 48px 34px;
  cursor: default;
  /* horizontal hairline above every row after the first (desktop: 3 per row) */
  background-image: none;
  transition: background-color 0.3s ease, transform 0.15s ease-out;
}

.trust-grid > * { flex-basis: 50%; max-width: 50%; }

/* row separators */
.ar-grid > *:nth-child(n+4),
.challenges-grid > *:nth-child(n+4),
.services-grid > *:nth-child(n+4),
.specialties-grid > *:nth-child(n+4),
.pillars-grid > *:nth-child(n+4),
.trust-grid > *:nth-child(n+3) {
  background-image: linear-gradient(90deg, rgba(197,155,39,0) 0%, rgba(197,155,39,0.45) 50%, rgba(197,155,39,0) 100%);
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% 1px;
}

/* vertical dividers (same gradient as the PHI pillars) */
.ar-grid > *::after,
.challenges-grid > *::after,
.services-grid > *::after,
.specialties-grid > *::after,
.pillars-grid > *::after,
.trust-grid > *::after {
  content: '';
  position: absolute;
  top: 12%;
  bottom: 12%;
  right: 0;
  left: auto;
  width: 1px;
  height: auto;
  opacity: 1;
  background: linear-gradient(180deg, rgba(197,155,39,0) 0%, rgba(197,155,39,0.45) 50%, rgba(197,155,39,0) 100%);
  pointer-events: none;
}

.ar-grid > *:nth-child(3n)::after,
.challenges-grid > *:nth-child(3n)::after,
.services-grid > *:nth-child(3n)::after,
.specialties-grid > *:nth-child(3n)::after,
.pillars-grid > *:nth-child(3n)::after,
.trust-grid > *:nth-child(2n)::after,
.ar-grid > *:last-child::after,
.challenges-grid > *:last-child::after,
.services-grid > *:last-child::after,
.specialties-grid > *:last-child::after,
.pillars-grid > *:last-child::after,
.trust-grid > *:last-child::after {
  display: none;
}

/* hover: soft gold wash instead of a box */
.ar-grid > *:hover,
.challenges-grid > *:hover,
.services-grid > *:hover,
.specialties-grid > *:hover,
.pillars-grid > *:hover,
.trust-grid > *:hover {
  background-color: rgba(197, 155, 39, 0.07);
  border-color: transparent;
  box-shadow: none;
}
.ar-grid > *:hover,
.challenges-grid > *:hover,
.specialties-grid > *:hover,
.trust-grid > *:hover {
  transform: none;
}

/* number label (gold mono) — auto-counted, matches .phi-pillar-num but bigger */
.challenge-card::before,
.specialty-card::before,
.pillar-card::before,
.trust-card::before {
  content: counter(pc, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 14px;
}

.service-num,
.ar-bucket {
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}
.ar-bucket { font-size: 1.5rem; letter-spacing: 0; }

/* icons are replaced by the number label in the pillar/trust cards */
.pillar-card .pillar-icon,
.trust-card .pillar-icon { display: none; }

/* titles + copy — larger than the PHI original */
.ar-card h3,
.challenge-card h3,
.specialty-card h3,
.pillar-card h3,
.trust-card h3,
.service-card h3 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin-bottom: 12px;
}
.ar-card p,
.specialty-card p,
.pillar-card p,
.trust-card p,
.challenge-solution p,
.service-card p {
  font-size: 1rem;
  line-height: 1.65;
}

/* challenge card internals, centered */
.challenge-card { display: block; overflow: visible; }
.problem-label { justify-content: center; }
.solution-divider { width: 60px; margin: 18px auto; }
.ar-tag { margin-bottom: 14px; }

/* services flip cards: front becomes the unboxed pillar, back stays dark */
.service-card { perspective: 1400px; }
.service-card:hover { transform: none; box-shadow: none; }
.flip-card-inner { min-height: 250px; }
.flip-front {
  background: transparent;
  border: 0;
  align-items: center;
  text-align: center;
  padding: 0;
}
.flip-back { border-radius: var(--radius-sm); }
.flip-hint { justify-content: center; }
.service-card:hover .flip-front { background: transparent; }

/* EHR names: same treatment, just larger */
.ehr-badge { padding: 30px 24px; min-height: 108px; font-size: 1.05rem; }

/* ---------- tablet: 2 per row ---------- */
@media (max-width: 992px) {
  .ar-grid > *,
  .challenges-grid > *,
  .services-grid > *,
  .specialties-grid > *,
  .pillars-grid > *,
  .trust-grid > * {
    flex-basis: 50%;
    max-width: 50%;
    background-image: none;
  }
  .ar-grid > *:nth-child(n+3),
  .challenges-grid > *:nth-child(n+3),
  .services-grid > *:nth-child(n+3),
  .specialties-grid > *:nth-child(n+3),
  .pillars-grid > *:nth-child(n+3),
  .trust-grid > *:nth-child(n+3) {
    background-image: linear-gradient(90deg, rgba(197,155,39,0) 0%, rgba(197,155,39,0.45) 50%, rgba(197,155,39,0) 100%);
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 100% 1px;
  }
  .ar-grid > *:nth-child(3n)::after,
  .challenges-grid > *:nth-child(3n)::after,
  .services-grid > *:nth-child(3n)::after,
  .specialties-grid > *:nth-child(3n)::after,
  .pillars-grid > *:nth-child(3n)::after { display: block; }
  .ar-grid > *:nth-child(2n)::after,
  .challenges-grid > *:nth-child(2n)::after,
  .services-grid > *:nth-child(2n)::after,
  .specialties-grid > *:nth-child(2n)::after,
  .pillars-grid > *:nth-child(2n)::after,
  .trust-grid > *:nth-child(2n)::after,
  .ar-grid > *:last-child::after,
  .challenges-grid > *:last-child::after,
  .services-grid > *:last-child::after,
  .specialties-grid > *:last-child::after,
  .pillars-grid > *:last-child::after,
  .trust-grid > *:last-child::after { display: none; }
}

/* ---------- mobile: one per row, vertical stack ---------- */
@media (max-width: 768px) {
  .ar-grid > *,
  .challenges-grid > *,
  .services-grid > *,
  .specialties-grid > *,
  .pillars-grid > *,
  .trust-grid > * {
    flex-basis: 100%;
    max-width: 100%;
    padding: 40px 22px;
    background-image: none;
  }
  /* short centered horizontal divider between stacked cards (as on PHI mobile) */
  .ar-grid > *:nth-child(n+2),
  .challenges-grid > *:nth-child(n+2),
  .services-grid > *:nth-child(n+2),
  .specialties-grid > *:nth-child(n+2),
  .pillars-grid > *:nth-child(n+2),
  .trust-grid > *:nth-child(n+2) {
    background-image: linear-gradient(90deg, rgba(197,155,39,0) 0%, rgba(197,155,39,0.55) 50%, rgba(197,155,39,0) 100%);
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 60% 1px;
  }
  .ar-grid > *::after,
  .challenges-grid > *::after,
  .services-grid > *::after,
  .specialties-grid > *::after,
  .pillars-grid > *::after,
  .trust-grid > *::after { display: none !important; }

  .ar-card h3, .challenge-card h3, .specialty-card h3, .pillar-card h3,
  .trust-card h3, .service-card h3 { font-size: 1.25rem; }
  .flip-card-inner { min-height: 270px; }

  /* Revenue Cycle hub: always a true circle on mobile (was rendering square) */
  .orbit-hub {
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    box-shadow: 0 8px 20px rgba(17, 27, 43, 0.15), 0 0 24px rgba(197, 155, 39, 0.3);
  }
  .orbit-hub:hover { transform: translateZ(0) scale(1.04); }
}

/* services: tighter outer padding so the flipped (dark) face stays generous */
.services-grid > * { padding: 24px 20px; }
@media (max-width: 768px) { .services-grid > * { padding: 16px 8px; } }

/* ==========================================================================
   27. COLOR REFINEMENTS
   - "Financial Bottleneck" label: gold instead of red
   - Flipped service card: warm cream instead of dark ink
   ========================================================================== */
.problem-label { color: var(--gold); }

.flip-back {
  background: var(--paper-accent);
  border: 1px solid var(--gold);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.flip-back .back-metric { color: var(--gold); }
.flip-back .back-metric-label { color: var(--ink-soft); }
.flip-back p { color: var(--ink-soft); }
.flip-back .flip-hint { color: var(--ink-light); }

/* ==========================================================================
   28. "MANY MORE" NOTES — editorial closing line flanked by gold gradient
   rules (same language as the PHI dividers), replacing the generic pill.
   ========================================================================== */
.grid-more-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  max-width: 900px;
  margin: 48px auto 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--ink-soft);
  text-align: center;
}
.grid-more-note::before,
.grid-more-note::after {
  content: '';
  flex: 1 1 60px;
  height: 1px;
  background: linear-gradient(90deg, rgba(197,155,39,0) 0%, rgba(197,155,39,0.6) 100%);
}
.grid-more-note::after {
  background: linear-gradient(90deg, rgba(197,155,39,0.6) 0%, rgba(197,155,39,0) 100%);
}
.grid-more-note .gm-text { flex: 0 1 auto; }
.grid-more-note .gm-plus {
  display: inline-block;
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 600;
  font-size: 1.3em;
  line-height: 1;
  color: var(--gold);
  margin-right: 10px;
  vertical-align: -0.06em;
}
.grid-more-note strong {
  font-weight: 700;
  color: var(--ink);
  font-size: 1.08em;
}
.grid-more-note em {
  font-style: italic;
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(transparent 68%, rgba(197,155,39,0.28) 68%);
  padding: 0 2px;
}

@media (max-width: 768px) {
  .grid-more-note {
    flex-direction: column;
    gap: 16px;
    margin-top: 36px;
    padding: 0 8px;
  }
  .grid-more-note::before,
  .grid-more-note::after {
    flex: none;
    width: 60px;
    height: 1px;
  }
  .grid-more-note::before { background: linear-gradient(90deg, rgba(197,155,39,0), rgba(197,155,39,0.6), rgba(197,155,39,0)); }
  .grid-more-note::after { background: linear-gradient(90deg, rgba(197,155,39,0), rgba(197,155,39,0.6), rgba(197,155,39,0)); }
}

/* ==========================================================================
   29. "MANY MORE" NOTES — toned down to match the PHI closing line:
   quiet serif italic, gold "+", hairline above. No highlights, no heavy bold.
   ========================================================================== */
.grid-more-note {
  display: block;
  max-width: 620px;
  margin: 44px auto 0;
  padding: 28px 0 0;
  border: 0;
  border-top: 1px solid var(--line-golden);
  border-radius: 0;
  background: none;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--ink-soft);
  text-align: center;
}
.grid-more-note::before,
.grid-more-note::after { content: none; display: none; }
.grid-more-note .gm-text { display: inline; }
.grid-more-note .gm-plus {
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gold);
  margin-right: 8px;
  vertical-align: baseline;
}
.grid-more-note strong {
  font-weight: 500;
  font-size: inherit;
  color: var(--ink);
}
.grid-more-note em {
  font-weight: 400;
  color: inherit;
  background: none;
  padding: 0;
}
@media (max-width: 768px) {
  .grid-more-note { margin-top: 32px; padding: 24px 12px 0; font-size: 1.02rem; }
}

/* ==========================================================================
   30. SERVICE FLIP CARDS — auto-fit height
   Both faces now share one grid cell (instead of being absolutely positioned
   over a fixed min-height), so the card always grows to fit whichever face
   has more content and nothing spills out of the top or sides when flipped.
   ========================================================================== */
.service-card { display: flex; }
.flip-card-inner {
  flex: 1 1 auto;
  display: grid;
  min-height: 250px;
  width: 100%;
}
.flip-face {
  position: relative;
  inset: auto;
  grid-area: 1 / 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.flip-back {
  padding: 28px 24px;
  justify-content: center;
  text-align: center;
  align-items: center;
}
.flip-back .back-metric { font-size: clamp(1.6rem, 5vw, 2.1rem); overflow-wrap: normal; }
@media (max-width: 768px) {
  .flip-card-inner { min-height: 240px; }
}

/* ==========================================================================
   31. HERO → PHI SCROLL EFFECT (driven by CSS variables from script.js §6a)
   --hp = hero scroll progress (0 at the very top => fully visible, no stuck
   state possible), --sw = sweep-line strength, --pp = PHI ring progress.
   Fallbacks reproduce the plain static look when JS / variables are absent.
   ========================================================================== */
.hero-copy,
.ledger-wrapper {
  opacity: calc(1 - 0.85 * var(--hp, 0));
  transform: translateY(calc(-40px * var(--hp, 0))) scale(calc(1 - 0.03 * var(--hp, 0)));
}
.hero-orbit-decor {
  /* holds still through the first ~40% of the hero scroll, then eases away
     while the two expanding rings (orbit-fx.js) take over */
  opacity: calc(1 - clamp(0, calc((var(--hp, 0) - 0.4) * 1.8), 1));
  scale: calc(1 + 0.15 * clamp(0, calc((var(--hp, 0) - 0.4) * 1.8), 1));
}
.orbit-sweep-line { opacity: var(--sw, 0.9); }
.phi-orbit-decor {
  opacity: calc(var(--pp, 1) * 0.7);
  scale: calc(0.85 + 0.15 * var(--pp, 1));
}
@media (max-width: 768px) {
  .hero-copy,
  .ledger-wrapper {
    transform: translateY(calc(-20px * var(--hp, 0))) scale(calc(1 - 0.03 * var(--hp, 0)));
  }
  .hero-orbit-decor { scale: calc(1 + 0.1 * clamp(0, calc((var(--hp, 0) - 0.4) * 1.8), 1)); }
  .phi-orbit-decor { opacity: calc(var(--pp, 1) * 0.45); }
}

/* ==========================================================================
   32. NO SIDEWAYS PAGE SCROLL ON MOBILE
   `body { overflow-x: hidden }` alone is ignored by some phone browsers, so
   the page could still be dragged sideways. Clip at the viewport (html) and
   use `clip` on body so it does not turn into a scroll container (which
   would break the sticky header).
   ========================================================================== */
html {
  overflow-x: hidden;
  max-width: 100%;
}
body {
  overflow-x: clip;
  max-width: 100%;
  position: relative;
}
/* the sample report's table may scroll sideways inside its own box, but that
   swipe must never drag the whole page with it */
.rv-scroll {
  overscroll-behavior-x: contain;
}
img, svg, video, canvas { max-width: 100%; }

/* ==========================================================================
   33. PREMIUM HERO → PHI TRANSITION
   Hero exit  : copy drifts up and softly defocuses; the claims card tilts
                back into depth; a golden "horizon" glow rises at the seam.
   Seam       : a luminous gold line draws out from the centre, with a slow
                shimmer travelling along it.
   PHI entry  : masked word-by-word headline, tightening eyebrow, staggered
                pillars with gold dividers that draw downward.
   Everything is derived from scroll position / one-shot transitions, so no
   animation can get stuck mid-way.
   ========================================================================== */

/* ---- hero exit (scroll-driven via --hp) ---- */
.hero-copy {
  opacity: calc(1 - 1.15 * var(--hp, 0));
  transform: translateY(calc(-64px * var(--hp, 0)));
  will-change: transform, opacity;
}
.ledger-wrapper {
  opacity: calc(1 - 1.2 * var(--hp, 0));
  transform: perspective(1400px) translateY(calc(-28px * var(--hp, 0)))
             rotateX(calc(16deg * var(--hp, 0))) rotateY(calc(-9deg * var(--hp, 0)))
             scale(calc(1 - 0.08 * var(--hp, 0)));
  transform-origin: 50% 100%;
  will-change: transform, opacity;
}
/* golden horizon glow rising from the bottom of the hero */
.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60%;
  pointer-events: none;
  z-index: 0;
  opacity: var(--hp, 0);
  background:
    radial-gradient(ellipse 70% 100% at 50% 100%, rgba(197, 155, 39, 0.22) 0%, rgba(197, 155, 39, 0.08) 45%, rgba(197, 155, 39, 0) 75%);
}

/* ---- seam line: draws out from the centre as PHI approaches ---- */
.orbit-sweep-line {
  height: 2px;
  opacity: 1;
  transform: scaleX(var(--pp, 1));
  transform-origin: 50% 50%;
  background: linear-gradient(90deg,
    rgba(197, 155, 39, 0) 0%,
    rgba(197, 155, 39, 0.85) 50%,
    rgba(197, 155, 39, 0) 100%);
  box-shadow: 0 0 22px 2px rgba(197, 155, 39, 0.35);
  overflow: visible;
}
.orbit-sweep-line::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 18%;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255, 236, 170, 0), rgba(255, 236, 170, 0.95), rgba(255, 236, 170, 0));
  filter: blur(1px);
  animation: phiSeamShimmer 7s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}
@keyframes phiSeamShimmer {
  0%   { left: -20%; opacity: 0; }
  12%  { opacity: 1; }
  60%  { left: 102%; opacity: 1; }
  70%, 100% { left: 102%; opacity: 0; }
}

/* ---- PHI entrance (only when JS armed it: html.phi-fx) ---- */
html.phi-fx .phi-head .eyebrow {
  display: inline-block;
  opacity: 0;
  letter-spacing: 0.55em;
  transition: opacity 1.1s ease, letter-spacing 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
html.phi-fx .phi-head.is-in .eyebrow { opacity: 1; letter-spacing: 0.14em; }

.phi-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.phi-wi { display: inline-block; }
html.phi-fx .phi-wi {
  transform: translateY(112%);
  transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: calc(0.25s + var(--i, 0) * 0.07s);
}
html.phi-fx .phi-head.is-in .phi-wi { transform: translateY(0); }

html.phi-fx .phi-subhead,
html.phi-fx .phi-body {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
html.phi-fx .phi-subhead { transition-delay: 0.85s; }
html.phi-fx .phi-body { transition-delay: 1.05s; }
html.phi-fx .phi-head.is-in .phi-subhead,
html.phi-fx .phi-head.is-in .phi-body { opacity: 1; transform: none; }

html.phi-fx .phi-pillar {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease, transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
html.phi-fx .phi-pillars.is-in .phi-pillar { opacity: 1; transform: none; }
html.phi-fx .phi-pillars .phi-pillar:nth-child(1) { transition-delay: 0.15s; }
html.phi-fx .phi-pillars .phi-pillar:nth-child(3) { transition-delay: 0.4s; }
html.phi-fx .phi-pillars .phi-pillar:nth-child(5) { transition-delay: 0.65s; }

html.phi-fx .phi-pillar-divider {
  transform: scaleY(0);
  transform-origin: 50% 0;
  transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
html.phi-fx .phi-pillars.is-in .phi-pillar-divider { transform: scaleY(1); }
html.phi-fx .phi-pillars .phi-pillar-divider:nth-child(2) { transition-delay: 0.5s; }
html.phi-fx .phi-pillars .phi-pillar-divider:nth-child(4) { transition-delay: 0.75s; }

/* gold number glows softly as each pillar arrives */
html.phi-fx .phi-pillar-num { transition: text-shadow 1.6s ease 0.9s; }
html.phi-fx .phi-pillars.is-in .phi-pillar-num { text-shadow: 0 0 14px rgba(197, 155, 39, 0.55); }

html.phi-fx .phi-closing {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1.2s ease 0.5s, transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s;
}
html.phi-fx .phi-closing.is-in { opacity: 1; transform: none; }

/* mobile: lighter touch (no blur, smaller drift), pillars stacked */
@media (max-width: 768px) {
  .hero-copy { transform: translateY(calc(-36px * var(--hp, 0))); }
  .ledger-wrapper {
    transform: perspective(1000px) translateY(calc(-18px * var(--hp, 0)))
               rotateX(calc(10deg * var(--hp, 0))) scale(calc(1 - 0.05 * var(--hp, 0)));
  }
  html.phi-fx .phi-pillar { filter: none; transform: translateY(28px); }
  html.phi-fx .phi-pillars .phi-pillar:nth-child(1) { transition-delay: 0.1s; }
  html.phi-fx .phi-pillars .phi-pillar:nth-child(3) { transition-delay: 0.25s; }
  html.phi-fx .phi-pillars .phi-pillar:nth-child(5) { transition-delay: 0.4s; }
  html.phi-fx .phi-pillar-divider { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .orbit-sweep-line::after { animation: none; opacity: 0; }
}


/* ==========================================================================
   34. ORBIT FX — section hand-off (see orbit-fx.js)
   The section you just left dims slightly while the next one arrives, and
   reveals rise and fade into place. No blur anywhere. The hero's own exit
   (section 31/33) is untouched.
   ========================================================================== */
main > section.fx-section > .container {
  transition: opacity 0.8s ease;
}
main > section.fx-section.fx-past > .container {
  opacity: 0.55;
}

/* fallback reveal path (no GSAP): fade + rise only */
.reveal {
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 768px) {
  main > section.fx-section.fx-past > .container { opacity: 0.65; }
}
@media (prefers-reduced-motion: reduce) {
  main > section.fx-section.fx-past > .container { opacity: 1; }
}
