/* Aneidya dark theme: one dark surface for the whole site, subtle depth and purposeful motion.
   Loaded after site.css (and enhance.css where used). */

:root {
  --bg: #060d18;
  --bg-soft: #0a1424;
  --ink: #f1f5fb;
  --ink-2: #c3cfe1;
  --ink-3: #93a3bb;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(92, 200, 255, .38);
  --glass: rgba(255, 255, 255, .035);
  --glass-2: rgba(255, 255, 255, .06);
  --link: #5cc8ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 30px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

/* ---------- Page surface: faint grid and two slow glows ---------- */
body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 56px 56px;
  color: var(--ink-2);
}
body::before, body::after {
  content: ""; position: fixed; z-index: -1; pointer-events: none; width: 70vmax; height: 70vmax; border-radius: 50%;
  filter: blur(10px); opacity: .9;
}
body::before { top: -30vmax; right: -25vmax; background: radial-gradient(closest-side, rgba(35, 181, 242, .10), transparent 70%); animation: drift 26s ease-in-out infinite; }
body::after { bottom: -35vmax; left: -25vmax; background: radial-gradient(closest-side, rgba(22, 104, 227, .12), transparent 70%); animation: drift 32s ease-in-out infinite reverse; }
@keyframes drift { 50% { transform: translate(4vmax, 3vmax) scale(1.08); } }

