/* ===== HERO ===== */
.hero {
  box-sizing: border-box;
  padding-left: 0;
  padding-right: 0;
  padding-top: max(
    calc(118px - var(--preview-banner-stack-visible) + var(--preview-banner-stack)),
    calc(
      118px - var(--hero-shift-up) - var(--preview-banner-stack-visible) + var(--preview-banner-stack)
    )
  );
  padding-bottom: max(32px, env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0;
  position: relative;
  isolation: isolate;
  border: none;
}

.hero-ascii-bg {
  position: absolute;
  /* 与 .hero padding-top / 标题同步（随预览条显隐上移） */
  top: calc(72px - var(--preview-banner-stack-visible) + var(--preview-banner-stack));
  right: 48px;
  z-index: 1;
  pointer-events: auto;
  color: rgba(255, 255, 255, 0.15);
  opacity: 1;
  transform: scale(1.25);
  transform-origin: top right;
  transition: opacity 0.3s ease;
  user-select: none;
  -webkit-user-select: none;
}
.hero-ascii-bg pre {
  font-family: "Menlo", monospace;
  font-size: 10px;
  line-height: 15px;
  letter-spacing: normal;
  margin: 0;
  font-weight: 400;
}

.ascii-char {
  display: inline-block;
  color: rgba(255, 255, 255, 1);
  opacity: 0.15;
  transition: color 0.3s ease, text-shadow 0.3s ease, opacity 0.3s ease;
}

.ascii-char--idle-glow {
  animation: char-idle-glow 8s ease-in-out infinite;
}

@keyframes char-idle-glow {
  0%, 72% {
    opacity: 0.15;
  }
  86% {
    opacity: 0.35;
  }
  100% {
    opacity: 0.15;
  }
}
.ascii-space {
  display: inline-block;
  width: 0.6em;
}
.hero-ascii-glow-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: var(--hover-opacity, 0);
  transition: opacity 0.3s ease;
  -webkit-mask-image: radial-gradient(circle 120px at var(--mouse-x, -999px) var(--mouse-y, -999px), black 0%, rgba(0, 0, 0, 0.4) 40%, transparent 100%);
  mask-image: radial-gradient(circle 120px at var(--mouse-x, -999px) var(--mouse-y, -999px), black 0%, rgba(0, 0, 0, 0.4) 40%, transparent 100%);
  z-index: 2;
  margin: 0;
}

.hero-ascii-glow-layer .ascii-char,
.hero-ascii-glow-layer .ascii-char--idle-glow {
  color: rgba(255, 255, 255, 0.4) !important;
  opacity: 1 !important;
  animation: none !important;
  transition: none !important;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.2), 0 0 10px rgba(255, 255, 255, 0.1);
  transform: translate(-0.5px, -0.5px) scale(1.01);
}

.hero > .terminal-panel {
  margin-top: 96px;
  margin-left: 0px;
  margin-right: 0px;
  align-self: stretch;
  width: auto;
  max-width: none;
  height: auto;
  min-height: 214px;
  border: 1px solid var(--border);
  backdrop-filter: none;
  background: #000;
}

/* Hero quickstart tabbed panel */
.hero-terminal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}

.hero-terminal-head .fb-tab.tab {
  padding-left: 16px;
}

.hero-terminal-lights {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-right: 16px;
}

.hero-terminal-lights span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hero-terminal-lights span:nth-child(1) {
  background: #525252;
}

.hero-terminal-lights span:nth-child(2) {
  background: #525252;
}

.hero-terminal-lights span:nth-child(3) {
  background: #525252;
}

.hero-terminal-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-height: 148px;
  padding: 25px;
  background: #000;
  border: none;
  min-width: 0;
}

.hero-terminal-inner .terminal-label {
  font-size: 16px;
  line-height: 22.75px;
  color: #AFAFAF;
}

.hero-terminal-inner .terminal-cmd {
  font-family: Menlo, ui-monospace, monospace;
  font-size: 16px;
  line-height: 32px;
  color: #fff;
  margin: 0;
}

.hero-terminal-inner .terminal-cmd .link,
.cta-terminal-wrap .terminal-panel .terminal-cmd .link {
  color: var(--blue);
  line-height: 32px;
}

.hero-terminal-inner .terminal-cmd [data-i18n="heroTerminalAgentL2"],
.cta-terminal-wrap .terminal-panel .terminal-cmd [data-i18n="heroTerminalAgentL2"] {
  line-height: 32px;
}

.hero-heading-wrap {
  flex-shrink: 0;
  width: 100%;
  min-width: 0;
}

.hero-heading {
  display: flex;
  flex-direction: column;
  gap: 32px;
  transform: translateY(-24px);
  width: 100%;
  min-width: 0;
}

.hero-title-row {
  margin: 0;
  font: inherit;
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  padding-left: 32px;
  padding-right: 32px;
}

.hero-d0-img {
  width: 100%;
  max-width: min(100%, 790px);
  max-height: 100px;
  height: auto;
  padding-top: 0;
  display: block;
  object-fit: contain;
  object-position: left center;
}

.hero-subtitle {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-desc {
  font-family: Menlo;
  font-weight: 700;
  font-size: 64px;
  color: rgba(255, 255, 255, 1);
  line-height: 86px;
  letter-spacing: 0px;
  white-space: normal;
  padding-left: 0px;
  padding-right: 0px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 中大屏（≥769px）：两行 — 「ZERO-CONFIG, MySQL+Vector」「with Native Self-Forking」 */
@media (min-width: 769px) {
  .hero-desc {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .hero-desc-row {
    display: block;
    white-space: nowrap;
  }

  .hero-desc-row--top .hero-desc-line1,
  .hero-desc-row--top .hero-desc-line2 {
    display: inline;
    vertical-align: baseline;
  }

  .hero-desc-row--top .hero-desc-line2::before {
    content: " ";
  }

  .hero-desc-row--bottom .hero-desc-line3,
  .hero-desc-row--bottom .hero-desc-line4 {
    display: inline;
    vertical-align: baseline;
    letter-spacing: -4px;
  }

  .hero-desc-row--bottom .hero-desc-line4::before {
    content: " ";
  }
}

.hero-desc-line {
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}

.hero-desc-line2 {
  letter-spacing: -2px;
}

.hero-desc-accent {
  color: #72dff3;
}

.hero-desc-tagline {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 40px;
  font-weight: 400;
  color: var(--muted);
  padding-left: 0px;
  padding-right: 0px;
  letter-spacing: 0px;
}

.hero-desc-tagline::before {
  content: '>';
  color: #72dff3;
  margin-right: 0.35em;
}

.decode-target {
  opacity: 0;
  visibility: hidden;
}
