/*
 * The public site. Tokens are the app's own (web/src/styles/tokens.css,
 * itself transcribed from the Android theme), so the site and the app read
 * as one product. Every text colour is 7:1 or better against the surface it
 * sits on, in both themes, as in the app.
 *
 * No inline style anywhere: the Content-Security-Policy is
 * `style-src 'self'`, so a style attribute in a page would simply not
 * apply. site/test/build.test.mjs refuses one.
 */

@font-face {
  font-family: 'Noto ShikkhokPlus';
  src: url('/assets/noto_regular.94078421.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Noto ShikkhokPlus';
  src: url('/assets/noto_semibold.9843051c.ttf') format('truetype');
  font-weight: 600 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --primary: #1d4f91;
  --on-primary: #ffffff;
  --primary-container: #d8e3f7;
  --on-primary-container: #0b2447;
  --background: #f4f6f9;
  --surface: #ffffff;
  --surface-container: #eef1f5;
  --on-surface: #15191f;
  --on-surface-variant: #434a55;
  --outline-variant: #c9ced6;
  --paid-container: #dcf1e2;
  --on-paid-container: #0f5427;
  --hero: #1d4f91;
  --on-hero: #ffffff;
  --on-hero-soft: #d8e3f7;
  --accent-on-hero: #a9c7ff;
  --focus: #1d4f91;

  --font: 'Noto ShikkhokPlus', 'Noto Sans Bengali', 'Noto Sans', system-ui, sans-serif;
  --gutter: 16px;
  --max: 1120px;
  --r-card: 12px;
  --r-panel: 16px;
  --r-pill: 999px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #a9c7ff;
    --on-primary: #0b2447;
    --primary-container: #1e3f6e;
    --on-primary-container: #d8e3f7;
    --background: #0f1215;
    --surface: #15191e;
    --surface-container: #1c2128;
    --on-surface: #e6e9ee;
    --on-surface-variant: #b5bcc7;
    --outline-variant: #343b45;
    --paid-container: #10301c;
    --on-paid-container: #8fd9a6;
    /* The hero keeps the brand blue, darkened so it does not glare. */
    --hero: #173f74;
    --focus: #a9c7ff;
  }
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--on-surface);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  /* Long Bangla compounds and e-mail addresses must wrap, never push the
     page sideways at phone width. */
  overflow-wrap: anywhere;
}

/* Bangla glyphs carry taller stacks above and below the line. */
:lang(bn) body,
body:lang(bn) {
  line-height: 1.7;
}

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

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

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

.hero :focus-visible {
  outline-color: #ffffff;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 8px 16px;
  background: var(--surface);
  color: var(--on-surface);
  border-radius: var(--r-card);
  z-index: 10;
}
.skip:focus {
  top: 8px;
}

/* ---------- header ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--outline-variant);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 12px 20px;
  flex-wrap: wrap;
  min-height: 64px;
  padding-block: 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--on-surface);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.15rem;
  margin-inline-end: auto;
}
.brand img {
  width: 32px;
  height: 32px;
}
.brand span b {
  color: var(--primary);
  font-weight: 600;
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  padding: 10px 2px;
  color: var(--on-surface-variant);
  text-decoration: none;
  font-weight: 600;
}
.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--primary);
  text-decoration: underline;
}
.lang-switch {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-pill);
  color: var(--on-surface);
  text-decoration: none;
  font-weight: 600;
}
.lang-switch:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* The section links only earn their room on a wide screen; FAQ, Contact
   and the language switch stay at every width. On a phone the brand and
   the language switch share the first row and the links take the second,
   rather than the switch wrapping onto a row of its own. */
@media (max-width: 719px) {
  .site-nav .wide-only {
    display: none;
  }
  .site-header .wrap {
    gap: 0 12px;
  }
  .site-nav {
    order: 3;
    flex-basis: 100%;
  }
  .site-nav ul {
    gap: 0 20px;
  }
  .site-nav a {
    padding-block: 8px;
  }
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 22px;
  border-radius: var(--r-pill);
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
}
.btn-light {
  background: #ffffff;
  color: #0b2447;
}
.btn-light:hover {
  background: #d8e3f7;
}
.btn-ghost {
  border-color: #ffffff;
  color: #ffffff;
}
.btn-ghost:hover {
  background: rgb(255 255 255 / 12%);
}
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn-primary:hover {
  filter: brightness(1.1);
}
.btn-outline {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary-container);
}

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

.hero {
  background: var(--hero);
  color: var(--on-hero);
}
.hero .wrap {
  display: grid;
  gap: 32px;
  padding-block: 40px 0;
  align-items: end;
}
.hero-copy {
  padding-bottom: 8px;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-on-hero);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 5.5vw, 3.1rem);
  line-height: 1.2;
  font-weight: 700;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent-on-hero);
}
.hero .lede {
  margin: 16px 0 0;
  font-size: 1.15rem;
  color: var(--on-hero-soft);
  max-width: 36em;
}
.promise-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.promise-list li {
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 14%);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
}
.hero-shot {
  justify-self: center;
  width: min(300px, 78vw);
}
.hero-shot img {
  border-radius: 24px 24px 0 0;
}

