/* Shared chrome + typography for the static legal pages (privacy / terms / dpa /
   subprocessors), styled to match the React landing page (src/components/LandingPage.tsx).
   These files are plain HTML served from /public, so the styling is hand-written rather
   than Tailwind. Light theme only. */

:root {
  --primary: #5ea368;
  --primary-dark: #528f5b;
  --chrome: #152a1d;
  --ink: #243126;
  --border: #dedccf;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: "Anuphan", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    "Noto Sans Thai", "Sarabun", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* The shared site header (logo, nav, ฟีเจอร์ mega menu, mobile drawer) is injected by
   /site-header.js and styles itself -- see marketing/public/site-header.js. */

/* ---------- Content ---------- */

.legal-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.legal-main h1,
.legal-main h2,
.legal-main h3 {
  font-family: "IBM Plex Sans Thai", "Anuphan", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", "Noto Sans Thai", "Sarabun", sans-serif;
}
.legal-main h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
}
.legal-main h2 {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 2.75rem 0 0.75rem;
}
.legal-main h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.75rem 0 0.4rem;
}
.legal-main p {
  margin: 0 0 1rem;
  color: rgba(36, 49, 38, 0.8);
}
.legal-main .meta {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 2.5rem;
}
.legal-main p.subhead {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.legal-main ul,
.legal-main ol {
  padding-left: 1.4rem;
  margin: 0 0 1rem;
  color: rgba(36, 49, 38, 0.8);
}
.legal-main li {
  margin-bottom: 0.45rem;
}
.legal-main strong {
  color: var(--ink);
}
.legal-main hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}
.legal-main code {
  background: rgba(94, 163, 104, 0.12);
  color: var(--ink);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

.legal-main table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.92rem;
}
.legal-main th,
.legal-main td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  vertical-align: top;
}
.legal-main thead {
  background: #f0f5f1;
}
.legal-main th {
  font-weight: 600;
  color: var(--ink);
}

.legal-main .table-scroll {
  overflow-x: auto;
}

/* ---------- Footer (mirrors SiteFooter) ---------- */

.legal-footer {
  background: var(--chrome);
  color: #fff;
}
.legal-footer__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
}
.legal-footer__grid {
  display: grid;
  gap: 2.5rem;
}
.legal-footer__brand img {
  height: 2rem;
  width: auto;
  display: block;
}
.legal-footer__tagline {
  margin: 1rem 0 0;
  max-width: 20rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}
.legal-footer__socials {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.75rem;
}
.legal-footer__socials a {
  display: flex;
  height: 2.25rem;
  width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  transition: background 0.15s ease, color 0.15s ease;
}
.legal-footer__socials a:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  text-decoration: none;
}
.legal-footer__socials svg {
  height: 1rem;
  width: 1rem;
}

.legal-footer__col h2 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}
.legal-footer__col ul {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}
.legal-footer__col li {
  margin-bottom: 0.75rem;
}
.legal-footer__col a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}
.legal-footer__col a:hover {
  color: #fff;
  text-decoration: none;
}

.legal-footer__bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}
.legal-footer__bottom-links {
  display: flex;
  gap: 1.5rem;
}
.legal-footer__bottom-links a {
  color: rgba(255, 255, 255, 0.45);
}
.legal-footer__bottom-links a:hover {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

@media (min-width: 640px) {
  .legal-footer__inner {
    padding: 2rem 2rem 2.5rem;
  }
  .legal-footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
@media (min-width: 768px) {
  .legal-footer__grid {
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  }
}
