/* ClipPulse website. Colours match the app's design tokens (frontend/src/styles.css). */
:root {
  color-scheme: dark;
  --bg: #100a1c;
  --bg-2: #181027;
  --card: #211632;
  --card-2: #2b1b42;
  --primary: #7c3aed;
  --primary-2: #a855f7;
  --primary-light: #b9a3fc;
  --primary-soft: rgba(124, 58, 237, 0.18);
  --rose: #e11d48;
  --rose-bright: #f43f5e;
  --magenta: #db2777;
  --text: #f5f3ff;
  --text-2: #c9c0d8;
  --muted: #9a8fb0;
  --border: #39274f;
  --border-strong: #4c3570;
  --success: #22c55e;
  --warning: #f59e0b;
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, Menlo, monospace;
  --wrap: 1120px;
  --gutter: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 16px/1.65 var(--font); color: var(--text); -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 50% 38% at 88% 4%, rgba(244, 63, 94, 0.20), transparent 72%),
    radial-gradient(ellipse 55% 45% at 6% 30%, rgba(124, 58, 237, 0.26), transparent 72%),
    radial-gradient(ellipse 45% 30% at 60% 100%, rgba(219, 39, 119, 0.14), transparent 70%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 40%);
  background-repeat: no-repeat;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--primary-light); text-underline-offset: 3px; }
a:hover { color: #d8ccff; }
:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 12px; }
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); font-weight: 750; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 14px; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(16, 10, 28, 0.92); border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 750; font-size: 1.15rem; }
.brand img { width: 32px; height: 32px; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--text-2); text-decoration: none; padding: 7px 13px; border-radius: 999px; font-weight: 550; font-size: 0.95rem; }
.nav a:hover { background: var(--primary-soft); color: var(--text); }
.nav a[aria-current="page"] { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
[id] { scroll-margin-top: 80px; }
@media (max-width: 720px) {
  .site-header { position: static; }
  [id] { scroll-margin-top: 12px; }
  .site-header .wrap { gap: 6px; padding-top: 10px; padding-bottom: 8px; }
  .nav { margin-left: -8px; width: calc(100% + 8px); gap: 2px 0; }
  .nav a { padding: 5px 10px; font-size: 0.9rem; white-space: nowrap; }
}

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 22px; border-radius: 999px;
  font-weight: 650; text-decoration: none; border: 1px solid transparent; line-height: 1.2; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--primary) 0%, #9333ea 55%, var(--magenta) 100%);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.38); }
.btn-primary:hover { color: #fff; filter: brightness(1.08); }
.btn-ghost { color: var(--text); border-color: var(--border-strong); background: rgba(33, 22, 50, 0.6); }
.btn-ghost:hover { color: var(--text); background: var(--card-2); }

/* ---- hero ---- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--primary-light); font-weight: 650; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rose-bright); box-shadow: 0 0 12px var(--rose-bright); }
.lead { font-size: clamp(1.05rem, 1.8vw, 1.22rem); color: var(--text-2); max-width: 36em; }
.grad { background: linear-gradient(135deg, #c4b5fd, var(--primary-2) 45%, var(--rose-bright)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.fine { color: var(--muted); font-size: 0.88rem; margin-top: 14px; }
.hero-card { background: linear-gradient(180deg, rgba(43, 27, 66, 0.9), rgba(33, 22, 50, 0.9)); border: 1px solid var(--border-strong);
  border-radius: 20px; padding: 18px 18px 14px; box-shadow: 0 24px 60px rgba(5, 2, 12, 0.5); }
.hero-card .bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--text-2); margin-bottom: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 650; border: 1px solid var(--border-strong); }
.pill.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.pill.spike { color: #ffd1da; border-color: rgba(244, 63, 94, 0.5); background: rgba(225, 29, 72, 0.16); }
.hero-card svg { display: block; width: 100%; height: auto; }
.hero-card .legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

/* ---- sections ---- */
section { padding: clamp(44px, 7vw, 80px) 0; }
.section-head { max-width: 46em; margin-bottom: 30px; }
.section-head p { color: var(--text-2); }
.alt { background: linear-gradient(180deg, rgba(24, 16, 39, 0.0), rgba(24, 16, 39, 0.75) 20%, rgba(24, 16, 39, 0.75) 80%, rgba(24, 16, 39, 0)); }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }
.card { background: rgba(33, 22, 50, 0.78); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card h3 { margin-top: 4px; }
.card p, .card li { color: var(--text-2); }
.card ul { margin: 0; padding-left: 20px; }
.card li { margin-bottom: 6px; }
.icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(219, 39, 119, 0.25)); border: 1px solid var(--border-strong); }
.icon svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; margin-bottom: 56px; }
.feature:last-child { margin-bottom: 0; }
.feature .kicker { color: var(--rose-bright); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; }
.feature p { color: var(--text-2); }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 11px; color: var(--text-2); }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c4b5fd' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat;
  border: 1px solid var(--border-strong); }
