/* =============================================================================
   ZoomLine — brand.css
   The app's own design tokens, verbatim, plus the wordmark recipe, translated
   from React Native to CSS. Drop this file in and the landing page speaks the
   same visual language as the app.

   Sources, so nothing here is invented:
     src/theme/tokens.ts   colour, radius, spacing, type
     app/index.tsx         the wordmark: fontSize 30, fontWeight '900',
                           letterSpacing 4, color colors.accent, text ZOOMLINE
   ========================================================================== */

:root {
  /* ---- Colour: src/theme/tokens.ts, unchanged ---------------------------- */
  --zl-bg: #0b0f14;
  --zl-surface: #141a22;
  --zl-surface-alt: #1c242e;
  --zl-border: #2a3542;
  --zl-text: #f2f6fa;
  --zl-text-dim: #8a99ab;
  --zl-accent: #c6ff3d; /* volt tennis-ball green */
  --zl-accent-ink: #0b0f14; /* text on accent */
  --zl-danger: #ff5a5f;
  --zl-warn: #ffb020;
  --zl-ok: #3ddc97;

  /* ---- Radius and spacing: src/theme/tokens.ts --------------------------- */
  --zl-radius-sm: 8px;
  --zl-radius-md: 12px;
  --zl-radius-lg: 18px;
  --zl-radius-pill: 999px;
  --zl-space-xs: 4px;
  --zl-space-sm: 8px;
  --zl-space-md: 12px;
  --zl-space-lg: 16px;
  --zl-space-xl: 24px;
  --zl-space-xxl: 32px;

  /* ---- Type ------------------------------------------------------------- */
  /* The app bundles no font, so the system sans IS the brand font. Keep this
     stack first and never substitute a webfont for it. */
  --zl-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  /* 4 / 30, the app's letterSpacing over its fontSize. This one number is the
     whole wordmark. */
  --zl-tracking-brand: 0.1333em;
  /* 26 / 18 (tagline) and 17 / 12 (home privacy line). */
  --zl-leading: 1.45;
  /* 0.6 / 12, the app's `label` token. */
  --zl-tracking-label: 0.05em;
}

/* ---- Base ---------------------------------------------------------------- */

html {
  background: var(--zl-bg);
  color-scheme: dark; /* native scrollbars and form controls go dark */
}

body {
  margin: 0;
  background: var(--zl-bg);
  color: var(--zl-text);
  font-family: var(--zl-font);
  font-size: 1.0625rem; /* 17px */
  font-weight: 500;
  line-height: var(--zl-leading);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- The wordmark -------------------------------------------------------- */

/*
  In the app (app/index.tsx):

    <Text style={{ color: colors.accent, fontSize: 30, fontWeight: '900',
                   letterSpacing: 4 }}>ZOOMLINE</Text>

  Four rules follow from that, and all four matter:
    1. Always upper-case. The app writes ZOOMLINE literally; text-transform
       keeps the HTML readable.
    2. Weight 900, never 700. It is SF Pro Display Black on iPhone.
    3. Tracking of 0.1333em at every size: it is a ratio, not a pixel value.
    4. Accent green on the dark background, nothing else.
*/
.zl-wordmark {
  display: inline-block;
  font-family: var(--zl-font);
  font-weight: 900;
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 1.875rem); /* 24px → 30px, the app's 30 */
  line-height: 1.05;
  letter-spacing: var(--zl-tracking-brand);
  color: var(--zl-accent);
  text-transform: uppercase;
  white-space: nowrap;
}

/* React Native adds the tracking after the final glyph too, which throws a
   centred or flex-row wordmark a little off-centre. Cancel it optically. */
.zl-wordmark--flush {
  margin-inline-end: calc(-1 * var(--zl-tracking-brand));
}

/* The large lockup: mark above the wordmark, as on Home. */
.zl-lockup {
  display: flex;
  flex-direction: column;
  align-items: center; /* use flex-start for a left-aligned header */
  gap: var(--zl-space-md);
}

.zl-lockup__mark {
  width: 104px; /* the app's Home logo size */
  height: 104px;
  display: block;
}

/* ---- Type scale ---------------------------------------------------------- */

/*
  The app's scale is title 22/700, body 15/500, label 12/600. A web page needs
  larger headings, so the sizes grow and the weights and tracking carry over.
  Introducing a weight the app does not use (600 on a heading, 300 anywhere)
  is what makes a landing page look like a different product.
*/
.zl-h1 {
  margin: 0;
  font-size: clamp(2rem, 1.35rem + 3.2vw, 3.5rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.01em; /* tight, like the wordmark, at display sizes */
  color: var(--zl-text);
  text-wrap: balance;
}

.zl-h2 {
  margin: 0;
  font-size: clamp(1.375rem, 1.1rem + 1.4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--zl-text);
  text-wrap: balance;
}

.zl-h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--zl-text);
}

.zl-body {
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: var(--zl-leading);
  color: var(--zl-text);
  max-width: 68ch; /* the reading measure the app's short lines imply */
}

.zl-small {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--zl-text-dim);
}

/* The app's `label` token: 12px, 600, 0.05em tracking, upper case. */
.zl-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--zl-tracking-label);
  text-transform: uppercase;
  color: var(--zl-text-dim);
}

/* Numbers in the app are tabular, so times and frame counters do not jitter. */
.zl-mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

/* ---- Controls ------------------------------------------------------------ */

.zl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px; /* the tap target */
  padding: 0 22px;
  border: 0;
  border-radius: var(--zl-radius-pill);
  font-family: var(--zl-font);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 120ms ease;
}

.zl-btn--primary {
  background: var(--zl-accent);
  color: var(--zl-accent-ink);
}

.zl-btn--ghost {
  background: transparent;
  color: var(--zl-text);
  box-shadow: inset 0 0 0 1px var(--zl-border);
}

/* "Coming to the App Store" lives here until the app has a store URL. */
.zl-btn:disabled,
.zl-btn[aria-disabled="true"] {
  background: var(--zl-surface-alt);
  color: var(--zl-text-dim);
  cursor: default;
}

.zl-card {
  background: var(--zl-surface);
  border: 1px solid var(--zl-border);
  border-radius: var(--zl-radius-lg);
  padding: var(--zl-space-xl);
}

/* ---- Text-level rules ---------------------------------------------------- */

a {
  color: var(--zl-accent);
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

:focus-visible {
  outline: 2px solid var(--zl-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/*
  Contrast, measured against --zl-bg (#0B0F14):
    --zl-text        #F2F6FA   17.0 : 1   body copy
    --zl-accent      #C6FF3D   16.3 : 1   wordmark, links, primary button
    --zl-text-dim    #8A99AB    6.6 : 1   labels and captions only, never body
    --zl-accent-ink on --zl-accent  16.3 : 1   the primary button's label
  Everything here clears WCAG 2.2 AA. --zl-text-dim is the one to keep small.
*/

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