/* Tokens, base layout, .store-btn, footer and .card live in ../shared/shared.css.
   BBS uses the shared accent (blue), so no :root override here. */

h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0 0 12px;
}

.section-sub {
  text-align: center;
  color: var(--text-soft);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 40px;
}

/* ---------- Hero (dark, fills the screen) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  overflow: hidden;
  background: #05060a;
  color: #f5f5f7;
  -webkit-user-select: none;
  user-select: none;
}

/* Wall of terminals scattered behind everything (positioned by JS) */
.terminal-wall {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 85% 80% at 50% 45%, #000 60%, transparent 100%);
          mask-image: radial-gradient(ellipse 85% 80% at 50% 45%, #000 60%, transparent 100%);
}

.term {
  position: absolute;
  width: 440px;
  height: 340px;
  background: rgba(18, 20, 28, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

.term__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: #2a2d38;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.term__bar i {
  width: 10px; height: 10px; border-radius: 50%;
  background: #ff5f57; display: inline-block;
}
.term__bar i:nth-child(2) { background: #febc2e; }
.term__bar i:nth-child(3) { background: #28c840; }
.term__bar span {
  margin-left: 8px;
  font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: rgba(255, 255, 255, 0.4);
}

.term__body {
  padding: 12px 14px;
  font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #c9d4e3;
  white-space: pre;
  text-align: left; /* hero centers text by default; terminals read left-aligned */
  overflow: hidden; /* clip the scrolling text to the body so it never rides over the header */
}
/* scroll the content up forever; duplicated lines make it seamless. duration set per-terminal in JS */
.term__body span { display: block; animation: scrollUp linear infinite; }

@keyframes scrollUp {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

.t-cmd  { color: #f5f5f7; }
.t-ok   { color: #28c840; }
.t-info { color: #5ac8fa; }
.t-warn { color: #febc2e; }
.t-dim  { color: rgba(201, 212, 227, 0.45); }
.t-ai   { color: #bf9bff; }

/* Frosted glass card wrapping the headline so it stays readable over the terminals */
.hero__content {
  position: relative;
  z-index: 5; /* above the square (z-3) so the glass slides behind the text box */
  max-width: 560px;
  padding: 44px 40px;
  border-radius: 24px;
  background: rgba(18, 20, 26, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
          backdrop-filter: blur(24px) saturate(1.2);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 14px;
}

.hero p {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: rgba(245, 245, 247, 0.8);
  margin: 28px auto;
  max-width: 440px;
}

.hero__hint {
  margin: 24px 0 0;
  font-size: 0.9rem !important;
  color: rgba(245, 245, 247, 0.55);
}

/* ---------- The glass square (follows the cursor) ---------- */
.glass-square {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  width: 200px;
  height: 200px;
  margin: -100px 0 0 -100px; /* center on the pointer */
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.10);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between; /* one line near the top, one near the bottom — like the app */
  padding: 24px 12px 20px;
  pointer-events: none; /* never blocks hero links/buttons */
  opacity: 0;
  transition: opacity 0.25s ease;
  will-change: transform;
}
.glass-square.is-visible { opacity: 0.95; }

.glass-square__text {
  font-weight: 500;
  font-size: 15px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease;
}
.glass-square.is-swapping .glass-square__text { opacity: 0; }

/* Auto-pilot fake cursor (shown when the real mouse isn't over the hero) */
.fake-cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4; /* above the square (3), behind the content card (5) */
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
  will-change: transform;
}
.fake-cursor.is-visible { opacity: 1; }
.fake-cursor svg { display: block; }

/* ---------- Why? (horizontal carousel) ---------- */
.why {
  padding: 88px 0 56px;
}
.why-track {
  /* full-bleed: break out of the centered 920px container */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden; /* no user scroll — it auto-scrolls */
  padding: 6px 0 20px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.why-row {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: whyScroll 60s linear infinite;
}
.why-track:hover .why-row { animation-play-state: paused; }
@keyframes whyScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); } /* row holds 2 copies, so -50% = one full loop */
}
/* card body shared by .why-card (carousel) and .feature (grid) */
.why-card, .feature { padding: 24px; }
.why-card { flex: 0 0 260px; }
.why-card .emoji, .feature .emoji { display: block; margin-bottom: 12px; }
.why-card .emoji { font-size: 1.8rem; }
.feature .emoji { font-size: 1.5rem; }
.why-card h3, .feature h3 { margin: 0 0 6px; font-size: 1.1rem; }
.why-card p, .feature p { margin: 0; color: var(--text-soft); font-size: 0.95rem; }

/* ---------- How it works ---------- */
.how {
  padding: 88px 0 64px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.step {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
}
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 700;
  margin-bottom: 16px;
}
.step h3 { margin: 0 0 8px; font-size: 1.15rem; }
.step p { margin: 0; color: var(--text-soft); font-size: 0.98rem; }
.step kbd {
  font: 600 0.85em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}

/* ---------- Features ---------- */
.features {
  padding: 64px 0;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
/* .feature card body is defined with .why-card above */

/* ---------- Download CTA ---------- */
.cta {
  text-align: center;
  padding: 64px 0 88px;
}
