/* TOV FUTURE LTD: one stylesheet for the Hebrew (rtl) and English (ltr)
   pages. Logical properties only (inline-start/end), so the same rules lay
   out both directions. The logo's white O vanishes on a light page, so the
   logo always sits on black: the header, the home hero and the footer.

   Contrast (WCAG 2.0 AA asks 4.5:1 for text, 3:1 for focus rings):
   ink on bg 17.9:1, ink-soft on bg 8.2:1, link on bg 10.7:1, on-dark-soft on
   black 14.4:1, gold ring on black 10.5:1; dark mode ink 16.3:1, ink-soft
   10.1:1, link 10.1:1. website/tools/check_site.py re-checks every pair. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-soft: #f4f5f7;
  --ink: #15171c;
  --ink-soft: #4a4f59;
  --line: #d5d8de;
  --link: #003598;
  --ring: #003598;
  --black: #000000;
  --on-dark: #ffffff;
  --on-dark-soft: #d3d6dd;
  --gold: #ddb244;
  --measure: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1116;
    --bg-soft: #171a21;
    --ink: #eceef2;
    --ink-soft: #b9bec8;
    --line: #2d313a;
    --link: #a3bcff;
    --ring: #a3bcff;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Hebrew", "Noto Sans", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  /* A word longer than the line breaks rather than pushing the page
     sideways: at 200% text on a phone "Accessibility" is wider than the
     screen. */
  overflow-wrap: break-word;
}

h1,
h2 {
  hyphens: auto;
}

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

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

/* Skip link: off screen until it takes the keyboard focus. */
.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -10rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--on-dark);
  color: var(--black);
  font-weight: 700;
  border: 3px solid var(--gold);
}

.skip-link:focus {
  top: 1rem;
}

/* The black bands: header, home hero, footer. */
.site-header,
.hero,
.site-footer {
  --link: var(--on-dark);
  --ring: var(--gold);
  background: var(--black);
  color: var(--on-dark);
}

.site-header .bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
}

.site-header .bar.no-brand {
  justify-content: flex-end;
}

.brand {
  display: inline-block;
  line-height: 0;
  padding: 0.25rem 0;
}

.site-nav a {
  display: inline-block;
  padding: 0.6rem 0.1rem;
  border-bottom: 3px solid transparent;
  color: var(--on-dark);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  border-bottom-color: var(--gold);
}

.hero {
  padding: 2.5rem 1rem 3rem;
  border-bottom: 3px solid var(--gold);
  text-align: center;
}

.hero-logo {
  display: block;
  width: 360px;
  margin: 0 auto;
}

.hero h1 {
  margin: 1.75rem 0 0;
  font-size: clamp(1.9rem, 6vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.hero .hero-name {
  margin: 0.35rem 0 0;
  color: var(--on-dark-soft);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}

.hero .lead {
  max-width: 34rem;
  margin: 1.25rem auto 0;
  color: var(--on-dark);
  font-size: 1.25rem;
}

.hero h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.15rem;
}

/* The download boxes. Until a store's page opens, its box is plain text and
   not a link to nowhere; then the same class goes on a link (see the README). */
.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* A box may shrink below its width: at 200% text on a phone it would
   otherwise be wider than the screen. */
.stores li {
  flex: 0 1 12rem;
  min-width: 0;
}

.store {
  display: block;
  padding: 0.6rem 1rem;
  border: 2px solid var(--on-dark-soft);
  border-radius: 0.5rem;
  color: var(--on-dark);
  text-decoration: none;
}

a.store:hover {
  border-color: var(--gold);
}

.store-name {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
}

.store-state {
  display: block;
  color: var(--on-dark-soft);
  font-size: 0.95rem;
}

.content {
  display: block;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1rem 3.5rem;
}

.content h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: 1.25;
}

.content h2 {
  margin: 2.25rem 0 0.5rem;
  font-size: 1.35rem;
  line-height: 1.3;
}

.content > section:first-child h2 {
  margin-top: 0;
}

.lead {
  font-size: 1.2rem;
  color: var(--ink-soft);
  text-wrap: balance;
}

.content p,
.content ul {
  margin: 0 0 1rem;
}

.content li {
  margin: 0 0 0.5rem;
}

.details {
  display: grid;
  /* minmax(0, ...): a column may shrink below its longest word, which then
     breaks; a plain 1fr column grows past the box instead. */
  grid-template-columns: minmax(0, 1fr);
  gap: 0.15rem 1.5rem;
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--gold);
}

.details dt {
  font-weight: 700;
}

.details dd {
  margin: 0 0 0.65rem;
}

/* An email address has no break point: at 200% text on a phone it would
   push the page sideways. */
.details dt,
.details dd {
  overflow-wrap: anywhere;
}

@media (min-width: 40rem) {
  .details {
    grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr);
  }

  .details dd {
    margin: 0;
  }

  .details dt,
  .details dd {
    padding: 0.3rem 0;
  }
}

.updated {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.site-footer {
  border-top: 3px solid var(--gold);
  color: var(--on-dark-soft);
  font-size: 0.95rem;
}

.site-footer .inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.75rem 1rem 2rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.site-footer a {
  display: inline-block;
  padding: 0.35rem 0;
  color: var(--on-dark);
}

.site-footer .legal {
  margin: 0;
  overflow-wrap: anywhere;
}

/* Printed pages keep the black bands, or the logo's white O would vanish. */
@media print {
  .site-header,
  .hero,
  .site-footer {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .skip-link,
  .site-nav {
    display: none;
  }
}
