/* =========================================================
   HRNS · patterns.css
   Composed, page-level blocks: hero, services, case-studies,
   steps, stats, logo wall, diagram, activity feed.
   Import after tokens.css + base.css + components.css.
   ========================================================= */

/* Hero */
.hero { padding: 112px 0 80px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 300px at 20% 0%, oklch(0.70 0.17 255 / 0.14), transparent 70%),
    radial-gradient(700px 340px at 90% 10%, oklch(0.72 0.17 290 / 0.12), transparent 70%);
}
.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.15fr 1fr;
  gap: 56px; align-items: center;
}
.hero h1 {
  font-size: clamp(48px, 6.2vw, 84px);
  line-height: 0.98; letter-spacing: -0.035em; font-weight: 500;
  margin-top: 20px; text-wrap: balance;
}
.hero h1 em {
  font-style: normal; color: var(--accent);
  text-shadow: 0 0 40px oklch(0.82 0.16 220 / 0.4);
}
.hero p.lede {
  font-size: 18px; line-height: 1.55; color: var(--fg-1);
  max-width: 540px; margin-top: 24px;
}
.hero-ctas { margin-top: 32px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero-trust {
  margin-top: 48px; display: flex; gap: 14px; align-items: center;
  font-family: var(--f-mono); font-size: 11.5px; color: var(--fg-3);
  letter-spacing: 0.04em; flex-wrap: wrap;
}

/* Hero right visual panel + activity feed */
.hero-panel {
  background: var(--bg-1);
  border: 1px solid var(--line-0);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 40px 80px -40px oklch(0 0 0 / 0.6);
}
.hero-panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--bg-2);
  border-bottom: 1px solid var(--line-0);
  font-family: var(--f-mono); font-size: 11.5px; color: var(--fg-2);
}
.hero-panel-head .title { color: var(--fg-0); margin-right: auto; font-weight: 500; }
.activity { padding: 8px 0; }
.activity-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; border-bottom: 1px dashed var(--line-0);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.activity-body { flex: 1; }
.activity-title { font-size: 13.5px; color: var(--fg-0); }
.activity-meta { display: flex; gap: 10px; margin-top: 4px; font-family: var(--f-mono); font-size: 11px; color: var(--fg-3); }
.activity-time { font-family: var(--f-mono); font-size: 11px; color: var(--fg-3); flex-shrink: 0; }

/* Service card */
.svc { display: flex; flex-direction: column; gap: 16px; min-height: 280px; }
.svc-icon {
  width: 40px; height: 40px; border-radius: var(--r-sm);
  background: var(--bg-2); border: 1px solid var(--line-1);
  display: grid; place-items: center; color: var(--accent);
}
.svc-meta {
  margin-top: auto; display: flex; justify-content: space-between; align-items: center;
  padding-top: 16px; border-top: 1px dashed var(--line-0);
  font-family: var(--f-mono); font-size: 11.5px; color: var(--fg-2); letter-spacing: 0.02em;
}
.svc-meta b { color: var(--fg-0); font-weight: 500; }

/* Case study */
.case-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.case-logo { font-family: var(--f-mono); font-weight: 600; font-size: 14px; letter-spacing: 0.02em; color: var(--fg-0); }
.case-metric { display: flex; align-items: baseline; gap: 8px; }
.case-metric .big {
  font-size: 48px; letter-spacing: -0.03em; font-weight: 500;
  color: var(--accent); line-height: 1;
}
.case-metric .lbl { color: var(--fg-2); font-size: 13px; }
.case-quote {
  font-size: 15px; line-height: 1.55; color: var(--fg-0);
  margin: 20px 0; letter-spacing: -0.005em;
}
.case-byline {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 11.5px; color: var(--fg-2);
  letter-spacing: 0.02em;
}

