/* AgentPulse landing page — matches the app's dark theme + purple accent */

:root {
  --accent: rgb(217, 128, 255);
  --accent-dim: rgba(217, 128, 255, 0.6);
  --text: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-dim: rgba(255, 255, 255, 0.45);
  --bg: rgb(24, 24, 26);
  --surface: rgb(38, 38, 40);
  --border: rgba(255, 255, 255, 0.08);
  --found: rgb(77, 242, 153);
  --waiting: rgb(255, 179, 64);
  --radius: 16px;
  --radius-lg: 22px;
  --max-width: 1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  /* Smooth scroll for in-page nav links (Features / States / Install). */
  scroll-behavior: smooth;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", "PingFang TC",
               "Microsoft JhengHei", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; opacity: 0.85; }

img { max-width: 100%; display: block; }

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

/* ─── Nav ─── */
nav {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(24, 24, 26, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10;
}
nav .container { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; }
.brand-logo { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; display: block; }
.nav-links { display: flex; gap: 24px; font-size: 14px; }
.nav-links a { color: var(--text-secondary); }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ─── Hero ─── */
.hero {
  position: relative;
  /* overflow stays visible so the absolute .live-demo can extend past the
     hero bottom when Settings opens. The wallpaper does its own clipping. */
  padding: 60px 24px 80px;
}
.hero-grid {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
}
.hero-text {
  max-width: 560px;
}
/* Mobile stacks naturally: text first, demo below. */
@media (max-width: 919px) {
  .hero-text { text-align: center; margin: 0 auto; }
  .live-demo { margin-top: 40px; }
}

/* Gradient "desktop wallpaper" with soft animated blobs */
.wallpaper {
  position: absolute;
  inset: 0;
  overflow: hidden;  /* clip blobs that hang off negative offsets */
  background:
    radial-gradient(ellipse at top left, rgba(124, 58, 237, 0.35), transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(236, 72, 153, 0.28), transparent 55%),
    radial-gradient(ellipse at center, rgba(56, 189, 248, 0.12), transparent 70%),
    linear-gradient(180deg, #0d0b1a 0%, #181527 100%);
  z-index: 0;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
}
.blob.b1 { width: 480px; height: 480px; top: -120px; left: -160px; background: #8b5cf6; animation: blobFloat1 22s ease-in-out infinite; }
.blob.b2 { width: 420px; height: 420px; top: 40%; right: -120px; background: #ec4899; animation: blobFloat2 26s ease-in-out infinite; }
.blob.b3 { width: 360px; height: 360px; bottom: -120px; left: 30%; background: #38bdf8; opacity: 0.35; animation: blobFloat3 30s ease-in-out infinite; }

@keyframes blobFloat1 { 0%,100% { transform: translate(0, 0); } 50% { transform: translate(80px, 50px); } }
@keyframes blobFloat2 { 0%,100% { transform: translate(0, 0); } 50% { transform: translate(-60px, 40px); } }
@keyframes blobFloat3 { 0%,100% { transform: translate(0, 0); } 50% { transform: translate(40px, -40px); } }

/* Live demo — on desktop, absolute-positioned overlay in top-right so that
   growing the iframe never pushes the hero text. On mobile, falls back to
   normal block flow via the media query below. */
.live-demo {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
@media (min-width: 920px) {
  .live-demo {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    z-index: 5;
  }
}
.live-demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(217, 128, 255, 0.4);
  color: var(--text);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px rgba(217, 128, 255, 0.25);
  white-space: nowrap;
  align-self: center;  /* centered in its flex column slot */
}
.live-demo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--found);
  box-shadow: 0 0 0 0 rgba(77, 242, 153, 0.6);
  animation: liveDot 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
.live-demo-gear { width: 12px; height: 12px; margin: 0 2px; flex-shrink: 0; color: var(--accent); }
@keyframes liveDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(77, 242, 153, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(77, 242, 153, 0); }
}
.live-demo iframe {
  width: 100%;
  height: 760px;        /* fixed at the tallest state (Settings → Sounds
                           with both completion + waiting sections fully
                           open, plus padding + scrollbar room). Empty
                           area below capsule is transparent so the hero
                           wallpaper shows through. */
  border: 0;
  background: transparent;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4))
          drop-shadow(0 0 60px rgba(217, 128, 255, 0.25));
}
.live-demo-hint {
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 13px;
  letter-spacing: 0.3px;
  text-align: center;
}

.hero-text {
  position: relative;
  z-index: 1;
  text-align: left;
}
@media (max-width: 920px) {
  .hero-text { text-align: center; }
}
.hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;          /* was 1.05 — descenders like g/y were getting clipped */
  padding-bottom: 0.12em;     /* extra room below the baseline for background-clip text */
  margin-bottom: 20px;
  background: linear-gradient(180deg, #ffffff 30%, var(--accent) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(217, 128, 255, 0.12);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  margin-bottom: 20px;
  border: 1px solid rgba(217, 128, 255, 0.3);
  backdrop-filter: blur(8px);
}
.hero p.lede {
  font-size: clamp(17px, 1.8vw, 21px);
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin-bottom: 36px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
@media (max-width: 920px) {
  .hero p.lede { margin-left: auto; margin-right: auto; }
}
.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
@media (max-width: 920px) {
  .cta { justify-content: center; }
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-icon { width: 16px; height: 16px; flex-shrink: 0; display: block; }

/* Download buttons — 3 side-by-side, each for one OS */
.dl-btn {
  min-width: 110px;
  justify-content: center;
  position: relative;
}
.dl-arch {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.7;
  margin-left: 2px;
  letter-spacing: 0.3px;
}

/* Secondary info row under the three download buttons */
.cta-secondary {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-dim);
}
@media (max-width: 920px) { .cta-secondary { justify-content: center; } }
.cta-secondary a.link-subtle { color: var(--text-secondary); }
.cta-secondary a.link-subtle:hover { color: var(--text); }
.cta-sep { color: var(--text-dim); opacity: 0.5; }
.dl-version-label { font-variant-numeric: tabular-nums; }
.dl-version-label #dl-version { color: var(--accent); font-weight: 600; }
.btn-primary {
  background: var(--accent);
  color: #000;
  box-shadow: 0 10px 30px rgba(217, 128, 255, 0.35);
}
.btn-primary:hover { background: rgb(230, 150, 255); box-shadow: 0 14px 36px rgba(217, 128, 255, 0.45); }
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.14); }

