/* NumberBook website, "Signal" design (docs/superpowers/specs/2026-11-18-signal-design.md).
   Colours follow flutter-app/lib/ui/theme.dart and ui/widgets/signal.dart.
   System fonts only: the site makes no external requests. */

:root {
  color-scheme: light dark;
  --page: #F4F7F6;
  --card: #FFFFFF;
  --tint: #E9F0ED;          /* soft disc behind the guides */
  --ink: #0F1E18;
  --text2: #4E5D58;
  --hair: #DCE4E1;
  --green: #117A46;
  --deep: #0B5A33;
  --mint: #7FD9A8;
  --icon-green: #168A4E;
  --orange: #FF8A3D;        /* buttons, live dot */
  --orange-ink: #2B1300;    /* text on orange */
  --orange-text: #B84A00;   /* orange as text on a light page (4.8:1; #FF8A3D is 2.2:1) */
  --ring: #117A46;
  --badge-bg: #0F1E18;
  --badge-fg: #FFFFFF;
  --focus: #0B5A33;
  --shadow: 0 8px 22px -14px rgba(11, 90, 51, .45), 0 2px 6px -2px rgba(11, 90, 51, .08);

  /* pulse-icon tones: fg on bg (each pair >= 4.5:1) */
  --t-green-fg: #117A46;  --t-green-bg: #E4F4EA;
  --t-red-fg: #C0352E;    --t-red-bg: #FBEAE8;
  --t-gold-fg: #85600A;   --t-gold-bg: #F8EED6;
  --t-blue-fg: #1F5B97;   --t-blue-bg: #DDE9F6;
  --t-orange-fg: #A64300; --t-orange-bg: #FFE9DA;
  --t-grey-fg: #4E5D58;   --t-grey-bg: #E8EEEC;

  --radius-card: 20px;
  --radius-control: 14px;
  --gutter: 16px;
  --max: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

/* Arabic: system faces with good Arabic glyphs first. */
:root:lang(ar) {
  --font: system-ui, -apple-system, "Segoe UI", "Noto Sans Arabic", "Noto Naskh Arabic", "Geeza Pro", Tahoma, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #08130E;
    --card: #12201A;
    --tint: #D5E2DB;
    --ink: #FFFFFF;
    --text2: #A6B6B0;
    --hair: #1F2F28;
    --green: #5DD394;
    --ring: #7FD9A8;
    --orange-text: #FF8A3D;
    --badge-bg: #FFFFFF;
    --badge-fg: #0F1E18;
    --focus: #7FD9A8;
    --shadow: none;

    --t-green-fg: #7FD9A8;  --t-green-bg: #143A24;
    --t-red-fg: #F07A70;    --t-red-bg: #3A1A18;
    --t-gold-fg: #F2C75B;   --t-gold-bg: #35290F;
    --t-blue-fg: #8DBDF0;   --t-blue-bg: #14263A;
    --t-orange-fg: #FF8A3D; --t-orange-bg: #3A2212;
    --t-grey-fg: #B9C7C2;   --t-grey-bg: #1A2A23;
  }
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  position: relative;
  overflow-x: hidden; /* the page rings run off the edge */
  overflow-x: clip;
}
.site-head, main, .site-foot { position: relative; } /* above the page rings */

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul { margin: 0; }

a { color: var(--green); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 8px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 10;
  background: var(--card); color: var(--ink); padding: 10px 14px; border-radius: 10px;
  box-shadow: var(--shadow); font-weight: 600;
}
.skip:focus { top: 12px; }

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

@media (min-width: 768px) { :root { --gutter: 24px; } }

/* The orange last words of a headline. */
.hl { color: var(--orange-text); font-style: normal; }