/* Process step */
.step {
  position: relative; padding: 24px; border: 1px solid var(--line-0);
  border-radius: var(--r-lg); background: var(--bg-1);
  display: flex; flex-direction: column; gap: 12px; min-height: 200px;
}
.step-num { font-family: var(--f-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.12em; }
.step-title { font-size: 17px; font-weight: 600; }
.step-desc { font-size: 13.5px; color: var(--fg-1); line-height: 1.55; }
.step-duration { margin-top: auto; font-family: var(--f-mono); font-size: 11px; color: var(--fg-3); letter-spacing: 0.04em; }

/* Stats */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  border-top: 1px dashed var(--line-0); border-bottom: 1px dashed var(--line-0);
  padding: 32px 0;
}
.stat-num { font-size: 48px; letter-spacing: -0.03em; margin-top: 6px; font-weight: 500; }
.stat-num .u { color: var(--fg-2); font-size: 22px; font-weight: 400; }
.stat-num .d { color: var(--accent); font-size: 16px; margin-left: 8px; }
.stat-lbl { font-family: var(--f-mono); color: var(--fg-3); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }

/* Logo wall */
.logo-wall {
  display: grid; grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--line-0); border-radius: var(--r-lg);
  overflow: hidden;
}
.logo-cell {
  padding: 28px 20px; border-right: 1px solid var(--line-0);
  border-bottom: 1px solid var(--line-0);
  display: grid; place-items: center;
  font-family: var(--f-sans); font-weight: 500; font-size: 16px;
  color: var(--fg-2); letter-spacing: 0.01em;
  transition: color var(--dur), background var(--dur);
}
.logo-cell:hover { color: var(--fg-0); background: var(--bg-1); }
.logo-cell:nth-child(6n) { border-right: none; }
.logo-cell:nth-last-child(-n+6) { border-bottom: none; }

/* =========================================================
   Diagram — knowledge graph (agent + branches + tool logos)
   Agent hub at center · 4 category branches · tool chips +
   activity cards scattered organically · thin wire connections.
   ========================================================= */
