/*
 * Zym's public pages on nexotri.com: the landing behind every /zym/app/... link, the
 * privacy policy and the account-deletion page.
 *
 * The Studio palette from zym-app/src/theme/tokens.ts — cream ground, one forest green
 * doing the work of "primary", terracotta only for what should catch the eye — so a
 * member who taps the WhatsApp invite and then opens the app sees one product, not two.
 *
 * System fonts only. These pages are opened from a WhatsApp chat on a budget phone,
 * often on mobile data, and the app's DM Sans and Fraunces would triple what the page
 * weighs for a heading. Android ships Noto Sans and Noto Serif Devanagari, so Marathi
 * and Hindi render properly without a webfont either.
 *
 * No inline styles anywhere: the nginx location serves these pages with style-src
 * 'self', so a style="" attribute would simply be ignored.
 */

:root {
  --bg: #F4F1EA;
  --surface: #FFFFFF;
  --surface-alt: #EFEADF;
  --border: #E4DED2;
  --border-strong: #CFC6B5;
  --text: #1B1D1A;
  --text-muted: #5C6057;
  --text-subtle: #686C63;
  --primary: #1E3A2F;
  --primary-hover: #152B22;
  --primary-soft: #E4ECE6;
  --on-primary: #FFFFFF;
  --hero: #1E3A2F;
  --on-hero: #FFFFFF;
  --on-hero-muted: rgba(255, 255, 255, 0.74);
  --hero-inset: rgba(255, 255, 255, 0.12);
  --accent: #B8511F;
  --accent-soft: #F6E6DA;
  --accent-text: #8A3A13;
  --warning-soft: #FBEFD9;
  --warning-text: #7A4906;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Nirmala UI", sans-serif;
  --serif: "Noto Serif", Georgia, "Noto Serif Devanagari", "Nirmala UI", "Times New Roman", serif;
  --gutter: 16px;
  --radius: 16px;
  --radius-sm: 12px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111412;
    --surface: #1A1E1B;
    --surface-alt: #232824;
    --border: #2C322D;
    --border-strong: #3B423C;
    --text: #EEF0EA;
    --text-muted: #A9AEA4;
    --text-subtle: #8C9187;
    --primary: #A7D5B9;
    --primary-hover: #C3E4D0;
    --primary-soft: rgba(167, 213, 185, 0.14);
    --on-primary: #0F1A14;
    --hero: #1F3A2E;
    --on-hero: #EEF0EA;
    --on-hero-muted: rgba(238, 240, 234, 0.72);
    --hero-inset: rgba(238, 240, 234, 0.1);
    --accent: #F08A5D;
    --accent-soft: rgba(240, 138, 93, 0.16);
    --accent-text: #F6B391;
    --warning-soft: rgba(227, 163, 59, 0.16);
    --warning-text: #F2CD8C;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

/* Devanagari's vowel signs sit above and below the line; Latin line heights crop them. */
:lang(mr), :lang(hi) { line-height: 1.6; }

a { color: var(--primary); }
a:focus-visible,
button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

[hidden] { display: none !important; }

.page {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--gutter) 32px;
}

.page.doc { max-width: 720px; }

/* --- top bar: the mark and the language switch --------------------------------- */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand svg { width: 30px; height: 30px; flex: none; border-radius: 8px; }

.langs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.langs button {
  min-height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.langs button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }

/* --- the landing --------------------------------------------------------------- */

.hero {
  padding: 22px 20px 20px;
  border-radius: 20px;
  background: var(--hero);
  color: var(--on-hero);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--on-hero-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hero h1:lang(mr), .hero h1:lang(hi) { line-height: 1.4; }

.hero .sub { margin: 10px 0 0; color: var(--on-hero-muted); font-size: 15px; }

.code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

/* Lets a long code break at its space on a narrow phone instead of pushing the button off. */
.code > div { min-width: 0; }

.code-label { margin: 0; color: var(--text-muted); font-size: 13px; font-weight: 600; }

.code-value {
  margin: 2px 0 0;
  font-family: ui-monospace, "Roboto Mono", "Noto Sans Mono", Menlo, monospace;
  font-size: clamp(24px, 8vw, 30px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.06em;
}

.copy {
  flex: none;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.notice {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--warning-soft);
  color: var(--warning-text);
  font-size: 15px;
  font-weight: 600;
}

.actions { display: grid; gap: 10px; margin-top: 16px; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.primary:active { background: var(--primary-hover); }
.btn.secondary { border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text); }

.hint { margin: 10px 2px 0; color: var(--text-muted); font-size: 14px; }

.steps {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  min-height: 28px;
  margin: 0 0 10px;
  padding-left: 38px;
  font-size: 15px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
}

.early {
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  font-size: 14px;
}

.early p { margin: 0; }
.early strong { color: var(--accent-text); }
.early a { display: inline-block; margin-top: 6px; color: var(--accent-text); font-weight: 700; }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin-top: 28px;
  color: var(--text-subtle);
  font-size: 13px;
}

.foot a { color: var(--text-muted); }

/* --- the privacy policy and the deletion page ---------------------------------- */

.doc h1 {
  margin: 8px 0 4px;
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.2;
}

.doc h1:lang(mr), .doc h1:lang(hi) { line-height: 1.4; }

.doc .meta { margin: 0 0 18px; color: var(--text-muted); font-size: 14px; }

.doc h2 {
  margin: 28px 0 8px;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.3;
}

.doc h3 { margin: 18px 0 6px; font-size: 16px; }

.doc p, .doc li { font-size: 16px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 4px 0; }

.doc .lead {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}

.doc .card {
  margin: 12px 0;
  padding: 4px 16px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.doc .card h3 { margin-top: 12px; }

.doc .translation-note { color: var(--text-muted); font-size: 14px; }

.table-wrap { overflow-x: auto; }

.doc table {
  width: 100%;
  margin: 8px 0;
  border-collapse: collapse;
  font-size: 15px;
}

.doc th, .doc td {
  padding: 8px 10px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.doc th { background: var(--surface-alt); }

@media (min-width: 560px) {
  .hero { padding: 28px 26px 24px; }
  .hero h1 { font-size: 32px; }
  .doc h1 { font-size: 36px; }
}