@media (min-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1.25fr 1fr;
    padding-top: 64px;
  }
  .hero-copy {
    padding-bottom: 64px;
    align-self: center;
  }
  .hero-shot {
    width: 340px;
  }
}

/* ---------- sections ---------- */

main section {
  padding-block: 56px;
}
main section + section {
  border-top: 1px solid var(--outline-variant);
}
.section-alt {
  background: var(--surface);
}
.kicker {
  margin: 0 0 8px;
  color: var(--primary);
  font-weight: 600;
}
h2 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3.6vw, 2.2rem);
  line-height: 1.25;
}
h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  line-height: 1.35;
}
.intro {
  max-width: 44em;
  margin: 0 0 32px;
  color: var(--on-surface-variant);
  font-size: 1.08rem;
}

.split {
  display: grid;
  gap: 32px;
  align-items: start;
}
.split .shot {
  justify-self: center;
  width: min(280px, 80vw);
  border-radius: var(--r-panel);
  overflow: hidden;
  background: #1d4f91;
}
@media (min-width: 860px) {
  .split {
    grid-template-columns: 1.6fr 1fr;
    gap: 48px;
  }
  .split.flip {
    grid-template-columns: 1fr 1.6fr;
  }
  .split.flip .shot {
    order: -1;
  }
}

.features {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 600px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.features li {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-card);
}
.section-alt .features li {
  background: var(--background);
}
.features p {
  margin: 0;
  color: var(--on-surface-variant);
}

.three {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 760px) {
  .three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.three li {
  padding: 20px;
  border-radius: var(--r-card);
  background: var(--primary-container);
  color: var(--on-primary-container);
}
.three p {
  margin: 0;
}

.note {
  margin: 24px 0 0;
  padding: 14px 18px;
  border-radius: var(--r-card);
  background: var(--paid-container);
  color: var(--on-paid-container);
  max-width: 48em;
}

.get {
  text-align: center;
}
.get .intro {
  margin-inline: auto;
}
.get .actions {
  justify-content: center;
}
.get-grid {
  display: grid;
  gap: 16px;
  margin: 32px auto 0;
  padding: 0;
  list-style: none;
  max-width: 820px;
  text-align: start;
}
@media (min-width: 700px) {
  .get-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.get-grid li {
  padding: 20px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--outline-variant);
}
.get-grid p {
  margin: 0 0 16px;
  color: var(--on-surface-variant);
}

.contact-card {
  display: grid;
  gap: 24px;
  padding: 24px;
  border-radius: var(--r-panel);
  background: var(--surface);
  border: 1px solid var(--outline-variant);
}
@media (min-width: 860px) {
  .contact-card {
    grid-template-columns: 1fr 1fr;
    padding: 32px;
  }
}
.contact-card ul {
  margin: 0;
  padding-inline-start: 1.2em;
}
.contact-card li + li {
  margin-top: 6px;
}
.email {
  display: inline-block;
  margin: 8px 0 16px;
  font-size: 1.2rem;
  font-weight: 600;
}
.muted {
  color: var(--on-surface-variant);
}

/* ---------- FAQ ---------- */

.page-head {
  padding-block: 40px 8px;
}
.page-head h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  line-height: 1.2;
}
.faq {
  padding-block: 16px 56px;
}
/* The list keeps the page's left edge and limits the line length of
   each question instead, so it lines up with the heading above it. */
.faq-list > details {
  max-width: 820px;
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-card);
  margin-bottom: 12px;
}
.faq summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 1.05rem;
  list-style-position: outside;
  margin-inline-start: 1.1em;
}
.faq summary:hover {
  color: var(--primary);
}
.faq details[open] summary {
  border-bottom: 1px solid var(--outline-variant);
}
.faq .answer {
  padding: 4px 20px 8px;
}
.faq .answer p,
.faq .answer ul {
  margin: 12px 0;
}
.faq .answer li + li {
  margin-top: 4px;
}

/* ---------- 404 ---------- */

.not-found {
  padding-block: 64px;
  max-width: 640px;
}
.not-found h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 4.5vw, 2.4rem);
  line-height: 1.25;
}
.not-found + .not-found {
  padding-top: 0;
}

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

.site-footer {
  background: var(--surface-container);
  color: var(--on-surface-variant);
  padding-block: 32px;
  font-size: 0.95rem;
}
.site-footer .wrap {
  display: grid;
  gap: 16px;
}
@media (min-width: 760px) {
  .site-footer .wrap {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}
.site-footer p {
  margin: 0;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer a {
  color: var(--on-surface);
  display: inline-block;
  padding-block: 6px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

.contact-card p:first-child,
.features h3,
.three h3 {
  margin-top: 0;
}