/* ─── Providers strip ─── */
.providers {
  padding: 40px 0;
  text-align: center;
}
.providers-label {
  color: var(--text-dim);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
}
.providers-row {
  display: flex;
  gap: 36px;
  justify-content: center;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 500;
}
.providers-row > span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.providers-row .provider-logo {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.providers-row .provider-logo svg { width: 100%; height: 100%; }

/* ─── Section ─── */
section {
  padding: 70px 0;
  border-top: 1px solid var(--border);
  /* Offset so sticky nav doesn't overlap the section heading when
     smooth-scrolling via a hash link. */
  scroll-margin-top: 72px;
}
section h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
  text-align: center;
}
section .section-lede {
  text-align: center;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 48px;
}

/* ─── Feature grid ─── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.feature:hover {
  border-color: rgba(217, 128, 255, 0.3);
  transform: translateY(-2px);
}
.feature-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: var(--accent);
  background: linear-gradient(135deg, rgba(217, 128, 255, 0.18), rgba(124, 58, 237, 0.08));
  border: 1px solid rgba(217, 128, 255, 0.25);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.feature-icon svg { width: 100%; height: 100%; display: block; }
.feature h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* ─── States table ─── */
.states-table {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.states-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.states-row:last-child { border-bottom: 0; }
.states-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.states-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.states-row.working .states-dot { background: var(--found); box-shadow: 0 0 8px var(--found); }
.states-row.waiting .states-dot { background: var(--waiting); box-shadow: 0 0 8px var(--waiting); }
.states-row.idle .states-dot { background: var(--text-dim); }
.states-row.stale .states-dot { background: var(--text-dim); opacity: 0.5; }
.states-desc { color: var(--text-secondary); font-size: 14px; }

/* ─── Screenshot gallery ─── */
.screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.shot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  padding: 24px 20px 20px;
}
.shot img {
  margin: 0 auto 16px;
  max-height: 380px;
  width: auto;
}
.shot h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.shot p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ─── Install ─── */
.install-card {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.install-card h3 {
  font-size: 17px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.os-icon-group { display: inline-flex; gap: 8px; align-items: center; }
.os-icon { width: 20px; height: 20px; display: block; color: var(--text); }

/* Inline SVG icons that sit within flowing prose (e.g. the folder glyph
   inside the Sounds tab description). */
.inline-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -2px;
  color: var(--accent);
  margin: 0 2px;
}
.install-card + .install-card { margin-top: 16px; }
pre {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  font-family: "SF Mono", "Cascadia Code", "Consolas", "Menlo", monospace;
  font-size: 13px;
  color: var(--text);
  overflow-x: auto;
  line-height: 1.6;
}
.install-note {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 10px;
}

/* ─── Footer ─── */
footer {
  padding: 40px 0 60px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  border-top: 1px solid var(--border);
}
footer a { color: var(--text-secondary); }
footer .footer-links { margin-bottom: 14px; display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
