/* Experience 2.0 — visual layer on top of site.css
   Circuit environment, hero data panel, ecosystem graph, motion.
   No dependencies. Everything degrades to a readable static page. */

:root {
  --midnight: #070b12;
  --surface: #111722;
  --surface-2: #0c121c;
  --teal: #35e0d0;
  --cyan: #40cfff;
  --blue: #527bff;
  --accent: #35e0d0;
  --accent-2: #40cfff;
  --bg: #070b12;
  --bg-2: #0b111b;
  --line: rgba(120, 210, 255, 0.14);
  --line-soft: rgba(120, 210, 255, 0.08);
}

html { overflow-x: clip; }

body { background: var(--midnight); }

/* the hero network deliberately bleeds past its container — clip it so it can
   never widen the document on small screens */
.hero { overflow: clip; }

/* ---------- circuit environment ---------- */

.env {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.env svg { width: 100%; height: 100%; display: block; opacity: 0.85; }
.env canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.env .trace {
  fill: none;
  stroke: rgba(82, 123, 255, 0.16);
  stroke-width: 1;
}
.env .trace.glow {
  stroke: rgba(53, 224, 208, 0.55);
  stroke-width: 1.15;
  stroke-dasharray: 90 640;
  animation: traceflow 14s linear infinite;
}
.env .trace.glow.n2 { stroke: rgba(64, 207, 255, 0.45); animation-duration: 19s; animation-delay: -6s; }
.env .trace.glow.n3 { stroke: rgba(82, 123, 255, 0.5); animation-duration: 24s; animation-delay: -12s; }

.env .node { fill: rgba(53, 224, 208, 0.65); }
.env .node.soft { fill: rgba(82, 123, 255, 0.5); }
.env .node.pulse { animation: nodepulse 7s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.env .node.pulse:nth-of-type(2n) { animation-delay: -2.4s; }
.env .node.pulse:nth-of-type(3n) { animation-delay: -4.8s; }

@keyframes traceflow { to { stroke-dashoffset: -1460; } }
@keyframes nodepulse {
  0%, 100% { opacity: 0.35; r: 2; }
  50% { opacity: 0.95; r: 3.1; }
}

/* ambient lighting per section */
main > section { position: relative; }
main > section::before {
  content: "";
  position: absolute;
  inset: -10% -20%;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.1s ease;
  background: radial-gradient(60% 45% at 50% 40%, rgba(64, 207, 255, 0.10), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 76%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 76%, transparent 100%);
}
main > section.lit::before { opacity: 1; }
main > section[data-ambient="teal"]::before { background: radial-gradient(55% 45% at 40% 35%, rgba(53, 224, 208, 0.13), transparent 72%); }
main > section[data-ambient="blue"]::before { background: radial-gradient(55% 45% at 60% 35%, rgba(82, 123, 255, 0.15), transparent 72%); }
main > section[data-ambient="violet"]::before { background: radial-gradient(55% 45% at 50% 40%, rgba(167, 139, 250, 0.12), transparent 72%); }

/* ---------- motion primitives ---------- */

/* Reveal hides nothing unless JS is running: the html.js class is set by an inline
   script in <head>, so a JS failure or a throttled frame loop can never blank the page. */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.75s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.75s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--d, 0ms);
}
html.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- hero ---------- */

.hero { position: relative; }
.hero > * { position: relative; z-index: 1; }

/* two-column hero: copy left, roster instrument right */
.hero-grid {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 56px;
  align-items: center;
}
.hero-copy { min-width: 0; }
.hero-copy .display { font-size: clamp(34px, 4.5vw, 62px); }
.hero-side { min-width: 0; }

.hero-visual {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(72% 72% at 50% 46%, rgba(53, 224, 208, 0.10), transparent 72%),
    radial-gradient(60% 60% at 82% 12%, rgba(82, 123, 255, 0.12), transparent 70%),
    rgba(10, 16, 26, 0.72);
  box-shadow: inset 0 0 60px rgba(64, 207, 255, 0.06), 0 30px 80px -50px rgba(53, 224, 208, 0.5);
}
.hero-visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.hv-corner {
  position: absolute;
  width: 16px; height: 16px;
  border: 1px solid rgba(53, 224, 208, 0.55);
}
.hv-corner.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; border-radius: 7px 0 0 0; }
.hv-corner.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; border-radius: 0 7px 0 0; }
.hv-corner.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; border-radius: 0 0 0 7px; }
.hv-corner.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; border-radius: 0 0 7px 0; }

.hv-tag {
  position: absolute;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
  pointer-events: none;
}
.hv-tag.tl { top: 20px; left: 24px; }
.hv-tag.br { bottom: 20px; right: 24px; }
.hv-tag.bl { bottom: 20px; left: 24px; color: #9ff4e8; }

.hero-visual-cap {
  margin: 14px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted-2);
  text-align: right;
  max-width: 46ch;
  margin-left: auto;
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-visual { max-width: 420px; margin-inline: auto; }
  .hero-visual-cap { text-align: left; margin-left: 0; }
}

