/* ============================================================================
 * StudyBits home — page-specific layout & mockups
 * (Studio theme tokens come from styles.css: editorial light palette,
 *  Inter / Fraunces / JetBrains Mono, iridescent AI gradient + shimmer.)
 * ========================================================================== */

/* ---- hero ---------------------------------------------------------------- */
.hero { position: relative; padding: 88px 0 96px; overflow: hidden; }
.hero-glow {
  position: absolute; top: -180px; right: -120px; width: 720px; height: 720px; z-index: 0;
  background: radial-gradient(circle at 60% 40%, rgba(138,182,255,0.28), rgba(200,181,255,0.16) 38%, transparent 64%);
  filter: blur(8px); pointer-events: none;
}
/* faint blueprint grid behind the hero — fades out toward the fold */
.hero-grid-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(closest-side at 70% 20%, rgba(0,0,0,0.5), transparent 88%);
          mask-image: radial-gradient(closest-side at 70% 20%, rgba(0,0,0,0.5), transparent 88%);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero-h1 { font-size: clamp(38px, 5vw, 62px); margin: 22px 0 0; }

/* announcement pill */
.announce {
  display: inline-flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-sm);
  font-size: 13.5px; color: var(--text-secondary); transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.announce:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.announce:hover .announce-arrow { transform: translateX(3px); }
