:root {
  --bg: #08111d;
  --bg-panel: rgba(10, 22, 37, 0.76);
  --border: rgba(217, 227, 236, 0.18);
  --text: #f4f7fb;
  --muted: #a7b6c8;
  --primary: #14b8a6;
  --accent: #3b82f6;
  --gold: #d6a84f;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  --container: min(1160px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.18), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.18), transparent 24%),
    linear-gradient(180deg, #07101a 0%, #08111d 48%, #0a1522 100%);
  overflow-x: hidden;
  overflow-y: auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, black 46%, transparent 96%);
  pointer-events: none;
  z-index: -2;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

.ambient {
  position: fixed;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.26;
  pointer-events: none;
  z-index: -1;
  animation: drift 18s ease-in-out infinite;
}

.ambient-one {
  top: -9rem;
  right: -8rem;
  background: rgba(20, 184, 166, 0.24);
}

.ambient-two {
  bottom: -10rem;
  left: -7rem;
  background: rgba(59, 130, 246, 0.2);
  animation-delay: -9s;
}

.grid-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 25%, rgba(214, 168, 79, 0.08), transparent 24%),
    radial-gradient(circle at 25% 75%, rgba(20, 184, 166, 0.1), transparent 26%);
  z-index: -1;
}

.topbar,
.hero {
  width: var(--container);
  margin: 0 auto;
}

.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow:
    0 0 0 6px rgba(20, 184, 166, 0.12),
    0 0 28px rgba(20, 184, 166, 0.45);
}

.brand-text {
  font-size: 1rem;
}

.status-pill {
  margin: 0;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
}

.hero-wrap {
  min-height: calc(100svh - 78px);
}

.hero {
  position: relative;
  min-height: calc(100svh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: 36px 0 56px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(100%, 640px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.74rem;
  font-weight: 800;
}

.hero h1,
.signal-card h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 11ch;
  font-size: clamp(3.3rem, 8vw, 6.4rem);
  line-height: 0.98;
}

.hero-text {
  max-width: 58ch;
  margin: 26px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: #07211f;
  background: linear-gradient(135deg, #3ce5d0 0%, #14b8a6 70%);
  box-shadow: 0 18px 44px rgba(20, 184, 166, 0.28);
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  backdrop-filter: blur(12px);
}

.hero-points {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.hero-points li {
  position: relative;
  padding-left: 28px;
  color: #d8e1ec;
}

.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--primary));
  box-shadow: 0 0 18px rgba(214, 168, 79, 0.45);
}

.hero-visual {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  justify-self: end;
  pointer-events: none;
  opacity: 0.9;
}

/* ── Signal Board ─────────────────────────────────── */
.signal-board {
  position: relative;
  width: 100%;
  border-radius: 28px;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)),
    linear-gradient(145deg, rgba(15, 39, 66, 0.9), rgba(8, 17, 29, 0.94));
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

/* Holographic shimmer sweep */
.board-shimmer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(20, 184, 166, 0.08) 45%,
    rgba(59, 130, 246, 0.1) 50%,
    rgba(214, 168, 79, 0.06) 54%,
    transparent 58%
  );
  background-size: 300% 100%;
  animation: shimmerSweep 5s ease-in-out infinite;
}

/* Breathing ambient glow */
.board-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(20, 184, 166, 0.18), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.14), transparent 40%);
  animation: breatheGlow 7s ease-in-out infinite;
}

/* Inner border ring */
.signal-board::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 0;
  pointer-events: none;
}

/* Bottom teal wash */
.signal-board::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 35%;
  background: linear-gradient(180deg, transparent, rgba(20, 184, 166, 0.08));
  pointer-events: none;
  z-index: 0;
}

/* ── Board Content (flex layout — no overlap) ──── */
.board-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
}

/* ── Main Signal Card ─────────────────────────────── */
.signal-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 18, 30, 0.65);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  animation: cardReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.signal-card-main {
  padding: 24px;
}

.signal-card h2 {
  margin: 14px 0 10px;
  font-size: 1.6rem;
  line-height: 1.1;
}

.signal-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* ── Chip with live dot ───────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: #dffcf8;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(20, 184, 166, 0.14);
  border: 1px solid rgba(20, 184, 166, 0.22);
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px rgba(20, 184, 166, 0.7);
  animation: liveDot 2s ease-in-out infinite;
}

