/* ============================================================
   SlopScan — Landing page styles
   Palette
     bg          #ffffff / #f8fafc
     ink         #0f172a (primary)  #475569 (secondary)  #64748b (muted)
     accent      #16a34a (positive / CTA)   #dc2626 (AI flagged)
     border      #e2e8f0
   ============================================================ */

:root {
  --bg:        #ffffff;
  --bg-soft:   #f8fafc;
  --ink:       #0f172a;
  --ink-2:     #334155;
  --ink-3:     #475569;
  --muted:     #64748b;
  --muted-2:   #94a3b8;
  --border:    #e2e8f0;
  --border-2:  #cbd5e1;

  --green:     #16a34a;
  --green-dk:  #15803d;
  --green-tnt: #f0fdf4;
  --red:       #dc2626;
  --red-dk:    #991b1b;
  --red-tnt:   #fef2f2;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 1px 1px rgba(15,23,42,.03);
  --shadow:    0 1px 2px rgba(15,23,42,.04), 0 8px 24px -8px rgba(15,23,42,.08);
  --shadow-lg: 0 1px 2px rgba(15,23,42,.04), 0 24px 60px -16px rgba(15,23,42,.16);

  --container: 1180px;
  --container-narrow: 760px;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(.16,1,.3,1);
}

/* ---------- Reset-ish ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01","cv02","cv03","cv04";
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
ul, ol { padding: 0; margin: 0; list-style: none; }
p { margin: 0; }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: var(--container-narrow); }

.section {
  padding: clamp(64px, 9vw, 120px) 0;
  position: relative;
}

.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 64px); }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-dk);
  background: var(--green-tnt);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #bbf7d0;
}
.h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -.02em;
  line-height: 1.1;
  margin: 16px 0 14px;
  font-weight: 700;
}
.h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.01em;
  margin: 0 0 6px;
}
.section-lede {
  color: var(--ink-3);
  font-size: 17px;
  max-width: 60ch;
}
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(255,255,255,.9);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: -.01em;
  color: var(--ink);
}
.brand-mark {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px;
}
.brand-name { font-size: 16px; }

.nav { display: none; gap: 28px; }
.nav a {
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 500;
  transition: color .15s ease;
}
.nav a:hover { color: var(--ink); }
@media (min-width: 860px) {
  .nav { display: inline-flex; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 6px 14px -6px rgba(15,23,42,.4);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 12px 22px -8px rgba(15,23,42,.45); }
.btn-secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover { color: var(--green-dk); }
.btn-ghost svg { transition: transform .2s var(--ease); }
.btn-ghost:hover svg { transform: translateX(3px); }
.btn.block { display: flex; width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 9vw, 112px);
  overflow: hidden;
  background:
    radial-gradient(60% 80% at 80% 0%, rgba(22,163,74,.08) 0%, rgba(22,163,74,0) 60%),
    radial-gradient(50% 70% at 0% 20%, rgba(15,23,42,.05) 0%, rgba(15,23,42,0) 60%),
    var(--bg);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(15,23,42,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,23,42,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 80%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 64px);
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; }
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--ink-3);
  font-size: 12px; font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(22,163,74,.18);
}
.display {
  font-size: clamp(40px, 6.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 800;
  margin: 22px 0 18px;
}
.ink-grad {
  color: var(--green-dk);
}
.lede {
  color: var(--ink-3);
  font-size: 18px;
  max-width: 56ch;
}
.cta-row {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 28px;
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 18px 24px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
}
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }

/* ---- Hero mock ---- */
.hero-mock {
  position: relative;
  isolation: isolate;
}
.mock-bg {
  position: absolute;
  inset: -8% -4% -8% -4%;
  background:
    radial-gradient(60% 50% at 70% 30%, rgba(22,163,74,.18) 0%, rgba(22,163,74,0) 60%),
    radial-gradient(50% 50% at 30% 80%, rgba(220,38,38,.10) 0%, rgba(220,38,38,0) 60%);
  filter: blur(8px);
  z-index: -1;
}
.mock-svg {
  width: 100%;
  height: auto;
  border-radius: 18px;
  animation: float 6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .mock-svg { animation: none; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.float-chip {
  position: absolute;
  font-size: 12px;
  font-weight: 500;
  background: #fff;
  color: var(--ink-3);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.float-chip::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  margin-right: 8px;
  vertical-align: middle;
}
.chip-tl { top: -3%; left: -8%; z-index: 5; }
.chip-br { bottom: -3%; right: -6%; z-index: 5; }
@media (max-width: 720px) {
  .float-chip { display: none; }
}

/* ---------- Problem ---------- */
.problem { background: var(--bg-soft); border-block: 1px solid var(--border); }

.card-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
.card-grid.three { grid-template-columns: 1fr; }
@media (min-width: 720px) { .card-grid.three { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .card-grid.three { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-2); }
.card-num {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  color: var(--muted-2);
  letter-spacing: .12em;
  margin-bottom: 14px;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.chip {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--ink-3);
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
.chip-red {
  background: var(--red-tnt);
  border-color: #fecaca;
  color: var(--red-dk);
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  counter-reset: step;
}
@media (min-width: 720px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px 28px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-2); }
.step-icon {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--green-tnt);
  color: var(--green-dk);
  border: 1px solid #bbf7d0;
  margin-bottom: 18px;
}
.step-num {
  position: absolute;
  top: 24px; right: 24px;
  font-size: 12px; font-weight: 600;
  color: var(--muted-2);
  letter-spacing: .12em;
}

/* ---------- Detector ---------- */
.detector { background: var(--bg-soft); border-block: 1px solid var(--border); }
.signal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 720px) { .signal-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .signal-grid { grid-template-columns: repeat(3, 1fr); } }
.signal {
  background: #fff;
  padding: 26px 24px;
  position: relative;
  transition: background .2s ease;
}
.signal:hover { background: var(--green-tnt); }
.signal-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--green-dk);
  margin-bottom: 10px;
}
.signal h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -.01em;
}
.signal p {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.55;
  margin: 0;
}