.announce-tag {
  display: inline-grid; place-items: center; height: 24px; padding: 0 11px; border-radius: 999px;
  background: var(--ai-grad); background-size: 200% 200%; animation: ai-shimmer 6s linear infinite;
  color: #1a1a1a; font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.02em;
}
.announce-text { font-weight: 500; color: var(--text-primary); }
.announce-arrow { color: var(--text-tertiary); transition: transform 0.18s ease; }
.hero-copy .lead { margin: 22px 0 0; max-width: 520px; }
.hero-cta { margin-top: 30px; }
.hero-meta { margin-top: 34px; display: flex; align-items: center; gap: 10px 14px; font-size: 13px; flex-wrap: wrap; }
.hero-connectors { display: flex; gap: 8px; flex-wrap: wrap; }
.hc-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 7px; border-radius: 999px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border-subtle); font-size: 12.5px; color: var(--text-secondary); font-weight: 500;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.hc-pill:hover { transform: translateY(-1px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.brand-chip { width: 20px; height: 20px; flex-shrink: 0; display: grid; place-items: center; background: #fff; border-radius: 5px; padding: 2px; box-shadow: 0 0 0 1px var(--border-subtle); }
.hc-more { padding: 0 13px; border-style: dashed; color: var(--text-tertiary); font-weight: 600; }

/* hero demo */
.hero-demo { position: relative; }
.demo-output { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.demo-card {
  background: var(--surface); border: 1px solid var(--border-subtle); border-radius: 14px; padding: 14px 16px;
  box-shadow: var(--shadow-sm); opacity: 0; transform: translateY(12px);
  animation: rise 0.5s cubic-bezier(0.22,1,0.36,1) forwards;
}
@keyframes rise { to { opacity: 1; transform: none; } }
.demo-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.demo-orb {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: #fff; flex-shrink: 0;
  background: var(--ai-grad); background-size: 180% 180%; animation: ai-shimmer 6s linear infinite;
}
.demo-title { font-size: 13.5px; font-weight: 600; }
.demo-status { margin-left: auto; font-size: 11.5px; color: var(--success); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0; }
.demo-status svg { width: 13px; height: 13px; flex-shrink: 0; }
.demo-mod { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border-subtle); font-size: 13px; color: var(--text-secondary); }
.demo-mod:first-of-type { border-top: 0; }
.demo-mod .midx { font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); width: 20px; }
.demo-mod .mbar { margin-left: auto; height: 5px; width: 54px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.demo-mod .mbar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.demo-sub { font-size: 11.5px; color: var(--text-tertiary); margin-top: 1px; }
.demo-card.lift { animation: demoLift 0.3s cubic-bezier(0.4,0,1,1) forwards; }
@keyframes demoLift { to { opacity: 0; transform: translateY(-10px) scale(0.985); } }

/* grounding step — source chips light up one by one */
.ground-srcs { display: flex; flex-wrap: wrap; gap: 7px; }
.gsrc {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500;
  padding: 5px 11px 5px 9px; border-radius: 999px; border: 1px solid var(--border-subtle);
  background: var(--surface); color: var(--text-tertiary);
  opacity: 0.45; transform: translateY(4px); transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.gsrc svg { width: 13px; height: 13px; color: var(--text-tertiary); transition: color 0.3s ease; }
.gsrc.on { opacity: 1; transform: none; color: var(--text-secondary); border-color: var(--border-strong); }
.gsrc.on svg { color: var(--success); }

/* idle prompt suggestions — fill the demo stage before/between runs so the
 * reserved mobile height never reads as empty. Swapped out once the build
 * starts; restored (with the rise animation replaying) on each loop. */
.demo-suggests { display: flex; flex-direction: column; gap: 9px; }
.demo-suggests-label {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-tertiary); margin: 4px 2px 2px;
  opacity: 0; animation: rise 0.5s cubic-bezier(0.22,1,0.36,1) 0.05s forwards;
}
.demo-suggest {
  display: flex; align-items: center; gap: 11px; padding: 13px 15px;
  border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--surface);
  box-shadow: var(--shadow-sm); font-size: 13.5px; font-weight: 500; color: var(--text-secondary);
  opacity: 0; transform: translateY(10px); animation: rise 0.5s cubic-bezier(0.22,1,0.36,1) forwards;
}
/* the label is the 1st div sibling, so rows are of-type 2–4 */
.demo-suggest:nth-of-type(2) { animation-delay: 0.12s; }
.demo-suggest:nth-of-type(3) { animation-delay: 0.22s; }
.demo-suggest:nth-of-type(4) { animation-delay: 0.32s; }
.demo-suggest svg { width: 15px; height: 15px; color: var(--brand); flex-shrink: 0; }
.demo-suggest .ds-arrow { margin-left: auto; color: var(--text-tertiary); font-size: 13px; }

@keyframes railIn { to { opacity: 1; transform: none; } }

/* ---- presentation editor mockup (final stage — mirrors the real editor) - */
/* The composer collapses away so this stage shows just the editor. */
.composer { max-height: 360px; transition: opacity 0.4s ease, transform 0.4s ease, max-height 0.55s cubic-bezier(0.4,0,0.2,1), margin 0.4s ease; }
.composer.collapsed { opacity: 0; transform: translateY(-8px) scale(0.985); max-height: 0; margin-bottom: -16px; overflow: hidden; pointer-events: none; border-color: transparent; }

.demo-editor {
  background: var(--surface); border: 1px solid var(--border-subtle); border-radius: 14px;
  overflow: hidden; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(16px); animation: rise 0.6s cubic-bezier(0.22,1,0.36,1) forwards;
}
/* header */
.se-bar { display: flex; align-items: center; gap: 9px; padding: 0 11px; min-height: 50px; border-bottom: 1px solid var(--border-subtle); background: var(--surface); }
.se-bar-l { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1; }
.se-logo { width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0; display: block; }
.se-file { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: var(--text-tertiary); flex-shrink: 0; }
.se-file svg { width: 15px; height: 15px; }
.se-title { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.se-bar-r { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.se-pill { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border-subtle); background: var(--surface); font-size: 11px; font-weight: 500; color: var(--text-secondary); }
.se-pill svg { width: 13px; height: 13px; }
.se-pill.se-ai { position: relative; border-color: transparent; }
.se-pill.se-ai::before {
  content: ""; position: absolute; inset: 0; border-radius: 999px; padding: 1px;
  background: var(--ai-grad); background-size: 200% 200%; animation: ai-shimmer 6s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.se-pill.se-ai svg { color: #5A4FB6; }
.se-present { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 13px; border-radius: 999px; background: var(--text-primary); color: var(--bg); font-size: 11px; font-weight: 600; }
.se-present svg { width: 12px; height: 12px; }
/* body: slides rail · canvas · tools rail */
.se-body { display: grid; grid-template-columns: 116px minmax(0, 1fr) 42px; height: 312px; }
.se-rail { border-right: 1px solid var(--border-subtle); background: var(--bg); padding: 11px 9px 0; overflow: hidden; }
.se-rail-h { display: flex; align-items: center; justify-content: space-between; font-size: 10px; font-weight: 600; letter-spacing: 0.11em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 9px; }
.se-unit { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.se-thumbs { display: flex; flex-direction: column; gap: 9px; border-left: 1px solid var(--border-subtle); padding-left: 8px; margin-left: 1px; }
.se-thumb { position: relative; border-radius: 6px; border: 1px solid var(--border-subtle); background: var(--surface); overflow: hidden; padding: 12px 8px 8px; opacity: 0; transform: translateX(-6px); animation: railIn 0.4s ease forwards; }
.se-thumb.active { border: 1.5px solid var(--brand); box-shadow: 0 0 0 3px rgba(59,91,255,0.12); }
.se-tnum { position: absolute; top: 3px; left: 3px; font-family: var(--font-mono); font-size: 7px; font-weight: 500; color: #fff; background: rgba(0,0,0,0.5); border-radius: 3px; padding: 1px 3px; line-height: 1.3; }
.se-thumb.active .se-tnum { background: var(--brand); }
.se-tline { height: 3px; border-radius: 2px; background: var(--surface-3); margin-top: 3px; }
.se-tline.t1 { width: 60%; height: 4px; background: rgba(59,91,255,0.35); margin-top: 0; }
.se-tline.t2 { width: 92%; }
.se-tline.t3 { width: 70%; }
/* canvas */
.se-canvas {
  position: relative; padding: 18px 16px; overflow: hidden; display: flex; align-items: flex-start; justify-content: center;
  background: radial-gradient(440px 240px at 24% -10%, rgba(138,182,255,0.12), transparent 70%), var(--bg-2);
}
.se-slide {
  width: 100%; max-width: 348px; background: var(--surface); border-radius: 10px;
  box-shadow: 0 0 0 2px rgba(59,91,255,0.2), var(--shadow-md); padding: 20px 22px 22px; min-height: 226px;
}
.se-slide-kick { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 7px; }
.se-slide-title {
  font-family: var(--font-serif); font-size: 23px; font-weight: 500; line-height: 1.14; min-height: 1.14em;
  background: linear-gradient(118deg, var(--brand), #7C5CFF 96%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.se-caret { height: 0.84em; transform: translateY(2px); }
.se-bullets { list-style: none; margin: 17px 0 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.se-bullets li { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; line-height: 1.45; color: var(--text-secondary); opacity: 0; transform: translateY(6px); animation: rise 0.45s cubic-bezier(0.22,1,0.36,1) forwards; }
.se-bullets li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); margin-top: 5px; flex-shrink: 0; }
/* tools rail */
.se-tools { border-left: 1px solid var(--border-subtle); background: var(--surface); display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 11px 0; }
.se-tool { position: relative; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--text-secondary); }
.se-tool svg { width: 15px; height: 15px; }
.se-tool.active { background: var(--surface-2); color: var(--text-primary); }
.se-tool.active::before { content: ""; position: absolute; left: -10px; width: 3px; height: 14px; border-radius: 0 3px 3px 0; background: var(--text-primary); }
.se-zoom { margin-top: auto; font-family: var(--font-mono); font-size: 8.5px; color: var(--text-tertiary); }

@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy .lead { max-width: none; }
  /* Reserve a stable height so swapping demo stages never shifts the page,
   * and center the content so shorter stages stay balanced (no dead space). */
  .hero-demo { min-height: 380px; display: flex; flex-direction: column; justify-content: center; }
}
@media (max-width: 560px) {
  .hero-demo { min-height: 360px; }
  .se-pill:not(.se-ai) { display: none; }
  .se-tools { display: none; }
  .se-body { grid-template-columns: 100px minmax(0, 1fr); height: 296px; }
  .se-slide { padding: 18px 18px 20px; }
  .se-slide-title { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-editor, .se-thumb, .se-bullets li { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ---- proof: logo marquee + count-up stats -------------------------------- */
.proof { border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); background: var(--bg-2); overflow: hidden; }
.proof-kicker { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 28px; }
.marquee {
  position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex; align-items: center; gap: 56px; width: max-content; padding: 4px 28px;
  animation: marquee-scroll 30s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
/* Track = [set A][gap][set B] with 28px padding each side; shifting by exactly
 * half the track width lands set B where set A began — a seamless loop. */
@keyframes marquee-scroll { to { transform: translateX(-50%); } }
.logo-wm { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; color: var(--text-tertiary); opacity: 0.78; display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; transition: opacity 0.2s, color 0.2s; }
.logo-wm svg { width: 22px; height: 22px; flex-shrink: 0; }
.logo-wm:hover { opacity: 1; color: var(--text-secondary); }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 52px; }
.stat { text-align: center; }
.stat-num { font-size: clamp(34px, 4vw, 48px); line-height: 1; color: var(--text-primary); font-variant-numeric: tabular-nums; }
/* render multiplier/unit suffixes crisply in the sans face (Fraunces lacks a
 * clean × glyph, so it would otherwise fall back to an inconsistent serif). */
.stat-mult { font-family: var(--font-sans); font-weight: 600; font-size: 0.58em; margin-left: 3px; vertical-align: 0.22em; }
.stat-label { margin-top: 10px; font-size: 13.5px; color: var(--text-secondary); }
@media (max-width: 720px) { .stat-row { grid-template-columns: 1fr 1fr; gap: 32px 20px; } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---- section heads ------------------------------------------------------- */
.sec-head { max-width: 760px; margin: 0 auto 56px; }
.sec-title { font-size: clamp(30px, 4vw, 50px); margin: 16px 0 0; }
.sec-head.center .eyebrow { justify-content: center; }

/* ---- connect diagram ----------------------------------------------------- */
.connect-stage {
  position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 80px; max-width: 920px; margin: 0 auto 72px; min-height: 240px;
}
.connect-sources, .connect-outputs { display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 2; }
.connect-outputs { align-items: flex-end; }
.cnode {
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-sm);
  font-size: 13.5px; font-weight: 500; color: var(--text-primary); white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.cnode:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.cnode .cfav { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.cnode .cfav-logo { background: #fff; padding: 3px; box-shadow: 0 0 0 1px var(--border-subtle); }
.conn-label { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); padding: 0 0 2px 2px; }
.cnode-more { justify-content: center; border-style: dashed; color: var(--text-tertiary); font-weight: 600; font-size: 12.5px; }
.connect-core {
  display: inline-flex; flex-direction: column; align-items: center; gap: 7px; justify-self: center;
  width: 132px; height: 132px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-lg);
  justify-content: center; font-weight: 600; font-size: 14px; color: var(--text-primary); position: relative; z-index: 3;
}
.connect-core svg { color: var(--brand); }
.connect-wires { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; overflow: visible; }
.connect-wires path { fill: none; stroke: var(--border-strong); stroke-width: 1.5; stroke-dasharray: 5 6; }
.connect-wires .flow { stroke: var(--brand); stroke-dasharray: 5 90; animation: wireflow 2.4s linear infinite; opacity: 0.8; }
@keyframes wireflow { to { stroke-dashoffset: -95; } }
@media (max-width: 760px) {
  /* Vertical "funnel": sources fan into the core, core fans out to outputs.
   * Wires stay visible and animated (drawn vertically by drawWires). */
  .connect-stage { grid-template-columns: 1fr; gap: 56px; max-width: 460px; min-height: 0; }
  .connect-wires { display: block; }
  .connect-sources, .connect-outputs {
    flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; gap: 9px 8px;
  }
  .connect-outputs { align-items: center; }
  .conn-label { width: 100%; justify-content: center; order: -1; margin: 0 0 2px; }
  .cnode { padding: 8px 11px; font-size: 12px; gap: 7px; }
  .cnode .cfav { width: 18px; height: 18px; font-size: 11px; }
  .cnode-more { width: auto; }
  .connect-core { width: 104px; height: 104px; border-radius: 24px; justify-self: center; margin: 0; }
  .connect-wires path { stroke-width: 1.4; }
  .connect-wires .flow { stroke-width: 2.2; stroke-dasharray: 5 80; opacity: 0.9; }
}

/* ---- tour launcher cards (spotlight hover) ------------------------------- */
.launchers { grid-template-columns: repeat(3, 1fr); }
.launch {
  position: relative; overflow: hidden; padding: 28px; display: block; text-align: left;
  font-family: inherit; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.launch:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.launch::after {
  content: ''; position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(59,91,255,0.09), transparent 65%);
}
.launch:hover::after { opacity: 1; }
.launch-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); margin-bottom: 18px; }
.launch h3 { font-size: 21px; margin: 0 0 8px; font-weight: 600; letter-spacing: -0.01em; color: var(--text-primary); }
.launch p { color: var(--text-secondary); font-size: 14.5px; line-height: 1.55; margin: 0 0 16px; }
.pillar-link { font-size: 13.5px; font-weight: 600; color: var(--brand); }
@media (max-width: 820px) { .launchers { grid-template-columns: 1fr; } }

/* ---- product tour (tabbed) ------------------------------------------------ */
.tour-sec { position: relative; background: var(--bg-2); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); scroll-margin-top: 72px; }
.sec-anchor { position: absolute; top: 0; scroll-margin-top: 80px; }
.tour-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  max-width: 760px; margin: 0 auto 44px;
}
.tour-tab {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 14px 18px; border-radius: 14px; cursor: pointer; font-family: inherit;
  background: var(--surface); border: 1px solid var(--border-subtle); color: var(--text-secondary);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.tour-tab:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.tour-tab.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow-sm); }
.tour-tab .tt-ico {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: var(--surface-2); color: var(--text-secondary); transition: background 0.16s ease, color 0.16s ease;
}
.tour-tab.on .tt-ico { background: var(--brand-soft); color: var(--brand); }
.tt-copy { display: flex; flex-direction: column; min-width: 0; }
.tt-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.tt-hint { font-size: 11.5px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-progress {
  position: absolute; left: 0; bottom: 0; height: 2.5px; width: 100%;
  background: var(--brand); transform-origin: left; transform: scaleX(0);
  animation-name: tt-fill; animation-timing-function: linear; animation-fill-mode: forwards;
}
@keyframes tt-fill { to { transform: scaleX(1); } }

.tour-panel {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center;
  animation: tour-fade 0.45s cubic-bezier(0.22,1,0.36,1);
}
@keyframes tour-fade { from { opacity: 0; transform: translateY(14px); } }
.tour-title { font-size: clamp(26px, 3vw, 38px); margin: 14px 0 0; }
.tour-copy .lead { font-size: 17px; margin: 16px 0 22px; }
.check-list { list-style: none; padding: 0; margin: 0 0 26px; display: flex; flex-direction: column; gap: 12px; }
.check-list li { position: relative; padding-left: 30px; font-size: 14.5px; color: var(--text-secondary); }
.check-list li::before {
  content: ''; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 6px;
  background: var(--brand-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%233B5BFF' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17.5 19.5 8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
@media (max-width: 900px) {
  /* visual first, copy second — the mock is the hook on small screens */
  .tour-panel { grid-template-columns: 1fr; gap: 30px; }
  .tour-visual { order: -1; }
  /* compact segmented tabs: icon over label, hint hidden */
  .tour-tabs { grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 460px; margin-bottom: 32px; }
  .tour-tab { flex-direction: column; align-items: center; gap: 7px; padding: 12px 8px 14px; text-align: center; }
  .tour-tab .tt-ico { width: 30px; height: 30px; border-radius: 9px; }
  .tt-copy { align-items: center; }
  .tt-name { font-size: 13px; }
  .tt-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tour-panel { animation: none; }
  .tt-progress { display: none; }
}

/* ---- window mockups ------------------------------------------------------ */
.window { border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-lg); }
.window-bar { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--border-subtle); background: var(--surface-2); }
.wdot { width: 11px; height: 11px; border-radius: 50%; background: var(--surface-3); }
.window-url { margin-left: 14px; font-size: 11.5px; color: var(--text-tertiary); }
.window-body { height: 420px; position: relative; overflow: hidden; }

/* studio mock */
.studio-mock { display: grid; grid-template-columns: 52px 1fr; }
.sm-rail { border-right: 1px solid var(--border-subtle); background: var(--surface-2); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; }
.sm-rail .smi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--text-tertiary); }
.sm-rail .smi.on { color: var(--text-primary); background: var(--surface); box-shadow: var(--shadow-sm); }
.sm-main { padding: 18px 20px; overflow: hidden; }
.sm-crumb { font-size: 11px; color: var(--text-tertiary); display: flex; gap: 7px; margin-bottom: 14px; }
.sm-h { font-family: var(--font-serif); font-weight: 300; font-size: 22px; letter-spacing: -0.02em; margin: 0 0 14px; }
.sm-out { display: flex; flex-direction: column; gap: 9px; }
.sm-mod { border: 1px solid var(--border-subtle); border-radius: 10px; padding: 11px 13px; background: var(--surface); }
.sm-mod-top { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 600; }
.sm-mod-top .smtag { margin-left: auto; font-size: 10px; font-weight: 500; color: var(--text-tertiary); font-family: var(--font-mono); }
.sm-tiles { display: flex; gap: 6px; margin-top: 9px; }
.sm-tile { height: 32px; flex: 1; border-radius: 6px; background: var(--surface-2); }
.sm-tile.gen { background: var(--ai-grad-soft); position: relative; overflow: hidden; }
.sm-tile.gen::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent); animation: shimmer-sweep 1.6s linear infinite; }
@keyframes shimmer-sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* chat mock */
.chat-mock { padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.cm-row { display: flex; gap: 12px; }
.cm-row.user { justify-content: flex-end; }
.cm-bubble { max-width: 78%; padding: 11px 15px; border-radius: 16px; font-size: 13.5px; line-height: 1.5; }
.cm-row.user .cm-bubble { background: var(--surface-2); border-radius: 16px 16px 5px 16px; }
.cm-orb { width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; color: #fff; background: var(--ai-grad); background-size: 180% 180%; animation: ai-shimmer 6s linear infinite; }
.cm-ai { flex: 1; }
.cm-ai .cm-bubble { background: transparent; padding: 4px 0 0; max-width: none; color: var(--text-primary); }
.cm-cite { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 5px 10px; border-radius: 8px; background: var(--brand-soft); font-size: 11.5px; color: var(--brand); font-weight: 500; }
.cm-cite + .cm-cite { margin-left: 6px; }
.cm-suggests { display: flex; flex-wrap: wrap; gap: 8px; margin-left: 42px; }
.cm-suggest {
  padding: 7px 13px; border-radius: 999px; border: 1px dashed var(--border-strong);
  font-size: 12px; font-weight: 500; color: var(--text-secondary); cursor: default;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.cm-suggest:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); border-style: solid; }

/* insights mock (Prove tab) */
.insights-mock { background: var(--bg); }
.im-wrap { display: flex; flex-direction: column; height: 100%; padding: 20px 22px; }
.im-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.im-title { font-family: var(--font-serif); font-weight: 400; font-size: 20px; letter-spacing: -0.02em; }
.im-sub { font-size: 12px; color: var(--text-tertiary); margin-top: 3px; }
.im-live { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-subtle); font-size: 11.5px; font-weight: 600; color: var(--success); }
.im-grid { display: grid; grid-template-columns: 158px 1fr; gap: 22px; align-items: center; flex: 1; }
.im-ring-card { position: relative; display: grid; place-items: center; }
.im-ring { width: 148px; height: 148px; transform: rotate(-90deg); }
.im-ring-bg { fill: none; stroke: var(--surface-3); stroke-width: 9; }
.im-ring-fg {
  fill: none; stroke: var(--brand); stroke-width: 9; stroke-linecap: round;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.22,1,0.36,1) 0.25s;
}
@media (prefers-reduced-motion: no-preference) {
  .im-ring-fg { animation: im-ring-in 1.2s cubic-bezier(0.22,1,0.36,1) 0.2s backwards; }
  @keyframes im-ring-in { from { stroke-dashoffset: 327; } }
}
.im-ring-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.im-ring-num .serif { font-size: 32px; font-weight: 300; line-height: 1; color: var(--text-primary); }
.im-ring-num span:last-child { font-size: 11px; color: var(--text-tertiary); }
.im-bars { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.im-row { display: flex; align-items: center; gap: 12px; font-size: 12.5px; }
.im-name { width: 82px; flex-shrink: 0; font-weight: 500; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.im-track { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.im-track i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), #7C5CFF);
  animation: im-bar-in 0.8s cubic-bezier(0.22,1,0.36,1) backwards;
}
@keyframes im-bar-in { from { width: 0; } }
.im-val { width: 38px; flex-shrink: 0; text-align: right; font-size: 11px; color: var(--text-tertiary); }
.im-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-subtle); }
.im-chip { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-subtle); font-size: 11.5px; font-weight: 500; color: var(--text-secondary); }
.im-chip.up { color: var(--success); border-color: rgba(31,138,76,0.25); }
@media (max-width: 560px) {
  .im-grid { grid-template-columns: 1fr; gap: 16px; }
  .im-ring { width: 120px; height: 120px; }
  .im-foot .im-chip:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .im-track i { animation: none; }
}

