/*
 * Shared styles for the Bazar Assistant site.
 *
 * Self-contained on purpose: no web fonts, no CDN, no analytics. The whole site is three files
 * and should still work on a slow connection in the market this app is for, which is also why
 * there are no images heavier than the app icon.
 *
 * Colours are the app's own palette, so the site and the thing it is advertising look related.
 * Light values come from apps/android/src/main/res/values/colors.xml, dark from values-night.
 */

:root {
  --primary: #2e6b3e;
  --on-primary: #ffffff;
  --primary-container: #b2f0be;
  --on-primary-container: #00210e;

  --surface: #f7fbf3;
  --surface-raised: #ffffff;
  --on-surface: #191d18;
  --on-surface-muted: #414941;
  --outline: #c3cbc0;

  --radius: 16px;
  --measure: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #97d5a3;
    --on-primary: #00391c;
    --primary-container: #12522b;
    --on-primary-container: #b2f0be;

    --surface: #111411;
    --surface-raised: #191d18;
    --on-surface: #e1e4dd;
    --on-surface-muted: #c1c9be;
    --outline: #3a423a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Bengali", sans-serif;
  line-height: 1.65;
  color: var(--on-surface);
  background: var(--surface);
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Header ---------------------------------------------------------------------------- */

header {
  background: var(--primary-container);
  color: var(--on-primary-container);
  padding: 3.5rem 0 3rem;
  text-align: center;
}

header h1 {
  margin: 0 0 .5rem;
  font-size: clamp(2rem, 6vw, 2.75rem);
  letter-spacing: -0.02em;
}

header p {
  margin: 0 auto;
  max-width: 32rem;
  font-size: clamp(1.05rem, 2.6vw, 1.2rem);
  opacity: .9;
}

/* --- Call to action -------------------------------------------------------------------- */

.cta {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-top: 2rem;
  padding: .9rem 1.6rem;
  /* 48px minimum, same rule the app follows for touch targets. */
  min-height: 48px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  text-decoration: none;
  transition: transform .12s ease, opacity .12s ease;
}

.cta:hover { transform: translateY(-1px); }
.cta:active { transform: translateY(0); opacity: .9; }
.cta:focus-visible { outline: 3px solid var(--on-primary-container); outline-offset: 3px; }

.cta-note {
  margin-top: .9rem;
  font-size: .9rem;
  opacity: .75;
}

/* --- Sections -------------------------------------------------------------------------- */

main { padding: 3rem 0 1rem; }

section { margin-bottom: 3rem; }

h2 {
  font-size: 1.35rem;
  margin: 0 0 1.25rem;
}

.features {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  padding: 0;
  list-style: none;
  margin: 0;
}

.features li {
  background: var(--surface-raised);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
}

.features strong {
  display: block;
  margin-bottom: .3rem;
}

.features span {
  color: var(--on-surface-muted);
  font-size: .95rem;
}

.callout {
  background: var(--surface-raised);
  border: 1px solid var(--outline);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
}

.callout p { margin: 0; }

/* --- Long-form pages -------------------------------------------------------------------- */

.doc { padding: 2.5rem 0; }
.doc h1 { margin-bottom: .25rem; }
.doc .updated { margin-top: 0; color: var(--on-surface-muted); }
.doc h2 { margin-top: 2.5rem; font-size: 1.2rem; }
.doc ul { padding-left: 1.15rem; }
.doc li { margin-bottom: .4rem; }

.doc table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
  /* Wide tables scroll inside themselves rather than making the page scroll sideways. */
  display: block;
  overflow-x: auto;
}

.doc th, .doc td {
  text-align: left;
  padding: .6rem .7rem;
  border-bottom: 1px solid var(--outline);
  vertical-align: top;
  min-width: 8rem;
}

a { color: var(--primary); }
a:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 3px; }

/* --- Footer ----------------------------------------------------------------------------- */

footer {
  border-top: 1px solid var(--outline);
  margin-top: 3rem;
  padding: 2rem 0 3rem;
  color: var(--on-surface-muted);
  font-size: .92rem;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: .75rem;
}
