/* ═══════════════════════════════════════════════
   m3kko — Animations & Visualizations
   Show-don't-tell graphics for deep tech concepts
   ═══════════════════════════════════════════════ */

/* ── Keyframes ── */

@keyframes ring-orbit {
  to { stroke-dashoffset: -1068; }
}

@keyframes ring-orbit-reverse {
  to { stroke-dashoffset: 692; }
}

@keyframes ring-orbit-inner {
  to { stroke-dashoffset: -314; }
}

@keyframes pulse-soft {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes pulse-glow {
  0%, 100% {
    filter: drop-shadow(0 0 2px rgba(0,255,136,0.3));
    opacity: 0.65;
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(0,255,136,0.6));
    opacity: 1;
  }
}

@keyframes pulse-glow-cyan {
  0%, 100% {
    filter: drop-shadow(0 0 2px rgba(0,212,255,0.3));
    opacity: 0.65;
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(0,212,255,0.6));
    opacity: 1;
  }
}

@keyframes flow-dash {
  to { stroke-dashoffset: -24; }
}

@keyframes connector-flow {
  0% { background-position: 0 0; }
  100% { background-position: 7px 0; }
}

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

@keyframes explored-pulse {
  0%, 100% {
    stroke-width: 3;
    opacity: 0.7;
  }
  50% {
    stroke-width: 5;
    opacity: 1;
  }
}

@keyframes radar-ping {
  0% { r: 20; opacity: 0.25; }
  100% { r: 55; opacity: 0; }
}


/* ══════════════════════════════════════════════════
   PROBLEM — Orbital Design Space Diagram
   ══════════════════════════════════════════════════ */

.problem-visual {
  display: flex;
  align-items: center;
  gap: 64px;
  margin-bottom: 48px;
}

.problem-visual__text {
  flex: 1;
  min-width: 0;
}

.section__body-text {
  font-size: var(--text-body);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 500px;
}

/* ── Orbital Container ── */

.orbital {
  flex-shrink: 0;
  width: 380px;
  height: 380px;
  position: relative;
}

.orbital::before {
  display: none;
}

.orbital__svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* ── Ring Strokes ── */

.orbital__ring-solid {
  fill: none;
  stroke-width: 1;
}

.orbital__ring-solid--outer  { stroke: rgba(0,255,136,0.04); }
.orbital__ring-solid--middle { stroke: rgba(0,255,136,0.06); }
.orbital__ring-solid--inner  { stroke: rgba(0,255,136,0.08); }

.orbital__ring-path {
  fill: none;
  stroke-linecap: round;
}

.orbital__ring-path--outer {
  stroke: rgba(0,255,136,0.12);
  stroke-width: 1;
  stroke-dasharray: 8 14;
  animation: ring-orbit 28s linear infinite;
}

.orbital__ring-path--middle {
  stroke: rgba(0,255,136,0.18);
  stroke-width: 1;
  stroke-dasharray: 6 10;
  animation: ring-orbit-reverse 20s linear infinite;
}

.orbital__ring-path--inner {
  stroke: rgba(0,255,136,0.22);
  stroke-width: 1;
  stroke-dasharray: 4 8;
  animation: ring-orbit-inner 12s linear infinite;
}

/* ── Connection Lines ── */

.orbital__connection {
  stroke: rgba(0,255,136,0.05);
  stroke-width: 0.5;
  stroke-dasharray: 3 6;
}

.orbital__conn-1 { animation: pulse-soft 6s ease-in-out infinite; }
.orbital__conn-2 { animation: pulse-soft 6s ease-in-out -1.5s infinite; }
.orbital__conn-3 { animation: pulse-soft 6s ease-in-out -3s infinite; }
.orbital__conn-4 { animation: pulse-soft 6s ease-in-out -4.5s infinite; }

/* ── Node Dots ── */

.orbital__dot {
  animation: pulse-glow 3.5s ease-in-out infinite;
}

.orbital__dot--cyan {
  animation-name: pulse-glow-cyan;
}

/* ── Labels ── */

.orbital__label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.15em;
  fill: rgba(255,255,255,0.3);
}

/* ── Explored Arc ── */

.orbital__explored {
  fill: none;
  stroke: #00FF88;
  stroke-linecap: round;
  animation: explored-pulse 2.5s ease-in-out infinite;
}

/* ── Center ── */

.orbital__core {
  font-family: 'Share Tech Mono', monospace;
  font-size: 32px;
  fill: #00FF88;
}

.orbital__core-sub {
  font-family: 'Share Tech Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.2em;
  fill: rgba(0,255,136,0.4);
}


/* ══════════════════════════════════════════════════
   HOW IT WORKS — Pipeline Flow (scaled up)
   ══════════════════════════════════════════════════ */

.pipeline {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 40px;
}

.pipeline__step {
  flex: 1;
  text-align: center;
  padding: 0 32px;
  max-width: 320px;
}

.pipeline__num {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.22em;
  text-shadow: var(--glow-text);
  margin-bottom: 24px;
}

.pipeline__icon {
  margin-bottom: 32px;
  display: flex;
  justify-content: center;
}

.pipeline__icon svg {
  width: 110px;
  height: 110px;
  filter: drop-shadow(0 0 15px rgba(0,255,136,0.12));
  transition: filter 0.4s ease;
}

.pipeline__step:hover .pipeline__icon svg {
  filter: drop-shadow(0 0 25px rgba(0,255,136,0.25));
}

.pipeline__title {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-primary);
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.pipeline__text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 260px;
  margin: 0 auto;
}

.pipeline__arrow {
  display: flex;
  align-items: center;
  padding-top: 84px;
  flex-shrink: 0;
}

/* Flowing arrow animation */
.arrow-flow {
  stroke-dasharray: 8 4;
  animation: flow-dash 1.2s linear infinite;
}

