/* GINBEC legal pages — shared styling
   Brand colors mirror the app's GColor (lib/config/color.dart). */

:root {
  --espresso: #3E1A06;   /* primary — headings, header bg */
  --gold: #D9A441;       /* secondary — accents, links */
  --cream: #FFFDF1;      /* background */
  --ink: #2b1c10;        /* body text */
  --muted: #7a6a59;      /* secondary text */
  --line: #e7ddc8;       /* hairlines */
  --card: #ffffff;
  --maxw: 760px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Noto Sans Khmer", "Khmer OS Siemreap", system-ui, -apple-system,
    "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.75;
}

/* ---------- Language toggle: show one language at a time ---------- */
.km { display: none; }
.en { display: none; }
html.show-km .km { display: revert; }
html.show-en .en { display: revert; }
/* inline variants keep flow on the same line */
span.km, span.en { display: none; }
html.show-km span.km { display: inline; }
html.show-en span.en { display: inline; }

/* ---------- Header ---------- */
.site-header {
  background: var(--espresso);
  color: var(--cream);
  padding: 22px 20px;
}
.site-header .bar {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.site-header img.logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--cream);
  object-fit: contain;
  flex: 0 0 auto;
}
.site-header .titles { flex: 1 1 auto; min-width: 0; }
.site-header .org {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--gold);
  text-transform: uppercase;
  margin: 0 0 2px;
}
.site-header h1 {
  font-size: 20px;
  margin: 0;
  font-weight: 600;
  color: var(--cream);
}

/* Language switch */
.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(217, 164, 65, 0.6);
  border-radius: 999px;
  overflow: hidden;
  flex: 0 0 auto;
}
.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--cream);
  padding: 7px 14px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
}
.lang-switch button.active {
  background: var(--gold);
  color: var(--espresso);
  font-weight: 600;
}

/* ---------- Content ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 20px 8px;
}

.page-title {
  font-size: 27px;
  color: var(--espresso);
  margin: 8px 0 4px;
  line-height: 1.4;
}
.intro {
  color: var(--muted);
  margin: 0 0 8px;
}

section.policy {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 22px;
}
section.policy h2 {
  font-size: 19px;
  color: var(--espresso);
  margin: 0 0 8px;
  line-height: 1.45;
}
section.policy p { margin: 0 0 10px; }
section.policy ul { margin: 0 0 10px; padding-left: 1.25em; }
section.policy li { margin: 0 0 6px; }

a { color: #a06b16; }
a:hover { color: var(--espresso); }

.updated {
  margin: 28px 0 8px;
  color: var(--muted);
  font-size: 15px;
  font-style: italic;
}

/* ---------- Landing page cards ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(62, 26, 6, 0.08);
}
.card h3 { margin: 0 0 6px; color: var(--espresso); font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 20px 48px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
}
.site-footer a { color: var(--muted); text-decoration: underline; }
.site-footer .nav { margin-bottom: 8px; }
.site-footer .nav a { margin-right: 16px; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-header .bar { flex-wrap: wrap; }
  .lang-switch { order: 3; }
  .cards { grid-template-columns: 1fr; }
  .page-title { font-size: 23px; }
}