.checks strong { color: var(--text); }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); }
.steps li { counter-increment: s; background: rgba(33, 22, 50, 0.78); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; color: var(--text-2); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; margin-bottom: 10px;
  font-weight: 750; color: #fff; background: linear-gradient(135deg, var(--primary), var(--magenta)); }
.steps strong { display: block; color: var(--text); margin-bottom: 4px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---- download ---- */
.download { border: 1px solid var(--border-strong); border-radius: 22px; padding: clamp(22px, 4vw, 40px);
  background: radial-gradient(ellipse 60% 80% at 100% 0%, rgba(244, 63, 94, 0.16), transparent 70%),
              radial-gradient(ellipse 60% 80% at 0% 100%, rgba(124, 58, 237, 0.24), transparent 70%), var(--card); }
.download .grid-2 { align-items: start; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: 0.95rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.hash { font-family: var(--mono); font-size: 0.8rem; color: var(--text-2); word-break: break-all; }
pre { background: #0b0714; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; overflow-x: auto;
  font: 0.85rem/1.55 var(--mono); color: #e9e3ff; margin: 0 0 14px; }

/* ---- notices ---- */
.notice { border-radius: var(--radius-sm); padding: 14px 16px; margin: 0 0 18px; border: 1px solid; font-size: 0.95rem; }
.notice p:last-child { margin-bottom: 0; }
.notice.info { background: rgba(124, 58, 237, 0.12); border-color: var(--border-strong); color: var(--text-2); }
.notice.warn { background: rgba(245, 158, 11, 0.09); border-color: rgba(245, 158, 11, 0.45); color: #f6e3c2; }
.notice.draft { background: rgba(225, 29, 72, 0.12); border-color: rgba(244, 63, 94, 0.55); color: #ffd7df; }
/* Every statement that the site owner still has to confirm is wrapped in <mark class="confirm">. */
mark.confirm { background: rgba(244, 63, 94, 0.18); color: #ffd7df; border: 1px dashed rgba(244, 63, 94, 0.75); border-radius: 6px;
  padding: 0 6px; font-weight: 600; font-size: 0.92em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* ---- documents (legal / support) ---- */
.doc { padding: clamp(36px, 6vw, 64px) 0 clamp(48px, 7vw, 80px); }
.doc .wrap { max-width: 860px; }
.doc h1 { font-size: clamp(1.9rem, 4.4vw, 2.7rem); }
.doc h2 { font-size: 1.35rem; margin-top: 38px; padding-top: 8px; }
.doc h3 { margin-top: 24px; }
.doc p, .doc li { color: var(--text-2); }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 14px; }
.doc li { margin-bottom: 7px; }
.doc strong { color: var(--text); }
.meta { color: var(--muted); font-size: 0.92rem; }
.toc { background: rgba(33, 22, 50, 0.7); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin: 24px 0 8px; }
.toc h2 { font-size: 1rem; margin: 0 0 8px; padding: 0; }
.toc ol { margin: 0; columns: 2; column-gap: 28px; }
@media (max-width: 600px) { .toc ol { columns: 1; } }
.table-wrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-2); }
th { color: var(--text); background: rgba(43, 27, 66, 0.7); font-weight: 650; }
tr:last-child td { border-bottom: 0; }
details { background: rgba(33, 22, 50, 0.7); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 18px; margin-bottom: 10px; }
details[open] { padding-bottom: 6px; }
summary { cursor: pointer; padding: 14px 0; font-weight: 650; color: var(--text); list-style-position: outside; }
summary::marker { color: var(--primary-light); }

/* ---- footer ---- */
.site-footer { margin-top: auto; border-top: 1px solid var(--border); background: rgba(12, 8, 22, 0.85); padding: 36px 0 28px; font-size: 0.92rem; color: var(--muted); }
.site-footer .cols { display: flex; gap: 32px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 22px; }
.site-footer nav { display: flex; gap: 8px 20px; flex-wrap: wrap; }
.site-footer nav a { color: var(--text-2); text-decoration: none; }
.site-footer nav a:hover { color: var(--text); text-decoration: underline; }
.site-footer p { margin: 0 0 8px; max-width: 60em; }

/* ---- small utilities (no inline styles: the pages' CSP blocks them) ---- */
.mb-xl { margin-bottom: 56px; }
.h-feature { font-size: 1.5rem; }
.bar-foot { margin: 8px 0 0 !important; }
.lead-sm { font-size: 1.05rem; }
.soft { color: var(--text-2); }
.cta-tight { margin-top: 18px; }
.notice-foot { margin: 22px 0 0; }