/* ── Metrics Grid ─────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.mini-panel {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 18, 30, 0.6);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  padding: 14px 16px;
  animation: cardReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.panel-a { animation-delay: 0.15s; }
.panel-b { animation-delay: 0.3s; }
.panel-c { animation-delay: 0.45s; }

.mini-panel span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 10px;
}

.mini-panel strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 800;
}

/* ── Animated Progress Bars ───────────────────────── */
.panel-bar {
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.panel-bar-fill {
  height: 100%;
  border-radius: 4px;
  animation: barFill 2.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bar-fill-a {
  width: 92%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  animation-delay: 0.5s;
}

.bar-fill-b {
  width: 68%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  animation-delay: 0.7s;
}

.bar-fill-c {
  width: 85%;
  background: linear-gradient(90deg, var(--gold), var(--primary));
  animation-delay: 0.9s;
}

/* ── Data-Flow Node Strip ─────────────────────────── */
.node-strip {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 8px 4px;
}

.node {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.08), 0 0 12px rgba(20, 184, 166, 0.3);
  flex-shrink: 0;
  animation: dataNodePulse 3s ease-in-out infinite;
}

.node-1 { animation-delay: 0s; }
.node-2 { animation-delay: 0.6s; }
.node-3 { animation-delay: 1.2s; }
.node-4 { animation-delay: 1.8s; }
.node-5 { animation-delay: 2.4s; }

.node-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.15), rgba(59, 130, 246, 0.25), rgba(20, 184, 166, 0.15));
  position: relative;
  overflow: hidden;
}

.node-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.8), transparent);
  animation: dataFlow 2.4s linear infinite;
}

.node-line:nth-child(2)::after { animation-delay: 0s; }
.node-line:nth-child(4)::after { animation-delay: 0.5s; }
.node-line:nth-child(6)::after { animation-delay: 1s; }
.node-line:nth-child(8)::after { animation-delay: 1.5s; }

/* ── Keyframe Animations ──────────────────────────── */

/* Holographic shimmer that sweeps diagonally */
@keyframes shimmerSweep {
  0% { background-position: 200% 0; }
  50% { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

/* Breathing ambient glow */
@keyframes breatheGlow {
  0%, 100% {
    opacity: 0.7;
    filter: blur(0px);
  }
  50% {
    opacity: 1;
    filter: blur(2px);
  }
}

/* Staggered card entrance */
@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Progress bar fill */
@keyframes barFill {
  from {
    width: 0%;
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Live chip dot */
@keyframes liveDot {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 8px rgba(20, 184, 166, 0.7);
  }
  50% {
    opacity: 0.4;
    box-shadow: 0 0 3px rgba(20, 184, 166, 0.3);
  }
}

/* Node pulse — scales in place */
@keyframes dataNodePulse {
  0%, 100% {
    transform: scale(0.85);
    opacity: 0.5;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.05), 0 0 8px rgba(20, 184, 166, 0.15);
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
    box-shadow: 0 0 0 6px rgba(20, 184, 166, 0.12), 0 0 18px rgba(20, 184, 166, 0.5);
  }
}

/* Data flow light traveling along the lines */
@keyframes dataFlow {
  0% { left: -40%; }
  100% { left: 140%; }
}

/* Background ambient drift (kept for .ambient elements) */
@keyframes drift {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(22px, -18px, 0) scale(1.06);
  }
}

@media (max-width: 1040px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 28px 0 48px;
    align-items: start;
  }

  .hero-copy {
    width: min(100%, 620px);
  }

  .hero-visual {
    width: min(100%, 520px);
    justify-self: center;
    opacity: 0.72;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding-top: 18px;
  }

  .status-pill {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 18px 0 40px;
  }

  .hero h1 {
    max-width: 12ch;
    font-size: clamp(2.8rem, 14vw, 4.5rem);
  }

  .hero-text {
    max-width: 34ch;
  }

  .hero-visual {
    width: 100%;
    max-width: 440px;
    opacity: 0.95;
    justify-self: center;
  }

  .board-content {
    padding: 18px;
    gap: 12px;
  }

  .signal-card-main {
    padding: 16px;
  }

  .signal-card-main h2 {
    font-size: 1.3rem;
    margin: 10px 0 6px;
  }

  .signal-card-main p {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .chip {
    min-height: 26px;
    padding: 0 10px;
    font-size: 0.68rem;
    gap: 6px;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .mini-panel {
    padding: 12px;
  }

  .mini-panel span {
    font-size: 0.72rem;
    margin-top: 8px;
  }

  .mini-panel strong {
    font-size: 1.15rem;
  }

  .node {
    width: 10px;
    height: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
