/* ============================================================================
   CuraPatient · CuraClaims — BOLD layer (federal authority + personality + motion)
   Loads AFTER design-system.css. Adds: command-bar top, dramatic dark hero,
   the animated CARE×CLAIMS genome, the character Panel, count-up, federal seals.
   ========================================================================== */

:root {
  --gold:   #d97706;            /* workbench orange */
  --care:   #2d5a47;            /* dark green — clinical strand */
  --claims: #d97706;            /* orange — compliance strand */
  --night:  #1f3a5e;            /* navy — federal command bar */
}

/* ----------------------------------------------------- Federal command bar */
.topbar { background: var(--night); color: var(--muted-on-dark); border-bottom: 1px solid #223753; }
.topbar__inner { display: flex; align-items: center; justify-content: center; gap: 1.6rem; min-height: 36px; flex-wrap: wrap; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; padding-block: .4rem; }
.topbar span { display: inline-flex; align-items: center; gap: .5rem; }
.topbar b { color: var(--gold); font-weight: 500; }
.topbar .seal-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--care); box-shadow: 0 0 0 3px rgba(42,143,107,.22); }

/* --------------------------------------------------------- Dark nav variant */
.nav--dark { background: rgba(13,26,45,.88); border-bottom: 1px solid var(--line-on-dark); }
.nav--dark .brand__name { color: #fff; }
.nav--dark .brand__name .sub, .nav--dark .brand__reg { color: var(--muted-on-dark); }
.nav--dark .nav__links a { color: var(--paper-on-dark); }
.nav--dark .nav__links a:hover { color: var(--gold); }
.nav--dark .nav__links a[aria-current="page"] { color: #fff; border-bottom-color: var(--gold); }
.nav--dark .nav__toggle { color: #fff; }
@media (max-width: 720px) { .nav--dark .nav__links.open { background: var(--night); border-bottom-color: var(--line-on-dark); } }

/* -------------------------------------------------------------- Bold hero */
.hero--bold { position: relative; overflow: hidden; background: linear-gradient(168deg, #0d1a2d 0%, #122340 60%, #16294a 100%); color: var(--paper-on-dark); padding-block: clamp(3.5rem, 7vw, 6rem) clamp(3rem, 6vw, 5.5rem); }
.hero--bold::before { /* faint federal grid */ content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(126,166,214,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(126,166,214,.06) 1px, transparent 1px); background-size: 46px 46px; mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 40%, transparent 100%); }
.hero--bold .container { position: relative; z-index: 2; }
.hero-blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; z-index: 1; pointer-events: none; }
.hero-blob--amber { width: 520px; height: 520px; background: radial-gradient(circle, rgba(224,162,60,.55), transparent 65%); top: -160px; right: -80px; animation: floatA 16s ease-in-out infinite; }
.hero-blob--green { width: 460px; height: 460px; background: radial-gradient(circle, rgba(42,143,107,.45), transparent 65%); bottom: -200px; left: -120px; animation: floatB 19s ease-in-out infinite; }
.hero-blob--maroon { width: 360px; height: 360px; background: radial-gradient(circle, rgba(138,42,31,.5), transparent 65%); bottom: -120px; right: 18%; animation: floatA 22s ease-in-out infinite reverse; }

.hero--bold h1 { color: #fff; font-weight: 460; font-size: clamp(2.25rem, 1rem + 5.2vw, 5.6rem); line-height: .98; letter-spacing: -.03em; overflow-wrap: break-word; }
.hero--bold .lede { color: var(--paper-on-dark); }
.hero--bold strong, .section--dark strong { color: #fff; }
.hero--bold .eyebrow { color: var(--gold); }
.hero-underline { position: relative; white-space: nowrap; }
.hero-underline::after { content: ""; position: absolute; left: 0; right: 0; bottom: .04em; height: .12em; background: var(--gold); transform: scaleX(0); transform-origin: left; animation: underline 1s var(--ease) .5s forwards; }

.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero-figure { position: relative; display: flex; justify-content: center; }
.hero-figure__spot { position: absolute; inset: 8% 4%; background: radial-gradient(circle at 50% 45%, rgba(224,162,60,.30), transparent 62%); filter: blur(8px); }
.hero-mascot { position: relative; width: min(360px, 80%); filter: drop-shadow(0 24px 40px rgba(0,0,0,.55)); animation: bob 5.5s ease-in-out infinite; }
.hero-chip { position: absolute; z-index: 3; background: rgba(13,26,45,.92); border: 1px solid var(--line-on-dark); border-radius: 10px; padding: .7rem .9rem; box-shadow: var(--shadow-lg); backdrop-filter: blur(6px); }
.hero-chip__label { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-on-dark); display: block; }
.hero-chip__value { font-family: var(--font-serif); font-size: 1.25rem; color: #fff; line-height: 1; }
.hero-chip--tr { top: 6%; right: -2%; animation: bob 6s ease-in-out infinite .4s; }
.hero-chip--bl { bottom: 8%; left: -4%; animation: bob 6.5s ease-in-out infinite .9s; }
.hero-chip__value .verdict { color: #54c79e; }
.hero-chip__value .maroon { color: #e07a6c; }

.hero-creds { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 2rem; }
.cred { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .07em; padding: .45rem .8rem; border: 1px solid var(--line-on-dark); border-radius: 100px; color: var(--paper-on-dark); background: rgba(255,255,255,.03); }
.cred svg { width: 14px; height: 14px; color: var(--gold); }
.hero--bold .btn--ghost { color: #fff; border-color: var(--line-on-dark); }
.hero--bold .btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* ---------------------------------------------------- The CARE×CLAIMS genome */
.genome-wrap { position: relative; }
.genome { width: 100%; height: auto; overflow: visible; }
.genome .strand { fill: none; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.9s var(--ease) forwards; }
.genome .strand--care { stroke: var(--care); }
.genome .strand--claims { stroke: var(--claims); animation-delay: .15s; }
.genome .flow { fill: none; stroke-width: 2; stroke-linecap: round; stroke-dasharray: .012 .06; opacity: .5; animation: flow 2.6s linear infinite; }
.genome .flow--care { stroke: #6fe0b8; }
.genome .flow--claims { stroke: #ffd07a; animation-direction: reverse; }
.genome .rung { stroke: var(--gold); stroke-width: 2; opacity: .22; transform-box: fill-box; transform-origin: center; animation: helixrot 2.2s ease-in-out infinite; }
@keyframes helixrot { 0%, 100% { opacity: .08; stroke-width: 1.1; transform: scaleX(.5); } 50% { opacity: .58; stroke-width: 3.4; transform: scaleX(1); } }
.genome .node { opacity: 0; transform-box: fill-box; transform-origin: center; animation: pop .5s var(--ease) forwards, pulse 3.2s ease-in-out infinite 1.8s; }
.genome .node--care { fill: var(--care); }
.genome .node--claims { fill: var(--claims); }
.genome .node--cross { fill: var(--gold); }
.genome .glabel { font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.genome .glabel--care { fill: #6fe0b8; }
.genome .glabel--claims { fill: #ffd07a; }
.genome__verdict { font-family: var(--font-serif); fill: #fff; }
.genome__verdict-sub { font-family: var(--font-mono); fill: var(--gold); letter-spacing: .12em; text-transform: uppercase; }
.genome-legend { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.4rem; font-family: var(--font-mono); font-size: .78rem; letter-spacing: .04em; }
.genome-legend span { display: inline-flex; align-items: center; gap: .5rem; }
.genome-legend .sw { width: 14px; height: 14px; border-radius: 3px; }
.sw--care { background: var(--care); }
.sw--claims { background: var(--claims); }

/* ---------------------------------------------------------- The Panel (cast) */
.panel-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.character { text-align: center; }
.character__art { position: relative; aspect-ratio: 1; border-radius: 14px; background: linear-gradient(160deg, var(--ink-panel-2), #181410); border: 1px solid var(--line-on-dark); overflow: hidden; display: flex; align-items: flex-end; justify-content: center; transition: transform .25s var(--ease), border-color .25s var(--ease); }
.character__art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 120%, rgba(224,162,60,.22), transparent 60%); }
.character:hover .character__art { transform: translateY(-5px); border-color: var(--gold); }
.character__art img { position: relative; z-index: 1; width: 86%; filter: drop-shadow(0 10px 16px rgba(0,0,0,.5)); transition: transform .3s var(--ease); }
.character:hover .character__art img { transform: scale(1.05); }
.character__name { font-family: var(--font-serif); font-size: 1.05rem; color: var(--ink); margin-top: .7rem; }
.character__role { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin-top: .15rem; }
.section--dark .character__name { color: #fff; }
.section--dark .character__role { color: var(--muted-on-dark); }
@media (max-width: 900px) { .panel-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .panel-grid { grid-template-columns: repeat(2, 1fr); } }

/* feature row with mascot */
.feature-mascot { width: min(300px, 70%); filter: drop-shadow(0 16px 28px rgba(0,0,0,.18)); }
.section--dark .feature-mascot { filter: drop-shadow(0 18px 32px rgba(0,0,0,.5)); }

/* ----------------------------------------------------------- Federal seals */
.seal-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.seal { display: flex; align-items: center; gap: .8rem; padding: .9rem 1.1rem; border: 1px solid var(--line-on-dark); border-radius: 10px; background: linear-gradient(160deg, var(--ink-panel-2), #15110d); }
.seal__ring { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 2px solid var(--gold); display: flex; align-items: center; justify-content: center; color: var(--gold); box-shadow: inset 0 0 0 3px rgba(205,162,61,.15); }
.seal__ring svg { width: 20px; height: 20px; }
.seal__t { font-family: var(--font-serif); font-size: 1rem; color: #fff; line-height: 1.1; }
.seal__s { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-on-dark); }

/* big bold section heads */
.section--punch h2 { font-size: clamp(2.2rem, 1.2rem + 3vw, 3.6rem); }
.kicker-xl { font-family: var(--font-serif); font-size: clamp(3rem, 2rem + 4vw, 5rem); line-height: 1; color: var(--gold); }

/* ----------------------------------------------------------------- Keyframes */
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes flow { to { stroke-dashoffset: -1; } }
@keyframes fadeRung { to { opacity: .5; } }
@keyframes pop { to { opacity: 1; } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@keyframes underline { to { transform: scaleX(1); } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes floatA { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-30px,30px); } }
@keyframes floatB { 0%,100% { transform: translate(0,0); } 50% { transform: translate(40px,-26px); } }

/* ------------------------------------------------------- Texture & depth */
.section--dark { position: relative; }
.tex-grid::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(rgba(205,162,61,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(205,162,61,.045) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, #000 30%, transparent 85%); }
.tex-grid > .container { position: relative; z-index: 1; }
.seal-watermark { position: absolute; right: -56px; bottom: -56px; width: 300px; opacity: .06; pointer-events: none; z-index: 0; }
.glow-edge { position: relative; }
.glow-edge::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .5; }

/* bold color-blocked feature band */
.band { border-radius: var(--r-lg); padding: clamp(2rem, 4vw, 3.2rem); color: #fff; position: relative; overflow: hidden; }
.band--maroon { background: linear-gradient(135deg, #6e211a, #3a1410); }
.band--ink { background: linear-gradient(135deg, var(--ink-panel-2), var(--night)); }
.band h2, .band h3 { color: #fff; }
.band p { color: var(--paper-on-dark); }

/* live determination — pillars stagger + scan line */
.determination.reveal.in .pillar { animation: rowIn .5s var(--ease) backwards; }
.determination.reveal.in .pillar:nth-child(1){animation-delay:.10s}
.determination.reveal.in .pillar:nth-child(2){animation-delay:.22s}
.determination.reveal.in .pillar:nth-child(3){animation-delay:.34s}
.determination.reveal.in .pillar:nth-child(4){animation-delay:.46s}
.determination.reveal.in .pillar:nth-child(5){animation-delay:.58s}
.determination.reveal.in .pillar:nth-child(6){animation-delay:.70s}
.determination--scan { position: relative; }
.determination--scan::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 38%; pointer-events: none; background: linear-gradient(180deg, rgba(205,162,61,.16), transparent); animation: scan 3.4s var(--ease) infinite; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-10px); } }
@keyframes scan { 0% { transform: translateY(-10%); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(260%); opacity: 0; } }

/* per-page bold hero mascot sizing on inner pages */
.hero--bold .hero-mascot--sm { width: min(280px, 70%); }

/* ----------------------------------------------------------- Responsive bold */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { order: -1; margin-bottom: 1rem; }
  .hero-mascot { width: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-blob, .hero-mascot, .hero-chip, .genome .node, .genome .flow { animation: none !important; }
  .genome .strand { stroke-dashoffset: 0 !important; animation: none !important; }
  .genome .rung { opacity: .5 !important; animation: none !important; }
  .genome .node { opacity: 1 !important; }
  .hero-underline::after { transform: scaleX(1) !important; animation: none !important; }
}

/* ================================================================
   GLASS-BOX MARKETING — citation chips + the Auditor's page stamp
   ================================================================ */
.cite { position: relative; cursor: help; border-bottom: 1px dotted rgba(205,162,61,.65); white-space: nowrap; }
.cite__mark { color: var(--gold, #cda23d); font-size: .6em; vertical-align: super; margin-left: 1px; font-family: var(--font-mono); }
.cite__card {
  position: absolute; bottom: calc(100% + 9px); left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: #0d1a2d; color: #ffd98f;
  border: 1px solid rgba(240,179,78,.55); border-radius: 7px;
  padding: .45rem .75rem;
  font-family: var(--font-mono); font-size: .64rem; font-weight: 400; font-style: normal;
  letter-spacing: .05em; line-height: 1.5; text-transform: none; white-space: nowrap;
  opacity: 0; pointer-events: none; z-index: 60;
  box-shadow: 0 16px 34px rgba(0,0,0,.45);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.cite__card::before { content: "source · "; color: #8fa7c4; }
.cite__card::after { /* little pointer */
  content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px;
  border: 5px solid transparent; border-top-color: rgba(240,179,78,.55);
}
.cite:hover .cite__card, .cite:focus .cite__card, .cite:focus-within .cite__card {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
@media (max-width: 640px) {
  .cite__card { white-space: normal; min-width: 200px; }
}

/* the Auditor's stamp — injected by site.js into every footer */
.auditor-stamp {
  display: flex; align-items: center; gap: .85rem;
  width: fit-content; margin: 0 auto 1.8rem;
  padding: .7rem 1.15rem;
  border: 1.5px dashed rgba(205,162,61,.5); border-radius: 10px;
  transform: rotate(-1.2deg);
  transition: transform .3s var(--ease);
}
.auditor-stamp:hover { transform: rotate(0deg); }
.auditor-stamp img { width: 40px; height: 40px; object-fit: contain; }
.auditor-stamp .t {
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted-on-dark); text-align: left; line-height: 1.7; margin: 0;
}
.auditor-stamp .t b { color: var(--gold, #cda23d); font-weight: 500; }