.graph {
  background:
    radial-gradient(60% 50% at 50% 48%, oklch(0.82 0.16 220 / 0.10), transparent 70%),
    var(--bg-1);
  border: 1px solid var(--line-0);
  border-radius: var(--r-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.graph-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 720px;
}

/* Subtle dot grid behind everything */
.graph-stage::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(oklch(0.30 0.014 255 / 0.6) 1px, transparent 1.5px);
  background-size: 28px 28px;
  mask-image: radial-gradient(70% 60% at 50% 50%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 50%, #000 40%, transparent 100%);
  pointer-events: none;
  opacity: 0.6;
}

/* Wires layer — under everything */
.graph-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.graph-wires path { fill: none; stroke-width: 1; }
.graph-wires .w-cyan   { stroke: oklch(0.82 0.16 220 / 0.55); }
.graph-wires .w-blue   { stroke: oklch(0.70 0.17 255 / 0.55); }
.graph-wires .w-violet { stroke: oklch(0.72 0.17 290 / 0.55); }
.graph-wires .w-dim    { stroke: oklch(0.82 0.16 220 / 0.20); stroke-dasharray: 2 4; }

/* Every positioned item uses left/top in % and is translate-centered */
.g-node {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
}

/* --- Central hub --- */
.hub {
  width: 132px; height: 132px; border-radius: 50%;
  background:
    radial-gradient(closest-side, oklch(0.82 0.16 220 / 0.25), transparent 72%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1.5px solid oklch(0.82 0.16 220 / 0.6);
  box-shadow:
    0 0 0 8px oklch(0.82 0.16 220 / 0.06),
    0 0 80px -10px oklch(0.82 0.16 220 / 0.65);
  display: grid; place-items: center;
  text-align: center;
  z-index: 5;
}
.hub .hub-mark {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 34px;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
  text-shadow: 0 0 24px oklch(0.82 0.16 220 / 0.6);
}
.hub .hub-mark sub {
  display: block; font-size: 9.5px; font-family: var(--f-mono);
  color: var(--fg-1); letter-spacing: 0.14em; margin-top: 6px;
  text-transform: uppercase; text-shadow: none;
}

/* --- Branch label (primary categories: Activity, Projects, People, Data) --- */
.branch {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  padding: 10px 18px;
  font-family: var(--f-sans); font-weight: 600; font-size: 15px;
  color: var(--fg-0); letter-spacing: -0.01em;
  box-shadow: var(--sh-1);
  white-space: nowrap;
}
.branch.b-cyan   { border-color: oklch(0.82 0.16 220 / 0.55); box-shadow: 0 0 0 1px oklch(0.82 0.16 220 / 0.25), 0 1px 2px oklch(0 0 0 / 0.4); }
.branch.b-blue   { border-color: oklch(0.70 0.17 255 / 0.55); box-shadow: 0 0 0 1px oklch(0.70 0.17 255 / 0.25), 0 1px 2px oklch(0 0 0 / 0.4); }
.branch.b-violet { border-color: oklch(0.72 0.17 290 / 0.55); box-shadow: 0 0 0 1px oklch(0.72 0.17 290 / 0.25), 0 1px 2px oklch(0 0 0 / 0.4); }
.branch.b-warn   { border-color: oklch(0.82 0.14 85 / 0.55);  box-shadow: 0 0 0 1px oklch(0.82 0.14 85 / 0.25),  0 1px 2px oklch(0 0 0 / 0.4); }

/* --- Tool logo badge (circle with logo) --- */
.logo-node {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  display: grid; place-items: center;
  box-shadow: var(--sh-1);
  transition: transform var(--dur) var(--ease);
}
.logo-node.lg { width: 52px; height: 52px; }
.logo-node.sm { width: 36px; height: 36px; }
.logo-node svg { width: 56%; height: 56%; display: block; }
.logo-node .logo-fill {
  width: 100%; height: 100%; border-radius: 50%;
  display: grid; place-items: center;
}

/* --- Activity / task card (little sub-entity blob) --- */
.act-card {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  min-width: 170px; max-width: 220px;
  box-shadow: var(--sh-1);
  font-family: var(--f-sans);
}
.act-card .act-eyebrow {
  font-family: var(--f-mono); font-size: 9.5px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 4px;
}
.act-card.tone-cyan   .act-eyebrow { color: oklch(0.82 0.16 220); }
.act-card.tone-blue   .act-eyebrow { color: oklch(0.70 0.17 255); }
.act-card.tone-violet .act-eyebrow { color: oklch(0.72 0.17 290); }
.act-card.tone-warn   .act-eyebrow { color: oklch(0.82 0.14 85); }
.act-card .act-title {
  font-size: 13px; color: var(--fg-0); line-height: 1.35;
  letter-spacing: -0.005em;
}
.act-card .act-bar {
  height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, var(--bg-3), transparent);
  margin-top: 8px; width: 70%;
}
.act-card.ghost { opacity: 0.45; }

/* --- Small colored dot markers (to add texture like the reference) --- */
.g-dot {
  position: absolute;
  width: 6px; height: 6px; border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

/* Fade out edges of stage slightly */
.graph-stage::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg-1) 0%, transparent 10%, transparent 90%, var(--bg-1) 100%),
    linear-gradient(180deg, var(--bg-1) 0%, transparent 8%, transparent 92%, var(--bg-1) 100%);
  opacity: 0.55;
  z-index: 4;
}

@media (max-width: 960px) {
  .graph-stage { aspect-ratio: 4/5; }
  .hub { width: 100px; height: 100px; }
  .hub .hub-mark { font-size: 26px; }
  .branch { font-size: 13px; padding: 8px 12px; }
  .logo-node { width: 36px; height: 36px; }
  .logo-node.lg { width: 44px; height: 44px; }
  .logo-node.sm { width: 30px; height: 30px; }
  .act-card { min-width: 130px; padding: 8px 10px; }
  .act-card .act-title { font-size: 11.5px; }
}

/* =========================================================
   Legacy orbit styles (kept to avoid regressions if reused)
   ========================================================= */
.orbit {
  background:
    radial-gradient(closest-side at 50% 50%, oklch(0.82 0.16 220 / 0.10), transparent 60%),
    var(--bg-1);
  border: 1px solid var(--line-0); border-radius: var(--r-lg);
  padding: 56px; position: relative; overflow: hidden;
  min-height: 560px;
}
.orbit-stage {
  position: relative;
  width: 100%;
  max-width: 680px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}