.reassure {
  margin-top: 28px;
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
}
.reassure-mark {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--green-tnt);
  border-radius: 10px;
}
.reassure strong { color: var(--ink); display: block; margin-bottom: 4px; font-weight: 600; }
.reassure p { font-size: 14.5px; }

/* ---------- Pricing ---------- */
.price-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  align-items: stretch;
}
@media (min-width: 860px) { .price-grid { grid-template-columns: 1fr 1fr; } }
.price-card {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 30px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.price-card--pro {
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(22,163,74,.08) 0%, rgba(22,163,74,0) 60%),
    #fff;
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink), var(--shadow);
}
.recommended {
  position: absolute; top: -11px; right: 24px;
  background: var(--ink);
  color: #fff;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.price-head { margin-bottom: 24px; }
.price-name {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--green-dk);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.price-tag {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--ink);
  line-height: 1;
  margin: 0 0 12px;
}
.price-tag span {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
.price-list {
  display: flex; flex-direction: column; gap: 12px;
  margin: 0 0 28px;
  flex: 1;
}
.price-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14.5px;
  color: var(--ink-2);
}
.price-list li svg { flex: 0 0 auto; margin-top: 3px; }
.fineprint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
  text-align: center;
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.faq-item + .faq-item { border-top: 1px solid var(--border); }
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer;
  padding: 22px 24px;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  list-style: none;
  transition: background .15s ease;
}
.faq-item summary:hover { background: var(--bg-soft); }
.faq-item summary::-webkit-details-marker { display: none; }
.chev {
  position: relative;
  width: 14px; height: 14px;
  flex: 0 0 auto;
}
.chev::before, .chev::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 12px; height: 1.8px;
  background: var(--ink-3);
  border-radius: 2px;
  transition: transform .25s var(--ease);
}
.chev::before { transform: translate(-50%, -50%); }
.chev::after  { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .chev::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-body {
  padding: 0 24px 24px;
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1.65;
  max-width: 70ch;
}

/* ---------- CTA strip ---------- */
.cta-strip { padding-bottom: clamp(80px, 10vw, 140px); }
.cta-card {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 7vw, 72px) 24px;
  background:
    radial-gradient(60% 100% at 50% 0%, rgba(22,163,74,.10) 0%, rgba(22,163,74,0) 65%),
    var(--bg-soft);
}
.cta-card .h2 { margin-top: 0; }
.cta-card .btn { margin-top: 20px; }
.cta-card .install-group { margin-top: 20px; display: inline-flex; }
.cta-card .install-group .btn { margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 40px 0;
}
.footer-inner {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; align-items: center; }
}
.footer-brand .brand { margin-bottom: 8px; }
.footer-nav {
  display: flex; flex-wrap: wrap; gap: 18px;
  font-size: 14px;
  color: var(--ink-3);
}
.footer-nav a:hover { color: var(--ink); }
.footer-meta {
  font-size: 13px;
  color: var(--muted);
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
}
@media (min-width: 720px) { .footer-meta { justify-content: flex-end; } }
.dot-sep { color: var(--muted-2); }

