/*
 * One stylesheet, no build step, no framework, and — still — no JavaScript.
 *
 * That last one is a choice with consequences the page benefits from: the security policy in
 * firebase.json can say `default-src 'none'` honestly, the page paints before a script could have
 * been fetched, and everything below degrades to readable text if the CSS never arrives at all.
 *
 * The app's own Lottie animations were the obvious source for motion here. They are 2–6 KB each,
 * but playing one on the web needs ~200 KB of player. The two that earn their place are rebuilt
 * rebuilt as animated SVG in site/build-scenes.py instead — the animation lives inside the
 * file, so an <img> plays it and this page still has no script of any kind.
 */

:root {
  --green: #15A25A;
  --green-lift: #22B36A;
  --green-deep: #0B5030;
  --mint: #D5F2E2;
  --amber: #F59E0B;

  --ground: #FFFFFF;
  --raised: #F7F8F7;
  --line: #E2E6E4;
  --ink: #0E1211;
  --ink-soft: #5E6763;

  --measure: 34rem;
  --radius: 20px;
  --gap: clamp(1rem, 0.5rem + 2vw, 2rem);
  --section: clamp(3.5rem, 8vw, 7rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0E1211;
    --raised: #191D1B;
    --line: #2A302D;
    --ink: #F7F8F7;
    --ink-soft: #8A928E;
    --green: #22B36A;
    --mint: #0B5030;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  /*
   * System faces, and the Armenian ones named explicitly. Armenian is the reason there is no web
   * font here: the families that cover it well are large, and a stack that only names Latin faces
   * falls through to whatever the browser keeps for unknown scripts — on Windows, something whose
   * Armenian is visibly worse than its Latin. The system already has better, and it costs nothing.
   */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Armenian",
               "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.wrap { width: min(68rem, 100% - 2.5rem); margin-inline: auto; }

h1, h2, h3 { text-wrap: balance; letter-spacing: -0.02em; }

/* ── header ─────────────────────────────────────────────────────────────── */

.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 0; }

.nav { display: none; gap: 0.35rem; margin-inline-start: 1.5rem; }
/* Below this the four links would wrap the header onto two lines; the sections are all one scroll
   away in any case, so they simply step aside and the language switcher keeps its place. */
@media (min-width: 52rem) { .nav { display: flex; } }
.nav a {
  padding: 0.35rem 0.7rem; border-radius: 999px;
  text-decoration: none; color: var(--ink-soft); font-size: 0.93rem;
}
.nav a:hover { background: var(--raised); color: var(--ink); }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: inherit; }
.brand img { width: 32px; height: 32px; display: block; }
.brand b { font-size: 1.1rem; letter-spacing: -0.01em; }

.langs { margin-inline-start: auto; display: flex; gap: 0.15rem; }
.langs a {
  padding: 0.3rem 0.65rem; border-radius: 999px;
  text-decoration: none; color: var(--ink-soft); font-size: 0.9rem;
}
.langs a:hover { background: var(--raised); color: var(--ink); }
.langs a[aria-current="page"] { background: var(--green); color: #fff; }

/* ── hero ───────────────────────────────────────────────────────────────── */

.hero {
  display: grid; gap: var(--gap) clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr;
  align-items: center;
  padding: clamp(2.5rem, 7vw, 5rem) 0 var(--section);
}
@media (min-width: 56rem) { .hero { grid-template-columns: 1.15fr 0.85fr; } }

.hero h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(2.1rem, 1rem + 4.4vw, 3.6rem);
  line-height: 1.1;
  max-width: 16ch;
}
.hero .lede { margin: 0 0 1.6rem; max-width: var(--measure); font-size: 1.15rem; color: var(--ink-soft); }

.badges { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.8rem; border-radius: 999px;
  background: var(--raised); border: 1px solid var(--line);
  font-size: 0.88rem; color: var(--ink-soft);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* the illustration beside the words */

.stage { position: relative; display: grid; place-items: center; }

/* An illustration, not a device: no bezel, no shadow, nothing pretending to be a photograph. */
.scene { display: block; width: 100%; max-width: 30rem; height: auto; }

/* ── sections ───────────────────────────────────────────────────────────── */

section { padding-block: var(--section); }
.eyebrow {
  margin: 0 0 0.6rem; font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--green);
}
h2.title { margin: 0 0 0.7rem; font-size: clamp(1.6rem, 1rem + 2.2vw, 2.3rem); }
.sub { margin: 0 0 2.5rem; max-width: var(--measure); color: var(--ink-soft); }

.split { display: grid; gap: var(--gap) clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 56rem) {
  .split { grid-template-columns: 1fr 0.8fr; }
  .split.flip > :first-child { order: 2; }
}

.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; }
.points li { display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.9rem; }
.points li::before {
  content: ""; margin-top: 0.4rem;
  width: 1rem; height: 1rem; border-radius: 50%;
  border: 3px solid var(--green);
}
.points h3 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.points p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }

/* the ordered one, where the numbers mean something */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap);
         grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); counter-reset: s; }
