/* Trends on Internet website. Tokens from the approved Highlighter design system (docs/DESIGN.md).
   Layout: a stack of full-width bands alternating dark (band) and light (paper); content at most 1120px. */
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-var-latin.woff2") format("woff2"); font-weight: 400 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-400-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-700-latin.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plexmono-400-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plexmono-600-latin.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #fafaf5;
  --surface: #ffffff;
  --ink: #111418;
  --muted: #4a525c;
  --line: #dcddd3;
  --highlight: #f5e04a;
  --on-highlight: #111418;
  --band: #111418;
  --on-band: #f3f3ec;
  --muted-on-band: #a4abb4;
  --line-on-band: #2a3038;
  --link: #1f4fd1;
  --rising: #16733b;
  --tint: #f1f0e6;
  --font-display: "Archivo", "Arial Black", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-pill: 999px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0e1116; --surface: #171b21; --ink: #f3f3ec; --muted: #a4abb4; --line: #2a3038;
    --band: #05070a; --line-on-band: #3a414b; --link: #8db0ff; --rising: #4cc27e; --tint: #1f242b;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0e1116; --surface: #171b21; --ink: #f3f3ec; --muted: #a4abb4; --line: #2a3038;
  --band: #05070a; --line-on-band: #3a414b; --link: #8db0ff; --rising: #4cc27e; --tint: #1f242b;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--font-body); }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.band :focus-visible, .site-header :focus-visible { outline-color: var(--highlight); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--highlight); color: var(--on-highlight); padding: 8px 12px; border-radius: var(--radius-s); }

.inner {
  width: 100%; max-width: 1120px; margin: 0 auto;
  padding-left: var(--gutter); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.band { background: var(--band); color: var(--on-band); }
.paper { background: var(--paper); color: var(--ink); }
.tinted { background: var(--tint); color: var(--ink); }
section > .inner { padding-block: 56px; }
@media (min-width: 760px) { section > .inner { padding-block: 88px; } }

/* Type */
.eyebrow { display: block; font: 600 0.75rem/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.band .eyebrow { color: var(--muted-on-band); }
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; }
h1 { font-stretch: 120%; font-weight: 800; font-size: clamp(2.5rem, 7vw, 4.5rem); line-height: 1.0; letter-spacing: -0.01em; }
h2 { font-stretch: 120%; font-weight: 800; font-size: clamp(1.9rem, 4.5vw, 2.75rem); line-height: 1.05; }
h3 { font-stretch: 108%; font-weight: 750; font-size: 1.2rem; line-height: 1.25; }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 60ch; color: var(--muted); margin: 18px 0 0; }
.band .lead { color: var(--muted-on-band); }
.prose { max-width: 68ch; }
.prose p, .prose li { color: var(--ink); }
.muted { color: var(--muted); }
.band .muted { color: var(--muted-on-band); }
.mark { background: linear-gradient(transparent 58%, var(--highlight) 58%); padding: 0 3px; }
.band .mark { background: var(--highlight); color: var(--on-highlight); padding: 0 8px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.confirm { background: var(--highlight); color: var(--on-highlight); font: 600 0.8em var(--font-mono); padding: 1px 6px; border-radius: 4px; }

/* Header */
.site-header { background: var(--band); color: var(--on-band); position: sticky; top: 0; z-index: 5; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--band); }
.site-header { top: env(safe-area-inset-top, 0px); }
.site-header .inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.wordmark { font: 800 1.15rem/1.1 var(--font-display); font-stretch: 120%; color: var(--on-band); text-decoration: none; white-space: nowrap; }
.wordmark span { background: var(--highlight); color: var(--on-highlight); padding: 0 6px; }
.nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; }
.nav a { color: var(--muted-on-band); font: 600 0.75rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding: 10px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--on-band); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--highlight); }
@media (max-width: 640px) { .nav { width: 100%; gap: 4px 16px; } .nav .btn { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: var(--radius-pill); border: 2px solid var(--ink); background: var(--ink); color: var(--paper);
  font: 700 0.8125rem/1 var(--font-body); letter-spacing: .05em; text-transform: uppercase; text-decoration: none;
}
.btn.secondary { background: transparent; color: var(--ink); }
.band .btn, .site-header .btn { background: var(--on-band); color: var(--band); border-color: var(--on-band); }
.band .btn.secondary { background: transparent; color: var(--on-band); }
.site-header .btn { min-height: 38px; padding: 0 16px; font-size: 0.75rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Hero */
.hero .inner { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero .inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); } }
.hero-copy { min-width: 0; }
.hero-example { min-width: 0; display: grid; gap: 10px; }
.example-note { font: 600 0.6875rem/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted-on-band); }

