/* ============================================================
   HoldPoint — Dafren landing page
   Dark, near-black cinematic canvas with violet accent.
   Vanilla CSS · GSAP + ScrollTrigger + Lenis handle motion.
   Re-skin = the 4 --accent* vars below; everything else is the
   frozen Dafren landing foundation (DAFREN-LANDING-TEMPLATE §3).
   ============================================================ */

:root {
  /* ===== PER-PRODUCT: the only block that changes (TEMPLATE §2) ===== */
  --accent:      #8B5CF6;                    /* HoldPoint violet */
  --accent-dim:  #7C3AED;                    /* darker — gradient ends, hovers */
  --accent-glow: rgba(139, 92, 246, 0.18);   /* accent at 0.18 alpha — glows/shadows */
  --accent-ink:  #1E1B4B;                     /* deep indigo — text on solid accent fills */

  /* ===== SHARED FOUNDATION (frozen — TEMPLATE §3) ===== */
  /* Surfaces (near-black cinematic) */
  --bg:            #0A0B0D;
  --bg-elevated:   #141618;
  --bg-card:       #1A1D20;
  --bg-card-hover: #202327;

  /* Borders */
  --border:        #2A2E33;
  --border-strong: #3A3F45;
  --line:          rgba(255, 255, 255, 0.08);

  /* Text */
  --text:           #FFFFFF;
  --text-secondary: #B4B9C0;
  --text-tertiary:  #8A9099;

  /* Status (semantic, never product-tinted) */
  --success: #30D158;
  --warning: #FF9F0A;
  --danger:  #FF453A;

  /* Per-section accents (for .feature[data-accent] overrides) */
  --green:  #30D158;
  --violet: #A78BFA;
  --amber:  #FF9F0A;

  /* Priority (severity scale — --p4 stays teal regardless of brand accent) */
  --p1: #FF3B47; --p2: #FF9F0A; --p3: #FFD60A; --p4: #40E0D0;

  /* Type */
  --sans:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --fs-display: clamp(3rem, 8vw, 6rem);
  --fs-h2:      clamp(2.25rem, 5vw, 3.75rem);
  --fs-h3:      1rem;
  --fs-lead:    clamp(1.0625rem, 1.5vw, 1.25rem);
  --fs-body:    1rem;
  --fs-small:   0.875rem;
  --fs-label:   0.75rem;

  /* Layout */
  --maxw: 1200px;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --section-y: clamp(5rem, 12vh, 9rem);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Lenis manages scroll; disable native smooth when it's active */
html.lenis { scroll-behavior: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Focus ring — TEMPLATE §11 (accent keeps it on-brand, meets 3:1 on dark) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Grain overlay */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Typography ---------- */
h1, h2, h3 { margin: 0; font-weight: 400; }
h1, h2 { font-family: var(--display); letter-spacing: -0.01em; line-height: 1.02; }
h1 { font-size: var(--fs-display); }
h2 { font-size: var(--fs-h2); }
h3 { font-family: var(--sans); font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.eyebrow {
  font-family: var(--sans); font-weight: 600; font-size: var(--fs-label);
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 1.25rem;
}
.eyebrow.center { text-align: center; }

/* ---------- Layout primitives ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-family: var(--sans); font-weight: 600; font-size: var(--fs-small);
  padding: 0.7em 1.2em; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}
.btn-lg { font-size: var(--fs-body); padding: 0.85em 1.5em; }
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 8px 28px var(--accent-glow), inset 0 0 0 1px rgba(255,255,255,0.2);
}
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 80%, white); transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,0.04); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); transform: translateY(-2px); }

/* ---------- Announcement bar ---------- */
.announce {
  position: relative; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; padding: 0.6rem 1rem;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent) 10%, transparent),
    color-mix(in srgb, var(--accent) 10%, transparent));
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-small); color: var(--text-secondary);
}
.announce a { color: var(--accent); font-weight: 600; }
.announce a:hover { text-decoration: underline; }
.announce-x {
  position: absolute; right: 1rem; background: none; border: none;
  color: var(--text-tertiary); cursor: pointer; font-size: 0.8rem;
}
.announce.hide { display: none; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10,11,13,0.8); backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark {
  display: inline-flex; align-items: center;
  font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--text);
}
.wordmark.sm { font-size: 0.95rem; }
.wordmark-accent { color: var(--accent); }
.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-size: var(--fs-small); color: var(--text-secondary); font-weight: 500; transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 1.25rem; }
.nav-signin { font-size: var(--fs-small); color: var(--text-secondary); font-weight: 500; }
.nav-signin:hover { color: var(--text); }
/* Compact, restrained nav CTA so it balances the wordmark */
.nav-actions .btn-primary {
  font-size: 0.8125rem; padding: 0.5em 1.05em;
  box-shadow: 0 2px 12px var(--accent-glow), inset 0 0 0 1px rgba(255,255,255,0.15);
}

