/* ArcDelta motion layer: pipeline reel, typed titles, bracket labels, looping line art. */
:root {
  /* Keeps the original ArcDelta navy palette; only adds motion tokens. */
  --ivory: #f7f8fb;
  --slate: #05070c;
  --clay: #3b82f6;
  --ice: #7eb0ff;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --snap: cubic-bezier(0.77, 0, 0.18, 1);
}


/* Buttons: clay fill rises from below on hover. */
.primary, .secondary, .account {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color .35s var(--ease), transform .45s var(--ease), border-color .3s ease;
}
.primary::after, .secondary::after, .account::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--clay);
  transform: translateY(101%);
  transition: transform .5s var(--snap);
}
.primary:hover::after, .secondary:hover::after, .account:hover::after { transform: none; }
.primary { background: var(--ivory); color: var(--slate); }
.secondary:hover { border-color: var(--clay); color: #fff; }
.primary:hover, .account:hover { color: #fff; }
.primary:hover, .secondary:hover, .account:hover { filter: none; }

/* Hero: copy on the left, a clay tile with looping line art on the right. */
.hero { align-items: center; gap: 48px; padding-top: 48px; }
.hero-art {
  position: relative;
  z-index: 1;
  flex: 0 0 min(40%, 460px);
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.1);
  background: radial-gradient(120% 90% at 70% 20%, rgba(59,130,246,.2), transparent 60%), linear-gradient(160deg, #0d1726, #070c14);
  color: var(--ivory);
  transition: transform .7s var(--ease), border-radius .7s var(--ease), box-shadow .7s var(--ease);
}
.hero-art:hover { transform: translateY(-6px); border-color: rgba(126,176,255,.4); box-shadow: 0 30px 70px -36px rgba(38,119,254,.55); }
.hero-art svg { position: absolute; inset: 10%; width: 80%; height: 80%; }
.hero-art .chip {
  position: absolute;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(12,18,26,.9);
  color: rgba(255,255,255,.8);
  font: 11px ui-monospace, SFMono-Regular, monospace;
  box-shadow: 0 10px 30px -12px rgba(38,119,254,.5);
  animation: fx-bob 3.6s ease-in-out infinite;
}
.eyebrow { display: flex; align-items: center; gap: 10px; }
@media (max-width: 900px) {
  .hero { flex-direction: column; align-items: flex-start; }
  .hero-art { flex: none; width: 100%; max-width: 420px; }
}

/* Pulse mark */
.fx-spark { display: inline-block; flex: none; overflow: visible; }
.fx-spark-ring { transform-origin: 0 0; animation: fx-spin 14s linear infinite; }
.fx-spark-core { transform-origin: 0 0; animation: fx-beat 2.4s var(--ease) infinite; }
.fx-spark-orbit { transform-origin: 0 0; animation: fx-spin 3.6s linear infinite; }
.fx-spark-orbit.is-slow { animation-duration: 7s; animation-direction: reverse; }
@keyframes fx-spin { to { transform: rotate(360deg); } }
@keyframes fx-beat { 0%, 100% { transform: scale(1); opacity: 1; } 12% { transform: scale(1.35); opacity: .85; } 30% { transform: scale(.92); } }

/* Line art loops */
.fx-art .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: fx-draw var(--dur, 8s) var(--ease) infinite; animation-delay: calc(var(--d, 0) * 1s); }
@keyframes fx-draw { 0% { stroke-dashoffset: 1; } 28%, 72% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }
.fx-art .pulse { animation: fx-pulse 2.4s ease-in-out infinite; animation-delay: calc(var(--d, 0) * 1s); transform-box: fill-box; transform-origin: center; }
@keyframes fx-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
.fx-art .travel { animation: fx-travel var(--dur, 3.2s) ease-in-out infinite; animation-delay: calc(var(--d, 0) * 1s); }
@keyframes fx-travel { 0% { offset-distance: 0%; opacity: 0; } 10%, 90% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
.fx-art .sway { animation: fx-sway 2.6s ease-in-out infinite; animation-delay: calc(var(--d, 0) * 1s); transform-box: fill-box; transform-origin: var(--o, 0% 50%); }
@keyframes fx-sway { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.5); } }
@keyframes fx-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* Typing */
.fx-ghost { color: var(--clay); }
.fx-caret { display: inline-block; width: .42em; height: .82em; margin-left: .05em; vertical-align: -.04em; background: var(--clay); animation: fx-blink 1.05s steps(1) infinite; }
@keyframes fx-blink { 50% { opacity: 0; } }

