.hero {
  padding: 64px 0 40px;
  min-height: calc(100vh - 72px); /* subtract approx header height */
  display: flex;
  align-items: center;
  padding: 32px 0 40px; /* reduce top padding since we're centering */
}

.hero-weave {
  transform: scale(0.67);
  transform-origin: center top;
  /* NEW: pull it closer to the hero flow card */
  margin-bottom: -70px; /* try -40px to -110px */
}
.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero-copy {
  max-width: 560px;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--muted, #94a3b8);
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 3vw, 3rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}

.hero-sub {
  margin: 0;
  color: var(--muted, #cbd5f5);
  max-width: 36rem;
}

.hero-bullets {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
}

.hero-bullets li {
  margin: 0.35rem 0;
  color: var(--muted, #cbd5f5);
}

.hero-graphic img {
  max-width: 320px;
  width: 100%;
  height: auto;
  display: block;
  filter:
    drop-shadow(0 18px 45px rgba(15, 23, 42, 0.9))
    brightness(1.05)
    saturate(1.08);
}

/* Cards */

.section {
  padding: 40px 0;
}

.hero-graphic {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.hero-weave picture { display: block; }

.hero-weave img {
  max-width: 360px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  filter:
    drop-shadow(0 18px 45px rgba(15, 23, 42, 0.9))
    brightness(1.05)
    saturate(1.08);
}


.section-preview h2 {
  margin-bottom: 1.5rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.card {
  border-radius: 18px;
  padding: 18px 18px 16px;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.card p {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.card ul {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
}

/* Flow */

.section-flow .flow {
  display: grid;
  gap: 16px;
}

.section-flow article {
  border-left: 2px solid rgba(148, 163, 184, 0.5);
  padding-left: 14px;
}

.diagram-figure {
  margin: 0.75rem 0 1.5rem;
}

.diagram-figure figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

/* Responsive */

@media (max-width: 768px) {
  .hero-inner {
    flex-direction: column-reverse;
    text-align: center;
    min-height: auto;
    display: block;
    padding: 48px 0 24px;
  }

  .hero-copy {
    max-width: none;
  }

  .section-flow article {
    border-left: none;
    border-top: 1px solid rgba(148, 163, 184, 0.4);
    padding-left: 0;
    padding-top: 12px;
  }

  .section-flow article:first-child {
    border-top: none;
    padding-top: 0;
  }
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding: 48px 0 24px; }
  .features, .how { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .features, .how { grid-template-columns: 1fr; }
}

/* Motion primitives (SVG-first; self-hosted; no deps) */
.hero-flow-card {
  position: relative;
  width: min(520px, 100%);
  border-radius: 22px;
  overflow: hidden;
}

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

.hf-card {
  fill: rgba(15, 23, 42, 0.45);
  stroke: rgba(148, 163, 184, 0.35);
  stroke-width: 1.2;
}

.hf-stage {
  fill: rgba(2, 8, 26, 0.35);
  stroke: rgba(148, 163, 184, 0.32);
  stroke-width: 1;
}

.hf-label {
  font-size: 15px;
  font-weight: 650;
  fill: rgba(229, 237, 255, 0.9);
}

.hf-path {
  fill: none;
  stroke: url(#hfStroke);
  stroke-width: 3.2;
  stroke-linecap: round;
  opacity: 0.95;
}

.hf-out {
  fill: none;
  stroke: rgba(148, 163, 184, 0.45);
  stroke-width: 2.6;
  stroke-linecap: round;
}

.hf-icon-stroke {
  fill: rgba(2, 8, 26, 0.15);
  stroke: rgba(229, 237, 255, 0.55);
  stroke-width: 1.6;
}

.hf-icon-muted {
  fill: none;
  stroke: rgba(148, 163, 184, 0.55);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.hf-icon-fill {
  fill: rgba(229, 237, 255, 0.85);
}

.hf-target {
  fill: rgba(2, 8, 26, 0.35);
  stroke: rgba(148, 163, 184, 0.55);
  stroke-width: 1.4;
}
.hf-msg {
  fill: rgba(229, 237, 255, 0.95);
  opacity: 0.92;
}

.hf-baseline {
  fill: none;
  stroke: rgba(148, 163, 184, 0.25);
  stroke-width: 1;
  stroke-dasharray: 3 6;
}

.hf-micro {
  font-size: 11px;
  fill: rgba(148, 163, 184, 0.9);
}

.hf-micro-dots {
  letter-spacing: 0.25em;
}

.hf-target-label {
  font-size: 12px;
  font-weight: 600;
  fill: rgba(229, 237, 255, 0.78);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Card hover polish */
.card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(147, 197, 253, 0.55);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.65);
}

/* Micro animations containers */
.micro {
  margin: 12px 0 10px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(2, 8, 26, 0.35);
  position: relative;
  overflow: hidden;
  width: 33%;
}

/* Summary micro animations (SVG-based) */
.micro svg { width: 100%; height: auto; display: block; }

.mm-card {
  fill: rgba(15, 23, 42, 0.14);
  stroke: rgba(148, 163, 184, 0.28);
  stroke-width: 1;
}

.mm-path {
  fill: none;
  stroke-width: 3.2;
  stroke-linecap: round;
  opacity: 0.92;
}

.mm-branch {
  fill: none;
  stroke: rgba(148, 163, 184, 0.35);
  stroke-width: 2.2;
  stroke-dasharray: 5 6;
  opacity: 0.8;
}

/* Learn micro: semantic strokes */
.mm-path-high {
  stroke: rgba(34, 197, 94, 0.90);   /* green */
}

.mm-path-low {
  stroke: rgba(239, 68, 68, 0.85);   /* red */
}

.mm-dot {
  fill: rgba(229, 237, 255, 0.92);
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.18));
}

.mm-label {
  font-size: 11px;
  letter-spacing: 0.04em;
  fill: rgba(229, 237, 255, 0.62);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.mm-pill {
  fill: rgba(34, 211, 238, 0.08);
  stroke: rgba(34, 211, 238, 0.30);
  stroke-width: 1;
}

.mm-pill-text {
  font-size: 11px;
  letter-spacing: 0.12em;
  fill: rgba(229, 237, 255, 0.78);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.mm-hub {
  fill: rgba(59, 130, 246, 0.12);
  stroke: rgba(59, 130, 246, 0.35);
  stroke-width: 1.2;
}
