/* You Can Do It With Netlify */

:root {
  --black: #181a1c;
  --white: #ffffff;
  --primary: #32e6e2;
  --primary-soft: color-mix(in srgb, var(--primary) 28%, var(--white));
  --accent: var(--primary);
  --muted: #4d5359;
  --surface: #e9ecef;
  --border: color-mix(in srgb, var(--black) 20%, transparent);
  --border-strong: color-mix(in srgb, var(--black) 32%, transparent);
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max-width: 1120px;
  --panel-pad: 1.75rem;
  --radius: 14px;
  --radius-sm: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--black);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

/* ── Header ── */

.site-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2.5rem;
}

.site-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--primary-soft);
  padding: 0.35em 0.65em;
  border-radius: 4px;
  margin-bottom: 1.25rem;
}

.site-title {
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.site-intro {
  font-size: 14px;
  color: var(--black);
}

.site-intro em {
  font-style: normal;
  color: var(--black);
  background: var(--primary-soft);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* ── Panels ── */

.panels {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.panel {
  padding: var(--panel-pad);
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--black) 8%, transparent);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.panel:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border-strong));
  box-shadow: 0 4px 20px color-mix(in srgb, var(--black) 10%, transparent);
}

.panel-header {
  margin-bottom: 1rem;
}

.panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--primary);
  color: var(--black);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--black) 12%, transparent);
}

.panel-badge-icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}

.panel-badge-icon svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2.25;
}

.panel-headline {
  font-size: clamp(1.1rem, 3.5vw, 1.35rem);
  font-weight: 700;
  line-height: 1.3;
}

.panel-desc {
  font-size: 14px;
  margin-bottom: 1.75rem;
  max-width: 52ch;
}

/* ── Illustrative visual container ── */

.visual {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 1.5rem 1rem;
  margin-bottom: 1rem;
  min-height: 140px;
  overflow: visible;
}

.visual-inner {
  position: relative;
  width: 100%;
  min-height: 110px;
  overflow: visible;
}

/* ── Panel meta ── */

.panel-note {
  font-size: 12px;
  line-height: 1.45;
  color: color-mix(in srgb, var(--muted) 88%, var(--white));
  margin-bottom: 0.85rem;
  max-width: 52ch;
}

.panel-docs {
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-underline-offset: 3px;
}

.panel-docs:hover,
.panel-docs:focus-visible {
  text-decoration-color: var(--black);
}

.panel-docs:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* ── Footer ── */

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
}

.site-footer p {
  font-size: 13px;
}

.site-footer a {
  color: var(--black);
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-underline-offset: 3px;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration-color: var(--black);
}

.footer-sep {
  margin: 0 0.5rem;
  color: var(--muted);
}

/* ══════════════════════════════════════
   ILLUSTRATIVE ANIMATIONS
   ══════════════════════════════════════ */

/* ── 1. Forms ── */

.visual-forms {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
}

.forms-ui {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--white);
}

.forms-field {
  height: 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--white);
}

.forms-field.short {
  width: 60%;
}

.forms-btn {
  font-size: 10px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
  width: fit-content;
  animation: forms-pulse 4s ease-in-out infinite;
}

.forms-packet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: forms-fly 4s ease-in-out infinite;
}

.forms-inbox {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  min-height: 70px;
  background: var(--white);
}