/* ---- video --------------------------------------------------------------- */
.video-sec { background: var(--bg); }
.video-frame { position: relative; max-width: 960px; margin: 0 auto; aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); background: #000; }
.video-poster { position: absolute; inset: 0; background-size: cover; background-position: center; display: grid; place-items: center; cursor: pointer; }
.video-poster::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.35)); }
.video-play {
  position: relative; z-index: 2; display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%;
  border: 0; cursor: pointer; color: #0A0A0A; background: rgba(255,255,255,0.92); backdrop-filter: blur(4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3); transition: transform 0.18s ease, background 0.18s ease; animation: pulse-ring 2.4s infinite;
}
.video-play:hover { transform: scale(1.06); background: #fff; }
.video-play svg { margin-left: 5px; }
.video-cap { position: absolute; z-index: 2; left: 20px; bottom: 18px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px; background: rgba(0,0,0,0.55); backdrop-filter: blur(8px); color: #fff; font-size: 12.5px; font-weight: 500; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- steps timeline ------------------------------------------------------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps::before {
  content: ''; position: absolute; top: 47px; left: 8%; right: 8%; height: 1.5px; z-index: 0;
  background: repeating-linear-gradient(90deg, var(--border-strong) 0 6px, transparent 6px 13px);
}
.step {
  position: relative; overflow: hidden; z-index: 1; padding: 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.step::after {
  content: ''; position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(59,91,255,0.07), transparent 65%);
}
.step:hover::after { opacity: 1; }
.step-orb {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; margin-bottom: 16px;
  background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 500;
}
.step h3 { font-size: 19px; margin: 0 0 8px; font-weight: 600; }
.step p { color: var(--text-secondary); font-size: 14.5px; margin: 0; }
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }
}

