/* Home — dark command center */

.hero {
  padding: 3.5rem 0 2.5rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}

.brand {
  margin: 1rem 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.brand em {
  font-style: normal;
  color: var(--neon);
  text-shadow: 0 0 40px rgba(61, 255, 168, 0.35);
}

.lede {
  margin: 0 0 1.5rem;
  max-width: 34rem;
  color: var(--text-dim);
  font-size: 1.05rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.platform-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.platform-pills span {
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line);
  background: rgba(61, 255, 168, 0.04);
}

.hero-console {
  padding: 1.35rem 1.4rem 1.1rem;
}

.console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.console-status {
  font-family: var(--font-lcd);
  font-size: 0.7rem;
  color: var(--neon);
  letter-spacing: 0.08em;
}

.console-widgets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.console-widgets .widget { width: 100%; }

.console-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-lcd);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* Ticker */
.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(61, 255, 168, 0.03);
  padding: 0.7rem 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker-track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: tickerScroll 40s linear infinite;
  font-family: var(--font-lcd);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  white-space: nowrap;
}

.ticker-track span::before {
  content: "◆";
  margin-right: 0.65rem;
  color: var(--neon);
  font-size: 0.55rem;
}

.ticker:hover .ticker-track { animation-play-state: paused; }

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Stats */
.stats-bar { padding: 2.5rem 0; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat {
  padding: 1.25rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--panel);
  text-align: center;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--neon);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Cycle nexus */
.cycle-nexus {
  position: relative;
  padding: 5rem 0;
  overflow: hidden;
  background: #020806;
  border-block: 1px solid var(--line);
}

.nexus-void {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.nexus-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(61, 255, 168, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 255, 168, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 60% 55% at 65% 50%, #000 20%, transparent 75%);
}

.nexus-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(72, 229, 255, 0.04) 50%, transparent 60%);
  animation: nexusDrift 6s ease-in-out infinite;
}

.nexus-glow {
  position: absolute;
  width: 40%;
  height: 60%;
  right: 8%;
  top: 20%;
  background: radial-gradient(circle, rgba(61, 255, 168, 0.12), transparent 70%);
  filter: blur(40px);
}

@keyframes nexusDrift {
  0%, 100% { transform: translateY(-8%); }
  50% { transform: translateY(8%); }
}

.nexus-shell {
  position: relative;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: center;
}

.nexus-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
}

.nexus-console h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.nexus-copy {
  margin: 0 0 1.4rem;
  color: var(--text-dim);
}

.nexus-telemetry {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--terminal);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  font-family: var(--font-lcd);
}

.tel-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.78rem;
}

.tel-row span { color: var(--text-dim); letter-spacing: 0.08em; }
.tel-row strong { color: var(--neon); }
.tel-ok { color: var(--ok) !important; }

.nexus-hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.nexus-stage {
  display: flex;
  justify-content: center;
}

.nexus-orbit {
  position: relative;
  width: min(440px, 92vw);
  aspect-ratio: 1;
}

.nexus-rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.nexus-rings .ring-a,
.nexus-rings .ring-b,
.nexus-rings .ring-c {
  stroke: rgba(61, 255, 168, 0.18);
  stroke-width: 1;
}

.nexus-rings .ring-b { stroke-dasharray: 4 6; }

.nexus-rings .ring-arc {
  stroke: var(--neon);
  stroke-width: 2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px var(--neon));
  animation: spinSlow 18s linear infinite;
  transform-origin: 200px 200px;
}

@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

.nexus-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(61, 255, 168, 0.35);
  background: radial-gradient(circle at 40% 35%, #0f2e22, #04110c);
  box-shadow: var(--glow), inset 0 0 24px rgba(61, 255, 168, 0.12);
  z-index: 2;
}

.core-pulse {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(61, 255, 168, 0.25);
  animation: corePulse 2.4s ease-out infinite;
}

@keyframes corePulse {
  0% { transform: scale(0.92); opacity: 0.7; }
  100% { transform: scale(1.25); opacity: 0; }
}

.core-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  font-family: var(--font-lcd);
}

.core-label,
.core-sub {
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}

.core-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--neon);
  line-height: 1.1;
}

.nexus-node {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5.4rem;
  transform:
    translate(-50%, -50%)
    rotate(calc(var(--i) * 60deg))
    translateY(-10.5rem)
    rotate(calc(var(--i) * -60deg));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.55rem 0.4rem;
  border-radius: 0.55rem;
  border: 1px solid var(--line);
  background: rgba(7, 19, 16, 0.92);
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  z-index: 3;
}

.nexus-node i {
  font-family: var(--font-lcd);
  font-style: normal;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

.nexus-node img {
  width: 1.55rem;
  height: 1.55rem;
  object-fit: contain;
}

.nexus-node b {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
}

.nexus-node:hover,
.nexus-node.active {
  color: var(--text);
  border-color: rgba(61, 255, 168, 0.55);
  background: rgba(14, 40, 30, 0.95);
  box-shadow: var(--glow);
}

.nexus-node.active { color: var(--neon); }

/* Module clusters */
.cluster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.cluster-card {
  display: block;
  padding: 1.35rem 1.25rem 1.2rem;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.cluster-card:hover {
  border-color: rgba(61, 255, 168, 0.4);
  transform: translateY(-3px);
  box-shadow: var(--glow);
}

.cluster-num {
  display: block;
  margin-bottom: 0.55rem;
  font-family: var(--font-lcd);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

.cluster-card h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.cluster-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.cluster-card li {
  position: relative;
  padding-left: 0.9rem;
  font-size: 0.84rem;
  color: var(--text-dim);
}

.cluster-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--neon);
  opacity: 0.7;
}

.cluster-wide {
  grid-column: span 3;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 1.5rem;
  align-items: start;
}

.cluster-wide .cluster-num { grid-row: 1; }
.cluster-wide h3 { grid-column: 2; margin: 0 0 0.5rem; }
.cluster-wide ul {
  grid-column: 2;
  grid-template-columns: repeat(4, 1fr);
}

/* Ops grid */
.ops-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(5, 1fr);
  gap: 0.85rem;
  align-items: stretch;
}