/* ---------- Launch pill (replaces "Book a demo" in nav) ---------- */
.nav-launch {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.85rem; border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 0.8125rem; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: all 0.25s ease;
}
.nav-launch:hover {
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}
.launch-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
  animation: launch-pulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes launch-pulse {
  0%, 100% { box-shadow: 0 0 4px 0 var(--accent-glow); }
  50%      { box-shadow: 0 0 10px 3px var(--accent-glow); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding-top: clamp(4rem, 11vh, 8rem); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-bg > div { position: absolute; inset: 0; will-change: transform; }
.hero-backdrop {
  background: url('../images/hero-backdrop.png') center/cover no-repeat;
  opacity: 0.5;
  mix-blend-mode: screen;
  z-index: 0;
}
.hero-sky {
  background:
    radial-gradient(120% 90% at 50% 0%, #161122 0%, #100d18 42%, var(--bg) 78%);
  opacity: 0.45;
}
.hero-stars {
  background-image:
    radial-gradient(1.4px 1.4px at 20% 18%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1.2px 1.2px at 70% 12%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1px 1px at 40% 30%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.6px 1.6px at 85% 26%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 12% 42%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1.3px 1.3px at 58% 38%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 92% 48%, rgba(255,255,255,0.3), transparent);
  opacity: 0.7;
}
.hero-glow {
  background: radial-gradient(60% 40% at 50% 22%, var(--accent-glow), transparent 70%);
  opacity: 0.85;
}
/* Layered "document/seal" forms — same 6-layer structure & parallax speeds */
.hero-ridge { bottom: 0; height: 60%; top: auto; }
.ridge-back {
  background: linear-gradient(to top, #15101f 0%, transparent 100%);
  clip-path: polygon(0 100%, 0 55%, 14% 42%, 28% 52%, 42% 36%, 58% 50%, 72% 34%, 86% 48%, 100% 40%, 100% 100%);
  opacity: 0.8;
}
.ridge-front {
  background: linear-gradient(to top, #0c0a14 0%, #100d18 100%);
  clip-path: polygon(0 100%, 0 70%, 18% 60%, 33% 72%, 50% 58%, 66% 74%, 80% 62%, 100% 72%, 100% 100%);
}
.hero-route {
  bottom: 0; top: auto; height: 30%;
  background:
    linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--accent) 35%, transparent) 50%, transparent 100%) center/100% 2px no-repeat;
  opacity: 0.5;
  mask-image: linear-gradient(to top, #000, transparent);
}

.hero-copy { position: relative; z-index: 2; text-align: center; padding-bottom: clamp(2.5rem, 6vh, 4rem); }
.hero-title { margin: 0 auto 1.5rem; max-width: 16ch; }
.hero-sub { margin: 0 auto 2rem; max-width: 46ch; font-size: var(--fs-lead); color: var(--text-secondary); }
.hero-sub .ul { color: var(--text); border-bottom: 1.5px solid var(--accent); padding-bottom: 1px; }
.hero-cta { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   DEMO WINDOW (shared app-window frame)
   ============================================================ */
.demo-window {
  position: relative; z-index: 2;
  width: min(960px, 100%);
  margin: 0 auto;
  background: linear-gradient(180deg, var(--bg-elevated), #0c0e10);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 120px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03) inset,
              0 0 80px color-mix(in srgb, var(--accent) 6%, transparent);
  overflow: hidden;
}
.hero .demo-window { margin-top: 0; }
.demo-chrome {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 1rem; border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
}
.demo-chrome-left, .demo-chrome-right { display: flex; align-items: center; gap: 0.6rem; }
.demo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); box-shadow: 16px 0 0 var(--border-strong), 32px 0 0 var(--border-strong); margin-right: 28px; }
.brand-mark.sm { width: 20px; height: 20px; border-radius: 6px; background: linear-gradient(135deg, var(--accent), var(--accent-dim)); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 0.7rem; }
.demo-crumb { font-size: var(--fs-small); color: var(--text-secondary); font-weight: 500; }
.demo-crumb-sep { color: var(--text-tertiary); }
.demo-crumb-mute { font-size: var(--fs-small); color: var(--text-tertiary); }

.demo-tabs {
  display: flex; gap: 0.25rem; padding: 0.6rem 0.75rem 0; border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
}
.demo-tabs::-webkit-scrollbar { display: none; }
.demo-tab {
  font-family: var(--sans); font-size: var(--fs-small); font-weight: 500;
  color: var(--text-tertiary); background: none; border: none; cursor: pointer;
  padding: 0.5rem 0.85rem; border-radius: 8px 8px 0 0; position: relative; white-space: nowrap;
  transition: color 0.15s;
}
.demo-tab:hover { color: var(--text-secondary); }
.demo-tab.active { color: var(--text); }
.demo-tab.active::after {
  content: ''; position: absolute; left: 0.5rem; right: 0.5rem; bottom: -1px; height: 2px;
  background: var(--accent); border-radius: 2px; box-shadow: 0 0 10px var(--accent);
}

.demo-stage { position: relative; padding: 1.1rem; min-height: 340px; }
.demo-pane { display: none; }
.demo-pane.active { display: block; animation: paneIn 0.4s cubic-bezier(0.2,0.8,0.2,1); }
.demo-pane[hidden] { display: none; }
@keyframes paneIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---- status banner ---- */
.status-banner {
  padding: 0.85rem 1rem; margin-bottom: 0.85rem;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 8%, transparent),
    color-mix(in srgb, var(--accent) 2%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); border-radius: var(--radius-md);
  display: flex; align-items: center; gap: 0.75rem;
}
.status-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: ring 2s infinite; flex-shrink: 0; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 var(--accent-glow);} 100% { box-shadow: 0 0 0 12px transparent;} }
.signal-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.4;} }
.status-text { flex: 1; }
.status-label { font-size: 0.65rem; color: var(--text-tertiary); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.status-value { font-size: 1rem; font-weight: 700; margin-top: 2px; }
.eta { font-size: var(--fs-small); color: var(--accent); font-weight: 600; font-family: var(--mono); }

/* ---- document header ---- */
.job-header {
  padding: 1rem; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); position: relative; overflow: hidden; margin-bottom: 0.85rem;
}
.job-header::after { content:''; position:absolute; top:0; left:0; right:0; height:3px; background: var(--warning); box-shadow: 0 0 18px var(--warning); }
.job-id-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; gap: 0.5rem; }
.job-id { font-family: var(--mono); font-size: var(--fs-small); color: var(--text-secondary); font-weight: 600; }
.priority-badge { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.55rem; border-radius: 8px; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.05em; font-family: var(--mono); }
.priority-badge.p1 { background: rgba(255,59,71,0.15); color: var(--p1); border:1px solid rgba(255,59,71,0.3); }
/* risk-score pill (mono, banded — DAFREN/HoldPoint §1.4) */
.risk-pill { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.55rem; border-radius: 8px; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.04em; font-family: var(--mono); }
.risk-pill.low  { background: rgba(48,209,88,0.15);  color: var(--success); border: 1px solid rgba(48,209,88,0.3); }
.risk-pill.med  { background: rgba(255,159,10,0.15);  color: var(--warning); border: 1px solid rgba(255,159,10,0.3); }
.risk-pill.high { background: rgba(255,69,58,0.15);   color: var(--danger);  border: 1px solid rgba(255,69,58,0.3); }
.priority-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.job-title { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.job-subtitle { font-size: var(--fs-small); color: var(--text-secondary); margin-top: 0.2rem; }

/* ---- stepper ---- */
.stepper { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; position: relative; }
.stepper::before { content:''; position:absolute; top: 11px; left: 8%; right: 8%; height: 2px; background: var(--border); }
.step { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; flex: 1; cursor: pointer; position: relative; z-index: 1; transition: transform 0.15s; }
.step:active { transform: scale(0.95); }
.step-circle {
  width: 22px; height: 22px; border-radius: 50%; background: var(--bg-card);
  border: 2px solid var(--border); display: grid; place-items: center;
  font-size: 0.7rem; color: transparent; line-height: 1;
  transition: all 0.3s cubic-bezier(0.2,0.8,0.2,1);
}
.step.done .step-circle { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 12px var(--accent-glow); }
.step.current .step-circle { border-color: var(--accent); background: var(--bg); animation: stepPulse 1.5s infinite; }
@keyframes stepPulse { 0%,100%{ box-shadow: 0 0 0 0 var(--accent-glow);} 50%{ box-shadow: 0 0 0 6px transparent;} }
.step-label { font-size: 0.6rem; color: var(--text-tertiary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.step.done .step-label, .step.current .step-label { color: var(--accent); }
.step.current .step-label { color: var(--text); }

/* ---- mini section + tasks ---- */
.mini-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0.9rem 1rem; }
.mini-head { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); margin-bottom: 0.6rem; }
.task-list { list-style: none; margin: 0; padding: 0; }
.task { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.55rem 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.task:last-child { border-bottom: none; }
.checkbox { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--border-strong); flex-shrink: 0; display: grid; place-items: center; font-size: 0.7rem; color: transparent; line-height: 1; transition: all 0.2s cubic-bezier(0.2,0.8,0.2,1); }
.task.checked .checkbox { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 4px var(--accent-glow); }
.task-title { font-size: var(--fs-small); font-weight: 500; line-height: 1.4; transition: all 0.2s; }
.task-ref { font-family: var(--mono); font-size: 0.62rem; color: var(--text-tertiary); margin-right: 0.4rem; }
.task.checked .task-title { color: var(--text-tertiary); text-decoration: line-through; text-decoration-color: var(--accent); }
.task-progress { margin-top: 0.85rem; padding: 0.7rem 0.85rem; background: var(--bg-elevated); border-radius: var(--radius-sm); display: flex; align-items: center; }
.progress-text { font-size: 0.7rem; color: var(--text-secondary); font-weight: 600; }
.progress-bar { flex: 1; height: 6px; background: var(--border); border-radius: 3px; margin: 0 0.75rem; overflow: hidden; }
.progress-fill { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, var(--accent-dim), var(--accent)); border-radius: 3px; box-shadow: 0 0 8px var(--accent-glow); transition: width 0.5s cubic-bezier(0.2,0.8,0.2,1); }
.progress-count { font-size: var(--fs-small); font-weight: 700; color: var(--accent); font-family: var(--mono); }
.demo-hint { margin-top: 0.85rem; text-align: center; font-size: 0.7rem; color: var(--text-tertiary); }

