/*
 * The marketing site's one stylesheet.
 *
 * The tokens are the application's, copied from src/client/styles/base.css, and
 * the page shell is the dashboard's — the site and the product should look like
 * one thing, and a visitor who signs up should not feel the join.
 *
 * Everything here uses logical properties, the rule help.css already follows, so
 * Arabic mirrors the whole page without a single [dir='rtl'] override. If you
 * add a physical margin, padding or offset, you have broken one of the eight
 * languages and site.css.test.ts will say so.
 */

:root {
  color-scheme: dark;

  --bg: #0b0d12;
  --bg-raised: #141821;
  --bg-sunken: #0f131a;
  --border: #232a37;
  --border-strong: #333d4f;

  --text: #eef1f6;
  --text-dim: #98a2b6;
  --text-faint: #6b7688;

  --accent: #25f4ee;
  --accent-mid: #6c63ff;
  --accent-warm: #fe2c55;
  --good: #3ddc84;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;

  --wrap: 1120px;
  --font:
    'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  /* The legal stubs and the 404 are short. Without this the footer stops
     wherever the text ran out and the rest of the window is empty page. */
  min-block-size: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(37, 244, 238, 0.08), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(254, 44, 85, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
}

code {
  font-family: 'Cascadia Mono', 'SF Mono', Consolas, monospace;
  font-size: 0.9em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

/* --------------------------------------------------------------- buttons -- */

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 650;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  color: #06070a;
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding-block: 9px;
  padding-inline: 16px;
}

.btn:hover {
  filter: brightness(1.1);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  filter: none;
}

.btn.large {
  font-size: 1.05rem;
  padding-block: 13px;
  padding-inline: 26px;
}

.btn.small {
  font-size: 0.85rem;
  padding-block: 5px;
  padding-inline: 12px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* -------------------------------------------------------------- language -- */

.langbar {
  background: var(--bg-raised);
  border-block-end: 1px solid var(--border);
}

.langbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-block: 10px;
  font-size: 0.9rem;
}

.langbar-inner p {
  flex: 1 1 auto;
  min-inline-size: 0;
}

.locales {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.locale {
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding-block: 3px;
  padding-inline: 8px;
}

.locale:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.locale[aria-current='page'] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

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

.site-top {
  position: sticky;
  inset-block-start: 0;
  z-index: 5;
  background: rgba(11, 13, 18, 0.75);
  backdrop-filter: blur(8px);
  border-block-end: 1px solid var(--border);
}

.top-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

/* The mark is inline SVG in currentColor, so it takes the colour of the text it
   sits beside rather than painting the gradient panel over a dark bar. */
.mark {
  inline-size: 30px;
  block-size: 30px;
  flex: 0 0 auto;
  color: var(--accent);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand-tagline {
  font-size: 0.78rem;
  color: var(--text-faint);
}

.site-nav {
  display: flex;
  gap: 18px;
  margin-inline-start: auto;
  font-size: 0.92rem;
}

.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
  flex-wrap: wrap;
}

/* On a wide screen the bar is one row and the two `auto` margins space brand,
   navigation and actions across it. On a narrow one it wraps, and keeping the
   margin means the actions stay on the far side rather than sliding under the
   brand — the same edge the navigation was on. */

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

.hero-inner {
  display: grid;
  gap: 40px;
  padding-block: 64px 48px;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    padding-block: 88px 64px;
  }
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: start;
}

.eyebrow {
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(100deg, var(--accent), var(--accent-mid) 52%, var(--accent-warm));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
}

.lede {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-inline-size: 60ch;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.note {
  font-size: 0.88rem;
  color: var(--text-faint);
  max-inline-size: 56ch;
}

.hero-shot {
  margin: 0;
  display: flex;
  justify-content: center;
}

/*
 * The broadcast screenshots are 1080×1920 with a transparent background — that
 * is the product's whole trick, and it means the picture has nothing behind it.
 * This is the same stand-in for a camera that help.css paints behind them, so
 * the transparency reads as transparency rather than as a broken image.
 */
.phone {
  inline-size: min(300px, 78vw);
  aspect-ratio: 9 / 16;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(37, 244, 238, 0.16), transparent 60%),
    radial-gradient(120% 60% at 50% 100%, rgba(254, 44, 85, 0.16), transparent 60%),
    linear-gradient(160deg, #232a37, #12151d 60%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.phone img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
}

/* ------------------------------------------------------------------ band -- */

.band {
  border-block: 1px solid var(--border);
  background: linear-gradient(100deg, rgba(37, 244, 238, 0.07), rgba(254, 44, 85, 0.07));
}

.band-inner {
  padding-block: 26px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.band h2 {
  font-size: 1.15rem;
}

.band p {
  color: var(--text-dim);
  max-inline-size: 80ch;
}

/* ---------------------------------------------------------------- shared -- */

section {
  padding-block: 56px;
}

.band,
.need {
  padding-block: 0;
}

.need {
  padding-block: 40px;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-block-end: 28px;
}

.section-more {
  margin-block-start: 24px;
  font-size: 0.95rem;
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.need-card {
  max-inline-size: 720px;
}

.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-dim);
}

.ticks li {
  position: relative;
  padding-inline-start: 24px;
}

.ticks li::before {
  content: '✓';
  position: absolute;
  inset-inline-start: 0;
  color: var(--good);
  font-weight: 700;
}

/* ----------------------------------------------------------------- steps -- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.step {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

@media (min-width: 760px) {
  .step:has(.step-shot) {
    flex-direction: row;
    align-items: flex-start;
    gap: 26px;
  }

  .step:has(.step-shot) .step-text {
    flex: 1 1 auto;
  }

  .step:has(.step-shot) .step-shot {
    flex: 0 0 42%;
  }
}

.step-text {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    'number heading'
    '.      body';
  gap: 6px 14px;
  align-items: baseline;
}

.step-number {
  grid-area: number;
  inline-size: 30px;
  block-size: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  translate: 0 -3px;
}

.step-text h3 {
  grid-area: heading;
  font-size: 1.15rem;
}

.step-text p {
  grid-area: body;
  color: var(--text-dim);
  max-inline-size: 66ch;
}

.step-shot {
  margin: 0;
}

.step-shot img {
  display: block;
  inline-size: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
}

@media (max-width: 560px) {
  .step-text {
    grid-template-columns: 1fr;
    grid-template-areas: 'number' 'heading' 'body';
    gap: 8px;
  }
}

/* -------------------------------------------------------------- features -- */

/* `min(…, 100%)` rather than a bare minimum: minmax(300px, 1fr) is a hard
   floor, so on a 360px phone the track plus the wrap's padding is wider than the
   screen and the whole page scrolls sideways — every section with it, because
   body is a flex column and one wide child stretches the rest. */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 20px;
  align-items: start;
}

.feature h3 {
  font-size: 1.1rem;
}

.feature p {
  color: var(--text-dim);
}

.feature.wide {
  grid-column: 1 / -1;
}

.feature.wide p {
  font-size: 1.05rem;
  max-inline-size: 84ch;
}

.tight {
  margin: 0;
  padding-inline-start: 1.2em;
  color: var(--text-dim);
  font-size: 0.92rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quote {
  border-inline-start: 2px solid var(--accent);
  background: rgba(37, 244, 238, 0.06);
  border-start-end-radius: var(--radius-sm);
  border-end-end-radius: var(--radius-sm);
  padding-block: 8px;
  padding-inline: 12px;
  font-size: 0.9rem;
  color: var(--text);
}

.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-sunken);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding-block: 3px;
  padding-inline: 10px;
}

