/* How it works — explainer page (extends DriveSilk tokens) */

.explain-page {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(61, 143, 143, 0.12), transparent 60%),
    var(--bg);
}

.explain-shell { max-width: 920px; }

.explain-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 0;
  margin-bottom: 20px;
  background: rgba(7, 7, 8, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}

.explain-header.scrolled {
  border-bottom-color: var(--line);
}

.brand-link {
  text-decoration: none;
  color: inherit;
}

.explain-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-size: 13px;
}

.explain-nav a {
  color: var(--muted);
  text-decoration: none;
}

.explain-nav a:hover { color: var(--text); }

.explain-nav .nav-cta {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #111 !important;
  font-weight: 600;
}

.hero-explain {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  margin: 28px 0 48px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
}

.hero-explain h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3.5vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 650;
}

.hero-explain h2 em {
  font-style: normal;
  color: var(--orange);
}

.lede {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 42em;
}

.lede strong { color: var(--text); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #111;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.hero-svg { width: 100%; height: auto; display: block; }

.road-pulse {
  animation: roadGlow 3s ease-in-out infinite;
}

.car-slide {
  animation: carBob 2.4s ease-in-out infinite;
}

.wave {
  stroke-dasharray: 12 8;
  animation: waveMove 4s linear infinite;
}

.wave.w2 { animation-duration: 5s; animation-direction: reverse; }
.wave.w3 { animation-duration: 6s; }

@keyframes roadGlow {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes carBob {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(8px); }
}

@keyframes waveMove {
  to { stroke-dashoffset: -80; }
}

/* Steps */

.step {
  display: grid;
  grid-template-columns: 56px 1fr minmax(200px, 260px);
  gap: 18px 20px;
  align-items: start;
  margin-bottom: 36px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.step.in-view {
  opacity: 1;
  transform: none;
}

.step-num {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--teal);
  line-height: 1;
}

.step-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.step-body p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.step-body p strong { color: var(--text); }

.callout {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--teal-dim);
  border: 1px solid rgba(61, 143, 143, 0.28);
  color: var(--text) !important;
}

.viz {
  margin: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  text-align: center;
}

.viz svg {
  width: 100%;
  height: auto;
  display: block;
}

.viz figcaption {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

/* Graphic animations */

.mic-pulse {
  animation: micRing 2s ease-out infinite;
  transform-origin: 140px 90px;
}

.mic-core {
  animation: micCore 1.2s ease-in-out infinite;
}

.bars rect {
  transform-origin: bottom;
  animation: barDance 1.1s ease-in-out infinite alternate;
}

.bars .b2 { animation-delay: 0.1s; }
.bars .b3 { animation-delay: 0.2s; }
.bars .b4 { animation-delay: 0.15s; }
.bars .b5 { animation-delay: 0.05s; }
.bars .b6 { animation-delay: 0.25s; }

@keyframes micRing {
  0% { r: 14; opacity: 0.9; }
  100% { r: 36; opacity: 0; }
}

@keyframes micCore {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

@keyframes barDance {
  from { transform: scaleY(0.55); }
  to { transform: scaleY(1); }
}

.tag-float {
  animation: floatY 3s ease-in-out infinite;
}

.tag-float.delay { animation-delay: 0.4s; }

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.packet {
  transform-origin: 140px 100px;
  animation: orbitPacket 5s linear infinite;
}

.packet.p2 { animation-delay: -1.6s; }
.packet.p3 { animation-delay: -3.2s; }

@keyframes orbitPacket {
  from { transform: rotate(0deg) translateY(-55px) rotate(0deg); }
  to { transform: rotate(360deg) translateY(-55px) rotate(-360deg); }
}

.card-s {
  animation: stackPulse 2.8s ease-in-out infinite;
}

.card-s.s2 { animation-delay: 0.15s; }
.card-s.s3 { animation-delay: 0.3s; }
.card-s.s4 { animation-delay: 0.45s; }

.merged-block {
  animation: mergeGlow 2s ease-in-out infinite;
}

@keyframes stackPulse {
  0%, 100% { opacity: 0.55; }
  40% { opacity: 1; }
}

@keyframes mergeGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.25); }
}

.situation-grid .cell {
  animation: cellLit 3.5s ease-in-out infinite;
}

