/* ===== HERO VALUE GRID ===== */
.hero-value-section {
  padding: 0;
}

#features,
#api,
#quickstart {
  scroll-margin-top: calc(
    120px - var(--preview-banner-stack-visible) + var(--preview-banner-stack)
  );
}

.features-heading-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 96px 0 40px;
  width: 100%;
}

.features-heading-line {
  flex: 1;
  height: 1px;
  background-color: #333;
}

.hero-value-section-heading {
  font-family: "Press Start 2P";
  font-weight: 700;
  font-size: 30px;
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 45px;
  text-transform: uppercase;
  margin: 0;
  padding: 0;
  text-align: left;
}

/* 中文环境：模块标题使用系统默认字体（FEATURES / CLI / API / FAQ） */
html:lang(zh-CN) .hero-value-section-heading,
html[data-locale='zh'] .hero-value-section-heading {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    sans-serif;
}

.hero-value-row {
  display: grid;
  gap: 0;
  position: relative;
  margin: 0;
  padding: 0;
}

.hero-value-row-top {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
}

.hero-value-row-single {
  grid-template-columns: 1fr;
  margin-bottom: 0;
}

.hero-value-row-bottom {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.specs-inner.hero-top-block {
  /* Match .hero-value-card padding so copy/terminal align with the feature grid */
  padding: 32px 32px;
  margin-top: 0;
  margin-bottom: 24px;
  /* 三列语义：文案 1 份 + 右侧终端 2 份（1fr : 2fr） */
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.01);
}

.specs-inner.hero-top-block .specs-left {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.specs-inner.hero-top-block .hero-top-block-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.specs-inner.hero-top-block .hero-top-block-heading .hero-value-title {
  margin: 0;
  margin-top: 12px;
  font-family: Menlo;
  font-size: 20px;
  line-height: 30px;
}

.specs-inner.hero-top-block .specs-right {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  align-items: flex-start;
  align-self: start;
  justify-content: flex-end;
}

.hero-top-block .specs-item {
  cursor: default;
}
.hero-top-block .specs-item:hover {
  opacity: 1;
}

.fb-panel.terminal-panel {
  background: transparent;
  border: 1px solid #333;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  padding: 24px 33px 24px 32px;
  height: 380px;
  box-sizing: border-box;
  backdrop-filter: none;
}

/* Branch 终端：外框高度随当前 tab 代码块内容变化 */
.hero-top-block .fb-panel.terminal-panel {
  height: auto;
}

.fb-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}
.fb-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.fb-dots span:nth-child(1) { background: #ef4444; }
.fb-dots span:nth-child(2) { background: #72dff3; }
.fb-dots span:nth-child(3) { background: #525252; }

.fb-tabs.terminal-tabs {
  display: flex;
  gap: 24px;
  align-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  width: 100%;
  border: none;
  margin: 0;
  padding: 0;
}

.fb-tab.tab {
  padding: 0;
  height: auto;
  line-height: 36px;
  border: none !important;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
}
.fb-tab.tab.active {
  color: #fff;
  font-weight: 700;
}
.fb-tab-divider {
  display: none;
  color: rgba(255, 255, 255, 0.1);
  line-height: 32px;
}

.fb-content {
  background: #000;
  border: 1px solid #333;
  border-radius: 0;
  width: 100%;
  padding: 17px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.hero-top-block .fb-content {
  flex: 0 0 auto;
  height: 264px;
  overflow-x: auto;
  overflow-y: auto;
  min-height: 0;
  position: relative;
  /* Reserve space so long SQL lines don’t run under the copy control */
  padding-right: 50px;
}

.hero-top-block .fb-content .fb-terminal-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.fb-view {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 28px;
  color: #a3a3a3;
  margin: 0;
}

.fb-view p {
  margin: 0;
  width: fit-content;
  white-space: nowrap;
  clip-path: inset(0 calc(100% - 10px) 0 0);
  position: relative;
  padding-right: 10px;
  --anim-delay: 0s;
}

.fb-view.active p {
  animation: typing-clip 1.2s steps(40, end) forwards;
  animation-delay: var(--anim-delay);
}

.fb-view.active p:nth-child(1) { --anim-delay: 0s; }
.fb-view.active p:nth-child(2) { --anim-delay: 1.2s; }
.fb-view.active p:nth-child(3) { --anim-delay: 2.4s; }
.fb-view.active p:nth-child(4) { --anim-delay: 3.6s; }
.fb-view.active p:nth-child(5) { --anim-delay: 4.8s; }
.fb-view.active p:nth-child(6) { --anim-delay: 6.0s; }
.fb-view.active p:nth-child(7) { --anim-delay: 7.2s; }
.fb-view.active p:nth-child(8) { --anim-delay: 8.4s; }

.fb-view p::after {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 4px;
  left: 0;
  width: 6px;
  background: rgba(255, 255, 255, 0.6);
  opacity: 0;
}

.fb-view.active p::after {
  animation: 
    cursor-move 1.2s steps(40, end) forwards,
    cursor-typing 1.2s forwards;
  animation-delay: var(--anim-delay), var(--anim-delay);
}

.fb-view.active p:last-child::after {
  animation: 
    cursor-move 1.2s steps(40, end) forwards,
    cursor-typing 1.2s forwards,
    cursor-blink-infinite 0.8s infinite step-end;
  animation-delay: var(--anim-delay), var(--anim-delay), calc(var(--anim-delay) + 1.2s);
}

@keyframes typing-clip {
  from { clip-path: inset(0 calc(100% - 10px) 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes cursor-move {
  from { left: 0; }
  to { left: calc(100% - 10px); }
}

@keyframes cursor-typing {
  0%, 99% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes cursor-blink-infinite {
  0%, 50% { opacity: 1; }
  50.1%, 100% { opacity: 0; }
}

/* JS typewriter cursor — follows typed content */
.tw-cursor {
  display: inline-block;
  width: 2px;
  height: 0.85em;
  background: rgba(255, 255, 255, 0.75);
  vertical-align: middle;
  margin-left: 2px;
  border-radius: 1px;
  animation: tw-blink 0.7s step-end infinite;
}

@keyframes tw-blink {
  0%, 50%   { opacity: 1; }
  50.1%, 100% { opacity: 0; }
}

/* Suppress CSS ::after cursor while JS typewriter is running */
.fb-view.tw-active p::after {
  opacity: 0 !important;
  animation: none !important;
}

.fb-comment {
  color: rgba(255, 255, 255, 0.2);
}

.fb-kw {
  font-weight: 800;
  color: var(--blue);
}

.hero-value-card {
  padding: 32px 32px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 194px;
  transition: background-color 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-value-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.hero-value-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 16px; /* gap 16px + margin 16px = 32px to title */
}

.hero-value-card-number {
  font-family: var(--font-mono);
  font-size: 14px;
  color: #666;
  line-height: 24px;
}

.hero-value-card-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--blue);
}

.hero-value-card-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.hero-value-title {
  font-family: var(--font-heading);
  font-size: var(--t-card-title);
  font-weight: 700;
  line-height: var(--t-card-title-lh);
  color: #fff;
  letter-spacing: 0;
}

/* Match FEATURE section heading (mono / scale / uppercase) */
#features .hero-value-card .hero-value-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 20px;
  line-height: 30px;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
  margin: 0;
}

.hero-value-desc {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 400;
  line-height: var(--t-prose-lh);
  color: #A0A0A0;
  max-width: 100%;
  letter-spacing: 0px;
}

