/* Landing page — AVM Social Publisher / Threads topic radar.
   Direction: dark-first technical UI. The product watches a live stream and
   pages a Telegram bot, so the visual language borrows from monitoring
   tools and terminals: near-black surfaces, hairline borders instead of
   drop shadows, monospace for anything data-like (timestamps, keywords,
   labels), a single signal-orange accent used for state (not decoration).
   No external requests: system font stacks only, no webfonts, no icons
   fetched from anywhere. shared token names with static/privacy.html. */

:root {
  /* Surfaces, darkest to most elevated */
  --bg: #0a0e14;
  --bg-raised: #0d1219;
  --surface: #131924;
  --surface-2: #1a2230;

  /* Text */
  --ink: #e7ecf3;
  --ink-soft: #a9b4c4;
  --muted: #8e99ab;

  /* Lines */
  --line: rgba(231, 236, 243, 0.09);
  --line-strong: rgba(231, 236, 243, 0.16);

  /* Signal accent: warm orange, reads as "ping / match", not decoration */
  --accent: #ff7a45;
  --accent-strong: #ffa073;
  --accent-ink: #0a0e14; /* text placed ON accent-filled elements */
  --accent-soft-bg: rgba(255, 122, 69, 0.12);
  --accent-soft-line: rgba(255, 122, 69, 0.35);

  /* Telegram-mockup-only tokens, kept local to that component. Telegram's
     own dark theme palette, not our accent — the mock should look like the
     app, not like our brand. */
  --tg-wallpaper: #0e1621;
  --tg-header: #17212b;
  --tg-bubble: #1f2c38;
  --tg-check: #46b4f0;
  --tg-chip-bg: rgba(255, 122, 69, 0.16);
  --tg-chip-ink: #ffb28c;
  --tg-time: #97a3b4;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", "JetBrains Mono", "Fira Code", Menlo, Consolas, "Liberation Mono", monospace;

  --radius: 10px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.65;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(231, 236, 243, 0.06) 1px, transparent 0);
  background-size: 28px 28px;
}

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.btn-primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell { max-width: 980px; margin: 0 auto; padding: 0 24px; }

::selection { background: var(--accent-soft-bg); color: var(--ink); }

/* ---------- topbar ---------- */

header.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 14, 20, 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
header.topbar .shell {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono);
  font-weight: 700; font-size: 15px; letter-spacing: -0.01em; color: var(--ink);
}
.brand::before {
  content: ""; display: block; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft-bg);
}
.topnav { display: flex; align-items: center; gap: 18px; font-size: 13.5px; }
.topnav .lang {
  font-family: var(--mono);
  border: 1px solid var(--line-strong); border-radius: 6px; padding: 5px 11px; color: var(--ink-soft);
  min-height: 30px; display: inline-flex; align-items: center;
  transition: border-color .18s ease, color .18s ease;
}
.topnav .lang:hover { border-color: var(--accent); color: var(--ink); text-decoration: none; }
.topnav .login-link { color: var(--muted); }
.topnav .login-link:hover { color: var(--ink-soft); }

main { background: var(--bg); }

/* ---------- hero ---------- */

section.hero {
  padding: 88px 0 56px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
section.hero::before {
  /* faint radar rings, top-right — a technical motif, not a decorative blob */
  content: "";
  position: absolute; top: -180px; right: -180px;
  width: 520px; height: 520px; border-radius: 50%;
  background:
    radial-gradient(circle at center, transparent 0 118px, rgba(255, 122, 69, 0.16) 119px 120px, transparent 121px 178px, rgba(255, 122, 69, 0.12) 179px 180px, transparent 181px 238px, rgba(255, 122, 69, 0.08) 239px 240px, transparent 241px);
  pointer-events: none;
}
.hero .shell { position: relative; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 600;
  color: var(--accent-strong); margin: 0 0 20px;
}
.eyebrow::before {
  content: ""; display: block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft-bg); }
  50% { box-shadow: 0 0 0 5px var(--accent-soft-bg); }
}

h1 {
  font-family: var(--sans);
  font-size: clamp(30px, 4.4vw, 45px); line-height: 1.16; letter-spacing: -0.015em;
  margin: 0 0 22px; max-width: 19ch; font-weight: 700; color: var(--ink);
}
.subhead { font-size: 18px; color: var(--ink-soft); max-width: 58ch; margin: 0 0 32px; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 16px;
  padding: 13px 26px; border-radius: 9px; min-height: 44px;
  border: 1px solid var(--accent);
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); text-decoration: none; }
.btn-primary:active { transform: translateY(1px); }
.cta-note { font-size: 13.5px; color: var(--muted); margin: 0; font-family: var(--mono); }

/* ---------- generic section rhythm ---------- */

section { padding: 64px 0; position: relative; }
section + section { border-top: 1px solid var(--line); }
h2 {
  font-family: var(--sans);
  font-size: 24px; letter-spacing: -0.01em; margin: 0 0 10px; font-weight: 700; color: var(--ink);
}
.section-intro { color: var(--muted); font-size: 16px; margin: 0 0 28px; max-width: 62ch; }

/* ---------- example: Telegram mockup ---------- */

section.example { background: var(--bg-raised); }
.example-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  gap: 44px; align-items: start;
}
.example-copy h2 { margin-bottom: 14px; }

