:root {
  --bg: #0b0d10;
  --surface: #16191d;
  --border: #26292e;
  --text: #f5f6f7;
  --muted: #8a9099;
  --accent: #ffc400;
  --on-accent: #0b0d10;
  --success: #34c759;
  --danger: #ff3b30;
  --maxw: 940px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "Noto Sans Sinhala", "Noto Sans Tamil", "Noto Sans Khmer", "Noto Sans Ethiopic",
    "Noto Sans Arabic", sans-serif;
}

/* Nothing on the page reads correctly until i18n.js has swapped the copy in, and the swap is a
   whole-document repaint. Hiding until then costs one frame and avoids showing English to a
   Sinhala reader. */
body[data-i18n-pending] { visibility: hidden; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---- header ---- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }

.site-header nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}
.site-header nav a { color: var(--muted); }

/* ---- hero ---- */
.hero { text-align: center; padding: 48px 0 8px; }

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0 auto;
  max-width: 34em;
  color: var(--muted);
  font-size: clamp(16px, 2.4vw, 19px);
}

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 15px;
}
.store-btn:hover { text-decoration: none; opacity: 0.9; }
.store-btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.note { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* ---- screenshots ---- */
.shots {
  display: flex;
  /* safe center keeps the row centred when it fits and still starts at the left edge
     when it overflows, instead of clipping the first shot out of reach. */
  justify-content: safe center;
  gap: 16px;
  overflow-x: auto;
  padding: 40px 20px 8px;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 20px;
  -webkit-overflow-scrolling: touch;
}
.shots::-webkit-scrollbar { height: 0; }

.shots img {
  flex: 0 0 auto;
  /* Roughly two and a half shots on a phone, three and a half on a laptop. */
  width: clamp(150px, 40vw, 230px);
  height: auto;
  aspect-ratio: 257 / 560;
  border-radius: 20px;
  border: 1px solid var(--border);
  scroll-snap-align: center;
}

/* ---- features ---- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  padding: 48px 0;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---- legal pages ---- */
.legal { padding: 24px 0 8px; }
.legal h1 { font-size: clamp(28px, 5vw, 38px); letter-spacing: -0.02em; margin: 0 0 6px; }
.legal .updated { color: var(--muted); font-size: 14px; margin: 0 0 32px; }
.legal h2 { font-size: 17px; margin: 30px 0 6px; }
.legal p { margin: 0 0 10px; color: #c9ccd1; }
.legal ul, .legal ol { margin: 0 0 10px; padding-inline-start: 22px; color: #c9ccd1; }
.legal li { margin-bottom: 4px; }

/* ---- footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 56px;
  padding: 28px 20px 48px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0;
}
.site-footer, .site-footer a { color: var(--muted); font-size: 14px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }

select.lang {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 10px;
  font: inherit;
  font-size: 14px;
}

/* ---- auth callback ---- */
.callback {
  max-width: 460px;
  margin: 8vh auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
}
.callback h1 { font-size: 24px; margin: 18px 0 10px; letter-spacing: -0.02em; }
.callback p { color: var(--muted); margin: 0 0 10px; }
.callback .email {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: #c9ccd1;
}
.dot { width: 40px; height: 40px; border-radius: 999px; }
.dot.success { background: rgba(52, 199, 89, 0.15); }
.dot.pending { background: rgba(255, 196, 0, 0.15); }
.dot.error { background: rgba(255, 59, 48, 0.15); }
.callback .store-btn { display: flex; justify-content: center; margin-top: 24px; }