/* ---------- Reveal motion ----------
   Hide-via-JS pattern: only the .js-ready class enables the hidden state,
   so the page is fully visible without JS / before JS runs / in screenshots. */
.js-ready .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  will-change: opacity, transform;
}
.js-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Waitlist (Premium coming-soon) ---------- */
.price-tbd {
  font-size: 18px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: -0.01em;
}
.waitlist {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.waitlist input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.waitlist input[type="email"]:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}
.waitlist .btn { white-space: nowrap; }
.waitlist.is-success input,
.waitlist.is-success button { display: none; }
#waitlistMsg.is-success {
  color: var(--green);
  font-weight: 500;
}
#waitlistMsg.is-error {
  color: #dc2626;
}
.sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
@media (max-width: 540px) {
  .waitlist { flex-direction: column; }
  .waitlist .btn { width: 100%; }
}

/* ---------- Multi-browser install group ---------- */
.install-group {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 6px 14px -6px rgba(15,23,42,.4);
}
.install-group .btn-primary {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: none;
}
.install-group .browser-alt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  background: #1e293b;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-left: 1px solid rgba(255,255,255,.12);
  transition: background .15s ease;
  white-space: nowrap;
}
.install-group .browser-alt:hover { background: #334155; }
.install-group .browser-alt svg { width: 14px; height: 14px; }
.install-group .browser-alt:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

/* Free pricing card variant: outline style */
.install-group--outline {
  width: 100%;
  box-shadow: none;
  border: 1px solid var(--border);
}
.install-group--outline .btn-secondary {
  flex: 1;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
}
.install-group--outline .browser-alt {
  background: #fff;
  color: var(--ink);
  border-left: 1px solid var(--border);
}
.install-group--outline .browser-alt:hover { background: #f8fafc; }
.install-group--outline .browser-alt:last-child {
  border-top-right-radius: 9px;
  border-bottom-right-radius: 9px;
}
.install-group--outline { border-radius: 10px; overflow: hidden; }

@media (max-width: 480px) {
  .install-group { flex-wrap: wrap; }
  .install-group .btn-primary,
  .install-group--outline .btn-secondary {
    border-radius: 10px 10px 0 0;
    flex: 1 1 100%;
  }
  .install-group .browser-alt {
    flex: 1 1 50%;
    justify-content: center;
    padding: 10px 8px;
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,.12);
  }
  .install-group--outline .browser-alt {
    border-top: 1px solid var(--border);
  }
  .install-group .browser-alt:nth-last-child(2) {
    border-right: 1px solid rgba(255,255,255,.12);
  }
  .install-group--outline .browser-alt:nth-last-child(2) {
    border-right: 1px solid var(--border);
  }
}

/* ============================================================
   Animated hero demo loop
   16-second loop showing scroll → hover AI post → tooltip →
   click block → post slides away → reset
   ============================================================ */

.hero-demo { width: 100%; max-width: 540px; margin-inline: auto; }

.demo-frame {
  position: relative;
  background: #f1f5f9;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  padding: 16px;
  height: 460px;
  /* visible so the tooltip can float past the right edge */
  overflow: visible;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.10);
  isolation: isolate;
}

