.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: 28px clamp(20px, 5vw, 64px) 300px;
  background: #f5f7fb;
}

.topbar,
.page > main {
  position: relative;
  z-index: 1;
}

.topbar {
  max-width: 1200px;
  margin: 0 auto 36px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.28rem;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.brand-icon {
  display: block;
  width: 30px;
  height: auto;
  object-fit: contain;
}

.hero {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: 24px 40px;
  align-items: center;
}

.hero-copy {
  padding-top: 8px;
  min-width: 0;
}

.hero-copy h1 {
  margin: 0 0 18px;
  max-width: 11.5ch;
  font-size: clamp(2.5rem, 4.8vw, 3.7rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
  font-weight: 800;
  color: var(--navy);
}

.gradient-ssh {
  background: linear-gradient(90deg, #4a6cf7 0%, #38bdf8 42%, #2dd4bf 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 0 0 12px;
  max-width: 32rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #64748b;
  font-weight: 500;
}

.tagline {
  margin: 0 0 28px;
  color: #94a3b8;
  font-size: 0.98rem;
  font-weight: 500;
}

.github-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 13px 20px;
  background: #4a6cf7;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.github-cta:hover {
  background: #3b5de7;
}

/* —— Hero diagram: art assets + live text —— */
.diagram {
  --diagram-w: 520px;
  --diagram-h: 440px;
  position: relative;
  width: 100%;
  max-width: var(--diagram-w);
  aspect-ratio: 520 / 440;
  container-type: inline-size;
  container-name: diagram;
  justify-self: end;
}

.diagram-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--diagram-w);
  height: var(--diagram-h);
  transform-origin: top left;
  transform: scale(calc(100cqw / var(--diagram-w)));
}

.diagram-glow {
  position: absolute;
  inset: 20px 0 20px 30px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 42%, rgba(147, 197, 253, 0.3), transparent 60%),
    radial-gradient(circle at 72% 62%, rgba(167, 243, 208, 0.22), transparent 55%);
  filter: blur(2px);
  pointer-events: none;
}

.diagram-connectors {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

.diagram-node {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 118px;
  padding: 14px 14px 12px;
  background: #fff;
  border: 1px solid #e8eef7;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(26, 39, 68, 0.08);
}

.diagram-node img {
  display: block;
  object-fit: contain;
}

.diagram-label {
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--navy);
  text-align: center;
}

.diagram-label-machine {
  color: #3b82f6;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.diagram-agent {
  top: 68px;
  left: 110px;
}

.diagram-agent img {
  width: 56px;
  height: auto;
}

.diagram-fda {
  top: 268px;
  left: 110px;
}

.diagram-fda img {
  width: 44px;
  height: auto;
}

.diagram-machine {
  position: absolute;
  z-index: 2;
  top: 278px;
  left: 390px;
  width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.diagram-machine img {
  display: block;
  width: 72px;
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(26, 39, 68, 0.12));
}

.diagram-bubble {
  position: absolute;
  z-index: 3;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.8125rem;
  line-height: 1.4;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(26, 39, 68, 0.08);
}

.diagram-bubble-agent {
  top: 16px;
  left: 248px;
  max-width: 200px;
  background: #ede9fe;
  color: #6d28d9;
}

.diagram-bubble-machine {
  top: 175px;
  left: 360px;
  max-width: 158px;
  background: #dcfce7;
  color: #15803d;
}

.diagram-pill {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(26, 39, 68, 0.06);
}

.diagram-pill-blue {
  background: #eef2ff;
  color: #4a6cf7;
}

.diagram-pill-green {
  background: #dcfce7;
  color: #16a34a;
}

.diagram-pill-audit {
  background: #fff;
  color: #334155;
  border: 1px solid #e2e8f0;
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.85),
    0 6px 16px rgba(26, 39, 68, 0.08);
}

.diagram-request {
  top: 196px;
  left: 113px;
}

.diagram-audit {
  top: 188px;
  left: 4px;
  transform: rotate(-6deg);
}

.diagram-temp {
  top: 308px;
  left: 246px;
}

.features {
  max-width: 1200px;
  margin: 64px auto 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px 24px;
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.feature p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #64748b;
  font-weight: 500;
}

.feature-icon {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 14px;
  filter: drop-shadow(0 4px 10px rgba(26, 39, 68, 0.08));
}

.ocean {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  height: 260px;
  pointer-events: none;
  overflow: hidden;
}

.ocean-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .ocean-canvas {
    opacity: 0.9;
  }
}

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

  .diagram {
    justify-self: center;
  }

  .features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 48px;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 18px 16px 240px;
  }

  .ocean {
    height: 180px;
  }

  .topbar {
    margin-bottom: 24px;
  }

  .hero-copy {
    padding-top: 0;
  }

  .hero-copy h1 {
    font-size: clamp(2.05rem, 9vw, 2.65rem);
  }

  .features {
    grid-template-columns: 1fr 1fr;
    gap: 22px 16px;
    margin-top: 36px;
  }
}

@media (max-width: 480px) {
  .features {
    grid-template-columns: 1fr;
  }
}
