/* ─────────────────────────────────────────────────────────────────────────
 * Squirrel Wallet — site styles
 * Minimal, readable, App Store-reviewer-friendly.
 * ───────────────────────────────────────────────────────────────────────── */

:root {
  --color-bg: #FAF7F2;            /* warm off-white, evokes paper/woodland */
  --color-surface: #FFFFFF;
  --color-text: #1F1B2D;          /* near-black with violet undertone */
  --color-text-muted: #6B6480;
  --color-primary: #5B4B8A;       /* deep violet — matches App brand */
  --color-primary-soft: #ECE6F7;
  --color-accent: #B57E3F;        /* warm tan — squirrel fur */
  --color-border: #E6DFD2;
  --radius: 14px;
  --max-width: 720px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC",
               "PingFang TC", "Hiragino Sans TC", "Microsoft JhengHei",
               Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #14111D;
    --color-surface: #1F1B2D;
    --color-text: #F2EDE2;
    --color-text-muted: #A299B5;
    --color-primary: #B5A5DD;
    --color-primary-soft: #2A2440;
    --color-accent: #D4A56F;
    --color-border: #3A3450;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ─── Layout ────────────────────────────────────────────────────────────── */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.prose {
  /* legal / docs pages: more breathing room */
  padding-top: 16px;
}

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

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 32px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--color-primary);
  text-decoration: none;
}

.back-link:hover { text-decoration: underline; }

.lang-toggle {
  font-size: 14px;
  color: var(--color-text-muted);
}

.lang-toggle a {
  color: var(--color-primary);
  text-decoration: none;
  margin: 0 4px;
}

.lang-toggle a:hover { text-decoration: underline; }

/* ─── Typography ────────────────────────────────────────────────────────── */

h1 {
  font-size: 32px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

h2 {
  font-size: 22px;
  line-height: 1.35;
  font-weight: 700;
  margin: 40px 0 12px;
  color: var(--color-text);
}

h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 24px 0 8px;
}

p, ul, ol {
  margin: 0 0 16px;
}

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

li { margin-bottom: 6px; }

a {
  color: var(--color-primary);
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

strong { font-weight: 700; }

.meta {
  color: var(--color-text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ─── Language divider ──────────────────────────────────────────────────── */

.lang-divider {
  border: none;
  border-top: 1px dashed var(--color-border);
  margin: 56px 0;
}

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

.page-footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 14px;
  color: var(--color-text-muted);
  text-align: center;
}

.page-footer a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.page-footer a:hover { text-decoration: underline; }

/* ─── Landing page hero ─────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 56px 16px 48px;
}

.hero-mark {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 12px rgba(91, 75, 138, 0.18));
}

.hero h1 {
  font-size: 40px;
  letter-spacing: -0.02em;
}

.hero .tagline {
  font-size: 18px;
  color: var(--color-text-muted);
  max-width: 480px;
  margin: 12px auto 32px;
  line-height: 1.55;
}

.hero .tagline-en {
  font-size: 15px;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ─── Feature list ──────────────────────────────────────────────────────── */

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 40px;
}

@media (min-width: 600px) {
  .features { grid-template-columns: 1fr 1fr; }
}

.feature {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
}

.feature h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.feature p {
  margin: 0;
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.feature .icon {
  font-size: 28px;
  margin-bottom: 8px;
  display: block;
}

/* ─── Link cards (privacy / support links) ─────────────────────────────── */

.link-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin-top: 40px;
}

@media (min-width: 600px) {
  .link-cards { grid-template-columns: 1fr 1fr; }
}

.link-card {
  display: block;
  padding: 18px 20px;
  background: var(--color-primary-soft);
  border-radius: var(--radius);
  color: var(--color-text);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid transparent;
}

.link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(91, 75, 138, 0.15);
  border-color: var(--color-primary);
}

.link-card .label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.link-card .title {
  font-size: 17px;
  font-weight: 700;
}

/* ─── FAQ ────────────────────────────────────────────────────────────────── */

.faq {
  margin-top: 32px;
}

.faq details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px 18px;
  margin-bottom: 10px;
}

.faq summary {
  font-weight: 600;
  cursor: pointer;
  outline: none;
  list-style: none;
  padding: 4px 0;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 10px;
  color: var(--color-primary);
  transition: transform 0.15s ease;
}

.faq details[open] summary::before {
  transform: rotate(90deg);
}

.faq details > p:first-of-type {
  margin-top: 12px;
}

/* ─── Contact email box ─────────────────────────────────────────────────── */

.contact-box {
  background: var(--color-primary-soft);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 32px;
  text-align: center;
}

.contact-box .email {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  word-break: break-all;
}