/* Pipeline as a reel: one stage opens, the others stay as narrow columns. */
.pipeline { display: flex !important; gap: 6px; height: 460px; grid-template-columns: none !important; }
.pipeline article {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  border-radius: 18px !important;
  border: 1px solid var(--line) !important;
  background: #0a0f17 !important;
  cursor: pointer;
  transform: none !important;
  transition: flex-grow .9s var(--snap), background-color .5s ease, border-color .4s ease !important;
}
.pipeline article.is-active { flex-grow: 3.4; background: #0b1a33 !important; border-color: rgba(126,176,255,.35) !important; }
.pipeline article > span { position: relative; z-index: 2; }
.pipeline article > p { position: relative; z-index: 2; color: var(--clay); }
.pipeline h3 { position: relative; z-index: 2; margin-top: 200px; font-size: 40px; white-space: nowrap; }
.pipeline ul { position: relative; z-index: 2; width: 360px; opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .8s var(--ease); }
.pipeline article.is-active ul { opacity: 1; transform: none; transition-delay: .5s; }
.pipeline li::before { content: "— "; color: var(--clay); }
.pipeline .reel-scene { position: absolute; inset: 0; opacity: 0; transition: opacity .3s ease; pointer-events: none; }
.pipeline article.is-active .reel-scene { opacity: 1; transition-delay: .15s; }
.pipeline .reel-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(126,176,255,.06) 1px, transparent 1px), linear-gradient(to bottom, rgba(126,176,255,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 75% 40%, black 10%, transparent 75%);
}
.pipeline .reel-scene svg { position: absolute; right: 4%; top: 50%; width: min(42%, 300px); transform: translateY(-50%); color: var(--ivory); }
.pipeline .reel-cut {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: linear-gradient(180deg, transparent 0%, #9ec2ff 49.6%, transparent 50.4%);
  background-size: 100% 220%; background-position: 0 120%;
}
.pipeline article.is-active .reel-cut { animation: fx-cut .7s var(--snap) .05s; }
@keyframes fx-cut { 0% { opacity: 1; background-position: 0 120%; } 100% { opacity: .2; background-position: 0 -20%; } }
.pipeline .corners { position: absolute; inset: 12px; pointer-events: none; color: var(--ice); }
.pipeline .corners i { position: absolute; width: 16px; height: 16px; opacity: 0; transform: scale(.4); transition: opacity .25s ease, transform .6s var(--ease); }
.pipeline .corners i:nth-child(1) { left: 0; top: 0; border-left: 1px solid; border-top: 1px solid; transform-origin: 0 0; }
.pipeline .corners i:nth-child(2) { right: 0; top: 0; border-right: 1px solid; border-top: 1px solid; transform-origin: 100% 0; }
.pipeline .corners i:nth-child(3) { left: 0; bottom: 0; border-left: 1px solid; border-bottom: 1px solid; transform-origin: 0 100%; }
.pipeline .corners i:nth-child(4) { right: 0; bottom: 0; border-right: 1px solid; border-bottom: 1px solid; transform-origin: 100% 100%; }
.pipeline article.is-active .corners i { opacity: .85; transform: none; }
.pipeline .progress { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--clay); transform: scaleX(0); transform-origin: left; }
.pipeline article.is-active.is-auto .progress { animation: fx-progress 6s linear forwards; }
@keyframes fx-progress { to { transform: scaleX(1); } }
@media (max-width: 820px) {
  .pipeline { flex-direction: column; height: auto; }
  .pipeline article { flex: 0 0 auto; }
  .pipeline h3 { margin-top: 24px; }
  .pipeline ul { width: auto; display: none; }
  .pipeline article.is-active ul { display: block; }
  .pipeline .reel-scene svg { display: none; }
}