.situation-grid .c1 { animation-delay: 0s; }
.situation-grid .c2 { animation-delay: 0.2s; }
.situation-grid .c3 { animation-delay: 0.4s; }
.situation-grid .c4 { animation-delay: 0.6s; }
.situation-grid .c5 { animation-delay: 0.15s; }
.situation-grid .c6 { animation-delay: 0.35s; }
.situation-grid .c7 { animation-delay: 0.55s; }
.situation-grid .c8 { animation-delay: 0.75s; }
.situation-grid .c9 { animation-delay: 0.3s; }
.situation-grid .c10 { animation-delay: 0.5s; }
.situation-grid .c11 { animation-delay: 0.7s; }
.situation-grid .c12 { animation-delay: 0.9s; }

@keyframes cellLit {
  0%, 100% { fill: #1a1a1e; stroke: #2a2a30; }
  40% { fill: rgba(61, 143, 143, 0.35); stroke: #3d8f8f; }
}

.scale-a { animation: scaleTilt 3s ease-in-out infinite; transform-origin: 80px 100px; }
.scale-b { animation: scaleTilt 3s ease-in-out infinite reverse; transform-origin: 200px 100px; }
.overlap-glow { animation: overlapPulse 2s ease-in-out infinite; }

@keyframes scaleTilt {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

@keyframes overlapPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.line-a, .line-b {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: drawLine 2.5s ease forwards infinite;
  animation-iteration-count: infinite;
}

.line-b { animation-delay: 0.3s; }

.dot-pulse {
  animation: dotBlink 1.5s ease-in-out infinite;
}

@keyframes drawLine {
  0% { stroke-dashoffset: 200; }
  40%, 100% { stroke-dashoffset: 0; }
}

@keyframes dotBlink {
  0%, 100% { r: 4; opacity: 1; }
  50% { r: 8; opacity: 0.6; }
}

.peer {
  animation: peerPulse 2.4s ease-in-out infinite;
}

.peer.p-b { animation-delay: 0.3s; }
.peer.p-c { animation-delay: 0.6s; }
.peer.p-d { animation-delay: 0.9s; }
.peer.p-e { animation-delay: 1.2s; }

@keyframes peerPulse {
  0%, 100% { stroke-opacity: 0.4; }
  50% { stroke-opacity: 1; }
}

.rung.r3 {
  animation: rungHighlight 2s ease-in-out infinite;
}

@keyframes rungHighlight {
  0%, 100% { fill: #1a1a1e; }
  50% { fill: rgba(61, 143, 143, 0.25); }
}

.pipe {
  animation: pipeFlow 2.2s ease-in-out infinite;
}

.pipe.p2 { animation-delay: 0.25s; }
.pipe.p3 { animation-delay: 0.5s; }
.pipe.p4 { animation-delay: 0.75s; }

@keyframes pipeFlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.why-list, .method-list {
  margin: 0;
  padding-left: 1.15em;
  color: var(--muted);
  font-size: 14px;
}

.why-list li, .method-list li {
  margin-bottom: 8px;
}

.why-list strong, .method-list strong {
  color: var(--text);
}

.method-note {
  margin-top: 12px !important;
  font-size: 12px !important;
}

/* Community + partners */

.community-band,
.partners-band {
  margin: 48px 0 28px;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.community-band h2,
.partners-band h2 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.community-band > p,
.lede-sm {
  color: var(--muted);
  font-size: 15px;
  max-width: 48em;
}

.contrib-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0;
}

.contrib-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

.contrib-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--teal-dim);
  color: #9ee0e0;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.contrib-card h4 {
  margin: 0 0 6px;
  font-size: 15px;
}

.contrib-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.partner-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.partner-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

.partner-card.highlight {
  border-color: rgba(61, 143, 143, 0.45);
  background: linear-gradient(160deg, rgba(61, 143, 143, 0.12), var(--surface-2));
}

.partner-card h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

.partner-card ul {
  margin: 0 0 12px;
  padding-left: 1.1em;
  color: var(--muted);
  font-size: 13px;
}

.partner-card li { margin-bottom: 6px; }

.partner-name {
  font-size: 20px;
  font-weight: 650;
  margin: 0 0 6px;
}

.affiliate-note { margin-top: 12px; font-size: 12px; }

.partner-table-wrap {
  overflow-x: auto;
  margin-top: 18px;
}

.partner-table {
  width: 100%;
  font-size: 13px;
}

.partner-table th,
.partner-table td {
  padding: 10px 8px;
}

@media (max-width: 800px) {
  .hero-explain {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .step {
    grid-template-columns: 40px 1fr;
  }

  .step .viz {
    grid-column: 1 / -1;
  }

  .contrib-grid,
  .partner-layout {
    grid-template-columns: 1fr;
  }

  .explain-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .step {
    opacity: 1;
    transform: none;
  }
}