.steps li {
  counter-increment: s;
  background: var(--raised); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem;
}
.steps li::before {
  content: counter(s);
  display: grid; place-items: center;
  width: 2rem; height: 2rem; margin-bottom: 0.9rem;
  border-radius: 50%; background: var(--green); color: #fff;
  font-size: 0.95rem; font-weight: 600;
}
.steps h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ── the privacy break ──────────────────────────────────────────────────── */

.dark {
  background: var(--green-deep); color: #fff;
  border-radius: clamp(20px, 3vw, 32px);
  padding: clamp(2rem, 5vw, 3.5rem);
  margin-block: var(--section);
}
.dark .eyebrow { color: var(--mint); }
.dark h2 { margin: 0 0 0.8rem; font-size: clamp(1.5rem, 1rem + 2vw, 2.1rem); }
.dark p { margin: 0 0 1rem; color: #D5F2E2; max-width: var(--measure); }
.dark p:last-child { margin-bottom: 0; }
.dark b { color: #fff; }

/* ── get the app ────────────────────────────────────────────────────────── */

.stores { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.store {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.2rem; border-radius: 12px;
  border: 1px solid var(--line); background: var(--raised);
  color: var(--ink-soft); font-size: 0.95rem;
}
.store small { opacity: 0.75; }

/* ── footer ─────────────────────────────────────────────────────────────── */

.foot {
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem; margin-top: var(--section);
  color: var(--ink-soft); font-size: 0.9rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center;
}
.foot a { color: var(--ink-soft); }
.foot a:hover { color: var(--green); }
.foot .spacer { margin-inline-start: auto; }

/* ── the legal documents ────────────────────────────────────────────────── */

.doc { padding: clamp(2.5rem, 7vw, 4rem) 0 clamp(2rem, 5vw, 3rem); max-width: 44rem; }
.doc h1 { margin: 0 0 0.35rem; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); }
.doc .updated { margin: 0 0 2.5rem; color: var(--ink-soft); font-size: 0.9rem; }
.doc h2 { margin: 2.25rem 0 0.6rem; font-size: 1.25rem; }
.doc h3 { margin: 1.5rem 0 0.35rem; font-size: 1rem; }
.doc p { margin: 0 0 0.9rem; }
.doc a { color: var(--green); }
.plain { margin: 0 0 1.1rem; padding-inline-start: 1.15rem; }
.plain li { margin-bottom: 0.45rem; }
.plain li::marker { color: var(--green); }

/*
 * Reveal on scroll, as an enhancement and never as a requirement. Everything is visible by default;
 * a browser that understands view() animates it in, and one that does not simply shows the page.
 */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 32%;
    }
    @keyframes rise {
      from { opacity: 0; transform: translateY(1.4rem); }
      to   { opacity: 1; transform: none; }
    }
  }
}

.skip {
  position: absolute; left: -9999px; top: 0;
  padding: 0.7rem 1.1rem; background: var(--green); color: #fff;
  border-radius: 0 0 10px 0; text-decoration: none; z-index: 10;
}
.skip:focus { left: 0; }

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

/* The business points have no phone beside them, so they spread instead of stacking. */
.points.three { grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); gap: var(--gap); }


/* ── the tinted bands ───────────────────────────────────────────────────── */

/*
 * Two sections sit on a wash rather than the page's own ground, which is what gives the page a
 * rhythm instead of one long column. The wash is mixed from the brand green rather than picked, so
 * it moves with it and cannot drift into a colour nothing else uses.
 */
.tint {
  background: color-mix(in srgb, var(--green) 5%, var(--ground));
  border-block: 1px solid var(--line);
}
@media (prefers-color-scheme: dark) {
  .tint { background: color-mix(in srgb, var(--green) 9%, var(--ground)); }
}

/* ── announcement types ─────────────────────────────────────────────────── */

/*
 * The colours are the app's own — AppColors.kt gives a discount green, an expiry amber, an arrival
 * teal, an event purple. Each chip carries its own as a custom property, so the colour is data and
 * the rule is written once.
 */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
  --c: var(--green);
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 1.1rem; border-radius: 999px;
  background: color-mix(in srgb, var(--c) 12%, var(--ground));
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  color: color-mix(in srgb, var(--c) 78%, var(--ink));
  font-size: 0.95rem; font-weight: 500;
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* ── questions ──────────────────────────────────────────────────────────── */

.faq { margin: 0; display: grid; gap: var(--gap);
       grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr)); }
.faq dt { font-weight: 600; margin-bottom: 0.3rem; }
.faq dd { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }

/* A hero that is not simply white: a wash of the brand, thrown from where the illustration sits.
   `overflow: clip` rather than hidden — it contains the wash without making a scroll container, so
   the page cannot be dragged sideways on a phone by a decoration that is deliberately off-frame. */
.hero { position: relative; overflow: clip; }
.hero::before {
  content: ""; position: absolute; inset: -20% -30% auto auto;
  width: 46rem; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--green) 14%, transparent) 0%,
                                      transparent 62%);
  z-index: -1; pointer-events: none;
}

/* A sticky header means an anchor would otherwise land under it. */
:target { scroll-margin-top: 5rem; }
[id] { scroll-margin-top: 5rem; }
