/* Lakhara Samaj website — plain CSS, no build step. Colours follow the app. */

@font-face {
  font-family: "Mukta";
  src: url("../fonts/mukta-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Mukta";
  src: url("../fonts/mukta-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Mukta";
  src: url("../fonts/mukta-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --primary: #b4501e;
  --primary-dark: #8f3c12;
  --maroon: #7a1f2b;
  --bg: #fffaf5;
  --surface: #ffffff;
  --soft: #fbeee3;
  --text: #2b1d17;
  --muted: #6b5a50;
  --line: #ecdcd0;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(122, 31, 43, 0.08);
  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1411;
    --surface: #251b17;
    --soft: #2f221c;
    --text: #f6ebe3;
    --muted: #c7b3a6;
    --line: #3d2c24;
    --primary: #e07a45;
    --primary-dark: #f0915e;
    --maroon: #e58a96;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Mukta", "Noto Sans Devanagari", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

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

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

h1, h2, h3 { line-height: 1.3; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 10;
}
.skip-link:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
}
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.nav a:hover { color: var(--primary); }
.header-end { display: flex; align-items: center; gap: 18px; }
.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 76px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  white-space: nowrap;
}
/* Devanagari sits high in the line box; lower it to look centred. */
.lang-switch:lang(hi) { padding-top: 4px; }
.lang-switch:hover { border-color: var(--primary); color: var(--primary); }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--primary);
}
.button-primary { background: var(--primary); color: #fff; }
.button-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.button-ghost { color: var(--primary); background: transparent; }
.button-ghost:hover { background: var(--soft); }
.button[aria-disabled="true"] { cursor: default; opacity: 0.85; }

/* Hero */
.hero { padding: 64px 0 48px; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
}
.eyebrow { color: var(--maroon); font-weight: 600; margin-bottom: 8px; }
.lead { font-size: 1.2rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 8px; }
.note { font-size: 0.95rem; color: var(--muted); }
.hero-art {
  background: radial-gradient(circle at 30% 30%, var(--soft), transparent 70%);
  border-radius: 32px;
  padding: 32px;
  display: grid;
  place-items: center;
}
.hero-art img { width: min(260px, 70%); height: auto; border-radius: 48px; box-shadow: var(--shadow); }
.hero-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.chip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Sections */
.section { padding: 56px 0; }
.section-soft { background: var(--soft); }
.section-intro { max-width: 720px; color: var(--muted); margin-bottom: 28px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card .icon { font-size: 2rem; line-height: 1; margin-bottom: 10px; }
.card p { color: var(--muted); margin: 0; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 34px; margin-bottom: 14px; }
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
}

.levels { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 20px; }
.level {
  border-radius: var(--radius);
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.level strong { display: block; font-size: 1.1rem; }
.level span { color: var(--muted); font-size: 0.95rem; }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.step { counter-increment: step; }
.step::before {
  content: counter(step, devanagari);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--maroon);
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 12px;
}
:lang(en) .step::before { content: counter(step); }

/* FAQ */
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* Document pages (privacy, terms, account deletion) */
.doc { padding: 48px 0 64px; }
.doc .wrap { max-width: 820px; }
.doc h2 { font-size: 1.4rem; margin-top: 1.6em; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: 0.4em; }
.doc .updated { color: var(--muted); }
.callout {
  background: var(--soft);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 20px 0;
}

/* Census results page */
.sample-tag {
  display: inline-block;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--maroon);
}
.phone-demo {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  margin: 28px 0 8px;
}
.phone-demo h2 { margin-top: 0; }
.phone-figure { margin: 0; }
.phone {
  height: min(680px, 75vh);
  overflow-y: auto;
  border: 8px solid #2b1d17;
  border-radius: 28px;
  background: #fff8f4;
  box-shadow: var(--shadow);
}
.phone img { width: 100%; height: auto; }
.phone:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.phone-figure figcaption { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin: 16px 0 8px;
}
.access-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 1rem; line-height: 1.5; }
.access-table th, .access-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.access-table thead th { background: var(--soft); font-weight: 600; }
.access-table tbody tr:last-child > * { border-bottom: 0; }
.access-table tbody th { font-weight: 600; width: 30%; }
.access-table .no { color: var(--muted); }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 16px 0; }
.rule-grid .card img { height: auto; margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer a { color: var(--muted); }

@media (max-width: 820px) {
  .hero { padding-top: 40px; }
  .hero .wrap, .two-col { grid-template-columns: 1fr; }
  .hero-art { order: -1; padding: 16px; }
  .hero-art img { width: 140px; border-radius: 32px; }
  .nav { display: none; }
  .phone-demo { grid-template-columns: 1fr; }
  .phone-figure { width: min(340px, 100%); margin: 0 auto; }
}

/* Phones: each row of the census access table becomes its own card. */
@media (max-width: 640px) {
  .table-scroll { overflow: visible; border: 0; background: none; }
  .access-table { min-width: 0; }
  .access-table thead { display: none; }
  .access-table tbody, .access-table tr, .access-table th, .access-table td { display: block; }
  .access-table tr {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 12px;
    padding-bottom: 6px;
  }
  .access-table tbody th { width: auto; border-bottom: 1px solid var(--line); }
  .access-table td { border-bottom: 0; padding: 6px 14px 0; }
  .access-table td::before { content: attr(data-label) ": "; font-weight: 600; color: var(--text); }
}