/* ---- findings list (Gatekeeper) ---- */
.findings { list-style: none; margin: 0; padding: 0; }
.finding { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.55rem 0; border-bottom: 1px solid var(--border); }
.finding:last-child { border-bottom: none; }
.finding-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 6px; background: currentColor; box-shadow: 0 0 8px currentColor; }
.finding.crit { color: var(--danger); }
.finding.imp  { color: var(--warning); }
.finding.opt  { color: var(--info, #3B82F6); }
.finding-body { color: var(--text); }
.finding-tag { font-family: var(--mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.04em; }
.finding-text { display: block; font-size: var(--fs-small); color: var(--text-secondary); font-weight: 500; line-height: 1.4; margin-top: 1px; }

/* ---- dispatch / pipeline board (kanban) ---- */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.board-col { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0.7rem; min-height: 240px; }
.board-col-head { display: flex; align-items: center; gap: 0.45rem; font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.6rem; }
.board-count, .board-meta { margin-left: auto; font-size: 0.65rem; color: var(--text-tertiary); font-family: var(--mono); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-teal { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.dot-amber { background: var(--amber); }
.dot-green { background: var(--success); box-shadow: 0 0 8px rgba(48,209,88,0.4); }
.job-chip { background: var(--bg-elevated); border: 1px solid var(--border); border-left: 3px solid var(--p4); border-radius: 8px; padding: 0.5rem 0.6rem; margin-bottom: 0.5rem; }
.job-chip.p1 { border-left-color: var(--p1); }
.job-chip.p2 { border-left-color: var(--p2); }
.job-chip.p3 { border-left-color: var(--p3); }
.job-chip.p4 { border-left-color: var(--p4); }
.job-chip.placed { background: color-mix(in srgb, var(--accent) 6%, transparent); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.chip-id { display: block; font-family: var(--mono); font-size: 0.6rem; color: var(--text-tertiary); }
.chip-title { display: block; font-size: 0.78rem; font-weight: 500; margin-top: 2px; }
.board-suggest { font-size: 0.68rem; color: var(--accent); font-weight: 600; padding: 0.35rem 0.5rem; border: 1px dashed color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 7px; }

/* ---- capture grid + signature ---- */
.capture-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.cap-photo, .cap-add { aspect-ratio: 1; border-radius: var(--radius-sm); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem; }
.cap-photo { background: radial-gradient(circle at 30% 24%, color-mix(in srgb, var(--accent) 25%, transparent), transparent 40%), linear-gradient(145deg, #1d1a26, #0e0d13); border: 1px solid var(--border); position: relative; overflow: hidden; }
.cap-ic { font-size: 1.4rem; color: rgba(255,255,255,0.5); }
.cap-label { font-size: 0.58rem; color: var(--text-tertiary); text-align: center; padding: 0 0.3rem; }
.cap-add { border: 1.5px dashed var(--border-strong); color: var(--text-secondary); }
.cap-add span:first-child { font-size: 1.3rem; }
.cap-sign { margin-top: 0.85rem; padding: 1rem; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); position: relative; }
.cap-sign-line { height: 1px; background: var(--border-strong); margin-bottom: 0.5rem; }
.sign-name { font-family: "Instrument Serif", cursive; font-style: italic; font-size: 1.5rem; color: var(--accent); }
.cap-sign-hint { display: block; font-size: 0.65rem; color: var(--text-tertiary); margin-top: 0.3rem; font-family: var(--mono); }

/* ---- AI report (streaming text) ---- */
.report-source { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.9rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 0.85rem; }
.waveform { display: flex; align-items: center; gap: 3px; height: 28px; }
.waveform span { width: 3px; border-radius: 2px; background: var(--accent); opacity: 0.8; animation: wave 1.1s ease-in-out infinite; }
.waveform span:nth-child(odd) { animation-delay: 0.15s; }
.waveform span:nth-child(3n) { animation-delay: 0.3s; }
.waveform span:nth-child(1){height:40%}.waveform span:nth-child(2){height:70%}.waveform span:nth-child(3){height:100%}.waveform span:nth-child(4){height:55%}.waveform span:nth-child(5){height:85%}.waveform span:nth-child(6){height:45%}.waveform span:nth-child(7){height:95%}.waveform span:nth-child(8){height:60%}.waveform span:nth-child(9){height:80%}.waveform span:nth-child(10){height:50%}.waveform span:nth-child(11){height:90%}.waveform span:nth-child(12){height:65%}
@keyframes wave { 0%,100%{ transform: scaleY(0.5);} 50%{ transform: scaleY(1);} }
.report-src-label { font-size: 0.75rem; color: var(--text-secondary); font-weight: 500; }
.report-src-chips { margin-left: auto; font-size: 0.68rem; color: var(--text-tertiary); font-family: var(--mono); }
.report-out { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; min-height: 150px; }
.report-h { font-weight: 700; font-size: 0.85rem; color: var(--accent); margin-bottom: 0.6rem; font-family: var(--mono); }
.report-body { font-size: var(--fs-small); color: var(--text-secondary); line-height: 1.65; white-space: pre-wrap; }
.report-cursor { display: inline-block; width: 8px; height: 1rem; background: var(--accent); vertical-align: middle; margin-left: 2px; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---- portal (KPIs + status rows) ---- */
.portal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin-bottom: 0.85rem; }
.kpi { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem 0.85rem; text-align: center; }
.kpi-val { font-family: var(--mono); font-size: 1.6rem; font-weight: 600; color: var(--accent); font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.kpi-label { font-size: 0.65rem; color: var(--text-tertiary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.2rem; }
.portal-rows { display: flex; flex-direction: column; gap: 0.5rem; }
.portal-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.85rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pr-ref { font-family: var(--mono); font-size: 0.62rem; color: var(--text-tertiary); flex-shrink: 0; }
.pr-title { font-size: var(--fs-small); font-weight: 500; }
.pr-tag { margin-left: auto; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.2rem 0.5rem; border-radius: 6px; font-family: var(--mono); }
.pr-tag.done { background: rgba(48,209,88,0.15); color: var(--success); }
.pr-tag.live { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.pr-tag.sched { background: rgba(255,159,10,0.15); color: var(--amber); }
.pr-tag.returned { background: rgba(255,69,58,0.15); color: var(--danger); }

/* ---- audit trail + cert ---- */
.trail { list-style: none; margin: 0 0 0.85rem; padding: 0; position: relative; }
.trail::before { content:''; position:absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.trail-item { display: flex; gap: 0.85rem; padding: 0.5rem 0; position: relative; }
.trail-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--green); box-shadow: 0 0 8px rgba(48,209,88,0.4); flex-shrink: 0; margin-top: 2px; z-index: 1; }
.trail-t { display: block; font-size: var(--fs-small); font-weight: 600; }
.trail-m { display: block; font-size: 0.68rem; color: var(--text-tertiary); font-family: var(--mono); margin-top: 1px; }
.cert-card { display: flex; align-items: center; gap: 0.85rem; padding: 0.85rem 1rem; background: linear-gradient(135deg, rgba(48,209,88,0.1), transparent); border: 1px solid rgba(48,209,88,0.3); border-radius: var(--radius-md); }
.cert-ic { font-size: 1.3rem; color: var(--green); }
.cert-t { display: block; font-size: var(--fs-small); font-weight: 700; }
.cert-m { display: block; font-size: 0.68rem; color: var(--text-tertiary); font-family: var(--mono); }
.cert-go { margin-left: auto; color: var(--green); font-size: 1.1rem; }

/* ============================================================
   TRUST STRIP
   ============================================================ */
.trust { padding: clamp(3rem, 7vh, 5rem) 0 1rem; text-align: center; }
.trust-eyebrow { font-size: var(--fs-small); color: var(--text-tertiary); margin-bottom: 2rem; }
.trust-grid {
  max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.trust-grid span {
  background: var(--bg); padding: 1.5rem 1rem;
  font-weight: 600; letter-spacing: 0.05em; color: var(--text-tertiary); font-size: 0.95rem;
  display: grid; place-items: center;
}
.trust-note { font-size: 0.72rem; color: var(--text-tertiary); margin-top: 1rem; opacity: 0.7; }
.trust-note.center { text-align: center; }

/* ============================================================
   FEATURE SECTIONS (scrollytelling + rail)
   ============================================================ */
.features { position: relative; padding: clamp(4rem, 9vh, 7rem) 0; }
.rail {
  position: absolute; left: max(1.25rem, calc((100vw - var(--maxw)) / 2 + var(--gutter)));
  top: 0; bottom: 0; width: 2px; background: var(--border); border-radius: 2px;
}
.rail-fill { display: block; width: 100%; height: 100%; transform-origin: top; transform: scaleY(0); background: linear-gradient(var(--accent), var(--accent-dim)); border-radius: 2px; box-shadow: 0 0 12px var(--accent-glow); }

.feature {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem, 9vh, 7rem) var(--gutter);
  padding-left: calc(var(--gutter) + 2.5rem);
  display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "pill demo" "text demo";
  column-gap: clamp(2rem, 5vw, 4.5rem); row-gap: 0; align-items: center;
}
/* default feature inherits the product accent (--accent); these recolor per section */
.feature[data-accent="green"]  { --accent: var(--green); }
.feature[data-accent="violet"] { --accent: var(--violet); }
.feature[data-accent="amber"]  { --accent: var(--amber); }

.pill {
  grid-area: pill; justify-self: start;
  display: inline-block; font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.04em;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 0.3rem 0.7rem; border-radius: 100px; margin-bottom: 1.25rem;
}
.feature-text { grid-area: text; }
.feature-text h2 { margin-bottom: 1.25rem; }
.feature-lead { font-size: var(--fs-lead); color: var(--text-secondary); max-width: 42ch; }
.learn { display: inline-block; margin-top: 1.25rem; font-weight: 600; font-size: var(--fs-small); color: var(--accent); }
.learn:hover { text-decoration: underline; }
.feature-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
.fcol-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-size: 0.95rem; margin-bottom: 0.6rem; }
.fcol h3 { margin-bottom: 0.35rem; }
.fcol p { font-size: var(--fs-small); color: var(--text-tertiary); line-height: 1.5; }
.replaces { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--text-tertiary); display: flex; align-items: center; gap: 0.5rem; }
.replaces em { color: var(--text-secondary); font-style: normal; }
.replaces-ic { color: var(--text-tertiary); }

.feature-demo { grid-area: demo; }
.feature-demo .demo-window { width: 100%; }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testi { padding: var(--section-y) 0 clamp(3rem,7vh,5rem); overflow: hidden; }
.testi-feature { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: clamp(3.5rem, 8vh, 6rem); }
.testi-card { margin: 0; padding: 1.75rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; }
.testi-card p { font-size: 1.05rem; line-height: 1.55; color: var(--text); }
.testi-card footer { display: flex; align-items: center; gap: 0.75rem; }
.ava { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-dim)); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 0.8rem; flex-shrink: 0; }
.testi-card footer strong { display: block; font-size: var(--fs-small); font-weight: 600; }
.testi-card footer span span { font-size: 0.72rem; color: var(--text-tertiary); }
.testi-h { text-align: center; font-size: var(--fs-h2); }
.testi-sub { text-align: center; color: var(--text-secondary); margin-top: 0.75rem; }

.marquee { margin-top: clamp(3rem, 7vh, 5rem); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 1rem; width: max-content; }
.m-card { flex-shrink: 0; padding: 1rem 1.4rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 100px; font-size: var(--fs-small); color: var(--text-secondary); white-space: nowrap; }
.m-card em { color: var(--text-tertiary); font-style: normal; }

/* ============================================================
   SPLIT-FLAP STAT BOARD
   ============================================================ */
.board-stats { padding: var(--section-y) 0; }
.flap-rows { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; max-width: 760px; margin: 2rem auto 0; }
.flap-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.4rem clamp(1rem, 3vw, 2rem); background: #0c0e10; }
.flap-label { font-size: var(--fs-small); color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.flap-digits { display: flex; gap: 4px; }
.flap-cell {
  display: inline-grid; place-items: center; width: clamp(20px, 4.5vw, 30px); height: clamp(30px, 6.5vw, 42px);
  background: linear-gradient(180deg, #1c2024 0 50%, #111417 50% 100%);
  border: 1px solid #000; border-radius: 5px;
  font-family: var(--mono); font-weight: 600; font-size: clamp(1.1rem, 3vw, 1.6rem); color: var(--text);
  position: relative; overflow: hidden;
  font-feature-settings: "tnum"; font-variant-numeric: tabular-nums;
}
.flap-cell::after { content:''; position:absolute; left:0; right:0; top:50%; height:1px; background: rgba(0,0,0,0.6); }

/* ============================================================
   FINALE
   ============================================================ */
.finale { position: relative; padding: clamp(5rem, 12vh, 9rem) 0 clamp(6rem, 14vh, 11rem); overflow: hidden; text-align: center; }
.finale-car { position: absolute; inset: 0; z-index: 0; display: flex; align-items: flex-end; justify-content: center; gap: 1.5rem; padding-bottom: 4rem; pointer-events: none; }
.finale-window { width: clamp(120px, 20vw, 260px); aspect-ratio: 4/3; border-radius: 16px 16px 28px 28px; overflow: hidden; border: 1px solid var(--border-strong); box-shadow: 0 0 60px color-mix(in srgb, var(--accent) 15%, transparent), inset 0 0 40px rgba(0,0,0,0.5); position: relative; background: linear-gradient(160deg, #16121f, #0c0a12); }
.finale-window-wide { width: clamp(160px, 26vw, 340px); }
.finale-window img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; }
.finale-window::after { content:''; position:absolute; inset:0; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 70%); }
.finale-platform { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(to top, var(--bg), transparent), repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 60px); opacity: 0.4; }
.finale::before { content:''; position:absolute; inset:0; background: radial-gradient(60% 50% at 50% 60%, rgba(10,11,13,0.15), rgba(10,11,13,0.65) 80%); z-index: 1; }
.finale-copy { position: relative; z-index: 2; }
.finale-copy h2 { margin: 0 auto 1.25rem; }
.finale-copy > p { font-size: var(--fs-lead); color: var(--text-secondary); margin-bottom: 2rem; max-width: 40ch; margin-inline: auto; }
.finale-reassure { margin-top: 1.5rem; font-size: var(--fs-small); color: var(--text-tertiary); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { border-top: 1px solid var(--line); padding: clamp(3.5rem, 8vh, 5rem) 0 2.5rem; background: #08090b; }
.footer-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 6vw, 5rem); }
.footer-featured { display: flex; flex-direction: column; gap: 1rem; max-width: 360px; }
.footer-feat-card { padding: 1.1rem 1.25rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); transition: border-color 0.18s; }
.footer-feat-card:hover { border-color: var(--border-strong); }
.footer-feat-card strong { display: block; font-size: var(--fs-small); font-weight: 600; margin-bottom: 0.3rem; }
.footer-feat-card .accent { color: var(--accent); font-weight: 600; }
.footer-feat-card span { font-size: var(--fs-small); color: var(--text-tertiary); }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.footer-col h4 { font-size: var(--fs-label); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-tertiary); margin-bottom: 1rem; }
.footer-col a { display: block; font-size: var(--fs-small); color: var(--text-secondary); padding: 0.3rem 0; transition: color 0.15s; }
.footer-col a:hover { color: var(--text); }
.footer-bar { display: flex; align-items: center; gap: 1.5rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.footer-tagline { font-size: 0.72rem; color: var(--text-tertiary); font-family: var(--mono); letter-spacing: 0.04em; }
.footer-status { font-size: 0.72rem; color: var(--success); font-family: var(--mono); }
.footer-copy { margin-left: auto; font-size: 0.72rem; color: var(--text-tertiary); }

/* ============================================================
   REVEAL (JS-driven) + reduced motion
   ============================================================ */
.js-ready .reveal { opacity: 0; transform: translateY(24px); }
.js-ready .reveal.in { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2,0.8,0.2,1); }

@media (prefers-reduced-motion: reduce) {
  .js-ready .reveal { opacity: 1 !important; transform: none !important; }
  .rail-fill { transform: scaleY(1) !important; }
  .waveform span, .status-pulse, .signal-dot, .step.current .step-circle { animation: none !important; }
  .grain { display: none; }
  * { scroll-behavior: auto !important; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .feature {
    grid-template-columns: 1fr; grid-template-areas: "pill" "demo" "text";
    padding-left: calc(var(--gutter) + 2rem); row-gap: 1.25rem;
  }
  .feature > .pill { margin-bottom: 0; }
  .testi-feature { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links, .nav-signin { display: none; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-cols { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .board { grid-template-columns: 1fr; }
  .board-col { min-height: 0; }
  .demo-stage { min-height: 0; overflow: hidden; }
  .rail { display: none; }
  .feature { padding-left: var(--gutter); }
  .finale-window { width: 38vw; }
}