/* ---------- language hint (EN page only, shown by site.js) ---------- */
.lang-hint {
  background: var(--card);
  border-bottom: 1px solid var(--hair);
  font-size: .9375rem;
}
.lang-hint .wrap { display: flex; align-items: center; gap: 12px; padding-block: 8px; }
.lang-hint p { flex: 1; }
.lang-hint button {
  font: inherit; background: none; border: 0; color: var(--text2); cursor: pointer;
  min-width: 44px; min-height: 44px; border-radius: 10px;
}

/* ---------- header ---------- */
.site-head .wrap {
  display: flex; align-items: center; gap: 12px;
  padding-block: 14px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.1875rem;
  margin-inline-end: auto;
}
.brand svg { width: 36px; height: 36px; flex: none; }
.brand-word { direction: ltr; unicode-bidi: isolate; }

.langs {
  display: flex; gap: 2px; padding: 3px;
  background: var(--card); border-radius: 100px; box-shadow: var(--shadow);
}
.langs a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; min-height: 36px; padding-inline: 10px;
  border-radius: 100px; text-decoration: none; color: var(--text2);
  font-size: .875rem; font-weight: 600;
}
.langs a[aria-current="page"] { background: var(--ink); color: var(--page); }
.langs a:hover:not([aria-current]) { color: var(--ink); }

/* ---------- buttons and store badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: var(--radius-control);
  font-weight: 700; font-size: .9375rem; text-decoration: none; white-space: nowrap;
}
.btn-orange { background: var(--orange); color: var(--orange-ink); }
.btn-orange:hover { background: #FF9A57; }
.site-head .btn { display: none; }
@media (min-width: 560px) { .site-head .btn { display: inline-flex; } }

.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 12px;
  min-width: 176px; min-height: 56px; padding: 8px 18px 8px 14px;
  background: var(--badge-bg); color: var(--badge-fg);
  border-radius: var(--radius-control); text-decoration: none;
  box-shadow: var(--shadow);
}
[dir="rtl"] .badge { padding: 8px 14px 8px 18px; }
.badge:hover { transform: translateY(-1px); }
.badge svg { width: 26px; height: 26px; flex: none; }
.badge span { display: flex; flex-direction: column; line-height: 1.15; }
.badge small { font-size: .75rem; opacity: .85; }
.badge b { font-size: 1.1875rem; font-weight: 700; direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .badge b { text-align: right; }
@media (max-width: 419px) {
  .badges { gap: 8px; }
  .badge { min-width: 0; flex: 1 1 140px; gap: 8px; padding: 8px 10px; }
  [dir="rtl"] .badge { padding: 8px 10px; }
  .badge svg { width: 22px; height: 22px; }
  .badge b { font-size: 1.0625rem; }
  .badge small { font-size: .6875rem; }
}
/* site.js marks the visitor's platform; that store comes first. */
.is-android .badge-play, .is-ios .badge-apple { order: -1; }

/* ---------- pulse icon: icon in a tinted circle with a faint outer ring ---------- */
.pulse {
  --fg: var(--t-green-fg); --bg: var(--t-green-bg);
  display: block;
  width: 50px; height: 50px; flex: none; padding: 4px; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--fg) 30%, transparent);
}
.pulse > span {
  display: grid; place-items: center; width: 100%; height: 100%;
  border-radius: 50%; background: var(--bg); color: var(--fg);
}
.pulse svg { width: 20px; height: 20px; }
.tone-green  { --fg: var(--t-green-fg);  --bg: var(--t-green-bg); }
.tone-red    { --fg: var(--t-red-fg);    --bg: var(--t-red-bg); }
.tone-gold   { --fg: var(--t-gold-fg);   --bg: var(--t-gold-bg); }
.tone-blue   { --fg: var(--t-blue-fg);   --bg: var(--t-blue-bg); }
.tone-orange { --fg: var(--t-orange-fg); --bg: var(--t-orange-bg); }
.tone-grey   { --fg: var(--t-grey-fg);   --bg: var(--t-grey-bg); }