.forms-inbox-label {
  font-size: 9px;
  display: block;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.forms-entries {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.forms-entry {
  height: 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  opacity: 0.2;
}

.forms-entry:last-child {
  animation: forms-drop 4s ease-in-out infinite;
}

@keyframes forms-pulse {
  0%, 70%, 100% { background: var(--white); color: var(--black); }
  75%, 85% { background: var(--accent); color: var(--black); }
}

@keyframes forms-fly {
  0%, 70%, 100% { transform: translateX(-20px); opacity: 0; }
  75% { transform: translateX(0); opacity: 1; }
  85% { transform: translateX(20px); opacity: 0; }
}

@keyframes forms-drop {
  0%, 80%, 100% { opacity: 0.2; transform: translateY(-8px); background: var(--white); }
  85%, 95% { opacity: 1; transform: translateY(0); background: var(--accent); border-color: var(--accent); }
}

/* ── 2. Image CDN ── */

.visual-image-cdn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.img-big,
.img-small {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  background: var(--white);
  overflow: hidden;
}

.img-big {
  width: 90px;
  height: 70px;
  animation: img-shrink-box 5s ease-in-out infinite;
}

.img-small {
  width: 45px;
  height: 35px;
  opacity: 0;
  animation: img-appear 5s ease-in-out infinite;
}

.img-label {
  font-size: 10px;
  padding: 0.15rem 0.3rem;
  border-top: 1px solid var(--border);
  width: 100%;
  text-align: center;
  animation: img-size-drop 5s ease-in-out infinite;
}

.img-label-small {
  animation: img-size-small 5s ease-in-out infinite;
}

.img-arrow {
  font-size: 14px;
  animation: img-arrow-pulse 5s ease-in-out infinite;
}

@keyframes img-shrink-box {
  0%, 15% { width: 90px; height: 70px; opacity: 1; }
  35%, 55% { width: 45px; height: 35px; opacity: 0.3; }
  60%, 100% { width: 90px; height: 70px; opacity: 1; }
}

@keyframes img-appear {
  0%, 30% { opacity: 0; }
  40%, 60% { opacity: 1; }
  70%, 100% { opacity: 0; }
}

@keyframes img-size-drop {
  0%, 15% { font-weight: 400; }
  35%, 55% { font-weight: 700; background: var(--primary-soft); }
  60%, 100% { font-weight: 400; background: transparent; }
}

@keyframes img-size-small {
  0%, 35% { opacity: 0; }
  45%, 60% { opacity: 1; font-weight: 700; background: var(--primary-soft); }
  70%, 100% { opacity: 0; }
}

@keyframes img-arrow-pulse {
  0%, 25% { opacity: 0.5; transform: scale(1); }
  35%, 55% { opacity: 1; transform: scale(1.15); }
  65%, 100% { opacity: 0.5; transform: scale(1); }
}

/* ── 3. Functions ── */

.visual-functions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  padding: 0 1.5rem;
  min-height: 56px;
}

.fn-box {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.5rem;
  font-size: 10px;
  text-align: center;
  min-width: 70px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: var(--white);
  position: relative;
  z-index: 1;
}

.fn-key {
  font-size: 9px;
  font-weight: 600;
  color: var(--black);
  background: var(--primary-soft);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

.fn-request,
.fn-response {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--accent);
  z-index: 2;
  pointer-events: none;
}

.fn-request {
  left: 20%;
  animation: fn-request-fly 4s ease-in-out infinite;
}

.fn-response {
  left: 52%;
  animation: fn-response-fly 4s ease-in-out infinite;
}

@keyframes fn-request-fly {
  0%, 8%, 100% { left: 20%; opacity: 0; transform: translateY(-50%) scale(0.5); }
  14% { left: 24%; opacity: 1; transform: translateY(-50%) scale(1); }
  36% { left: 44%; opacity: 1; transform: translateY(-50%) scale(1); }
  46%, 100% { left: 48%; opacity: 0; transform: translateY(-50%) scale(0.5); }
}

@keyframes fn-response-fly {
  0%, 46%, 100% { left: 52%; opacity: 0; transform: translateY(-50%) scale(0.5); }
  54% { left: 58%; opacity: 1; transform: translateY(-50%) scale(1); }
  76% { left: 76%; opacity: 1; transform: translateY(-50%) scale(1); }
  86%, 100% { left: 80%; opacity: 0; transform: translateY(-50%) scale(0.5); }
}

/* ── 4. Blobs ── */

.visual-blobs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.blob-notepad {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  padding: 0.5rem;
  width: 80px;
  min-height: 65px;
  position: relative;
}

.blob-notepad-after {
  opacity: 0;
  animation: blob-show-after 6s ease-in-out infinite;
}

.blob-notepad-after .blob-line {
  animation: none;
}

.blob-notepad-after .blob-line-1 {
  width: 70%;
  background: var(--white);
  border-color: var(--border-strong);
}

.blob-notepad-after .blob-line-2 {
  width: 50%;
  background: var(--white);
  border-color: var(--border-strong);
}

.blob-notepad:not(.blob-notepad-after) {
  animation: blob-hide-before 6s ease-in-out infinite;
}

.blob-notepad-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.4rem;
}

.blob-line {
  height: 6px;
  border: 1px solid var(--border);
  margin-bottom: 0.3rem;
  width: 0;
}

.blob-line-1 { animation: blob-write-1 6s ease-in-out infinite; }
.blob-line-2 { animation: blob-write-2 6s ease-in-out infinite; }

.blob-line.visible {
  width: 100%;
}

.blob-cursor {
  width: 2px;
  height: 10px;
  background: var(--accent);
  animation: blob-cursor-blink 6s step-end infinite;
}

.blob-refresh {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 9px;
  gap: 0.2rem;
  animation: blob-refresh-spin 6s ease-in-out infinite;
}

.blob-refresh-icon {
  font-size: 18px;
  display: block;
  line-height: 1;
  padding: 0.15rem;
  animation: blob-refresh-icon-spin 6s ease-in-out infinite;
}