/* Trend card (TrendCard component) */
.trend-card { background: var(--surface); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius-s); padding: 18px 20px; display: grid; gap: 10px; }
.band .trend-card { border-color: var(--on-band); }
.trend-card .pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font: 600 0.6875rem/1.5 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; padding: 2px 10px; border-radius: var(--radius-pill); background: var(--tint); color: var(--ink); white-space: nowrap; }
.pill.rising { color: var(--rising); }
.trend-card .title { font: 700 1.2rem/1.28 var(--font-display); font-stretch: 105%; margin: 0; }
.trend-card .sources { margin: 0; font-size: 0.875rem; color: var(--muted); }
.trend-card .summary { margin: 0; padding: 12px 14px; background: var(--tint); border-radius: var(--radius-s); font-size: 0.9rem; line-height: 1.5; }
.trend-card .summary strong { display: block; font: 600 0.6875rem/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }

/* Facts strip */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-top: 36px; }
.fact { border-top: 2px solid var(--ink); padding-top: 12px; }
.fact b { display: block; font: 800 2.25rem/1 var(--font-display); font-stretch: 120%; font-variant-numeric: tabular-nums; }
.fact span { display: block; margin-top: 6px; color: var(--muted); font-size: 0.95rem; }

/* Steps: a real sequence, so numbered */
.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 22px; display: grid; gap: 10px; align-content: start; }
.steps .num { font: 600 0.8125rem/1 var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.steps p { margin: 0; color: var(--muted); }

/* Features on a band */
.features { display: grid; gap: 1px; margin-top: 36px; background: var(--line-on-band); border: 1px solid var(--line-on-band); border-radius: var(--radius-s); overflow: hidden; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .features { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.feature { background: var(--band); padding: 24px; display: grid; gap: 8px; align-content: start; }
.feature p { margin: 0; color: var(--muted-on-band); }
.feature .soon { justify-self: start; font: 600 0.6875rem/1.5 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; padding: 2px 10px; border-radius: var(--radius-pill); border: 1px solid var(--muted-on-band); color: var(--muted-on-band); }

/* Category chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; padding: 0; list-style: none; }
.chips li { font: 700 1rem/1 var(--font-display); font-stretch: 110%; padding: 12px 18px; border-radius: var(--radius-pill); border: 2px solid var(--ink); background: var(--surface); }

/* Two-column split */
.split { display: grid; gap: 32px; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.split > * { min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 22px; display: grid; gap: 10px; }
.panel p { margin: 0; color: var(--muted); }

/* Rules list */
.rules { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line-on-band); }
.rules li { padding: 18px 0; border-bottom: 1px solid var(--line-on-band); display: grid; gap: 4px; }
@media (min-width: 760px) { .rules li { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 24px; } }
.rules b { font: 750 1.1rem/1.3 var(--font-display); font-stretch: 108%; }
.rules span { color: var(--muted-on-band); }

/* Sources page */
.source-groups { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 760px) { .source-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.source-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 20px 22px; }
.source-group h3 { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.source-group h3 small { font: 600 0.75rem/1 var(--font-mono); color: var(--muted); }
.source-group ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); }

/* Long-form pages */
.doc h2 { font-size: clamp(1.4rem, 3vw, 1.75rem); margin-top: 44px; }
.doc h2:first-child { margin-top: 0; }
.doc p, .doc li { max-width: 68ch; }
.doc ul { padding-left: 20px; }
.notice { background: var(--tint); border-radius: var(--radius-s); padding: 14px 18px; max-width: 68ch; }

/* Footer */
.site-footer { background: var(--band); color: var(--muted-on-band); font-size: 0.9rem; }
.site-footer .inner { padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 18px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--on-band); text-decoration: none; font: 600 0.75rem/1.6 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.site-footer a:hover { text-decoration: underline; }
.site-footer p { margin: 0; max-width: 72ch; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Spacing helpers (inline styles are blocked by the Content Security Policy). */
.gap-s { margin-top: 12px; }
.gap-m { margin-top: 14px; }
.gap-l { margin-top: 40px; }

/* Early access form (plain HTML, posts to Web3Forms; no scripts). */
.access-form { display: grid; gap: 6px; max-width: 520px; margin-top: 24px; }
.access-form label { margin-top: 10px; font: 600 0.75rem/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.access-form .optional { color: var(--muted); text-transform: none; letter-spacing: 0; }
.access-form input[type="text"], .access-form input[type="email"], .access-form textarea {
  width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--surface); color: var(--ink); font: inherit;
}
.access-form input[type="text"], .access-form input[type="email"] { min-height: 48px; }
.access-form textarea { resize: vertical; }
.access-form :focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.access-form .form-hint { margin: 2px 0 0; color: var(--muted); font-size: 0.9375rem; }
.access-form .btn { justify-self: start; margin-top: 14px; cursor: pointer; font-family: inherit; }
.hp { display: none; }

/* Two products. */
.products { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 760px) { .products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.product { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius-s); padding: 24px; display: grid; gap: 10px; align-content: start; }
.product h3 { margin: 0; font: 800 1.6rem/1.1 var(--font-display); font-stretch: 120%; }
.product p { margin: 0; }
.product-tag { justify-self: start; font: 600 0.6875rem/1.5 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; padding: 2px 10px; border-radius: var(--radius-pill); background: var(--highlight); color: var(--on-highlight); }

/* The rules list on a light section. */
.paper .rules, .tinted .rules, .paper .rules li, .tinted .rules li { border-color: var(--line); }
.paper .rules span, .tinted .rules span { color: var(--muted); }

/* ---- Home page, shorter version with motion (20/11/2026) ---- */
ul.features { list-style: none; padding: 0; margin: 36px 0 0; }
.feature h3 { margin: 0; }

/* Hero: three real trends, stacked; motion below cycles them. */
.card-stack { display: grid; }
.card-stack > .trend-card { grid-area: 1 / 1; }
.card-stack > .trend-card:not(:first-child) { visibility: hidden; }

/* Rules as bold chips. */
.rule-chips { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.rule-chips li { font: 700 1rem/1.3 var(--font-display); font-stretch: 108%; padding: 12px 18px; border: 2px solid var(--ink); border-radius: var(--radius-pill); background: var(--surface); }
.steps h3 { margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  /* Highlighter swipe across "actually". */
  .hero .mark {
    background: linear-gradient(var(--highlight), var(--highlight)) no-repeat left center / 0% 100%;
    animation: swipe 0.9s 0.3s cubic-bezier(.2, .7, .2, 1) forwards;
  }
  @keyframes swipe { to { background-size: 100% 100%; } }

  /* Hero copy and card rise in. */
  .hero-copy > * { animation: rise 0.7s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .hero-example { animation: rise 0.8s 0.35s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

  /* Cycle the three trends, 4 seconds each. */
  .card-stack > .trend-card, .card-stack > .trend-card:not(:first-child) { visibility: visible; animation: cycle 12s infinite both; }
  .card-stack > .trend-card:nth-child(2) { animation-delay: 4s; }
  .card-stack > .trend-card:nth-child(3) { animation-delay: 8s; }
  @keyframes cycle {
    0% { opacity: 0; transform: translateY(16px) scale(.98); }
    4%, 30% { opacity: 1; transform: none; }
    34%, 100% { opacity: 0; transform: translateY(-16px) scale(.98); }
  }
  .card-stack:hover > .trend-card { animation-play-state: paused; }

  /* "Growing" pulses softly. */
  .pill.rising { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--rising) 25%, transparent); } }

  /* Sections rise in as they scroll into view, where the browser supports it. */
  @supports (animation-timeline: view()) {
    .reveal > * { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
    .steps li, .products .product, .features .feature, .rule-chips li, .facts .fact {
      animation: rise linear both; animation-timeline: view(); animation-range: entry 5% entry 45%;
    }
  }

  .btn { transition: transform .15s ease, box-shadow .15s ease; }
  .btn:hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--highlight); }
  .rule-chips li, .product { transition: transform .2s ease, background-color .2s ease; }
  .rule-chips li:hover { transform: rotate(-1.5deg); background: var(--highlight); color: var(--on-highlight); }
  .product:hover { transform: translateY(-4px); }
}

/* Cookie banner: Accept and Reject are equally easy. */
.cookie-banner { position: fixed; z-index: 20; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); max-width: 520px; margin-inline: auto;
  background: var(--surface); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius-s); padding: 16px 18px; box-shadow: 0 8px 0 var(--highlight); }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0 0 8px; font-size: 0.9375rem; }
.cookie-title { font: 800 1.1rem/1.2 var(--font-display) !important; font-stretch: 110%; }
.cookie-actions { display: flex; gap: 10px; margin-top: 12px; }
.cookie-actions .btn { flex: 1; justify-content: center; text-align: center; cursor: pointer; font-family: inherit; }
.footer-link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--on-band); font: 600 0.75rem/1.6 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.footer-link:hover { text-decoration: underline; }

.access-form .h-captcha { margin-top: 12px; min-height: 78px; }
.access-form .h-captcha[hidden] { display: none; }
