/*
 * One stylesheet for the whole site: the landing page and the two legal pages.
 *
 * Shared on purpose. The legal pages were written first and had their own minimal
 * look; now they pick up the same nav bar, footer and type as the landing page, so a
 * reader following a link from Play or from the app does not appear to land somewhere
 * else. Everything below the "legal pages" heading is what those two need on top.
 *
 * Dark only. The app has no light theme, and a light marketing site in front of a dark
 * app is a small lie about what you are downloading.
 */

:root {
  --canvas: #0a0d12;
  --raise: #121722;
  --line: #1f2733;
  --text: #f3f4f6;
  --body: #d5d9e0;
  --muted: #9ca3af;
  --emerald: #10b981;
  --emerald-dim: #0b7f5a;
  --bar: 60px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Anchored sections must clear the sticky bar or their heading hides behind it. */
[id] { scroll-margin-top: calc(var(--bar) + 16px); }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font: 16px/1.65 -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--emerald); text-decoration-thickness: 1px; text-underline-offset: 2px; }

h1, h2, h3 { color: var(--text); letter-spacing: -0.02em; }
h1 { font-size: clamp(30px, 5.4vw, 52px); line-height: 1.1; margin: 0 0 18px; }
h2 { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.2; margin: 0 0 14px; }
h3 { font-size: 17px; line-height: 1.35; margin: 0 0 8px; }

p { margin: 0 0 14px; }
strong { color: var(--text); }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.centre { text-align: center; }

.lead { color: var(--muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.55; }

.eyebrow {
  color: var(--emerald);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

/* A keyboard user needs a way past the nav; it stays off-screen until focused. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--emerald);
  color: #04120c;
  padding: 10px 16px;
  z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-block;
  background: var(--emerald);
  color: #04120c;
  font-weight: 650;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.12s ease;
  white-space: nowrap;
}
.btn:hover { background: #34d39e; transform: translateY(-1px); }

.btn-sm { padding: 8px 16px; font-size: 14px; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid #2a3442;
}
.btn-ghost:hover { background: #151b26; border-color: #3a475a; }

/* ---------------------------------------------------------------- top bar */

.bar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--bar);
  background: rgba(10, 13, 18, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar-in {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
}
.brand img { width: 30px; height: 30px; border-radius: 9px; }

.bar-nav { display: flex; align-items: center; gap: 22px; }
.bar-nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.bar-nav a:hover { color: var(--text); }
.bar-nav a.btn { color: #04120c; }

/* The three section links are the first thing to go on a narrow screen: the logo and
   the download button are what a phone visitor actually needs. */
@media (max-width: 660px) {
  .bar-nav a:not(.btn) { display: none; }
}

/* ------------------------------------------------------------------- hero */

.hero {
  padding: clamp(40px, 7vw, 84px) 0 clamp(30px, 5vw, 60px);
  /* A single soft emerald bloom behind the copy, echoing the feature graphic. */
  background:
    radial-gradient(760px 420px at 18% 0%, rgba(16, 185, 129, 0.13), transparent 70%),
    radial-gradient(520px 360px at 88% 22%, rgba(16, 185, 129, 0.07), transparent 72%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }

.ticks { list-style: none; margin: 26px 0 0; padding: 0; }
.ticks li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 15px;
}
/* A drawn tick rather than an icon font or an SVG request. */
.ticks li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  width: 6px;
  height: 11px;
  border-right: 2px solid var(--emerald);
  border-bottom: 2px solid var(--emerald);
  transform: rotate(42deg);
}

.hero-shot { display: flex; justify-content: center; }

/* ------------------------------------------------------------ phone bezel */

/*
 * The frame is CSS, not part of the bitmap: it stays sharp at any density, and the
 * radius can change without re-exporting eight screenshots.
 *
 * The screenshot is taller than the frame and is clipped, so each one shows its top
 * two-thirds. That is where every screen puts the thing worth looking at, and it keeps
 * all the frames the same height without cropping decisions per image.
 */
.phone {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 34px;
  border: 1px solid #263140;
  background: var(--canvas);
  box-shadow:
    0 0 0 8px #0d1117,
    0 30px 70px -24px rgba(0, 0, 0, 0.95),
    0 0 90px -40px rgba(16, 185, 129, 0.35);
}
.phone img {
  width: 100%;
  height: auto;
}
/* A short fade at the bottom so the clip reads as intentional rather than cut off. */
.phone::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 70px;
  background: linear-gradient(transparent, rgba(10, 13, 18, 0.92));
  pointer-events: none;
}

/* --------------------------------------------------------- feature rows */

.rows { padding: clamp(40px, 6vw, 80px) 0; }

.row {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(32px, 5vw, 56px) 0;
  border-top: 1px solid var(--line);
}
.row:first-child { border-top: 0; padding-top: 0; }

.row-shot { display: flex; justify-content: center; }
.row-shot .phone { max-width: 290px; }

/* Alternating sides, done by reordering rather than by swapping the markup, so the
   reading order stays copy-then-image for a screen reader. */
.row-flip .row-copy { order: 2; }
.row-flip .row-shot { order: 1; }

/* -------------------------------------------------------------- tiles */

.tiles { padding: clamp(40px, 6vw, 76px) 0; border-top: 1px solid var(--line); }
.tiles h2 { margin-bottom: 34px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
}
.tile {
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 8px;
}
.tile p { color: var(--muted); font-size: 15px; }

/* -------------------------------------------------------------- band */

.band {
  padding: clamp(44px, 6vw, 80px) 0;
  border-top: 1px solid var(--line);
  background: radial-gradient(700px 300px at 50% 0%, rgba(16, 185, 129, 0.09), transparent 70%);
}
.band-in { max-width: 700px; text-align: center; }
.band-in .note {
  background: var(--raise);
  border: 1px solid var(--line);
  border-left: 3px solid var(--emerald-dim);
  border-radius: 12px;
  padding: 16px 18px;
  text-align: left;
  margin: 22px 0;
  font-size: 15px;
}

/* --------------------------------------------------------------- faq */

.faq { padding: clamp(40px, 6vw, 76px) 0; border-top: 1px solid var(--line); }
.faq .wrap { max-width: 760px; }
.faq h2 { margin-bottom: 28px; }

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 40px 16px 0;
  position: relative;
  color: var(--text);
  font-weight: 600;
  font-size: 16.5px;
}
.faq summary::-webkit-details-marker { display: none; }
/* A chevron drawn from two borders, rotated a quarter turn when the panel opens. */
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 21px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--emerald);
  border-bottom: 2px solid var(--emerald);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { color: var(--muted); padding: 0 8px 18px 0; margin: 0; }

