/* ══════════════════════════════════════
   SYNTHETIC SWARM DEMO — Namespaced CSS
   All selectors scoped under .demo-wrapper
   ══════════════════════════════════════ */

/* ── Design tokens (scoped) ── */
.demo-wrapper {
  --apple-label:       rgb(29,29,31);
  --apple-secondary:   rgb(134,134,139);
  --apple-tertiary:    rgb(174,174,178);
  --apple-bg:          #ffffff;
  --apple-bg-grouped:  rgb(242,242,247);
  --apple-separator:   rgba(60,60,67,0.12);
  --apple-blue:        rgb(0,113,227);
  --apple-blue-hover:  rgb(0,95,192);
  --apple-green:       rgb(52,199,89);
  --apple-red:         rgb(255,59,48);
  --apple-font:        -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
  --apple-radius-sm:   8px;
  --apple-radius-md:   12px;
  --apple-radius-lg:   18px;
  --apple-radius-pill: 980px;
  --apple-shadow-sm:   0 1px 3px rgba(0,0,0,0.08);
  --apple-shadow-md:   0 4px 16px rgba(0,0,0,0.10);

  font-family: var(--apple-font);
  font-size: 14px;
  color: var(--apple-label);
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar inside demo */
.demo-wrapper ::-webkit-scrollbar { width: 5px; height: 5px; }
.demo-wrapper ::-webkit-scrollbar-track { background: transparent; }
.demo-wrapper ::-webkit-scrollbar-thumb { background: rgba(60,60,67,0.18); border-radius: 9999px; }

/* ═══════════════════════════════════
   DEMO HERO — Full section, centered
   ═══════════════════════════════════ */
.demo-wrapper .demo-hero {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 24px 40px;
  position: relative;
  background: transparent;
}

.demo-wrapper .demo-hero__inner {
  text-align: center;
  max-width: 720px;
  width: 100%;
}

/* Eyebrow : Breaking news ticker (true liquid glass) */
.demo-wrapper .demo-hero__eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 50%, rgba(0, 0, 0, 0.04)),
    rgba(22, 22, 24, 0.4);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  padding: 6px 18px 6px 12px;
  border-radius: 100px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 10px 36px rgba(0, 0, 0, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.22),
    inset 0 -1px 1px rgba(0, 0, 0, 0.18);
  overflow: visible;
}

/* Specular highlight (the glass shine on top edge) */
.demo-wrapper .demo-hero__eyebrow::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 38%);
  opacity: 0.9;
}

/* Subtle bottom refraction (the curved-glass darkening) */
.demo-wrapper .demo-hero__eyebrow::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 30%);
}

.demo-wrapper .demo-hero__eyebrow > * {
  position: relative;
  z-index: 1;
}

.hero-eyebrow-badge {
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 5px 11px;
  border-radius: 6px;
  text-transform: uppercase;
}

/* Headline */
.demo-wrapper .demo-hero__headline {
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--apple-label);
  line-height: 1.1;
  margin: 0 0 18px;
  max-width: 920px;
}

.demo-wrapper .demo-hero__subtitle {
  font-size: clamp(16px, 2.2vw, 20px);
  color: rgb(100,100,105);
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin: 0 auto 40px;
  max-width: 540px;
}

/* ═══════════════════════════════════
   MOBILE
   ═══════════════════════════════════ */
@media (max-width: 640px) {
  .demo-wrapper .demo-hero { padding: 48px 20px 32px; }
  .demo-wrapper .demo-hero__subtitle { margin-bottom: 28px; }

  /* Eyebrow pill: force single-line on mobile */
  .demo-wrapper .demo-hero__eyebrow {
    gap: 8px;
    padding: 5px 14px 5px 10px;
    margin-bottom: 20px;
  }
  .hero-eyebrow-badge {
    font-size: 10px;
    padding: 4px 8px;
    white-space: nowrap;
  }

  /* Headline: smaller on mobile to avoid 6-line wrap */
  .demo-wrapper .demo-hero__headline {
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: -0.025em;
    margin-bottom: 14px;
  }
  .demo-wrapper .demo-hero__subtitle {
    font-size: 15px;
  }
}
