/* Inner Edge home: the herd and the one that stands out (2026-11-21).
   Layout: one sticky stage. The herd is drawn on a canvas by herd.js; the copy, the half circle and the
   service circles sit on top. Without JavaScript, or with reduced motion, the services show as a plain list. */

/* The header floats over the stage while the story runs. */
.home .site-header { position: fixed; left: 0; right: 0; top: 0; background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.home .site-header.scrolled,
.home .site-header:has(.nav.open) { background: rgba(7, 10, 9, 0.78); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }

.story { position: relative; background: var(--paper); }
.story-stage {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  background:
    radial-gradient(60% 45% at 50% 58%, rgba(67, 229, 143, 0.06), transparent 70%),
    radial-gradient(120% 80% at 50% 40%, #0C110F 0%, #070A09 55%, #040605 100%);
}
.story-view { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
.story-herd { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.story-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(110% 85% at 50% 50%, transparent 55%, rgba(2, 4, 3, 0.85) 100%); }

/* The two lines of copy and the hint */
.story-copy { position: absolute; left: 0; right: 0; margin: 0; text-align: center; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); will-change: transform, opacity; z-index: 2; }
.story-copy-top { top: calc(72px + 4.5vh); }
.story-copy-top h1 { margin: 0; color: #fff; font-weight: 800; font-size: clamp(44px, 8.4vw, 124px); line-height: .95; letter-spacing: -0.045em; }
.story-copy-top h1 em { font-style: italic; font-weight: 800; color: var(--glow); padding-right: .04em; text-shadow: 0 0 34px rgba(67, 229, 143, 0.55), 0 0 2px rgba(67, 229, 143, 0.6); }
.story-copy-bottom { bottom: calc(7vh + 34px); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: clamp(21px, 2.9vw, 40px); line-height: 1.12; letter-spacing: -0.025em; text-wrap: balance; }
.story-copy-bottom em { font-style: italic; color: var(--glow); text-shadow: 0 0 22px rgba(67, 229, 143, 0.45); }
.story-hint { position: absolute; z-index: 3; left: max(24px, env(safe-area-inset-left, 0px)); bottom: max(22px, env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted); text-decoration: none; opacity: .7; transition: color .2s ease, opacity .2s ease; }
.story-hint:hover { color: var(--glow); opacity: 1; }
.story-hint svg { width: 12px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; animation: hint-bob 2.2s var(--ease) infinite; }
@keyframes hint-bob { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(4px); } }

/* Parts that only the scroll story uses */
.story-arc, .story-card { display: none; }

/* ---------- Plain list: no JavaScript, or reduced motion ---------- */
.story-services { position: relative; z-index: 2; background: var(--paper); border-top: 1px solid var(--line); padding: var(--space-24) max(16px, env(safe-area-inset-right, 0px)) var(--space-24) max(16px, env(safe-area-inset-left, 0px)); }
.story-services-head { max-width: 720px; margin: 0 auto var(--space-12); text-align: center; }
.story-services-head .eyebrow { justify-content: center; }
.svc-list { list-style: none; max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-6); }
.svc { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-6); }
.svc-node { display: flex; align-items: center; gap: 12px; width: 100%; padding: 0; margin: 0 0 var(--space-2); background: none; border: 0; color: var(--ink); font: 700 20px/1.2 var(--font-display); letter-spacing: -0.015em; text-align: left; cursor: default; }
.svc-num { font-size: 13px; color: var(--glow); font-weight: 700; }
.svc-icon { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--glow); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.svc-text { margin: 0; color: var(--ink-muted); font-size: 16px; }
.story-services-cta { text-align: center; margin: var(--space-12) 0 0; }
.story:not(.is-live) .story-stage { min-height: 0; overflow: visible; }

/* ---------- The scroll story (herd.js adds .is-live) ---------- */
.story.is-live { height: 640vh; }
.story.is-live .story-stage { position: sticky; top: 0; height: 100vh; height: 100svh; }
.story.is-live .story-view { position: absolute; inset: 0; height: auto; }
.story.is-live .story-arc { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; overflow: visible; }
.story-arc path { fill: none; }
.story-arc .arc-main { stroke: var(--glow); stroke-width: 1.5; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(67, 229, 143, 0.8)); }
.story-arc .arc-inner { stroke: rgba(67, 229, 143, 0.22); stroke-width: 1; stroke-dasharray: 2 9; }

