/* Pond legal pages — warm, on-brand styling.
   Brand tokens mirror constants/theme.ts (lightPalette) plus the splash
   cream from app.json. Serif headings + cream background to feel less
   "lawyer page" and more "letter from a friend". No external fonts so
   the privacy page itself stays request-light. */

:root {
  /* Warm cream paper — derived from the splash background (#F2E7D6) but
     softened so long reading bodies stay easy on the eyes. */
  --cream: #fbf4e8;
  --cream-deep: #f2e7d6;
  --cream-line: #ead9bf;
  /* Brand colors copied from constants/theme.ts. */
  --teal: #8fb97a;
  --coral: #7fd6d1;
  --ink: #26333d;
  --slate: #687783;
  --cloud: #ffffff;
  --shadow: rgba(38, 51, 61, 0.08);

  --serif: "Newsreader", "Source Serif Pro", "Charter", "Iowan Old Style",
    "Palatino Linotype", "URW Palladio L", P052, "Hiragino Mincho ProN",
    "Songti SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Avenir Next", "Helvetica Neue",
    Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --cream: #14181d;
    --cream-deep: #0e141a;
    --cream-line: #2a3340;
    --ink: #ece2cd;
    --slate: #a89a82;
    --cloud: #1a2128;
    --shadow: rgba(0, 0, 0, 0.35);
  }
}

/* Chinese-language pages get a warmer, rounder type stack — Yuanti
   (rounded gothic) for body, Hannotate (handwritten kaiti) for
   headings — so the docs read more like a friendly note than a
   government form. Latin glyphs still come from the system Latin
   fonts at the front of the stack via per-glyph fallback; the cute
   CJK faces only kick in for Chinese codepoints. */
html[lang="zh"] {
  --serif: "Newsreader", "Source Serif Pro", "Charter", "Iowan Old Style",
    "Palatino Linotype", "URW Palladio L", P052,
    "Hannotate SC", "Yuanti SC", "STYuanti",
    "Hiragino Maru Gothic ProN", "KaiTi", "STKaiti",
    "Hiragino Mincho ProN", "Songti SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Avenir Next", "Helvetica Neue",
    Helvetica, "Yuanti SC", "STYuanti", "Hiragino Maru Gothic ProN",
    "PingFang SC", "DengXian", "Microsoft YaHei", "Hiragino Sans GB",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Soft brand wash — subtle ripples behind the page that hint at the
   icon without competing with the type. Pinned to the page so they
   stay decorative even when scrolling long documents. */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(48px);
  opacity: 0.5;
}

body::before {
  width: 480px;
  height: 480px;
  top: -180px;
  left: -160px;
  background: radial-gradient(closest-side, #7fd6d122, transparent 70%);
}

body::after {
  width: 520px;
  height: 520px;
  bottom: -220px;
  right: -200px;
  background: radial-gradient(closest-side, #8fb97a22, transparent 70%);
}

main {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* ── Header ────────────────────────────────────────────────────────── */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 8px 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  box-shadow: 0 4px 16px var(--shadow);
}

.brand .wordmark {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--teal);
}

nav {
  display: flex;
  gap: 4px;
}

nav a {
  color: var(--slate);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  transition: background 120ms ease, color 120ms ease;
}

nav a:hover {
  background: var(--cloud);
  color: var(--ink);
}

/* ── Document card ─────────────────────────────────────────────────── */

article {
  background: var(--cloud);
  border: 1px solid var(--cream-line);
  border-radius: 24px;
  padding: 40px clamp(20px, 5vw, 56px);
  box-shadow: 0 24px 48px -28px var(--shadow);
}

.kicker {
  display: inline-block;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 16px;
}

h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 5.4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin: 0 0 12px;
  color: var(--ink);
}

.subtitle {
  color: var(--slate);
  font-size: 15px;
  margin: 0 0 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
}

.subtitle .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cream-line);
  display: inline-block;
}

h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.2px;
  margin: 36px 0 8px;
  color: var(--ink);
}

h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--teal);
  margin: 24px 0 4px;
}

p,
ul,
ol {
  margin: 8px 0 14px;
  color: var(--ink);
}

ul,
ol {
  padding-left: 22px;
}

li {
  margin-bottom: 6px;
}

a {
  color: var(--teal);
  text-decoration-color: rgba(143, 185, 122, 0.4);
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-color: var(--teal);
}

strong {
  color: var(--ink);
  font-weight: 600;
}

em {
  font-style: italic;
  color: var(--ink);
}

code {
  background: var(--cream);
  border: 1px solid var(--cream-line);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 14px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* ── Index hero ────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding-top: 8px;
}

.hero img {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 12px 32px var(--shadow);
  margin-bottom: 20px;
}

.hero .wordmark {
  font-size: 32px;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: -0.6px;
}

.hero h1 {
  margin-top: 8px;
}

.hero .tagline {
  color: var(--slate);
  max-width: 480px;
  margin: 4px auto 36px;
  font-size: 17px;
}

.doc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0 auto 24px;
  max-width: 520px;
  text-align: left;
}

.doc-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: var(--cloud);
  border: 1px solid var(--cream-line);
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  transition: transform 120ms ease, box-shadow 120ms ease,
    border-color 120ms ease;
}

.doc-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px -16px var(--shadow);
  border-color: var(--teal);
}

.doc-card .label {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}

.doc-card .meta {
  font-size: 13px;
  color: var(--slate);
}

.doc-card .arrow {
  color: var(--teal);
  font-size: 22px;
  line-height: 1;
}

.lang-block {
  margin-top: 32px;
  text-align: left;
}

.lang-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--slate);
  margin: 0 0 12px;
}

.lang-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--cream-line);
}

/* ── Footer ────────────────────────────────────────────────────────── */

footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--cream-line);
  color: var(--slate);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

footer .lang-switch a {
  color: var(--slate);
  text-decoration: none;
  border-bottom: 1px dotted var(--cream-line);
}

footer .lang-switch a:hover {
  color: var(--ink);
  border-bottom-color: var(--slate);
}

@media (max-width: 540px) {
  main {
    padding: 24px 16px 72px;
  }
  article {
    padding: 32px 22px;
    border-radius: 20px;
  }
  nav a {
    padding: 6px 10px;
  }
  .hero img {
    width: 84px;
    height: 84px;
  }
}
