/* app.thokdukaan.in: the website's colours, type and phone (src/styles.css), by hand. Light or dark follows the
 * device, as on the website. The fonts are in fonts.css (made by scripts/make-app-page.ts). */

:root {
  color-scheme: light;
  --bg: #f2f5ee;
  --surface: #ffffff;
  --ink: #0f1f17;
  --ink-soft: #48584f;
  --line: #e1e7dc;
  --primary: #0e3f2d;
  --primary-pressed: #0a2f21;
  --primary-soft: #ddefd4;
  --on-primary: #ffffff;
  --accent: #f2a20c;
  --accent-soft: #fff0cf;
  --accent-ink: #8a5100;
  --glow: rgba(19, 128, 75, 0.12);
  --shadow: 0 24px 60px rgba(12, 35, 24, 0.18);
  --font:
    "Anek Latin", "Anek Devanagari", "Anek Gujarati", "Anek Bangla", "Anek Tamil", "Anek Telugu",
    "Anek Kannada", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b120e;
    --surface: #141e18;
    --ink: #e7efe9;
    --ink-soft: #a8b7ae;
    --line: #223029;
    --primary: #4cc48f;
    --primary-pressed: #3da678;
    --primary-soft: #173326;
    --on-primary: #03160c;
    --accent: #f5b53a;
    --accent-soft: #3a2a0a;
    --accent-ink: #f5b53a;
    --glow: rgba(76, 196, 143, 0.12);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: radial-gradient(48rem 28rem at 85% 0%, var(--glow), transparent 65%), var(--bg);
  color: var(--ink);
  font: 400 17px / 1.55 var(--font);
}

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

a {
  color: var(--primary);
}

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

/* ── Header ──────────────────────────────────────────────────────────────────────────────────── */

.top {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

/* ── The page ────────────────────────────────────────────────────────────────────────────────── */

.hero {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 16px 48px;
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 720px) {
  .top,
  .hero {
    padding-inline: 32px;
  }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.2fr 0.8fr;
    padding-block: 16px 40px;
  }
}

.copy {
  min-width: 0;
}

/* The website's marigold pill. */
.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5.4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* Indian scripts: taller letters, and no tracking pulling the joined ones apart. */
:lang(hi) h1,
:lang(mr) h1,
:lang(gu) h1,
:lang(bn) h1,
:lang(ta) h1,
:lang(te) h1,
:lang(kn) h1 {
  letter-spacing: 0;
  line-height: 1.3;
}

.lead {
  margin: 18px 0 0;
  max-width: 36rem;
  color: var(--ink-soft);
  font-size: 1.2rem;
  text-wrap: pretty;
}

.actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  transition: background-color 0.15s;
}

.button.go {
  background: var(--primary);
  color: var(--on-primary);
}

.button.go:hover {
  background: var(--primary-pressed);
}

/* Google's badge, as it comes (its black and white are the same in both themes). */
.badge {
  display: inline-block;
  line-height: 0;
  border-radius: 10px;
}

.badge img {
  height: 56px;
  width: auto;
}

.note {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.qr {
  margin: 28px 0 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.qr img {
  flex-shrink: 0;
  width: 156px;
  height: 156px;
  padding: 8px;
  border-radius: 14px;
  /* White in both themes, so phone cameras read it. */
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.qr figcaption {
  max-width: 14rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* A phone has nothing to scan: no QR code on small touch screens. */
@media (max-width: 899px) and (pointer: coarse) {
  .qr {
    display: none;
  }
}

/* ── The phone (the website's .phone) ────────────────────────────────────────────────────────── */

.phone-wrap {
  margin: 0;
  display: flex;
  justify-content: center;
}

.phone {
  width: min(260px, 62vw);
  aspect-ratio: 720 / 1600;
  padding: 10px;
  border-radius: 38px;
  background: #101814;
  box-shadow:
    var(--shadow),
    inset 0 0 0 2px #2a352f;
}

/* Next to the text: as tall as the window allows (header and margins off), so laptops don't scroll for it. */
@media (min-width: 900px) {
  .phone {
    width: auto;
    height: clamp(460px, calc(100dvh - 140px), 660px);
  }
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 30px;
  background: var(--bg);
}

/* ── Android: the app opens (app.js); this is what stays if it doesn't ──────────────────────── */

.android-only {
  display: none;
}

.android .android-only {
  display: inline-flex;
}

.android .qr {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