/* The preset chips carry the accent each preset actually paints with, taken
   from PRESETS in src/shared/overlayTheme.ts. A swatch says more than a name. */
.preset-neon {
  border-color: #25f4ee;
  color: #25f4ee;
}
.preset-midnight {
  border-color: #7c9cff;
  color: #7c9cff;
}
.preset-sunset {
  border-color: #ff9f45;
  color: #ff9f45;
}
.preset-forest {
  border-color: #7bd88f;
  color: #7bd88f;
}
.preset-mono {
  border-color: #ffffff;
  color: #ffffff;
}
.preset-daylight {
  border-color: #0f7fd4;
  color: #57b0e8;
}

.examples {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}

.examples li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
}

.examples code {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding-block: 2px;
  padding-inline: 8px;
  color: var(--text);
}

.examples code:last-child {
  color: var(--good);
}

/* ----------------------------------------------------------------- shots -- */

.shot {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shot img {
  display: block;
  inline-size: 100%;
  max-inline-size: 900px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-sunken);
}

.shot figcaption {
  color: var(--text-dim);
  font-size: 0.92rem;
  max-inline-size: 76ch;
}

/* ------------------------------------------------------------------- faq -- */

.qa-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 20px;
}

.qa {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.qa dt {
  font-weight: 650;
  margin-block-end: 6px;
}

.qa dd {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* --------------------------------------------------------------- closing -- */

.closing {
  border-block-start: 1px solid var(--border);
}

.closing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.closing h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}

.closing p {
  color: var(--text-dim);
  max-inline-size: 60ch;
}

/* ----------------------------------------------------------------- prose -- */

.prose h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-block-end: 20px;
}

.prose .card {
  max-inline-size: 760px;
}

.prose .lede {
  margin-block-end: 8px;
}

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

.site-foot {
  border-block-start: 1px solid var(--border);
  background: var(--bg-sunken);
  padding-block: 40px 20px;
}

.foot-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 28px;
}

.foot-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  grid-column: 1 / -1;
}

@media (min-width: 900px) {
  .foot-brand {
    grid-column: auto;
    max-inline-size: 40ch;
  }
}

.disclaimer {
  color: var(--text-faint);
  font-size: 0.85rem;
}

.foot-links h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-block-end: 10px;
}

.foot-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.92rem;
}

.foot-links a {
  color: var(--text-dim);
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--accent);
}

.foot-legal {
  margin-block-start: 28px;
  padding-block-start: 16px;
  border-block-start: 1px solid var(--border);
  color: var(--text-faint);
}

[hidden] {
  display: none !important;
}