.story.is-live .story-services { position: absolute; inset: 0; padding: 0; margin: 0; border: 0; background: none; z-index: 3; pointer-events: none; }
.story.is-live .story-services-cta { display: none; }
.story.is-live .story-services-head,
.story.is-live .svc-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.story.is-live .svc-list { display: block; max-width: none; margin: 0; }
.story.is-live .svc {
  position: absolute; left: 0; top: 0; width: var(--d, 140px); height: var(--d, 140px); padding: 0; border: 0; background: none;
  opacity: 0; will-change: transform, opacity; pointer-events: none;
}
.story.is-live .svc.shown { pointer-events: auto; }
.story.is-live .svc-node {
  width: 100%; height: 100%; margin: 0; padding: 10px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  background: radial-gradient(circle at 50% 28%, rgba(67, 229, 143, 0.14), rgba(67, 229, 143, 0) 70%), #08100C;
  border: 1px solid rgba(67, 229, 143, 0.38);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 0 0 0 rgba(67, 229, 143, 0), inset 0 0 24px rgba(67, 229, 143, 0.06);
  font-size: 14px; line-height: 1.15; letter-spacing: -0.01em; cursor: pointer;
  transition: border-color .35s var(--ease), box-shadow .45s var(--ease), background .45s var(--ease), transform .45s var(--ease);
}
.story.is-live .svc-node:hover, .story.is-live .svc-node:focus-visible { border-color: var(--glow); transform: scale(1.06); }
.story.is-live .svc-num { font-size: 10px; letter-spacing: .12em; opacity: .8; }
.story.is-live .svc-icon { width: 30%; height: auto; max-width: 30px; }
.story.is-live .svc-name { max-width: 88%; }
.story.is-live .svc.on .svc-node {
  border-color: var(--glow);
  background: radial-gradient(circle at 50% 28%, rgba(67, 229, 143, 0.34), rgba(67, 229, 143, 0.04) 72%), #0A1A12;
  box-shadow: 0 0 0 6px rgba(67, 229, 143, 0.08), 0 0 44px rgba(67, 229, 143, 0.45), inset 0 0 22px rgba(67, 229, 143, 0.18);
}
.story.is-live .svc.on .svc-icon { stroke: #CFFFE4; }
.story.is-live .svc-list.compact .svc-name,
.story.is-live .svc-list.compact .svc-num { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
.story.is-live .svc-list.compact .svc-icon { width: 46%; max-width: 26px; }

/* The card that explains the active circle */
.story.is-live .story-card {
  display: block; position: absolute; z-index: 3; left: 0; top: 0; width: 420px; text-align: center; opacity: 0;
  pointer-events: none; will-change: opacity, transform;
}
.story.is-live .story-card.solid { pointer-events: auto; }
.story-card-kicker { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--glow); }
.story-card-title { margin: 0 0 10px; font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 2.6vw, 36px); line-height: 1.05; letter-spacing: -0.03em; color: #fff; text-wrap: balance; }
.story-card-text { margin: 0; color: #C9D3CD; font-size: 16px; line-height: 1.5; text-wrap: pretty; }
.story-card-cta { margin-top: 18px; display: none; }
.story-card.final .story-card-cta { display: block; }
.story-card .swap { animation: card-in .55s var(--ease) both; }
.story-card .swap.d1 { animation-delay: .05s; }
.story-card .swap.d2 { animation-delay: .1s; }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.story.is-live .story-card.below {
  text-align: left; padding: 18px 18px 20px; border-radius: var(--radius-md);
  background: rgba(7, 10, 9, 0.80); border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.story.is-live .story-card.below .story-card-title { font-size: 26px; }
.story.is-live .story-card.below .story-card-text { font-size: 15px; }

/* The rest of the home page */
.home main > .section:first-of-type { border-top: 0; }
.dash { margin-top: var(--space-24); align-items: center; }
.dash .big { margin-bottom: var(--space-4); }

@media (max-width: 700px) {
  .story-copy-top { top: calc(72px + 3vh); }
  .story-copy-bottom { bottom: calc(6vh + 40px); }
}
@media (prefers-reduced-motion: reduce) {
  .story-hint svg { animation: none; }
  .story-card .swap { animation: none; }
}
