/* Social Forge landing page. Colours match the app (lib/app/theme.dart). */
:root {
  --ink: #0f131c;        /* app surface */
  --panel: #171b24;
  --line: #262b36;
  --text: #dfe2ee;
  --muted: #a3afb4;
  --cyan: #4cd7f6;
  --violet: #8b5cf6;
  --lilac: #d0bcff;
  --mint: #4edea3;       /* "live" signals only */
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shell: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 72px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--cyan); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.shell { width: min(var(--shell), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--panel); padding: 8px 12px; }

h1, h2, h3 { font-family: var(--display); color: #fff; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--violet), var(--cyan));
  color: #06101a;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: none; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--muted); filter: none; }
.btn-small { padding: 9px 16px; font-size: 15px; }
.link { color: var(--text); text-decoration: none; font-weight: 500; }
.link:hover { color: #fff; }
.fine { color: var(--muted); font-size: 15px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 5;
  background: rgb(15 19 28 / 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; gap: 32px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none;
  font: 600 18px var(--display); }
.brand img { border-radius: 8px; }
.top nav { display: flex; gap: 24px; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.top nav a:hover { color: #fff; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 20px; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 88px 0 72px;
}
.hero h1 { font-size: clamp(42px, 5.4vw, 68px); line-height: 1.02; font-weight: 700; }
.lede { margin-top: 24px; font-size: 19px; color: var(--muted); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 14px; }

/* The signature: one query fanning out to every network */
.probe {
  margin: 0;
  padding: 22px;
  border-radius: 20px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgb(139 92 246 / 0.16), transparent 60%),
    var(--panel);
  border: 1px solid var(--line);
}
.probe-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--ink);
  border: 1px solid var(--line);
  font: 500 20px var(--display);
}
.probe-bar svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.caret { width: 2px; height: 22px; background: var(--cyan); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.probe-rows { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 4px; }
.probe-rows li {
  display: grid;
  grid-template-columns: 108px 1fr 64px;
  align-items: center;
  gap: 14px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
}
.probe-rows li:last-child { border-bottom: 0; }
.net { font-weight: 500; white-space: nowrap; }
.net::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--hue); margin-right: 10px; vertical-align: 1px;
}
.bar { height: 6px; border-radius: 6px; background: rgb(255 255 255 / 0.05); overflow: hidden; }
.bar i {
  display: block; height: 100%;
  width: max(calc(var(--share) * 100%), 4px);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
}
.probe-rows b { font: 600 17px var(--display); text-align: right; color: #fff; }
.probe figcaption { margin-top: 14px; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgb(78 222 163 / 0.15); }

/* Load sequence (landing.js adds .is-playing; without JS the final state shows) */
.probe.is-playing .probe-rows li { opacity: 0; transform: translateY(6px); }
.probe.is-playing .bar i { width: 0; }
.probe.is-playing figcaption { opacity: 0; }
.probe.is-done .probe-rows li {
  opacity: 1; transform: none;
  transition: opacity 350ms ease, transform 350ms ease;
  transition-delay: calc(var(--n) * 140ms);
}
.probe.is-done .bar i { transition: width 700ms cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--n) * 140ms + 120ms); }
.probe.is-done figcaption { opacity: 1; transition: opacity 300ms ease 900ms; }

/* App window */
.window img {
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 40px 120px -40px rgb(76 215 246 / 0.25), 0 30px 60px -30px rgb(0 0 0 / 0.8);
}

/* Features */
.features { padding: 128px 0 32px; }
.section-title { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.1; font-weight: 600; max-width: 18em; }
.feature {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 72px;
  align-items: center;
  margin-top: 88px;
}
.feature:nth-of-type(even) { grid-template-columns: 1fr 280px; }
.feature:nth-of-type(even) img { order: 2; }
.feature img { border-radius: 28px; border: 1px solid var(--line); }
.feature h3 { font-size: 30px; line-height: 1.15; font-weight: 600; max-width: 16em; }
.feature p { margin-top: 16px; color: var(--muted); font-size: 18px; max-width: 32em; }