/* ------------------------------------------------------------ closer */

.closer {
  padding: clamp(48px, 7vw, 92px) 0;
  border-top: 1px solid var(--line);
  background: radial-gradient(620px 300px at 50% 100%, rgba(16, 185, 129, 0.12), transparent 70%);
}
.closer .lead { margin-bottom: 26px; }

/* ------------------------------------------------------------- footer */

.foot { border-top: 1px solid var(--line); padding: 38px 0 28px; }
.foot-in {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand img { border-radius: 8px; }
.foot-brand .name { color: var(--text); font-weight: 700; }
.foot-brand .tag { color: var(--muted); font-size: 13px; }

.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-links a { color: var(--muted); text-decoration: none; font-size: 14.5px; }
.foot-links a:hover { color: var(--text); }

.foot-legal {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #6b7280;
  font-size: 12.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: space-between;
}
.foot-legal a { color: #6b7280; }

/* ------------------------------------------------------- legal pages */

/*
 * privacy.html and delete-account.html. They keep their own narrow measure -- long
 * prose at 1080 px is unreadable -- and reuse everything else.
 */
.doc { max-width: 720px; padding-top: 44px; padding-bottom: 70px; }
.doc h1 { font-size: clamp(26px, 4vw, 36px); }
.doc h2 { font-size: 20px; margin: 36px 0 10px; }
.doc h3 { font-size: 15px; margin: 24px 0 4px; color: var(--emerald); }
.doc li { color: var(--body); }
.doc ol li, .doc ul li { margin-bottom: 6px; }

.updated { color: var(--muted); font-size: 13px; margin-bottom: 28px; }

.card {
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 22px 0;
}

/* The old page header, kept so the two legal pages render correctly whether or not
   they have been switched over to the shared top bar. */
header.page {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
header.page img { width: 52px; height: 52px; border-radius: 14px; }
header.page .name { font-size: 22px; font-weight: 700; }
header.page .tag { color: var(--muted); font-size: 13px; }

nav.inline { margin: 30px 0 0; display: flex; gap: 18px; flex-wrap: wrap; }

/* ------------------------------------------------------- narrow screens */

@media (max-width: 860px) {
  .hero-grid, .row { grid-template-columns: 1fr; }

  .hero-copy, .row-copy { text-align: center; }
  .cta { justify-content: center; }
  .ticks { display: inline-block; text-align: left; }

  /* The alternating sides collapse: on one column the image always follows its copy,
     otherwise every other section would open with a picture and no context. */
  .row-flip .row-copy { order: 0; }
  .row-flip .row-shot { order: 0; }

  .hero-shot, .row-shot { margin-top: 8px; }
}

@media (max-width: 520px) {
  .phone { max-width: 270px; border-radius: 28px; }
  .row-shot .phone { max-width: 250px; }
  .tile { padding: 18px 18px 6px; }
  .foot-legal { flex-direction: column; }
}

/* Honour a reader who has asked the system for less movement. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .faq summary::after { transition: none; }
  .btn:hover { transform: none; }
}
