/* Brightcore v2 — base: tokens, layout, header, hero, audit card */
:root {
  --bc-bg: #07100f;
  --bc-bg-2: #0a1614;
  --bc-surface: #0e1c1a;
  --bc-surface-2: #112320;
  --bc-ink: #eef4f2;
  --bc-muted: #b3c2bf;
  --bc-dim: #7c8c89;
  --bc-line: rgba(150, 180, 175, .12);
  --bc-line-strong: rgba(150, 180, 175, .2);
  --bc-green: #6fe39a;
  --bc-green-2: #3aa86e;
  --bc-blue: #4f9bd6;
  --bc-blue-2: #2f6faa;
  --bc-amber: #e8b667;
  --bc-red: #e87d7d;
  --bc-radius: 12px;
  --bc-shell: min(1360px, 92vw);
  --bc-display: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --bc-body: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --bc-mono: "JetBrains Mono", ui-monospace, monospace;
  --bc-ease: cubic-bezier(.22, .9, .28, 1);
  --bc-motion: 1; /* tweakable scale */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.bc-cinema { margin: 0; background: var(--bc-bg); color: var(--bc-ink); font-family: var(--bc-body); font-size: 16px; line-height: 1.65; overflow-x: hidden; }
body.bc-cinema::before { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient(circle at 68% 15%, rgba(111, 227, 154, .08), transparent 32%), radial-gradient(circle at 20% 15%, rgba(109, 182, 238, .06), transparent 28%), linear-gradient(180deg, #07100f 0%, #07100f 52%, #06100f 100%); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.bc-shell { width: var(--bc-shell); margin-inline: auto; }
.bc-main { overflow: clip; }
.bc-icon { width: 22px; height: 22px; flex: 0 0 auto; }

/* cursor glow util — declared early so positioned components can override `position` */
.bc-glow { position: relative; }
.bc-glow::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s ease; background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(111, 227, 154, .1), transparent 60%); z-index: 1; }
.bc-glow:hover::before { opacity: 1; }

/* ---------- Header: frosted, shrinks on scroll ---------- */
.bc-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; border-bottom: 1px solid transparent; transition: background .35s var(--bc-ease), border-color .35s var(--bc-ease), backdrop-filter .35s var(--bc-ease); }
.bc-header.is-scrolled { background: rgba(7, 16, 15, .72); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border-bottom-color: var(--bc-line); }
.bc-header-inner { height: 82px; display: flex; align-items: center; justify-content: space-between; transition: height .35s var(--bc-ease); }
.bc-header.is-scrolled .bc-header-inner { height: 62px; }
.bc-brand { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; font-family: var(--bc-display); font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.bc-brand b { font-weight: 400; }
.bc-brand-mark { width: 26px; height: 26px; position: relative; display: inline-block; transform: rotate(30deg); border: 1px solid var(--bc-green); transition: transform .6s var(--bc-ease); }
.bc-brand:hover .bc-brand-mark { transform: rotate(120deg); }
.bc-brand-mark span { position: absolute; width: 8px; height: 8px; background: var(--bc-green); }
.bc-brand-mark span:nth-child(1) { top: 2px; left: 2px; }
.bc-brand-mark span:nth-child(2) { bottom: 2px; left: 8px; background: var(--bc-blue); }
.bc-brand-mark span:nth-child(3) { top: 5px; right: 2px; background: #b7e0d4; }
.bc-nav { display: flex; align-items: center; gap: 40px; font-size: 15px; font-weight: 600; }
.bc-nav a { position: relative; color: #d8e0e4; transition: color .2s ease; }
.bc-nav a:not(.bc-nav-enterprise)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 1px; background: var(--bc-green); transition: right .3s var(--bc-ease); }
.bc-nav a:not(.bc-nav-enterprise):hover::after { right: 0; }
.bc-nav a:hover, .bc-nav a:focus-visible { color: var(--bc-green); }
.bc-nav-enterprise { margin-left: 12px; padding-left: 32px; border-left: 1px solid var(--bc-line-strong); color: var(--bc-green) !important; display: inline-flex; align-items: center; gap: 8px; }
.bc-nav-enterprise .bc-icon { width: 15px; height: 15px; transform: rotate(-45deg); transition: transform .3s var(--bc-ease); }
.bc-nav-enterprise:hover .bc-icon { transform: rotate(0deg); }

/* ---------- Buttons ---------- */
.bc-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.bc-button { position: relative; overflow: hidden; display: inline-flex; min-height: 58px; padding: 0 30px; align-items: center; justify-content: center; gap: 20px; border: 1px solid var(--bc-green); border-radius: 6px; background: var(--bc-green); color: #03120e; font-weight: 700; font-size: 16.5px; transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s var(--bc-ease), box-shadow .25s ease; will-change: transform; }
.bc-button::after { content: ""; position: absolute; top: 0; bottom: 0; left: -80%; width: 50%; background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); transition: left .6s var(--bc-ease); pointer-events: none; }
.bc-button:hover::after { left: 130%; }
.bc-button:hover, .bc-button:focus-visible { background: #9af0b3; border-color: #9af0b3; transform: translateY(-2px); box-shadow: 0 12px 34px rgba(111, 227, 154, .25); }
.bc-button .bc-icon { width: 18px; height: 18px; transition: transform .25s var(--bc-ease); }
.bc-button:hover .bc-icon { transform: translateX(4px); }
.bc-button-outline { background: transparent; color: var(--bc-ink); border-color: rgba(130, 212, 155, .6); }
.bc-button-outline:hover, .bc-button-outline:focus-visible { background: rgba(130, 212, 155, .08); color: var(--bc-green); border-color: var(--bc-green); box-shadow: 0 12px 34px rgba(111, 227, 154, .12); }

/* ---------- Hero ---------- */
.bc-hero { min-height: 100vh; display: flex; align-items: center; border-bottom: 1px solid var(--bc-line); padding-top: 82px; background: radial-gradient(circle at 58% 44%, rgba(111, 227, 154, .1), transparent 24%), radial-gradient(circle at 74% 33%, rgba(109, 182, 238, .08), transparent 28%); position: relative; }
.bc-hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: 70px; align-items: center; padding-block: 66px 56px; }
.bc-hero-copy h1 { font-family: var(--bc-display); font-size: clamp(58px, 7vw, 96px); line-height: .94; letter-spacing: -.04em; font-weight: 800; margin: 0 0 28px; text-wrap: balance; }
.bc-keep-line { white-space: nowrap; }
.bc-hero-copy h1 > span:not(.bc-keep-line) { color: transparent; background: linear-gradient(90deg, var(--bc-blue), var(--bc-green), var(--bc-blue)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; animation: bc-gradient-pan 7s linear infinite; }
@keyframes bc-gradient-pan { to { background-position: -200% 0; } }
.bc-hero-copy p { max-width: 560px; color: var(--bc-muted); font-size: 22px; line-height: 1.48; margin: 0 0 30px; }
/* headline word-by-word entrance */
.bc-hero-copy h1 .bc-w { display: inline-block; opacity: 0; transform: translateY(.6em) rotate(2deg); filter: blur(6px); }
.bc-loaded .bc-hero-copy h1 .bc-w { opacity: 1; transform: none; filter: none; transition: opacity .8s var(--bc-ease), transform .8s var(--bc-ease), filter .8s var(--bc-ease); transition-delay: var(--d, 0s); }
.bc-proof-strip { margin-top: 42px; padding-top: 28px; border-top: 1px solid var(--bc-line); display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 640px; }
.bc-proof-strip span { display: flex; gap: 12px; align-items: center; color: var(--bc-muted); font-size: 15px; line-height: 1.4; }
.bc-proof-strip .bc-icon { color: var(--bc-green); width: 30px; height: 30px; }

/* ---------- Hero composite: animated scan ---------- */
.bc-hero-visual { min-height: 560px; position: relative; display: flex; align-items: center; justify-content: flex-end; }
.bc-hero-composite { position: relative; width: min(100%, 680px); min-height: 480px; isolation: isolate; transform-style: preserve-3d; }
.bc-doc-photo { position: absolute; left: 0; top: 28px; width: 300px; height: 420px; object-fit: cover; box-shadow: 0 30px 70px rgba(0, 0, 0, .38), 0 0 36px rgba(111, 227, 154, .08); }
.bc-hero-composite::before { content: ""; position: absolute; left: 150px; top: 36px; bottom: 54px; width: 240px; z-index: 2; background: linear-gradient(90deg, rgba(7, 16, 15, 0), rgba(7, 16, 15, .74) 60%, rgba(7, 16, 15, .94)); pointer-events: none; }
/* the moving scan line — sweeps down the document */
.bc-scan-line { position: absolute; left: 0; width: 300px; top: 28px; height: 2px; z-index: 4; background: linear-gradient(90deg, rgba(111, 227, 154, 0), var(--bc-green) 24%, var(--bc-green) 78%, rgba(111, 227, 154, 0)); box-shadow: 0 0 18px var(--bc-green), 0 0 54px rgba(111, 227, 154, .6); opacity: 0; transform: translateY(0); }
.bc-scan-line::after { content: ""; position: absolute; left: 0; right: 0; top: 2px; height: 64px; background: linear-gradient(180deg, rgba(111, 227, 154, .18), transparent); }
.is-scanning .bc-scan-line { opacity: 1; animation: bc-scan-sweep calc(2.6s / var(--bc-motion, 1)) var(--bc-ease) forwards; }
@keyframes bc-scan-sweep { from { transform: translateY(0); } to { transform: translateY(414px); } }
/* doc glow while scanning */
.is-scanning .bc-doc-photo { box-shadow: 0 30px 70px rgba(0, 0, 0, .38), 0 0 60px rgba(111, 227, 154, .22); }
/* connector node */
.bc-scan-next { position: absolute; right: 410px; top: 264px; z-index: 7; width: 48px; height: 48px; transform: translateX(50%); display: grid; place-items: center; border: 1px solid rgba(111, 227, 154, .55); border-radius: 50%; color: var(--bc-ink); background: rgba(7, 21, 22, .88); box-shadow: 0 0 0 1px rgba(238, 244, 242, .08), 0 0 34px rgba(111, 227, 154, .22); }
.bc-scan-next::before { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid rgba(111, 227, 154, .55); animation: bc-pulse-ring 2.4s ease-out infinite; }
@keyframes bc-pulse-ring { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.9); opacity: 0; } }
.bc-scan-next .bc-icon { width: 23px; height: 23px; }

/* ---------- Audit card (live) ---------- */
.bc-audit-card { position: absolute; right: 0; top: 22px; z-index: 5; width: 390px; border: 1px solid var(--bc-line-strong); border-radius: 12px; background: rgba(4, 14, 19, .94); color: var(--bc-ink); overflow: hidden; box-shadow: 0 34px 80px rgba(0, 0, 0, .38); transition: box-shadow .5s ease, border-color .5s ease; }
.is-complete .bc-audit-card { border-color: rgba(111, 227, 154, .4); box-shadow: 0 34px 80px rgba(0, 0, 0, .38), 0 0 50px rgba(111, 227, 154, .14); }
.bc-card-status { display: flex; align-items: center; gap: 9px; padding: 14px 18px; border-bottom: 1px solid var(--bc-line-strong); color: var(--bc-green); text-transform: uppercase; letter-spacing: .16em; font-size: 10px; font-weight: 800; }
.bc-card-status .bc-icon { width: 16px; height: 16px; }
.bc-card-status .bc-status-busy, .bc-card-status .bc-status-done { display: none; align-items: center; gap: 9px; }
.is-scanning .bc-status-busy { display: inline-flex; color: var(--bc-blue); }
.is-complete .bc-status-done { display: inline-flex; }
.bc-status-busy i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid rgba(109, 182, 238, .3); border-top-color: var(--bc-blue); animation: bc-spin .8s linear infinite; }
@keyframes bc-spin { to { transform: rotate(360deg); } }
.bc-card-grade { padding: 18px 18px 16px; border-bottom: 1px solid var(--bc-line); }
.bc-card-grade small, .bc-risk-meter small, .bc-key-findings small { display: block; color: #9eafbd; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 700; }
.bc-card-grade > div { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 20px; margin-top: 10px; }
.bc-card-grade b { font-family: var(--bc-display); font-size: 48px; line-height: .9; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.bc-card-grade b em { color: var(--bc-muted); font-family: var(--bc-body); font-size: 15px; font-style: normal; font-weight: 600; letter-spacing: 0; }
.bc-card-grade strong { color: var(--bc-green); font-size: 58px; line-height: .85; font-weight: 700; display: inline-block; opacity: 0; transform: scale(.4); }
.is-complete .bc-card-grade strong { opacity: 1; transform: scale(1); transition: opacity .45s var(--bc-ease), transform .55s cubic-bezier(.18, 1.6, .4, 1); transition-delay: .9s; }
.bc-card-grade p { max-width: 240px; margin: 10px 0 0; color: var(--bc-muted); font-size: 12px; line-height: 1.35; }
.bc-risk-meter { padding: 14px 18px; border-bottom: 1px solid var(--bc-line); }
.bc-risk-meter span { display: inline-block; margin: 7px 14px 0 0; color: var(--bc-green); font-size: 20px; font-weight: 700; }
.bc-risk-meter i { display: inline-block; width: 190px; height: 6px; background: rgba(111, 227, 154, .18); position: relative; overflow: hidden; }
.bc-risk-meter i::after { content: ""; position: absolute; inset: 0 100% 0 0; background: var(--bc-green); box-shadow: 0 0 20px rgba(111, 227, 154, .4); }
.is-complete .bc-risk-meter i::after { inset: 0 42% 0 0; transition: inset 1s var(--bc-ease) 1s; }
.bc-key-findings { padding: 14px 18px 16px; }
.bc-key-findings span { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 7px 9px; margin-top: 6px; border: 1px solid var(--bc-line); color: #d6e1de; font-size: 12px; opacity: 0; transform: translateX(14px); }
.is-complete .bc-key-findings span { opacity: 1; transform: none; transition: opacity .5s var(--bc-ease), transform .5s var(--bc-ease); transition-delay: calc(1.2s + var(--i, 0) * .18s); }
.bc-key-findings i { color: var(--bc-green); font-style: normal; }
.bc-key-findings .is-amber { color: var(--bc-amber); }
.bc-mini-button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 42px; margin: 0 18px 18px; padding: 0 20px; border: 1px solid rgba(111, 227, 154, .58); border-radius: 4px; color: var(--bc-ink); font-size: 12px; font-weight: 700; transition: background .25s ease, transform .25s var(--bc-ease); }
.bc-mini-button:hover { background: rgba(111, 227, 154, .1); transform: translateY(-1px); }
.bc-mini-button .bc-icon { width: 15px; height: 15px; color: var(--bc-green); }

/* manual (scroll-driven) scan mode: JS drives the line, CSS animation off */
.bc-hero-composite.is-manual .bc-scan-line { animation: none !important; transition: opacity .2s ease; }
.bc-hero-composite.is-manual .bc-doc-redactions i { transform: scaleX(0); transition-delay: 0s !important; }
.bc-hero-composite.is-manual .bc-doc-redactions i.is-show { transform: scaleX(1); }

/* redaction bars that appear on the note as the scan passes */
.bc-doc-redactions { position: absolute; left: 0; top: 28px; width: 300px; height: 420px; z-index: 3; pointer-events: none; }
.bc-doc-redactions i { position: absolute; height: 9px; border-radius: 2px; background: rgba(111, 227, 154, .85); box-shadow: 0 0 12px rgba(111, 227, 154, .5); transform: scaleX(0); transform-origin: left center; }
.is-scanning .bc-doc-redactions i, .is-complete .bc-doc-redactions i { transform: scaleX(1); transition: transform .4s var(--bc-ease); transition-delay: var(--rd, 0s); }

/* (glow util moved to top of file so component position rules take precedence) */

@media (prefers-reduced-motion: reduce) {
  .bc-hero-copy h1 .bc-w { opacity: 1; transform: none; filter: none; }
  .bc-scan-line, .bc-scan-next::before, .bc-hero-copy h1 > span:not(.bc-keep-line) { animation: none !important; }
}

/* WP: offset the fixed header on pages without a full-bleed hero */
body.bc-cinema:not(.home):not(.bcp-audit-page):not(.bcp-code-page) { padding-top: 82px; }
@media (max-width: 760px) {
  body.bc-cinema:not(.home):not(.bcp-audit-page):not(.bcp-code-page) { padding-top: 70px; }
}
