/* The OneEPC landing page (issue #110). One file, no build step.

   Keep in step with src/styles/tokens.css: every `--ui-*` below is copied
   from there by name, because this page is served outside the bundle and
   cannot import the token sheet -
     --ui-font, --ui-font-mono, the @font-face block (the woff2 files are
     the bundle's own, linked from /app/fonts/),
     --ui-bg, --ui-surface, --ui-hairline, --ui-ink, --ui-ink-muted,
     --ui-action, --ui-action-hover, --ui-action-ink, --ui-focus,
     --ui-brand (= --ui-action), --ui-brand-ink (= --ui-ink),
     --ui-brand-dim (= --ui-ink-muted),
     --ui-text-body / -strong / -mark,
     --ui-weight-regular / -medium / -semibold, --ui-tracking-mono,
     --ui-leading-tight / -text, --ui-space-3 / -5 / -7 / -8, --ui-radius,
     --ui-border, --ui-h-control-lg, --ui-focus-ring.
   The `--landing-*` tokens are this page's own: the lockup is a hero here,
   not a 60px band's head, so its sizes have no counterpart in the app. The
   literals are the wordmark's `line-height: 1` (as `.ui-brand__word` in
   components.css) and the two breakpoints - the shots stacking, and the
   phone - which a custom property cannot express in a media query.
   Logical properties only: the page is dir="rtl" and the two Latin lines
   flip to LTR with `.ui-ltr`, the same class the app uses. */

@font-face {
  font-family: 'Readex Pro';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/app/fonts/readex-pro-arabic-var.woff2') format('woff2');
  unicode-range:
    U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E,
    U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: 'Readex Pro';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/app/fonts/readex-pro-latin-var.woff2') format('woff2');
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/app/fonts/ibm-plex-mono-latin-400.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/app/fonts/ibm-plex-mono-latin-600.woff2') format('woff2');
}

:root {
  --ui-font: 'Readex Pro', 'Segoe UI', 'Noto Sans Arabic', 'Segoe UI Arabic', Tahoma, sans-serif;
  --ui-font-mono: 'IBM Plex Mono', 'Cascadia Mono', Consolas, 'Courier New', monospace;

  --ui-text-body: 12.5px;
  --ui-text-strong: 13.5px;
  --ui-text-mark: 15px;

  --ui-weight-regular: 400;
  --ui-weight-medium: 500;
  --ui-weight-semibold: 600;

  --ui-leading-tight: 1.35;
  --ui-leading-text: 1.7;
  --ui-tracking-mono: -0.02em;

  --ui-bg: #fbfcfd;
  --ui-surface: #ffffff;
  --ui-hairline: #dde2e8;
  --ui-ink: #1b2029;
  --ui-ink-muted: #6b7683;
  --ui-action: #334155;
  --ui-action-hover: #232f3f;
  --ui-action-ink: #ffffff;
  --ui-focus: #1f4f8c;
  --ui-brand: var(--ui-action);
  --ui-brand-ink: var(--ui-ink);
  --ui-brand-dim: var(--ui-ink-muted);

  --ui-space-3: 8px;
  --ui-space-5: 12px;
  --ui-space-7: 16px;
  --ui-space-8: 22px;
  --ui-radius: 2px;
  --ui-border: 1px solid var(--ui-hairline);
  --ui-h-control-lg: 38px;
  --ui-focus-ring: 2px solid var(--ui-focus);

  /* This page's own: the lockup is the hero here, not a 60px band's head. */
  --landing-mark: 40px;
  --landing-text-word: 28px;
  --landing-text-headline: 30px;
  --landing-text-feature: 16px;
  --landing-width: 1240px;
  --landing-width-text: 880px;
  --landing-gap: 32px;
  --landing-focus-offset: 2px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ui-bg);
  color: var(--ui-ink);
  font-family: var(--ui-font);
  font-size: var(--ui-text-body);
  line-height: var(--ui-leading-text);
}

.ui-ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

.landing {
  max-width: var(--landing-width);
  margin-inline: auto;
  padding-block: calc(var(--landing-gap) * 1.5) var(--landing-gap);
  padding-inline: var(--ui-space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--landing-gap);
  text-align: center;
}

/* ---- The lockup: mark + wordmark, `One` dimmed, `EPC` in ink ------------ */

.landing__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ui-space-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--ui-space-3);
  color: var(--ui-brand-ink);
}

.brand__mark {
  width: var(--landing-mark);
  height: var(--landing-mark);
  flex: none;
  color: var(--ui-brand);
}

.brand__mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand__word {
  font-family: var(--ui-font-mono);
  font-size: var(--landing-text-word);
  font-weight: var(--ui-weight-semibold);
  letter-spacing: var(--ui-tracking-mono);
  line-height: 1;
  white-space: nowrap;
}

.brand__word em {
  font-style: normal;
  font-weight: var(--ui-weight-medium);
  color: var(--ui-brand-dim);
}

.strapline {
  margin: 0;
  color: var(--ui-ink-muted);
  font-size: var(--ui-text-strong);
}

/* ---- The Arabic headline ---------------------------------------------- */

.headline {
  margin: 0;
  font-size: var(--landing-text-headline);
  font-weight: var(--ui-weight-semibold);
  line-height: var(--ui-leading-tight);
}

/* ---- The two shots, one per brand, side by side (issue #162) ----------- */

.shots {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--landing-gap);
}

.shot {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--ui-space-5);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: var(--ui-border);
  border-radius: var(--ui-radius);
  background: var(--ui-surface);
}

.shot figcaption {
  color: var(--ui-ink-muted);
  font-size: var(--ui-text-strong);
}

/* ---- The three lines, the brands line ---------------------------------- */

.features {
  max-width: var(--landing-width-text);
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--ui-space-5) var(--landing-gap);
  font-size: var(--landing-text-feature);
  font-weight: var(--ui-weight-medium);
}

.brands {
  margin: 0;
  color: var(--ui-ink-muted);
  font-size: var(--ui-text-strong);
}

/* ---- The two calls: WhatsApp, then the door into the app --------------- */

.cta,
.enter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--ui-space-7);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--ui-h-control-lg);
  padding-inline: var(--ui-space-8);
  border: 0;
  border-radius: var(--ui-radius);
  font-family: inherit;
  font-size: var(--ui-text-strong);
  font-weight: var(--ui-weight-medium);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--ui-action);
  color: var(--ui-action-ink);
}

.btn--primary:hover {
  background: var(--ui-action-hover);
}

.btn--ghost {
  background: var(--ui-surface);
  border: var(--ui-border);
  color: var(--ui-ink);
  font-weight: var(--ui-weight-regular);
}

.btn--ghost:hover {
  background: var(--ui-bg);
}

.btn:focus-visible {
  outline: var(--ui-focus-ring);
  outline-offset: var(--landing-focus-offset);
}

.phone {
  font-family: var(--ui-font-mono);
  font-size: var(--ui-text-mark);
  letter-spacing: var(--ui-tracking-mono);
  color: var(--ui-ink-muted);
}

/* ---- Footer ------------------------------------------------------------ */

.landing__foot {
  padding-block-start: var(--ui-space-8);
  border-block-start: var(--ui-border);
  width: 100%;
  color: var(--ui-ink-muted);
  font-size: var(--ui-text-body);
}

@media (max-width: 900px) {
  .shots {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  :root {
    --landing-text-headline: 24px;
    --landing-text-word: 24px;
    --landing-mark: 34px;
    --landing-gap: 24px;
  }

  .landing {
    padding-inline: var(--ui-space-7);
  }
}