a { color: var(--link); }
a:hover { color: #9bdcff; }
.eyebrow { color: #5cc8ff; }
.lead { color: var(--ink-3); }

/* Header: translucent, the page shows through */
.site-header { background: rgba(6, 13, 24, .78); -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px); }

/* Dark bands keep their own glow but sit on the same surface */
.dark { background: linear-gradient(180deg, rgba(7, 17, 31, .85), rgba(7, 17, 31, .55)); }
.section-soft { background: rgba(255, 255, 255, .015); border-color: var(--line); }

/* ---------- Headings: one accent phrase ---------- */
h1 .accent, h2 .accent, .accent {
  background: linear-gradient(90deg, #5cc8ff, #2f8cff); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Section badge: outlined icon above a section heading ---------- */
.sec-badge {
  width: 48px; height: 48px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 13px;
  color: #8fd3ff; border: 1px solid var(--line-strong); background: rgba(35, 181, 242, .06);
  box-shadow: 0 0 0 6px rgba(35, 181, 242, .04), 0 0 28px rgba(35, 181, 242, .18);
}
.sec-badge svg { width: 22px; height: 22px; }
.section-head:not(.center) .sec-badge { margin-left: auto; margin-right: auto; }

/* ---------- Cards: dark glass with a border that lights up ---------- */
.card, .feature, .topic, .product, .steps li, .pillars {
  background: var(--glass); border-color: var(--line); box-shadow: none;
}
.card { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
a.card:hover, .topic:hover, .feature:hover {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 1px rgba(92, 200, 255, .12), 0 18px 44px rgba(0, 0, 0, .45), 0 0 40px rgba(35, 181, 242, .10);
}
.feature { transition: border-color .25s, box-shadow .25s; }
.card p, .feature p, .steps li p, .topic span, .pillar span, .install p, .legend div, .note, .meta, .meta svg { color: var(--ink-3); }
.card .more, .card .kicker { color: #5cc8ff; }
.card .num { color: #3d4f6b; }
.card-cta { background: linear-gradient(145deg, rgba(22, 104, 227, .22), rgba(35, 181, 242, .06)); border-color: rgba(92, 200, 255, .25); }

.icon { color: #8fd3ff; background: rgba(35, 181, 242, .09); border-color: rgba(35, 181, 242, .22); }
.pillar { border-color: var(--line); }
.pillar strong { color: var(--ink); }
.pillar .p-icon { color: #8fd3ff; background: rgba(35, 181, 242, .09); border-color: rgba(35, 181, 242, .22); }

/* Buttons and badges on dark */
.btn-outline { color: #fff; border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .04); }
.btn-outline:hover { color: #fff; border-color: rgba(255, 255, 255, .34); background: rgba(255, 255, 255, .1); }
.badge { background: rgba(255, 255, 255, .05); border-color: var(--line); color: var(--ink-2); }
.badge-free { color: #6ee7b7; background: rgba(14, 159, 110, .14); border-color: rgba(110, 231, 183, .25); }
.badge-prop { color: #f6cf8a; background: rgba(183, 121, 31, .16); border-color: rgba(246, 207, 138, .25); }

/* Lists, tags, tables, code */
.checks li { color: var(--ink-2); }
.checks li::before { background-color: rgba(14, 159, 110, .18); }
.tags li, .protocols li { background: var(--glass); border-color: var(--line); color: var(--ink-2); }
.protocols li { color: var(--ink); }
.install strong, .specs th, .topic strong, .product-title .kind { color: var(--ink); }
.specs th, .specs td { border-color: var(--line); }
.specs td { color: var(--ink-3); }
code { background: rgba(255, 255, 255, .07); color: #e2e9f3; }
.service { border-color: var(--line); }

/* Small fixes */
.note a svg { width: 16px; height: 16px; vertical-align: -3px; }
.note a { display: inline-flex; align-items: center; gap: 6px; }
.product-media { background: radial-gradient(120% 100% at 100% 0%, rgba(19, 48, 90, .9) 0%, rgba(7, 17, 31, .4) 60%); }

/* ---------- How we work: numbered cards on a line that fills in ---------- */
.steps li { text-align: center; padding: 22px 22px 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.steps li::before { box-shadow: 0 0 0 6px var(--bg), 0 8px 22px rgba(22, 104, 227, .35); }
.steps::after {
  content: ""; position: absolute; top: 46px; left: 12.5%; right: 12.5%; height: 2px; z-index: 0;
  background: linear-gradient(90deg, #5cc8ff, #2f8cff); transform: scaleX(var(--fill, 1)); transform-origin: left;
  box-shadow: 0 0 12px rgba(92, 200, 255, .55);
}
.motion .steps:not(.on)::after { --fill: 0; }
.motion .steps::after { transition: transform 1.8s cubic-bezier(.4, .1, .2, 1); }
.motion .steps li { transition: border-color .4s, box-shadow .4s; transition-delay: calc(var(--n, 0) * .42s); }
.motion .steps.on li { border-color: rgba(92, 200, 255, .26); box-shadow: 0 0 30px rgba(35, 181, 242, .07); }
.steps li:nth-child(2) { --n: 1; } .steps li:nth-child(3) { --n: 2; } .steps li:nth-child(4) { --n: 3; }

/* ---------- Domain cards: a small live picture of each domain ---------- */
.viz { position: relative; height: 92px; margin: -6px -6px 18px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, rgba(35, 181, 242, .06), rgba(35, 181, 242, .015)); border: 1px solid rgba(92, 200, 255, .12); }
.viz svg { position: absolute; inset: 0; width: 100%; height: 100%; }
#domains .card .icon { display: none; }
#domains .card .num { top: 34px; right: 38px; z-index: 1; color: #8ea3c2; background: rgba(6, 13, 24, .8); padding: 3px 6px; border-radius: 6px; }
.viz .ln { fill: none; stroke: rgba(143, 211, 255, .35); stroke-width: 1.4; }
.viz .hi { fill: none; stroke: #5cc8ff; stroke-width: 2; stroke-linecap: round; }
.viz .fillhi { fill: #5cc8ff; }
.viz .soft { fill: rgba(92, 200, 255, .14); stroke: rgba(92, 200, 255, .5); stroke-width: 1.2; }

/* embedded: pulses run along the traces into the chip */
.viz-chip .pulse { stroke-dasharray: 10 120; animation: trace 2.6s linear infinite; }
.viz-chip .pulse:nth-of-type(2n) { animation-delay: -1.3s; }
.viz-chip .core { animation: corepulse 2.6s ease-in-out infinite; }
@keyframes trace { from { stroke-dashoffset: 130; } to { stroke-dashoffset: 0; } }
@keyframes corepulse { 50% { fill: rgba(92, 200, 255, .32); } }

/* automotive: a scan line passes over the shield, then the check confirms */
.viz-shield .scan { animation: scan 3.2s ease-in-out infinite; }
.viz-shield .tick { stroke-dasharray: 30; stroke-dashoffset: 30; animation: tick 3.2s ease-in-out infinite; }
@keyframes scan { 0% { transform: translateY(-34px); opacity: 0; } 15% { opacity: 1; } 60% { transform: translateY(34px); opacity: 1; } 70%, 100% { transform: translateY(34px); opacity: 0; } }
@keyframes tick { 0%, 60% { stroke-dashoffset: 30; } 75%, 92% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 30; } }

/* aerospace: a radar sweep with blips that fade */
.viz-radar .sweep { transform-origin: 50% 50%; transform-box: fill-box; animation: spin 3.6s linear infinite; }
.viz-radar .blip { animation: blip 3.6s ease-out infinite; opacity: 0; }
.viz-radar .blip.b2 { animation-delay: 1.4s; }
.viz-radar .blip.b3 { animation-delay: 2.5s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blip { 0% { opacity: 0; } 8% { opacity: 1; } 60%, 100% { opacity: 0; } }

/* video: frames stream past and a LIVE dot blinks */
.viz-video .strip { animation: stream 4s linear infinite; }
.viz-video .live { animation: blink 1.4s steps(2, start) infinite; }
@keyframes stream { to { transform: translateX(-84px); } }
@keyframes blink { to { opacity: .25; } }

/* edge AI: a detection box settles on a shape */
.viz-ai .box { animation: lock 3.4s cubic-bezier(.4, .1, .2, 1) infinite; transform-box: view-box; transform-origin: 160px 46px; }
.viz-ai .dot { animation: twinkle 3.4s ease-in-out infinite; }
.viz-ai .dot.t2 { animation-delay: -1.1s; } .viz-ai .dot.t3 { animation-delay: -2.2s; }
@keyframes lock {
  0% { transform: translate(-46px, 10px) scale(1.25); opacity: .35; }
  45% { transform: translate(0, 0) scale(1); opacity: 1; }
  80% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(46px, -8px) scale(1.2); opacity: 0; }
}
@keyframes twinkle { 50% { opacity: .35; } }

/* paused when off screen (motion.js) */
.viz.off * { animation-play-state: paused !important; }

/* ---------- AMP: glowing frame and a small camera-wall loop ---------- */
.glow-frame { position: relative; }
.glow-frame::before {
  content: ""; position: absolute; inset: -1px; border-radius: 17px; padding: 1px; pointer-events: none; z-index: 2;
  background: conic-gradient(from var(--a, 0deg), transparent 0 70%, rgba(92, 200, 255, .9) 82%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: orbit-border 6s linear infinite;
}
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes orbit-border { to { --a: 360deg; } }
.glow-frame { box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 60px rgba(35, 181, 242, .12); }

.wall-loop { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; border-radius: 16px;
  background: #050b15; border: 1px solid var(--line); max-width: 420px; margin: 28px auto 0; }
.wall-loop .cam { position: relative; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden;
  background: linear-gradient(135deg, #0d2140, #071326); border: 1px solid rgba(255, 255, 255, .06); }
.wall-loop .cam::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 80% at var(--x, 30%) 60%, rgba(92, 200, 255, .22), transparent 70%);
  animation: pan 7s ease-in-out infinite alternate; }
.wall-loop .cam:nth-child(2)::before { --x: 70%; animation-duration: 9s; }
.wall-loop .cam:nth-child(3)::before { --x: 45%; animation-duration: 8s; animation-direction: alternate-reverse; }
.wall-loop .cam:nth-child(4)::before { --x: 60%; animation-duration: 10s; }
.wall-loop .cam span { position: absolute; left: 7px; top: 6px; font: 700 .58rem/1 var(--font); letter-spacing: .08em; color: #fff;
  background: #e5484d; padding: 3px 5px 2px; border-radius: 4px; }
.wall-loop .cam em { position: absolute; left: 8px; bottom: 6px; font: 500 .62rem/1 var(--font); font-style: normal; color: #b6c3d8; }
.wall-loop .cam span::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 4px; border-radius: 50%;
  background: #fff; vertical-align: 1px; animation: blink 1.4s steps(2, start) infinite; }
@keyframes pan { from { transform: translateX(-12%); } to { transform: translateX(12%); } }
.wall-caption { text-align: center; font-size: .85rem; color: var(--ink-3); margin-top: 10px; }

/* ---------- Responsive and reduced motion ---------- */
@media (max-width: 1024px) {
  .steps::before, .steps::after { display: none; }
  .pillar { border-color: var(--line); }
}
@media (max-width: 760px) {
  .pillar { border-color: var(--line); }
  .viz { height: 84px; }
  body::before, body::after { width: 120vmax; height: 120vmax; }
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after, .viz *, .wall-loop *, .wall-loop .cam::before, .glow-frame::before, .cta.dark::before { animation: none !important; }
  .steps::after { transform: none !important; }
}