/* ---------- floating card ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

/* ---------- the rings (painted, as on the NumberBook mark) ----------
   Top-end of the page: top-right, top-left in Arabic. */
.rings {
  position: absolute; pointer-events: none; color: var(--ring);
  width: 440px; height: 440px;
  top: -200px; inset-inline-end: -200px;
}
@media (min-width: 900px) {
  .rings { width: 640px; height: 640px; top: -300px; inset-inline-end: -260px; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding-block: 24px 56px; }
.hero-grid { position: relative; display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding-block: 48px 32px; }
  .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 48px; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 100px; background: var(--card); box-shadow: var(--shadow);
  font-size: .8125rem; font-weight: 600; color: var(--text2);
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 22%, transparent);
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(2.25rem, 8.5vw, 3.75rem);
  line-height: 1.08; font-weight: 800; letter-spacing: -.02em;
}
:lang(ar) .hero h1 { letter-spacing: 0; line-height: 1.25; }
.hero h1 .hl { display: block; }
.lede { margin-top: 16px; font-size: 1.125rem; color: var(--text2); max-width: 34em; }
.hero .badges { margin-top: 28px; }
.hero-note { margin-top: 12px; font-size: .875rem; color: var(--text2); }

/* the illustration: guides on a soft disc, two floating call cards */
.hero-art { position: relative; min-height: 380px; max-width: 460px; width: 100%; margin-inline: auto; }
.disc {
  position: absolute; left: 50%; top: 50%; width: 280px; height: 280px;
  transform: translate(-50%, -50%); border-radius: 50%; background: var(--tint);
}
.disc::after {
  content: ""; position: absolute; inset: -18px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--ring) 14%, transparent);
}
.guides {
  position: absolute; left: 50%; top: 50%;
  width: 222px; height: auto; transform: translate(-50%, -38%);
}
.call {
  position: absolute; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px 12px 12px; width: min(260px, 80%);
}
[dir="rtl"] .call { padding: 12px 12px 12px 16px; }
.call .pulse { width: 46px; height: 46px; }
.call-spam { top: 0; inset-inline-start: 0; }
.call-ok { bottom: 4px; inset-inline-end: 0; }
.call-meta { min-width: 0; }
.call-kicker { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--text2); font-weight: 600; }
.call-kicker .live-dot { width: 6px; height: 6px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 22%, transparent); }
.call-name { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.call-num { font-size: .8125rem; color: var(--text2); }
[dir="rtl"] .call-num { text-align: right; }
.pill {
  display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 8px;
  font-size: .75rem; font-weight: 700; background: var(--bg); color: var(--fg);
}

/* ---------- sections ---------- */
.section { padding-block: 56px; }
@media (min-width: 900px) { .section { padding-block: 80px; } }
.section-head { max-width: 40em; margin-bottom: 28px; }
.section-head h2, .download h2 {
  font-size: clamp(1.75rem, 5.5vw, 2.5rem); line-height: 1.15; font-weight: 800; letter-spacing: -.015em;
}
:lang(ar) .section-head h2, :lang(ar) .download h2 { letter-spacing: 0; line-height: 1.35; }
.section-head p { margin-top: 10px; color: var(--text2); font-size: 1.0625rem; }

/* features */
.features { display: grid; gap: 16px; list-style: none; padding: 0; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) {
  .features { grid-template-columns: repeat(3, 1fr); }
  .features .wide { grid-column: span 2; }
}
.feature { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.feature { position: relative; overflow: hidden; }
.feature > :not(.feature-rings) { position: relative; }
.feature-rings { display: none; }
@media (min-width: 960px) {
  .wide { padding-inline-end: 260px; justify-content: center; }
  .wide h3 { font-size: 1.375rem; }
  .wide p { font-size: 1.0625rem; }
  .feature-rings {
    display: block; position: absolute; top: 50%; inset-inline-end: 24px;
    width: 220px; height: 220px; transform: translateY(-50%); color: var(--ring);
  }
}
.feature h3 { font-size: 1.125rem; line-height: 1.3; }
.feature p { color: var(--text2); }
.feature .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tag {
  padding: 3px 10px; border-radius: 100px; font-size: .75rem; font-weight: 700;
  background: var(--t-gold-bg); color: var(--t-gold-fg);
}

/* plans */
.plans { display: grid; gap: 16px; list-style: none; padding: 0; }
@media (min-width: 600px) { .plans { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .plans { grid-template-columns: repeat(4, 1fr); } }
.plan { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.plan h3 { font-size: 1.25rem; }
.plan p { color: var(--text2); }
.plan-bar { height: 4px; border-radius: 4px; width: 44px; background: var(--fg); }
.plans-note { margin-top: 18px; font-size: .875rem; color: var(--text2); max-width: 46em; }

/* privacy */
.privacy-card { padding: 24px; display: grid; gap: 24px; }
@media (min-width: 900px) { .privacy-card { grid-template-columns: .9fr 1.1fr; padding: 40px; gap: 40px; align-items: start; } }
.privacy-card .section-head { margin: 0; }
.privacy-card .pulse { margin-bottom: 16px; }
.checks { list-style: none; padding: 0; display: grid; gap: 0; }
.checks li { display: flex; gap: 12px; padding-block: 14px; align-items: flex-start; }
.checks li + li { border-top: 1px solid var(--hair); }
.checks svg { width: 22px; height: 22px; flex: none; color: var(--green); margin-top: 1px; }
.more { display: inline-block; margin-top: 16px; font-weight: 700; }

/* download */
.download { position: relative; overflow: hidden; padding: 40px 24px; text-align: center; }
.download .rings { top: -220px; inset-inline-end: -220px; }
.download > *:not(.rings) { position: relative; }
.download p { margin: 12px auto 0; color: var(--text2); max-width: 32em; }
.download .badges { justify-content: center; margin-top: 28px; }
@media (min-width: 900px) { .download { padding: 72px 40px; } }

/* footer */
.site-foot { padding-block: 40px 48px; font-size: .9375rem; color: var(--text2); }
.foot-grid { display: grid; gap: 20px; }
@media (min-width: 768px) { .foot-grid { grid-template-columns: 1fr auto; align-items: center; } }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; padding: 0; }
.foot-links a { color: var(--ink); display: inline-block; padding-block: 8px; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.foot-brand svg { width: 28px; height: 28px; }
.foot-copy { margin-top: 20px; font-size: .8125rem; }

/* ---------- legal pages and download page ---------- */
.doc { padding-block: 24px 64px; }
.doc-body { position: relative; max-width: 46em; padding: 24px; }
@media (min-width: 768px) { .doc-body { padding: 40px; } }
.doc h1 { font-size: clamp(2rem, 7vw, 2.75rem); line-height: 1.12; font-weight: 800; letter-spacing: -.015em; margin-bottom: 8px; }
.doc .updated { color: var(--text2); font-size: .875rem; margin-bottom: 24px; }
.doc h2 { font-size: 1.25rem; margin-top: 28px; margin-bottom: 8px; }
.doc p, .doc li { color: var(--ink); }
.doc ul { padding-inline-start: 22px; }
.doc li + li { margin-top: 8px; }
.doc .intro { color: var(--text2); }

.go { max-width: 34em; padding: 32px 24px; text-align: center; margin-inline: auto; position: relative; }
.go h1 { font-size: clamp(1.75rem, 6vw, 2.25rem); margin-bottom: 8px; }
.go .badges { justify-content: center; margin-top: 24px; }
.go .muted { color: var(--text2); }
.go .opening { display: none; }
.is-android .go .opening, .is-ios .go .opening { display: block; }

@media (prefers-reduced-motion: no-preference) {
  .badge, .btn { transition: transform .15s ease, background-color .15s ease; }
}
