/* Hauly — shared styles for /legal/* pages.
   Mirrors the design tokens from /index.html. */

:root {
  --bg: #fafaf6;
  --ink: #181828;
  --muted: #6b6b7a;
  --accent: #ff6b4a;      /* coral — decorative */
  --accent-deep: #cc4318; /* darker coral — for text on cream (WCAG AA 4.62 ✓) */
  --line: #e5e3da;
  --card: #ffffff;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[lang="km"] body {
  font-family: 'Noto Sans Khmer', 'Inter', sans-serif;
  line-height: 1.9;
}
html[lang="km"] h1,
html[lang="km"] h2 {
  font-family: 'Noto Serif Khmer', 'Fraunces', Georgia, serif;
  line-height: 1.4;
}
html[lang="km"] .logo {
  font-family: 'Fraunces', Georgia, serif;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}
.logo {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.logo .dot { color: var(--accent); }
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}
.back {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.back:hover { color: var(--ink); }

/* Language switcher */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 13px;
}
.lang button {
  background: transparent;
  border: 0;
  padding: 4px 10px;
  border-radius: 100px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.lang button:hover { color: var(--ink); }
.lang button.active {
  background: var(--ink);
  color: white;
}
.lang button[data-lang="km"] {
  font-family: 'Noto Sans Khmer', 'Inter', sans-serif;
}

/* Main content */
main {
  padding: 56px 0 80px;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 16px;
}
html[lang="km"] .eyebrow {
  letter-spacing: 0;
  text-transform: none;
  font-weight: 700;
}
h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: clamp(36px, 5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.updated {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 40px;
}
h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 48px 0 16px;
}
h2:first-of-type { margin-top: 0; }
p {
  font-size: 17px;
  color: var(--ink);
  margin: 0 0 16px;
}
p.tldr {
  font-size: 17px;
  padding: 20px 24px;
  background: white;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  margin: 0 0 32px;
}
ul {
  font-size: 17px;
  padding-left: 24px;
  margin: 0 0 16px;
}
ul li { margin-bottom: 8px; }
a { color: var(--accent-deep); }
a:hover { color: var(--accent); }
strong { font-weight: 600; }

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  font-size: 13px;
  color: var(--muted);
}
footer .container {
  max-width: 960px;
}
footer p { font-size: 13px; margin: 6px 0; }
footer a { color: var(--muted); text-decoration: underline; }
footer a:hover { color: var(--ink); }
.legal-nav {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.legal-nav a { text-decoration: none; }

/* Mobile */
@media (max-width: 720px) {
  .nav { flex-wrap: wrap; gap: 12px; }
  .logo { font-size: 24px; }
  h1 { font-size: 32px; }
  h2 { font-size: 22px; margin-top: 36px; }
  p, ul, p.tldr { font-size: 16px; }
  main { padding: 40px 0 64px; }
}