.also { margin-top: 120px; border-top: 1px solid var(--line); padding-top: 40px; }
.also h3 { font-size: 22px; font-weight: 600; }
.also dl { margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 40px; }
.also dt { color: #fff; font-weight: 600; }
.also dd { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

/* Credits */
.credits { padding: 128px 0 0; }
.credit-facts { margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.credit-facts p { color: var(--muted); border-left: 2px solid var(--violet); padding-left: 18px; }
.credit-facts strong { display: block; color: #fff; font-weight: 600; margin-bottom: 4px; }

/* Pricing */
.pricing { padding: 128px 0 0; }
.plans { margin: 40px 0 24px; display: grid; grid-template-columns: 1fr 1.12fr 1fr; gap: 20px; align-items: stretch; }
.plan {
  display: flex; flex-direction: column;
  padding: 28px;
  border-radius: 18px;
  border: 1px solid var(--line);
}
.plan-main {
  background: linear-gradient(180deg, rgb(139 92 246 / 0.18), rgb(76 215 246 / 0.05)), var(--panel);
  border-color: rgb(139 92 246 / 0.5);
}
.plan h3 { font-size: 20px; font-weight: 600; }
.price { margin-top: 12px; font: 700 40px/1 var(--display); color: #fff; }
.price span { font: 400 16px var(--body); color: var(--muted); margin-left: 4px; }
.plan ul { list-style: none; padding: 0; margin: 24px 0 28px; flex: 1; }
.plan li { padding: 7px 0; color: var(--muted); border-bottom: 1px solid var(--line); }
.plan li:last-child { border-bottom: 0; }
.plan .btn { text-align: center; }
.pricing .fine { max-width: 46em; }

/* FAQ */
.faq { padding: 128px 0 0; }
.faq details { max-width: 820px; }
.faq .section-title { margin-bottom: 24px; }
details { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer; list-style: none;
  padding: 20px 36px 20px 0;
  font-weight: 500; color: #fff; font-size: 18px;
  position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 6px; top: 50%;
  width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform 200ms ease;
}
details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
details p { padding: 0 0 22px; color: var(--muted); max-width: 40em; }

/* Closing */
.closing {
  margin-top: 128px;
  padding: 72px 32px;
  border-radius: 24px;
  text-align: center;
  background:
    radial-gradient(70% 120% at 50% 0%, rgb(139 92 246 / 0.25), transparent 70%),
    var(--panel);
  border: 1px solid var(--line);
}
.closing h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 600; margin-bottom: 28px; }

.foot {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  padding: 48px 0 56px; color: var(--muted); font-size: 14px;
}
.foot nav { display: flex; gap: 20px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: #fff; }

/* Tablet */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 56px; }
  .feature, .feature:nth-of-type(even) { grid-template-columns: 200px 1fr; gap: 40px; }
  .feature:nth-of-type(even) img { order: 0; }
  .also dl, .credit-facts { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr; max-width: 480px; }
}

/* Phone */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .top nav { display: none; }
  .top-actions { gap: 14px; }
  .hero { padding: 40px 0 48px; }
  .lede { font-size: 17px; }
  .probe { padding: 16px; }
  .probe-rows li { grid-template-columns: 96px 1fr 56px; gap: 10px; }
  .features, .credits, .pricing, .faq { padding-top: 88px; }
  .feature, .feature:nth-of-type(even) { grid-template-columns: 1fr; margin-top: 64px; gap: 28px; }
  .feature img { width: 220px; margin-inline: auto; }
  .feature h3 { font-size: 25px; }
  .also dl, .credit-facts { grid-template-columns: 1fr; gap: 24px; }
  .closing { margin-top: 88px; padding: 48px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret { animation: none; }
  .probe .probe-rows li, .probe .bar i, .probe figcaption { transition: none !important; }
}