@keyframes blob-write-1 {
  0%, 5% { width: 0; }
  15%, 30% { width: 70%; background: var(--accent); border-color: var(--accent); }
  35%, 100% { width: 70%; background: var(--white); border-color: var(--border-strong); }
}

@keyframes blob-write-2 {
  0%, 18% { width: 0; }
  28%, 30% { width: 50%; background: var(--accent); border-color: var(--accent); }
  35%, 100% { width: 50%; background: var(--white); border-color: var(--border-strong); }
}

@keyframes blob-cursor-blink {
  0%, 30% { opacity: 1; }
  31%, 35% { opacity: 0; }
  36%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes blob-refresh-spin {
  0%, 32% { opacity: 0; }
  35%, 55% { opacity: 1; }
  60%, 100% { opacity: 0; }
}

@keyframes blob-refresh-icon-spin {
  0%, 34% { transform: rotate(0deg); color: var(--black); }
  42% { transform: rotate(360deg); color: var(--black); background: var(--primary-soft); border-radius: 50%; }
  60%, 100% { transform: rotate(360deg); color: var(--black); }
}

@keyframes blob-hide-before {
  0%, 48% { opacity: 1; }
  52%, 90% { opacity: 0; }
  95%, 100% { opacity: 1; }
}

@keyframes blob-show-after {
  0%, 48% { opacity: 0; }
  52%, 90% { opacity: 1; }
  95%, 100% { opacity: 0; }
}

/* ── 5. Edge Functions ── */

.visual-edge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.edge-user,
.edge-result {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 10px;
  padding: 0.4rem 0.5rem;
  flex-shrink: 0;
  background: var(--white);
}

.edge-globe {
  flex: 1;
  position: relative;
  color: var(--black);
}

.edge-svg {
  width: 100%;
  max-width: 180px;
  display: block;
  margin: 0 auto;
}

.edge-dot {
  fill: var(--black);
}

.edge-dot-near {
  fill: var(--accent);
  animation: edge-near-pulse 5s ease-in-out infinite;
  transform-origin: 55px 55px;
  transform-box: fill-box;
}

.edge-dot-far {
  opacity: 0.3;
}

.edge-packet {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  top: 50%;
  left: 8%;
  margin-top: -4px;
  animation: edge-packet-fly 5s ease-in-out infinite;
}

@keyframes edge-packet-fly {
  0%, 10% { left: 8%; opacity: 0; }
  15% { opacity: 1; }
  30% { left: 22%; }
  50%, 100% { left: 28%; opacity: 1; }
}

@keyframes edge-near-pulse {
  0%, 40% { transform: scale(1); }
  50%, 70% { transform: scale(1.4); }
  80%, 100% { transform: scale(1); }
}

.edge-result {
  animation: edge-result-flash 5s ease-in-out infinite;
}

@keyframes edge-result-flash {
  0%, 48% { border-color: var(--border-strong); color: var(--black); background: var(--white); }
  52%, 75% { border-color: var(--accent); color: var(--black); background: var(--primary-soft); }
  80%, 100% { border-color: var(--border-strong); color: var(--black); background: var(--white); }
}

/* ── 6. Scheduled Functions ── */

.visual-scheduled {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
}

.sched-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.sched-face {
  width: 56px;
  height: 56px;
  border: 1px solid var(--border);
  border-radius: 50%;
  position: relative;
}

.sched-hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform-origin: bottom center;
  background: var(--black);
  width: 1px;
}

.sched-hour {
  height: 16px;
  animation: sched-hour 8s linear infinite;
}

.sched-minute {
  height: 22px;
  animation: sched-minute 4s linear infinite;
}

.sched-tick {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 1px;
  height: 6px;
  background: var(--black);
  transform: translateX(-50%);
}

.sched-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sched-spark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: sched-spark 8s ease-in-out infinite;
}

.sched-task {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  animation: sched-task-fire 8s ease-in-out infinite;
}

.sched-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 9px;
  line-height: 1;
  opacity: 0;
  animation: sched-check 8s ease-in-out infinite;
}

@keyframes sched-hour {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}

@keyframes sched-minute {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}

@keyframes sched-spark {
  0%, 48%, 100% { opacity: 0; transform: scale(0); }
  50% { opacity: 1; transform: scale(1); }
  55% { opacity: 0; transform: scale(1.5); }
}

@keyframes sched-task-fire {
  0%, 48% { border-color: var(--border-strong); color: var(--black); background: var(--white); }
  52%, 75% { border-color: var(--accent); color: var(--black); background: var(--primary-soft); }
  80%, 100% { border-color: var(--border-strong); color: var(--black); background: var(--white); }
}