.display .grad {
  background: linear-gradient(96deg, #ffffff 0%, #d8f6ff 34%, #35e0d0 62%, #40cfff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: sheen 14s ease-in-out infinite;
}
@keyframes sheen {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.display em {
  text-shadow: 0 0 42px rgba(53, 224, 208, 0.28);
}

.hero-panel {
  margin-top: 54px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
  align-items: stretch;
}
.hero-dash {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.hero-dash .cell {
  background: rgba(12, 18, 28, 0.86);
  padding: 22px 24px;
}
.hero-dash .n {
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1;
  color: #eaf6ff;
  font-variant-numeric: tabular-nums;
}
.hero-dash .n small { font-size: 17px; color: var(--muted-2); font-family: var(--mono); }
.hero-dash .k {
  margin-top: 9px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.hero-ring {
  display: flex;
  align-items: center;
  gap: 22px;
  background: rgba(12, 18, 28, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
}
.hero-ring svg { flex: none; transform: rotate(-90deg); }
.hero-ring .ring-bg { fill: none; stroke: rgba(120, 210, 255, 0.16); stroke-width: 7; }
.hero-ring .ring-fg {
  fill: none;
  stroke: url(#ringgrad);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: var(--circ, 314);
  stroke-dashoffset: var(--circ, 314);
  transition: stroke-dashoffset 1.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hero-ring .ring-label { text-align: left; }
.hero-ring .ring-label .v {
  font-family: var(--serif); font-size: 26px; line-height: 1;
}
.hero-ring .ring-label .k {
  margin-top: 8px; font-size: 13.5px; color: var(--muted);
}
.hero-ring .ring-label .src {
  margin-top: 8px; font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2);
}

/* ---------- ecosystem graph ---------- */

.eco {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 22px;
  align-items: stretch;
  margin-top: 22px;
}
.eco-stage {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(70% 70% at 50% 45%, rgba(64, 207, 255, 0.09), transparent 70%),
    rgba(10, 16, 26, 0.9);
  overflow: hidden;
  min-height: 480px;
}
.eco-stage svg { width: 100%; height: 100%; display: block; }
.eco-stage .seat { fill: rgba(120, 160, 200, 0.55); transition: fill 0.2s ease, r 0.2s ease; }
.eco-stage .seat.standing { fill: rgba(53, 224, 208, 0.85); }
.eco-stage .seat.dormant { fill: rgba(120, 160, 200, 0.35); }
.eco-stage .spoke { stroke: rgba(120, 210, 255, 0.16); stroke-width: 1; }
.eco-stage .pod { cursor: pointer; outline: none; }
.eco-stage .pod circle { fill: rgba(17, 23, 34, 0.95); stroke: rgba(120, 210, 255, 0.4); stroke-width: 1.2; transition: stroke 0.2s, fill 0.2s; }
.eco-stage .pod text { fill: #d6e6f5; font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; }
.eco-stage .pod:hover circle, .eco-stage .pod:focus-visible circle, .eco-stage .pod.active circle { stroke: var(--teal); fill: rgba(53, 224, 208, 0.16); }
.eco-stage .pod:focus-visible circle { stroke-width: 2.4; }
.eco-stage .core circle { fill: rgba(53, 224, 208, 0.12); stroke: rgba(53, 224, 208, 0.6); }
.eco-stage .core text { fill: #b9fff4; font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; }

.eco-tip {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  transform: translate(-50%, -130%);
  background: rgba(8, 13, 22, 0.97);
  border: 1px solid rgba(53, 224, 208, 0.45);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 12px;
  line-height: 1.35;
  color: #e6f6ff;
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}
.eco-tip.on { opacity: 1; }
.eco-tip b { color: var(--teal); font-weight: 600; }

.eco-side { display: grid; gap: 14px; align-content: start; }
.podbars { border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; background: rgba(12, 18, 28, 0.6); }
.podbars h4 {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted-2); margin: 0 0 16px;
}
.podbar { margin-bottom: 12px; }
.podbar .row { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 6px; }
.podbar .row span:last-child { font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.podbar .track { height: 6px; border-radius: 99px; background: rgba(120, 210, 255, 0.1); overflow: hidden; }
.podbar .fill {
  height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  transition: width 1.1s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.podbar .fill.standing { background: linear-gradient(90deg, var(--teal), var(--cyan)); }

.eco-note { font-size: 12.5px; color: var(--muted-2); }
.eco-list { max-height: 132px; overflow: auto; margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.eco-list li { margin-bottom: 4px; }
.eco-list b { color: #dbe9f6; font-weight: 600; }

/* ---------- product card upgrades ---------- */

.work-card {
  isolation: isolate;
  transition: border-color 0.28s ease, transform 0.28s ease, box-shadow 0.28s ease;
}
.work-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 22px;
  padding: 1px;
  background: linear-gradient(140deg, rgba(53, 224, 208, 0.7), rgba(82, 123, 255, 0.35), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
  z-index: 2;
}
.work-card:hover::before, .work-card:focus-visible::before { opacity: 1; }
.work-card:hover { transform: translateY(-4px); box-shadow: 0 22px 60px -30px rgba(53, 224, 208, 0.55); }
.work-card:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.work-shots img { transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1), filter 0.4s ease; filter: saturate(0.92) brightness(0.92); }
.work-card:hover .work-shots img { transform: translateY(-6px) scale(1.02); filter: saturate(1.05) brightness(1); }
.work-card:hover .work-shots img:nth-child(2) { transition-delay: 60ms; }
.work-card:hover .work-shots img:nth-child(3) { transition-delay: 120ms; }

.work-status {
  position: absolute;
  top: 22px; right: 22px;
  z-index: 3;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 99px;
  border: 1px solid rgba(53, 224, 208, 0.4);
  color: #b9fff4;
  background: rgba(53, 224, 208, 0.08);
}
.work-status.review { border-color: rgba(251, 191, 36, 0.45); color: #fbe3a7; background: rgba(251, 191, 36, 0.08); }

/* ---------- capability strip ---------- */

.capstrip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin-top: 22px;
}
.capstrip .cell { background: rgba(12, 18, 28, 0.86); padding: 22px 24px; }
.capstrip .v { font-family: var(--serif); font-size: 30px; line-height: 1; }
.capstrip .k { margin-top: 8px; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); }
.capstrip .d { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .hero-panel, .eco { grid-template-columns: 1fr; }
  .eco-stage { min-height: 400px; }
  .capstrip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .hero-dash { grid-template-columns: 1fr 1fr; }
  .hero-dash .n { font-size: 30px; }
  .hero-ring { flex-direction: column; align-items: flex-start; }
  .capstrip { grid-template-columns: 1fr; }
  .work-status { position: static; display: inline-block; margin-bottom: 10px; }
}

/* ---------- contact form ---------- */

.cta-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  gap: 44px;
  align-items: stretch;
}
.contact-left { min-width: 0; }
.contact-left .lede { max-width: 52ch; }
.cta-copy { min-width: 0; }
.contact-alt { margin: 18px 0 0; font-size: 14px; color: var(--muted-2); }
.contact-alt a { color: var(--teal); border-bottom: 1px solid rgba(53, 224, 208, 0.35); }

.contact-visual {
  position: relative;
  min-height: 340px;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(80% 80% at 50% 38%, rgba(82, 123, 255, 0.14), transparent 70%),
    radial-gradient(60% 60% at 50% 90%, rgba(53, 224, 208, 0.10), transparent 72%),
    rgba(7, 11, 18, 0.55);
}
.contact-visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.cv-tag {
  position: absolute;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.cv-tag.tl { top: 16px; left: 18px; }
.cv-tag.br { bottom: 16px; right: 18px; }
.cv-tag.bl { bottom: 16px; left: 18px; color: #9ff4e8; display: inline-flex; align-items: center; gap: 7px; }
.cv-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 10px rgba(53, 224, 208, 0.9);
  animation: cvpulse 2.4s ease-in-out infinite;
}
@keyframes cvpulse { 0%,100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }

.contact-form {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 440px;
  margin-top: 26px;
}
.contact-form .field { display: grid; gap: 6px; }
.contact-form label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(7, 11, 18, 0.66);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.contact-form textarea { resize: vertical; min-height: 88px; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(53, 224, 208, 0.6);
  box-shadow: 0 0 0 3px rgba(53, 224, 208, 0.14);
}
.contact-form input:user-invalid,
.contact-form textarea:user-invalid { border-color: rgba(251, 113, 133, 0.65); }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 4px 0 0; font-size: 13.5px; min-height: 1.2em; color: var(--muted); }
.form-status.ok { color: #9ff4e8; }
.form-status.err { color: #ffb4b4; }
.contact-form button[disabled] { opacity: 0.6; cursor: progress; }

@media (max-width: 980px) {
  .cta-band { grid-template-columns: 1fr; gap: 28px; }
  .contact-form { width: 100%; max-width: none; }
  .contact-visual { min-height: 300px; }
}

/* ---------- focus ---------- */

a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--teal);
  color: #04121a;
  font-weight: 600;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .env .trace.glow, .env .node.pulse, .display .grad { animation: none !important; }
  #circuit-fx { display: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .work-card, .work-card:hover { transform: none !important; box-shadow: none !important; }
  .work-shots img, .work-card:hover .work-shots img { transform: none !important; filter: none !important; }
  .podbar .fill { transition: none !important; }
  .hero-ring .ring-fg { transition: none !important; }
}