.orbit-ring {
  position: absolute; inset: 0;
  border: 1px dashed oklch(0.82 0.16 220 / 0.22);
  border-radius: 50%;
  animation: orbit-spin 80s linear infinite;
}
.orbit-ring.inner { inset: 16%; border-color: oklch(0.82 0.16 220 / 0.30); animation-duration: 60s; animation-direction: reverse; }
.orbit-ring.outer { inset: -8%; border-color: oklch(0.82 0.16 220 / 0.14); animation-duration: 120s; }
@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .orbit-ring { animation: none; }
}

/* Center agent node */
.orbit-core {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 180px; height: 180px; border-radius: 50%;
  background:
    radial-gradient(closest-side, oklch(0.82 0.16 220 / 0.22), transparent 72%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid oklch(0.82 0.16 220 / 0.55);
  box-shadow:
    0 0 0 6px oklch(0.82 0.16 220 / 0.06),
    0 0 60px -10px oklch(0.82 0.16 220 / 0.55),
    inset 0 1px 0 oklch(1 0 0 / 0.05);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center;
  z-index: 3;
}
.orbit-core .core-mark {
  width: 34px; height: 34px; position: relative;
  border-radius: var(--r-sm);
  background: var(--bg-0);
  border: 1px solid oklch(0.82 0.16 220 / 0.5);
  display: grid; place-items: center;
  margin-bottom: 2px;
}
.orbit-core .core-mark::before,
.orbit-core .core-mark::after { content: ''; position: absolute; background: var(--accent); }
.orbit-core .core-mark::before { width: 14px; height: 2px; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.orbit-core .core-mark::after  { width: 2px; height: 14px; top: 50%; left: 50%; transform: translate(-50%,-50%); box-shadow: 0 0 12px var(--accent); }
.orbit-core .core-label {
  font-family: var(--f-mono); font-size: 10.5px; color: var(--accent);
  letter-spacing: 0.14em; text-transform: uppercase;
}
.orbit-core .core-title {
  font-family: var(--f-sans); font-size: 15px; font-weight: 600; color: var(--fg-0);
  letter-spacing: -0.01em; max-width: 140px;
}
.orbit-core .core-sub {
  font-family: var(--f-mono); font-size: 10.5px; color: var(--fg-2);
  letter-spacing: 0.04em;
}

/* Tool chips placed around the orbit */
.orbit-tool {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-2); border: 1px solid var(--line-1);
  border-radius: 999px;
  padding: 8px 14px 8px 8px;
  box-shadow: var(--sh-1);
  font-family: var(--f-sans); font-size: 13px; color: var(--fg-0);
  font-weight: 500; letter-spacing: -0.005em;
  z-index: 2;
  white-space: nowrap;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.orbit-tool:hover { border-color: var(--accent); }
.orbit-tool .tool-ic {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-0); border: 1px solid var(--line-0);
  flex-shrink: 0;
}
.orbit-tool .tool-ic svg { width: 16px; height: 16px; display: block; }

/* Connector lines from each tool to the core */
.orbit-wires { position: absolute; inset: 0; pointer-events: none; z-index: 1; }

@media (max-width: 1000px) {
  .orbit { padding: 32px 16px; min-height: 480px; }
  .orbit-core { width: 140px; height: 140px; }
  .orbit-tool { font-size: 12px; padding: 6px 10px 6px 6px; }
  .orbit-tool .tool-ic { width: 22px; height: 22px; }
  .orbit-tool .tool-ic svg { width: 13px; height: 13px; }
}

/* Responsive */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; }
  .diagram-grid { grid-template-columns: 1fr; }
  .logo-wall { grid-template-columns: repeat(3, 1fr); }
  .logo-cell:nth-child(6n) { border-right: 1px solid var(--line-0); }
  .logo-cell:nth-child(3n) { border-right: none; }
  .logo-cell:nth-last-child(-n+6) { border-bottom: 1px solid var(--line-0); }
  .logo-cell:nth-last-child(-n+3) { border-bottom: none; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