.tg-card {
  background: var(--tg-wallpaper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.55);
}
.tg-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: var(--tg-header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.tg-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(155deg, var(--accent), #c8501f);
  color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 12.5px; font-weight: 700; letter-spacing: -0.02em;
  flex: none;
}
.tg-header .tg-who { display: flex; flex-direction: column; line-height: 1.3; }
.tg-header .tg-name {
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 700; font-size: 14.5px; color: #f2f5f8;
}
.tg-header .tg-name::after {
  content: ""; width: 13px; height: 13px; border-radius: 50%;
  background: var(--tg-check);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M9 16.2l-3.5-3.5L4 14.2 9 19l11-11-1.5-1.5z"/></svg>') center / 8px no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M9 16.2l-3.5-3.5L4 14.2 9 19l11-11-1.5-1.5z"/></svg>') center / 8px no-repeat;
  flex: none;
}
.tg-header .tg-status { font-size: 12.5px; color: var(--tg-time); }

.tg-body { padding: 18px 14px 20px; }
.tg-bubble {
  background: var(--tg-bubble);
  border-radius: 4px 14px 14px 14px;
  padding: 13px 15px 11px;
  max-width: 100%;
}
.tg-chip {
  display: inline-block; font-family: var(--mono);
  font-size: 12px; font-weight: 600; color: var(--tg-chip-ink);
  background: var(--tg-chip-bg); border: 1px solid var(--accent-soft-line);
  border-radius: 999px; padding: 3px 10px; margin-bottom: 11px;
}
.tg-post {
  border-left: 2px solid var(--line-strong); padding-left: 12px; margin: 0 0 12px;
  font-size: 14.5px; color: #cdd6e2; font-style: italic;
}
.tg-summary-label {
  font-family: var(--mono);
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600;
  color: var(--tg-time); margin: 0 0 4px;
}
.tg-summary { font-size: 14.5px; color: #f2f5f8; margin: 0 0 10px; }
.tg-source {
  font-family: var(--mono);
  font-size: 11.5px; color: var(--tg-time); margin: 0;
}
.tg-meta {
  display: flex; justify-content: flex-end; align-items: center; gap: 5px;
  margin-top: 8px; font-family: var(--mono);
  font-size: 11.5px; color: var(--tg-time);
}
.tg-check { color: var(--tg-check); font-size: 13px; letter-spacing: -1px; }

.example-caption { font-size: 13.5px; color: var(--muted); margin: 14px 0 0; max-width: 46ch; }

/* ---------- how it works ---------- */

.steps-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.steps-grid > div { background: var(--surface); padding: 26px 28px; transition: background-color .2s ease; }
.steps-grid > div:hover { background: var(--surface-2); }
.step .step-n {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--accent-strong);
  border: 1px solid var(--accent-soft-line); border-radius: 999px; width: 28px; height: 28px;
  background: var(--accent-soft-bg);
  margin-bottom: 14px;
}
.step h3 { font-size: 16.5px; margin: 0 0 8px; font-weight: 700; color: var(--ink); }
.step p { margin: 0; color: var(--muted); font-size: 15px; }
.steps-note { color: var(--muted); font-size: 15px; margin: 22px 0 0; max-width: 64ch; }

/* ---------- principles (what it does not do) ---------- */

.principles-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.principle {
  background: var(--surface); padding: 18px 22px 18px 20px;
  display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: baseline;
  transition: background-color .2s ease;
}
.principle:hover { background: var(--surface-2); }
.principle .mark {
  color: var(--accent-strong); font-family: var(--mono); font-weight: 700; font-size: 15px; line-height: 1.5;
}
.principle h3 { font-size: 15.5px; margin: 0; font-weight: 700; grid-column: 2; color: var(--ink); }
.principle p { margin: 2px 0 0; color: var(--muted); font-size: 14.5px; grid-column: 2; }

/* ---------- data-handling box ---------- */

.data-box {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 22px 26px; font-size: 15.5px; max-width: 70ch; color: var(--ink-soft);
  position: relative;
}
.data-box::before {
  content: "// data";
  display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  color: var(--muted); text-transform: uppercase; margin-bottom: 10px;
}
.data-box p { margin: 0; }
.data-box a { color: var(--accent-strong); }

/* ---------- footer ---------- */

footer.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; background: var(--bg-raised); }
footer.site-footer .shell {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px;
  font-size: 14px; color: var(--muted);
}
footer.site-footer .col { min-width: 180px; }
footer.site-footer .col b { display: block; color: var(--ink); margin-bottom: 8px; font-size: 13.5px; }
footer.site-footer .links a { display: block; margin-bottom: 6px; color: var(--muted); }
footer.site-footer .links a:hover { color: var(--accent-strong); }
footer.site-footer .legal {
  margin-top: 24px; font-size: 12px; color: var(--muted); opacity: .8; font-family: var(--mono);
}

/* ---------- responsive ---------- */

@media (max-width: 780px) {
  .example-layout { grid-template-columns: 1fr; }
  section.hero::before { width: 360px; height: 360px; top: -140px; right: -140px; }
}

@media (max-width: 680px) {
  section.hero { padding: 52px 0 40px; }
  section { padding: 44px 0; }
  .steps-grid { grid-template-columns: 1fr; }
  .btn-primary { width: 100%; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-note { text-align: center; }
  .principle { grid-template-columns: auto 1fr; padding: 16px 18px; }
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .btn-primary,
  .topnav .lang,
  .steps-grid > div,
  .principle {
    transition: none;
  }
  .eyebrow::before {
    animation: none;
  }
}
