/*
 * The part of the marketing site's stylesheet that is not a design decision: the tokens, the two
 * fonts and a reset. Ported from packages/ui/src/tokens.css so the site and the product cannot
 * drift onto different colours (docs/18 §3-5).
 *
 * Only these variables may be used for colour. Dark is the default; [data-theme="light"] swaps,
 * and a visitor who has expressed no preference gets dark, which is what the product does.
 */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/geist-mono-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root,
[data-theme='dark'] {
  color-scheme: dark;

  --bg: #000000;
  --bg-raised: #0b0b0c;
  --surface: #121213;
  --surface-hover: #1a1a1c;
  --border: #232325;
  --border-strong: #2f2f32;
  --text: #f2f1ef;
  --text-muted: #a3a19c;
  /* Captions only, at 11 to 13px monospace: it does not reach 4.5:1 at body size. */
  --text-faint: #6b6965;

  --flare: #ff6a3d;
  --flare-hover: #ff8a5b;
  --flare-pressed: #e4532a;
  --flare-link: #ffb08a;
  --flare-subtle: #2a120a;
  --flare-on-subtle: #ffb08a;

  --success: #3dd68c;
  --warning: #f5b940;
  --danger: #f0564d;
  --info: #5ca8ff;
  --success-subtle: rgba(61, 214, 140, 0.12);
  --warning-subtle: rgba(245, 185, 64, 0.12);
  --danger-subtle: rgba(240, 86, 77, 0.12);
  --info-subtle: rgba(92, 168, 255, 0.12);

  --shadow: none;
  --on-flare: #17171a;
  /* The object illustrations carry a baked black backdrop; screen drops it on dark. */
  --object-blend: screen;
}

[data-theme='light'] {
  color-scheme: light;

  --bg: #fafaf8;
  --bg-raised: #ffffff;
  --surface: #ffffff;
  --surface-hover: #f3f2ef;
  --border: #e6e4df;
  --border-strong: #cfccc5;
  --text: #17171a;
  --text-muted: #5f5e5a;
  --text-faint: #9a9893;

  --flare: #ff6a3d;
  --flare-hover: #e4532a;
  --flare-pressed: #b83f1e;
  --flare-link: #b83f1e;
  --flare-subtle: #ffe9df;
  --flare-on-subtle: #b83f1e;

  --success: #1e9e5e;
  --warning: #b7791f;
  --danger: #c8322b;
  --info: #2f6fd6;
  --success-subtle: rgba(30, 158, 94, 0.1);
  --warning-subtle: rgba(183, 121, 31, 0.12);
  --danger-subtle: rgba(200, 50, 43, 0.1);
  --info-subtle: rgba(47, 111, 214, 0.1);

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.06);
  --on-flare: #ffffff;
  --object-blend: multiply;
}

:root {
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;

  --dur-hover: 120ms;
  --dur-open: 180ms;
  --dur-panel: 240ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font-sans: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono Variable', ui-monospace, Menlo, Consolas, monospace;

  /*
   * Ink for a filled flare button, in both themes. The product's --on-flare turns white in light,
   * which on #FF6A3D is 2.6:1 and fails; the orange does not change between themes, so the ink
   * that reads on it does not either.
   */
  --on-flare-ink: #17171a;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* Anchor links land below the fixed header rather than under it. */
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Large type wants tighter tracking; small type wants none of it. */
h1,
h2 {
  letter-spacing: -0.02em;
  text-wrap: balance;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--flare);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

code,
kbd,
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Available to everything: the illustrations are rendered against the theme, not composited. */
.object {
  mix-blend-mode: var(--object-blend);
}

/*
 * Somebody who has asked their system for less movement gets the end state, immediately, rather
 * than a faster version of the same journey. Scroll-driven reveals must land on their final frame
 * here and in the @supports fallback below.
 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