@keyframes sched-check {
  0%, 52% { opacity: 0; transform: scale(0.5); }
  56%, 75% { opacity: 1; transform: scale(1); color: var(--black); background: var(--accent); border-radius: 50%; }
  80%, 100% { opacity: 0; transform: scale(0.5); }
}

/* ── 7. Background Functions ── */

.visual-background {
  padding: 0.25rem 0;
}

.bg-lanes {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bg-lane {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  position: relative;
  min-height: 36px;
  overflow: visible;
}

.bg-lane-side {
  border-style: dashed;
}

.bg-lane-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: absolute;
  top: -8px;
  left: 8px;
  background: var(--surface);
  color: var(--black);
  padding: 0 0.25rem;
}

.bg-user {
  width: 12px;
  height: 12px;
  border: 1px solid var(--border);
  position: absolute;
  top: 50%;
  left: 10%;
  margin-top: -6px;
  animation: bg-user-walk 6s ease-in-out infinite;
}

.bg-user-2 {
  animation-delay: 2s;
  left: 5%;
}

.bg-job {
  width: 40px;
  height: 14px;
  border: 1px solid var(--border);
  position: absolute;
  top: 50%;
  left: -50px;
  margin-top: -7px;
  animation: bg-job-slide 6s ease-in-out infinite;
}

.bg-job::after {
  content: "processing…";
  font-size: 8px;
  font-weight: 600;
  position: absolute;
  top: -14px;
  left: 0;
  white-space: nowrap;
  color: var(--black);
  background: var(--primary-soft);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  animation: bg-job-label 6s ease-in-out infinite;
}

@keyframes bg-user-walk {
  0% { left: 5%; }
  100% { left: 85%; }
}

@keyframes bg-job-slide {
  0%, 15% { left: -50px; opacity: 0; }
  20% { left: 10%; opacity: 1; border-color: var(--accent); }
  80% { left: 10%; opacity: 1; border-color: var(--accent); }
  90%, 100% { left: 80%; opacity: 0; border-color: var(--black); }
}

@keyframes bg-job-label {
  0%, 18% { opacity: 0; }
  22%, 78% { opacity: 1; }
  85%, 100% { opacity: 0; }
}

/* ── 8. AI Gateway ── */

.visual-ai-gateway {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  position: relative;
}

.ai-prompt,
.ai-gateway-box,
.ai-model {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 10px;
  padding: 0.4rem 0.5rem;
  background: var(--white);
}

.ai-gateway-box {
  animation: ai-gateway-glow 4s ease-in-out infinite;
}

.ai-wire {
  width: 20px;
  height: 1px;
  background: var(--black);
  position: relative;
}

.ai-wire::after {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  position: absolute;
  top: -2.5px;
  left: 0;
  animation: ai-pulse-travel 4s ease-in-out infinite;
}

.ai-wire:nth-child(4)::after {
  animation-delay: 0.6s;
}