/* Feedback loop */
.pipeline__loop {
  margin-top: 32px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.pipeline__loop path:first-child {
  stroke-dasharray: 4 4;
  animation: flow-dash 2.5s linear infinite;
}


/* ══════════════════════════════════════════════════
   THE ENGINE — Origin Story + MAXIMUS Platform
   ══════════════════════════════════════════════════ */

.section--engine {
  padding-top: 140px;
  padding-bottom: 120px;
}

/* ── Narrative Text Blocks ── */

.narrative {
  text-align: center;
  margin-bottom: 64px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.narrative__text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-top: 20px;
}

.narrative__text:first-child {
  margin-top: 0;
}

.narrative__accent {
  color: var(--accent);
  text-shadow: 0 0 6px rgba(0,255,136,0.35);
}

/* ── MAXIMUS Reveal ── */

.maximus {
  text-align: center;
  margin-bottom: 72px;
}

.maximus__acronym {
  display: block;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.maximus__stat {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.5vw, 28px);
  color: var(--text-primary);
  margin-top: 28px;
  letter-spacing: 0.03em;
}

.maximus__stat-highlight {
  color: var(--accent);
  text-shadow: 0 0 8px rgba(0,255,136,0.4);
}

.maximus__name {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-primary);
  line-height: 1;
  background: linear-gradient(
    180deg,
    rgba(232,232,232,1) 0%,
    rgba(232,232,232,0.5) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 40px rgba(0,255,136,0.08));
}

/* ── Pipeline Flow Diagram ── */

.engine-flow {
  margin-bottom: 72px;
}

.engine-flow__svg {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: block;
  overflow: visible;
}



/* ══════════════════════════════════════════════════
   NARROWING FUNNEL — How 10^60 becomes 5
   ══════════════════════════════════════════════════ */

.funnel {
  max-width: 740px;
  margin: 0 auto 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.funnel__row {
  display: flex;
  align-items: center;
  gap: 28px;
}

.funnel__bar {
  height: 6px;
  border-radius: 3px;
  flex-shrink: 0;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.funnel__bar--full {
  width: 100%;
  background: linear-gradient(90deg, rgba(0,255,136,0.12) 0%, rgba(0,255,136,0.25) 100%);
  border: 1px solid rgba(0,255,136,0.18);
}

.funnel__bar--mid {
  width: 45%;
  background: linear-gradient(90deg, rgba(0,255,136,0.18) 0%, rgba(0,255,136,0.35) 100%);
  border: 1px solid rgba(0,255,136,0.25);
}

.funnel__bar--narrow {
  width: 18%;
  background: linear-gradient(90deg, rgba(0,255,136,0.25) 0%, rgba(0,255,136,0.45) 100%);
  border: 1px solid rgba(0,255,136,0.35);
}

.funnel__bar--final {
  width: 6%;
  min-width: 40px;
  background: linear-gradient(90deg, rgba(0,255,136,0.45) 0%, rgba(0,255,136,0.7) 100%);
  border: 1px solid rgba(0,255,136,0.5);
  box-shadow: 0 0 20px rgba(0,255,136,0.25), 0 0 40px rgba(0,255,136,0.1);
}

.funnel__info {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.funnel__value {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(0,255,136,0.25);
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.funnel__value sup {
  font-size: 0.6em;
  vertical-align: super;
  line-height: 0;
}

.funnel__label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}


/* ══════════════════════════════════════════════════
   BACKER LOGO
   ══════════════════════════════════════════════════ */

.backer-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.backer-logo__frame {
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  background: var(--glass-bg);
  padding: 40px 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.backer-logo__frame:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--halo-hover);
}

.backer-logo__img {
  max-width: 320px;
  width: 100%;
  height: auto;
  filter: grayscale(1) brightness(0.8);
  opacity: 0.7;
  transition: filter 0.4s ease, opacity 0.4s ease;
}

.backer-logo__frame:hover .backer-logo__img {
  filter: grayscale(0) brightness(1);
  opacity: 1;
}


/* ══════════════════════════════════════════════════
   ENHANCED HOVER STATES
   ══════════════════════════════════════════════════ */

.bento-card--visual:hover {
  box-shadow:
    0 0 0 1px rgba(0,255,136,0.15),
    0 0 30px rgba(0,255,136,0.08),
    0 0 60px rgba(0,255,136,0.03);
}

.bento-card--stat:hover .bento-card__value {
  text-shadow: 0 0 25px rgba(0,255,136,0.5);
}


/* ══════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .problem-visual {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }

  .problem-visual__text {
    order: 1;
  }

  .orbital {
    width: 300px;
    height: 300px;
    order: 0;
    margin: 0 auto;
  }

  .section__body-text {
    max-width: 100%;
    margin: 0 auto;
  }

  .pipeline {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .pipeline__arrow {
    transform: rotate(90deg);
    padding-top: 0;
    padding: 8px 0;
  }

  .pipeline__step {
    max-width: 360px;
  }

  .pipeline__icon svg {
    width: 80px;
    height: 80px;
  }

  .narrative {
    max-width: 100%;
    padding: 0;
  }

  .narrative__text {
    font-size: 15px;
  }

  .funnel__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .funnel__bar--full  { width: 100%; }
  .funnel__bar--mid   { width: 60%; }
  .funnel__bar--narrow { width: 30%; }
  .funnel__bar--final { width: 12%; }

  .maximus {
    margin-bottom: 48px;
  }

  .engine-flow {
    margin-bottom: 48px;
    overflow-x: auto;
  }

  .engine-flow__svg {
    min-width: 600px;
  }
}

@media (max-width: 480px) {
  .orbital {
    width: 260px;
    height: 260px;
  }
}
