/* Self-hosted variable Latin fonts and the site’s visible CJK glyph subset. */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/dm-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(/assets/fonts/fraunces-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Noto Serif TC';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(/assets/fonts/noto-serif-tc-subset.woff2) format('woff2');
  unicode-range: U+5c07, U+7b52, U+7d22, U+842c, U+9ebb;
}

/* Pongo site design language, shared by every page.
   Tokens start from the app's Theme.swift (canvas, CTA blue, text) and add
   the physical table: bone for tiles, felt green for the band colours. */
:root {
    --paper: #f9f4f2;        /* app bgCanvas */
    --bone: #f0e6d6;
    --bone-deep: #e6d8c2;
    --ink: #221f1d;
    --copy: #4a4643;
    --muted: #6b6560;
    --line: #e0d6c9;
    --felt: #1f4a3d;
    --felt-deep: #163a30;
    --on-felt: #f4efe6;
    --on-felt-soft: #c9d8cf;
    --cobalt: #0061ef;       /* app ctaFill / brandLink */
    --cobalt-press: #0048cc; /* app ctaPressed */
    --sky: #0ca4ff;          /* app accent */
    --gold: #e3b458;
    --crimson: #b3373a;
    --display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --cjk: 'Noto Serif TC', 'Songti TC', 'Songti SC', serif;
    --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -.015em; line-height: 1.08; font-variation-settings: 'SOFT' 30, 'WONK' 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }

.wrap { width: min(100% - 64px, var(--wrap)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 300; top: -80px; left: 12px; padding: 12px 18px; background: #fff; color: var(--ink); border-radius: 4px; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cjk { font-family: var(--cjk); }

.eyebrow { display: block; font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ── Nav ─────────────────────────────────────────────── */
.site-nav { position: sticky; top: 0; z-index: 100; background: rgba(249,244,242,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-nav.is-scrolled { border-bottom-color: var(--line); }
.site-nav__inner { width: min(100% - 64px, 1280px); margin-inline: auto; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: -.02em; color: var(--ink); }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.site-nav__links { display: flex; align-items: center; gap: 28px; font-size: .92rem; font-weight: 600; }
.site-nav__links a { text-decoration: none; }
.site-nav__links a:not(.btn):hover { text-decoration: underline; text-underline-offset: 5px; }

/* ── Buttons ─────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 6px; font-family: var(--sans); font-weight: 700; font-size: .95rem; text-decoration: none; white-space: nowrap; transition: background .15s; }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #3a3532; }
.btn--light { background: var(--on-felt); color: var(--ink); }
.btn--light:hover { background: #fff; }
.app-store-badge { display: inline-flex; flex: none; border-radius: 9px; }
.app-store-badge img { display: block; height: 54px; width: auto; }
.app-store-badge--nav img { height: 40px; }
.app-store-badge:focus-visible { outline-offset: 4px; }
.text-link { color: var(--cobalt); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.text-link:hover { color: var(--cobalt-press); }

/* ── Phone frame around a real app screenshot ────────── */
.phone { margin: 0; width: min(100%, 320px); padding: 9px; background: #141313; border-radius: 52px; box-shadow: 0 30px 60px -20px rgba(34,31,29,.35), 0 0 0 1px rgba(255,255,255,.06) inset; }
.phone img { width: 100%; aspect-ratio: 720 / 1565; border-radius: 43px; background: var(--paper); }

/* ── Footer ──────────────────────────────────────────── */
.site-footer { background: var(--ink); color: #d8d0c7; padding: 64px 0 40px; font-size: .92rem; }
.site-footer__top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.site-footer .brand { color: #fff; }
.site-footer__tag { margin-top: 14px; max-width: 32ch; color: #b5aca3; line-height: 1.55; }
.site-footer h2 { font-family: var(--sans); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9d948b; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer__bottom { margin-top: 52px; padding-top: 22px; border-top: 1px solid #3b3633; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: #9d948b; font-size: .84rem; }

/* ── Interior pages: legal, support, error ───────────── */
.page-head { background: var(--bone); padding: 72px 0 64px; }
.page-head h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 600; max-width: 16ch; }
.page-head p { margin-top: 16px; color: var(--copy); font-size: 1.05rem; max-width: 56ch; }
.prose { width: min(100% - 64px, 70ch); margin: 64px auto 96px; }
.prose h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); margin: 48px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.25rem; margin: 30px 0 10px; }
.prose p, .prose li { color: var(--copy); line-height: 1.75; }
.prose p + p { margin-top: 16px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 14px 0; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--cobalt); text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose .lede { font-size: 1.2rem; line-height: 1.6; color: var(--ink); margin-bottom: 20px; }
.prose .callout { background: var(--bone); border-left: 4px solid var(--felt); padding: 18px 22px; margin: 22px 0; }
.prose .callout p { margin: 0; }

@media (max-width: 860px) {
    .site-footer__top { grid-template-columns: 1fr 1fr; }
    .site-footer__top > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .wrap, .site-nav__inner { width: calc(100% - 40px); }
    .site-nav__inner { min-height: 62px; gap: 12px; }
    .site-nav__links { gap: 16px; font-size: .88rem; }
    .site-nav__links .nav-optional { display: none; }
    .site-nav__links .btn { min-height: 38px; padding: 8px 13px; font-size: .86rem; }
    .app-store-badge--nav img { height: 36px; }
    .brand { font-size: 1.2rem; }
    .brand img { width: 26px; height: 26px; }
    .page-head { padding: 52px 0 46px; }
    .prose { width: calc(100% - 40px); margin: 44px auto 72px; }
    .site-footer { padding-top: 48px; }
}
@media (max-width: 400px) {
    .site-nav__links .nav-card { display: none; }
}