/* ---- testimonial ---------------------------------------------------------- */
.quote-sec { background: var(--bg-2); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.quote-card { max-width: 780px; margin: 0 auto; text-align: center; }
.quote-orb {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; margin: 0 auto 26px;
  color: #fff; background: var(--ai-grad); background-size: 180% 180%; animation: ai-shimmer 6s linear infinite;
}
.quote-card blockquote {
  margin: 0; font-size: clamp(21px, 2.6vw, 29px); font-weight: 300; line-height: 1.42;
  letter-spacing: -0.015em; color: var(--text-primary); text-wrap: balance;
}
.quote-card figcaption { margin-top: 26px; display: flex; flex-direction: column; gap: 3px; }
.quote-card figcaption strong { font-size: 14.5px; font-weight: 600; }
.quote-card figcaption span { font-size: 13px; color: var(--text-tertiary); }

/* ---- cta band ------------------------------------------------------------ */
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  padding: 44px 48px; border-radius: 24px; border: 1px solid var(--border-subtle);
}
.cta-band > div:first-child { max-width: 560px; }
@media (max-width: 720px) { .cta-band { padding: 32px 28px; } }

/* ---- small-screen refinements ------------------------------------------- */
@media (max-width: 600px) {
  .hero { padding: 48px 0 60px; }
  .hero-h1 { font-size: clamp(30px, 8vw, 40px); }
  .hero-copy .lead { font-size: 16.5px; }
  .hero-cta .btn { flex: 1; }
  .announce { max-width: 100%; }
  .announce-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sec-head { margin-bottom: 40px; }
  .sec-title { font-size: clamp(26px, 7vw, 36px); }
  .stat-row { margin-top: 40px; }
  .stat-num { font-size: clamp(30px, 9vw, 40px); }
  .stat-label { font-size: 12.5px; }
  .marquee-track { gap: 36px; padding: 4px 18px; }
  .logo-wm { font-size: 16px; }
  .connect-stage { margin-bottom: 48px; }
  .launch { padding: 22px; }
  .launch h3 { font-size: 19px; }

  /* tour */
  .tour-title { font-size: clamp(24px, 6.6vw, 30px); }
  .tour-copy .lead { font-size: 15.5px; margin: 14px 0 18px; }
  .check-list li { font-size: 14px; }
  .tour-copy .btn { width: 100%; }

  /* mocks: shorter windows; insights grows to fit its stacked layout */
  .window-body { height: 360px; }
  .window-body.insights-mock { height: auto; min-height: 0; }
  .im-wrap { padding: 16px 16px 18px; }
  .im-head { margin-bottom: 14px; }
  .im-title { font-size: 17px; }
  .im-grid { gap: 12px; }
  .im-ring-card { justify-self: center; }
  .im-name { width: 74px; font-size: 12px; }
  .im-foot { margin-top: 14px; padding-top: 13px; }
  .sm-main { padding: 15px 14px; }
  .sm-h { font-size: 19px; }
  .chat-mock { padding: 18px 16px; }
  .cm-suggests { margin-left: 0; }

  .step { padding: 22px; }
  .quote-orb { margin-bottom: 20px; }
  .quote-card figcaption { margin-top: 20px; }
  .video-cap { left: 12px; bottom: 12px; font-size: 11.5px; }
  .video-play { width: 68px; height: 68px; }
  .cta-band { text-align: center; }
  .cta-band > div:first-child { max-width: none; }
  .cta-band .row-wrap { justify-content: center; }
}