.ops-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 11rem;
  padding: 1rem 0.75rem;
  border-radius: 0.7rem;
  border: 1px solid var(--line);
  background: var(--panel);
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
}

.ops-tile img {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
}

.ops-tile.silo-big { min-height: 14rem; }

.ops-tile.silo-big .silo-art {
  width: 5.5rem;
  height: auto;
  max-height: 9rem;
}

.ops-name { margin-top: 0.2rem; }

.digi-silo {
  position: absolute;
  top: 0.65rem;
  right: 0.55rem;
  min-width: 4.4rem;
  padding: 0.3rem 0.4rem;
}

.digi-silo .digi-lcd { font-size: 0.85rem; }

.digi-trolley {
  position: absolute;
  bottom: 0.55rem;
  left: 0.45rem;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.28rem 0.4rem;
}

.digi-trolley .digi-lcd { font-size: 0.8rem; }

.digi-water {
  position: absolute;
  bottom: 0.55rem;
  right: 0.45rem;
  min-width: 0;
  padding: 0.28rem 0.4rem;
}

.digi-water .digi-lcd { font-size: 0.8rem; color: var(--water); text-shadow: 0 0 10px rgba(59, 163, 201, 0.4); }

.digi-temp {
  position: absolute;
  top: 0.55rem;
  left: 0.45rem;
  flex-direction: row;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  padding: 0.28rem 0.4rem;
}

.digi-temp .digi-lcd { font-size: 0.8rem; color: var(--temp); text-shadow: 0 0 10px rgba(232, 154, 60, 0.4); }

.cloud-float-water {
  position: absolute;
  top: 0.7rem;
  right: 0.6rem;
}

.cloud-tx svg {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--cyan);
}

/* Tally band */
.tally-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.tally-copy h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
}

.tally-copy > p {
  margin: 0 0 1.2rem;
  color: var(--text-dim);
  max-width: 36rem;
}

.voucher-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.35rem;
}

.voucher-chips span {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: rgba(61, 255, 168, 0.05);
  color: var(--text);
}

.tally-beam {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1.5rem 1.25rem;
}

.beam-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 4.5rem;
  text-align: center;
}

.beam-node strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--neon);
}

.beam-node span {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.beam-cloud strong { color: var(--cyan); }

.beam-line {
  flex: 1;
  height: 2px;
  background: rgba(61, 255, 168, 0.15);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.beam-line i {
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  animation: beamPulse 1.8s ease-in-out infinite;
}

@keyframes beamPulse {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(280%); }
}

/* Devices */
.device-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.device {
  padding: 1.5rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.device-mark {
  width: 3rem;
  height: 3rem;
  border-radius: 0.65rem;
  display: grid;
  place-items: center;
  background: rgba(61, 255, 168, 0.08);
  border: 1px solid rgba(61, 255, 168, 0.25);
  color: var(--neon);
}

.device-mark.android { color: #a8e063; }
.device-mark.windows { color: var(--cyan); }

.device h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

/* CTA */
.cta-band { padding: 1rem 0 4rem; }

.cta-panel {
  padding: 2.5rem 2rem;
  text-align: center;
}

.cta-panel h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
}

.cta-panel p {
  margin: 0 auto 1.35rem;
  max-width: 32rem;
  color: var(--text-dim);
}

.cta-panel .hero-cta {
  justify-content: center;
  margin-bottom: 0;
}

/* Responsive */
@media (max-width: 1100px) {
  .ops-grid { grid-template-columns: repeat(3, 1fr); }
  .ops-tile.silo-big { grid-column: span 1; }
  .cluster-wide ul { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero-grid,
  .nexus-shell,
  .tally-grid { grid-template-columns: 1fr; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .cluster-grid { grid-template-columns: 1fr 1fr; }
  .cluster-wide {
    grid-column: span 2;
    grid-template-columns: 1fr;
  }
  .cluster-wide h3,
  .cluster-wide ul { grid-column: 1; }

  .nexus-orbit { width: min(380px, 90vw); }
  .nexus-node {
    transform:
      translate(-50%, -50%)
      rotate(calc(var(--i) * 60deg))
      translateY(-9rem)
      rotate(calc(var(--i) * -60deg));
  }

  .device-rail { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero { padding-top: 2rem; }
  .cluster-grid { grid-template-columns: 1fr; }
  .cluster-wide { grid-column: span 1; }
  .cluster-wide ul { grid-template-columns: 1fr; }
  .ops-grid { grid-template-columns: 1fr 1fr; }
  .console-widgets { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .nexus-node {
    width: 4.6rem;
    transform:
      translate(-50%, -50%)
      rotate(calc(var(--i) * 60deg))
      translateY(-7.6rem)
      rotate(calc(var(--i) * -60deg));
  }
  .nexus-node b { font-size: 0.58rem; }
  .tally-beam { flex-wrap: wrap; justify-content: center; }
  .beam-line { min-width: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track,
  .nexus-scan,
  .nexus-rings .ring-arc,
  .core-pulse,
  .beam-line i { animation: none !important; }
  .cluster-card:hover { transform: none; }
}