.ai-key-skipped {
  position: absolute;
  bottom: -4px;
  right: 0;
  font-size: 9px;
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.ai-key-cross {
  text-decoration: line-through;
  opacity: 0.4;
}

.ai-skip {
  font-weight: 700;
  color: var(--black);
  background: var(--primary-soft);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  animation: ai-skip-flash 4s ease-in-out infinite;
}

@keyframes ai-gateway-glow {
  0%, 100% { border-color: var(--border-strong); color: var(--black); background: var(--white); }
  40%, 60% { border-color: var(--accent); color: var(--black); background: var(--primary-soft); }
}

@keyframes ai-pulse-travel {
  0%, 10% { left: 0; opacity: 0; }
  20%, 80% { left: 14px; opacity: 1; }
  90%, 100% { left: 20px; opacity: 0; }
}

@keyframes ai-skip-flash {
  0%, 30% { opacity: 0; }
  40%, 70% { opacity: 1; }
  80%, 100% { opacity: 0; }
}

/* ── 9. Netlify DB ── */

.visual-db {
  display: flex;
  justify-content: center;
}

.db-table {
  width: 100%;
  max-width: 280px;
  border-collapse: collapse;
  font-size: 11px;
  background: var(--white);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.db-table th,
.db-table td {
  border: 1px solid var(--border-strong);
  padding: 0.35rem 0.5rem;
  text-align: left;
}

.db-table th {
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.db-row {
  opacity: 0;
  transform: translateY(-6px);
}

.db-row-1 { animation: db-row-in 6s ease-in-out infinite; }
.db-row-2 { animation: db-row-in 6s ease-in-out infinite 0.8s; }
.db-row-3 { animation: db-row-in 6s ease-in-out infinite 1.6s; }

@keyframes db-row-in {
  0%, 5% { opacity: 0; transform: translateY(-6px); }
  12%, 80% { opacity: 1; transform: translateY(0); background: var(--white); }
  15%, 25% { background: var(--primary-soft); }
  85%, 100% { opacity: 0; transform: translateY(-6px); }
}

/* ── 10. Agent Runners ── */

.visual-agents {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.agent-prompt,
.agent-code,
.agent-deploy {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 10px;
  padding: 0.5rem 0.75rem;
  width: 100%;
  max-width: 220px;
  text-align: center;
}

.agent-arrow {
  font-size: 12px;
  color: var(--black);
  animation: agent-arrow-color 8s ease-in-out infinite;
}

.agent-code {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  opacity: 0;
  animation: agent-code-appear 8s ease-in-out infinite;
}

.agent-code-line {
  height: 6px;
  border: 1px solid var(--border);
  width: 100%;
  animation: agent-line-grow 8s ease-in-out infinite;
}

.agent-code-line.short {
  width: 60%;
  animation: agent-line-grow-short 8s ease-in-out infinite;
}

.agent-deploy {
  opacity: 0;
  animation: agent-deploy-appear 8s ease-in-out infinite;
}

@keyframes agent-code-appear {
  0%, 20% { opacity: 0; }
  28%, 70% { opacity: 1; border-color: var(--border-strong); background: var(--white); }
  35%, 55% { border-color: var(--accent); background: var(--primary-soft); }
  75%, 100% { opacity: 0; }
}

@keyframes agent-line-grow {
  0%, 25% { width: 0; }
  35%, 65% { width: 100%; background: var(--primary-soft); border-color: var(--accent); }
  75%, 100% { width: 100%; background: var(--white); border-color: var(--border-strong); }
}

@keyframes agent-line-grow-short {
  0%, 25% { width: 0; }
  35%, 65% { width: 60%; background: var(--primary-soft); border-color: var(--accent); }
  75%, 100% { width: 60%; background: var(--white); border-color: var(--border-strong); }
}

@keyframes agent-deploy-appear {
  0%, 55% { opacity: 0; }
  65%, 85% { opacity: 1; border-color: var(--accent); color: var(--black); background: var(--primary-soft); }
  92%, 100% { opacity: 0; }
}

@keyframes agent-arrow-color {
  0%, 25% { opacity: 0.35; }
  30%, 65% { opacity: 1; }
  70%, 100% { opacity: 0.35; }
}

/* ── Reduced motion ── */

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

  .db-row,
  .agent-code,
  .agent-deploy,
  .blob-notepad-after,
  .img-small {
    opacity: 1;
  }

  .fn-request,
  .fn-response,
  .edge-packet,
  .forms-packet {
    opacity: 1;
    transform: none;
  }
}

/* ── Mobile ── */

@media (max-width: 768px) {
  .panels {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1.25rem 2.5rem;
  }
}

@media (max-width: 480px) {
  :root {
    --panel-pad: 1.5rem;
  }

  .visual-forms {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .forms-packet {
    display: none;
  }

  .visual-functions {
    gap: 1.25rem;
    padding: 0 0.5rem;
  }

  @keyframes fn-request-fly {
    0%, 8%, 100% { left: 14%; opacity: 0; transform: translateY(-50%) scale(0.5); }
    14% { left: 20%; opacity: 1; transform: translateY(-50%) scale(1); }
    36% { left: 42%; opacity: 1; transform: translateY(-50%) scale(1); }
    46%, 100% { left: 46%; opacity: 0; transform: translateY(-50%) scale(0.5); }
  }

  @keyframes fn-response-fly {
    0%, 46%, 100% { left: 54%; opacity: 0; transform: translateY(-50%) scale(0.5); }
    54% { left: 60%; opacity: 1; transform: translateY(-50%) scale(1); }
    76% { left: 82%; opacity: 1; transform: translateY(-50%) scale(1); }
    86%, 100% { left: 86%; opacity: 0; transform: translateY(-50%) scale(0.5); }
  }

  .visual-edge {
    flex-direction: column;
  }

  .visual-blobs {
    flex-direction: column;
    gap: 0.5rem;
  }

  .visual-ai-gateway {
    flex-direction: column;
  }

  .ai-wire {
    width: 1px;
    height: 16px;
  }

  .ai-wire::after {
    top: 0;
    left: -2.5px;
    animation: none;
    opacity: 1;
  }

  .ai-key-skipped {
    position: static;
    margin-top: 0.5rem;
  }
}