.demo-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* Vertical scroll across loop */
  animation: demoScroll 16s ease-in-out infinite;
  will-change: transform;
  position: relative;
}
.demo-feed-clip {
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
  position: relative;
}

@keyframes demoScroll {
  /* Subtle hover only — keeps AI post top-aligned so reveal is clean */
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* ---- Post cards ---- */
.demo-post {
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  font-size: 12px;
  color: #334155;
  line-height: 1.45;
  flex-shrink: 0;
}

.post-ai {
  animation: aiPostBlock 16s ease-in-out infinite;
  transform-origin: top;
  will-change: transform, opacity, max-height;
  max-height: 260px;
}

@keyframes aiPostBlock {
  0%, 56%   { opacity: 1; transform: translateX(0) scale(1); max-height: 260px; }
  62%       { opacity: 0; transform: translateX(-30px) scale(0.96); max-height: 260px; }
  68%, 92%  { opacity: 0; transform: translateX(-30px) scale(0.96); max-height: 0; padding-top: 0; padding-bottom: 0; border-width: 0; }
  100%      { opacity: 1; transform: translateX(0) scale(1); max-height: 260px; }
}

.demo-post-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.demo-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}
.grad-1 { background: linear-gradient(135deg, #cbd5e1, #94a3b8); }
.grad-2 { background: linear-gradient(135deg, #16a34a, #22c55e); }
.grad-3 { background: linear-gradient(135deg, #f97316, #ea580c); }

.demo-author { flex: 1; min-width: 0; }
.demo-name { font-weight: 600; font-size: 12px; color: #0f172a; }
.demo-sub  { font-size: 10px; color: #64748b; line-height: 1.3; }
.demo-time { font-size: 10px; color: #94a3b8; }

.demo-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
}

.badge-ai     { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.badge-ai .badge-dot     { background: #dc2626; }
.badge-human  { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.badge-human .badge-dot  { background: #16a34a; }
.badge-mixed  { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.badge-mixed .badge-dot  { background: #f97316; }

/* AI badge pulses gently to draw attention */
.post-ai .demo-badge {
  animation: badgePulse 16s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 18%, 28%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); }
  22%                { box-shadow: 0 0 0 8px rgba(220,38,38,0.18); }
}

.demo-body p { margin: 0 0 6px; font-size: 11.5px; }
.demo-body p:last-child { margin-bottom: 0; }
.demo-lead { font-weight: 600; color: #0f172a; }

.demo-actions {
  display: flex; justify-content: space-between;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  font-size: 10px; color: #64748b; font-weight: 500;
}

/* ---- Tooltip ---- */
/* Tooltip is positioned relative to .demo-frame and floats over the right edge */
.demo-tooltip {
  position: absolute;
  top: 70px;
  right: -40px;
  width: 220px;
  background: #0f172a;
  color: #fff;
  padding: 12px 14px 10px;
  border-radius: 12px;
  box-shadow: 0 16px 32px rgba(15,23,42,0.30);
  z-index: 30;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transform-origin: top left;
  pointer-events: none;
  animation: tooltipShow 16s ease-in-out infinite;
}
.demo-tooltip::before {
  content: "";
  position: absolute;
  top: 14px; left: -6px;
  width: 0; height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 6px solid #0f172a;
}
@keyframes tooltipShow {
  0%, 22%   { opacity: 0; transform: translateY(8px) scale(0.96); }
  28%, 62%  { opacity: 1; transform: translateY(0) scale(1); }
  68%, 100% { opacity: 0; transform: translateY(8px) scale(0.96); }
}
.tt-kicker {
  font-size: 9px; font-weight: 700; letter-spacing: 0.12em;
  color: #4ade80; margin-bottom: 4px;
}
.tt-headline {
  font-size: 12px; font-weight: 600; color: #f1f5f9;
  margin-bottom: 10px;
}
.tt-bars { list-style: none; padding: 0; margin: 0 0 10px; }
.tt-bars li {
  display: grid;
  grid-template-columns: 70px 1fr 22px;
  gap: 6px;
  align-items: center;
  font-size: 9.5px;
  color: #cbd5e1;
  margin-bottom: 4px;
}
.tt-bars .bar {
  height: 4px; background: #1e293b; border-radius: 2px;
  overflow: hidden;
}
.tt-bars .bar > span {
  display: block; height: 100%;
  background: #ef4444;
  border-radius: 2px;
}
.tt-bars li:nth-child(2) .bar > span,
.tt-bars li:nth-child(3) .bar > span,
.tt-bars li:nth-child(5) .bar > span { background: #f97316; }
.tt-bars .v { font-size: 9.5px; color: #fca5a5; text-align: right; font-weight: 600; }
.tt-bars .v.amber { color: #fdba74; }

.tt-block {
  display: block; width: 100%;
  padding: 7px 10px;
  background: #16a34a; color: #fff;
  border: none; border-radius: 8px;
  font-size: 10.5px; font-weight: 600;
  cursor: default;
  transition: background 0.2s;
  animation: blockButtonHit 16s ease-in-out infinite;
}
@keyframes blockButtonHit {
  0%, 50%, 60%, 100% { background: #16a34a; transform: scale(1); }
  55%                { background: #15803d; transform: scale(0.96); }
}

/* ---- Animated cursor ---- */
.demo-cursor {
  position: absolute;
  width: 22px; height: 22px;
  z-index: 20;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
  /* Default position: bottom-right corner, idle */
  top: 380px;
  left: 320px;
  animation: cursorPath 16s ease-in-out infinite;
  will-change: transform;
}

/* Cursor: corner → AI badge → block button (still inside visible tooltip) → drift away.
   .demo-cursor base: top:380px, left:320px.
   Tooltip block button sits ~ right:-30px top:~240px relative to frame. */
@keyframes cursorPath {
  0%, 8%   { transform: translate(0, 0); }
  20%      { transform: translate(80px, -310px); }    /* approach badge */
  24%, 45% { transform: translate(100px, -320px); }   /* hover badge (tooltip visible) */
  52%      { transform: translate(140px, -160px); }   /* move down to Block author button */
  55%      { transform: translate(140px, -160px); }   /* click */
  68%      { transform: translate(80px, -120px); }    /* drift away after click */
  90%, 100%{ transform: translate(0, 0); }            /* return idle */
}

/* Cursor click pulse */
.demo-cursor::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 2px solid #16a34a;
  border-radius: 50%;
  opacity: 0;
  animation: cursorClick 16s ease-in-out infinite;
}
@keyframes cursorClick {
  0%, 53%, 60%, 100% { opacity: 0; transform: scale(0.4); }
  55%                { opacity: 0.9; transform: scale(1); }
  58%                { opacity: 0; transform: scale(1.4); }
}

/* ---- Hover-to-pause ---- */
.hero-demo:hover .demo-feed,
.hero-demo:hover .post-ai,
.hero-demo:hover .post-ai .demo-badge,
.hero-demo:hover .demo-tooltip,
.hero-demo:hover .tt-block,
.hero-demo:hover .demo-cursor,
.hero-demo:hover .demo-cursor::after {
  animation-play-state: paused;
}

/* ---- Reduced motion: freeze in tooltip-visible state ---- */
@media (prefers-reduced-motion: reduce) {
  .demo-feed,
  .post-ai,
  .post-ai .demo-badge,
  .demo-tooltip,
  .tt-block,
  .demo-cursor,
  .demo-cursor::after {
    animation: none;
  }
  .demo-tooltip { opacity: 1; transform: none; }
  .demo-cursor { transform: translate(60px, -310px); }
}

/* ---- Mobile: keep tooltip inside frame ---- */
@media (max-width: 900px) {
  .demo-tooltip { right: 8px; }
}
@media (max-width: 720px) {
  .demo-frame { height: 420px; padding: 12px; }
  .post-mixed { display: none; }
  .demo-tooltip { width: 200px; right: 8px; top: 80px; }
}
@media (max-width: 480px) {
  .demo-frame { height: 380px; }
  .demo-tooltip { width: 180px; right: 4px; }
  .tt-bars li { grid-template-columns: 56px 1fr 20px; font-size: 8.5px; }
}