/* Rows fill with ivory from the left on hover. */
.rows li { position: relative; isolation: isolate; padding-left: 12px; padding-right: 12px; transition: color .45s var(--ease), padding .6s var(--ease); }
.rows li::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(38,119,254,.28), rgba(38,119,254,.05)); clip-path: inset(0 100% 0 0); transition: clip-path .7s var(--snap); }
.rows li:hover { color: #fff; padding-left: 24px; }
.rows li:hover::before { clip-path: inset(0); }
.rows li:hover span { color: var(--ice); }

.status-table > div:not(:first-child) { transition: background-color .3s ease, padding .5s var(--ease); }
.status-table > div:not(:first-child):hover { background: rgba(126,176,255,.04); padding-left: 10px; }

.streams article:hover, .plan-card:not(.featured):hover { border-color: rgba(126,176,255,.45); }
.plan-card li:before { color: var(--clay); }

/* Closing block: big spark turning slowly behind the copy. */
.close { position: relative; }

.site-foot img { filter: none; }

@media (prefers-reduced-motion: reduce) {
  .fx-spark-ring, .fx-spark-core, .fx-spark-orbit, .fx-art .draw, .fx-art .pulse, .fx-art .travel, .fx-art .sway, .hero-art .chip, .fx-caret,
  .pipeline article.is-active .reel-cut, .pipeline article.is-active.is-auto .progress { animation: none; }
  .fx-art .draw { stroke-dashoffset: 0; }
}

/* Bracketed labels */
.fx-bracket { display: inline-flex; align-items: baseline; gap: .45em; font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.fx-bracket-edge { display: inline-block; opacity: .55; transition: transform .45s var(--ease), opacity .3s ease; }
.fx-bracket-text { display: inline-grid; transition: color .25s ease; }
.fx-bracket-text > span { grid-area: 1 / 1; }
.fx-bracket-ghost { visibility: hidden; }
.fx-bracket.is-on .fx-bracket-text { color: var(--clay); }
.fx-bracket.is-on .fx-bracket-edge { opacity: 1; }
.fx-bracket.is-on .fx-bracket-edge.is-l { transform: translateX(-.5em); }
.fx-bracket.is-on .fx-bracket-edge.is-r { transform: translateX(.5em); }
.topbar nav button:hover, .topbar nav a:hover, .topbar nav button.active { background: transparent; }
.topbar nav button.active .fx-bracket-text { color: #fff; }

/* ---------- ASCII feature scenes (shared TreVmS library, fx-scenes.js) ---------- */
.fx-scene { display: block; width: 100%; height: 100%; pointer-events: none; }
.hero-art .fx-scene { position: absolute; inset: 0; border-radius: inherit; }
.pipeline .reel-scene .fx-scene { position: absolute; right: 2%; top: 8%; width: 50%; height: 84%; }
@media (max-width: 760px) { .pipeline .reel-scene .fx-scene { display: none; } }
.feat-grid { display: grid; gap: 12px; margin-top: 32px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.feat { position: relative; overflow: hidden; border-radius: 16px; border: 1px solid rgba(255,255,255,.08); background: linear-gradient(180deg, rgba(13,23,38,.9), rgba(7,12,20,.9)); outline: none; transition: border-color .4s ease, box-shadow .6s var(--ease), transform .6s var(--ease); }
.feat:hover, .feat:focus-visible { border-color: rgba(126,176,255,.35); box-shadow: 0 28px 60px -34px rgba(38,119,254,.7); transform: translateY(-3px); }
.feat-art { position: relative; aspect-ratio: 16 / 9; background: radial-gradient(90% 80% at 50% 0%, rgba(38,119,254,.14), transparent 70%), #060a12; border-bottom: 1px solid rgba(255,255,255,.06); }
.feat-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(6,10,18,.85)); pointer-events: none; }
.feat-body { padding: 14px 16px 18px; }
.feat-body span { font: 10px ui-monospace, SFMono-Regular, monospace; letter-spacing: .2em; color: rgba(255,255,255,.35); }
.feat-body h3 { margin: 4px 0 0; font-size: 18px; font-weight: 500; letter-spacing: -.01em; transition: color .3s ease, transform .5s var(--ease); }
.feat:hover .feat-body h3 { color: #9ec2ff; transform: translateX(3px); }
.feat-body p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.55); }
.page-top { display: grid; gap: 28px; align-items: end; }
@media (min-width: 900px) { .page-top { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } }
.page-scene { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 18px; border: 1px solid rgba(255,255,255,.1); background: #060a12; margin-bottom: 28px; }
.block.close { position: relative; }
.close-scene { position: absolute; right: 0; top: 50%; width: min(44%, 520px); aspect-ratio: 4 / 3; transform: translateY(-50%); opacity: .7; pointer-events: none; -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent); mask-image: radial-gradient(closest-side, #000 55%, transparent); }
@media (max-width: 900px) { .close-scene { display: none; } }
