/* ============================================================
   ParkWhere SG — shared stylesheet for content pages
   (blog posts, blog index, About, Contact, Privacy, Terms)
   Mirrors the indigo/zinc design language of the main app.
   ============================================================ */

:root, [data-theme="dark"] {
  --bg: #09090b;
  --surface: #131316;
  --surface-2: #1c1c20;
  --surface-3: #26262b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --text-faint: #71717a;
  --accent: #818cf8;
  --accent-strong: #6366f1;
  --accent-soft: rgba(129, 140, 248, 0.14);
  --green: #34d399;
  --shadow: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.45);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --surface-3: #e4e4e7;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --text: #09090b;
  --text-muted: #52525b;
  --text-faint: #a1a1aa;
  --accent: #4f46e5;
  --accent-strong: #4338ca;
  --accent-soft: rgba(79, 70, 229, 0.08);
  --green: #059669;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.10);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ---------- Site header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 20px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.025em;
}
.site-brand:hover { text-decoration: none; }
.brand-mark {
  width: 27px;
  height: 27px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
  flex-shrink: 0;
}
.accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.site-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 56px;
  flex: 1 0 auto;
}

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.breadcrumb a { color: var(--text-muted); font-weight: 500; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--text-faint); }

/* ---------- Article meta ---------- */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 4px 0 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

/* ---------- Prose typography ---------- */
.prose { font-size: 16.5px; }
.prose h1 {
  font-size: clamp(27px, 6vw, 36px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 0 0 14px;
}
.prose h2 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 40px 0 12px;
  padding-top: 8px;
}
.prose h3 {
  font-size: 18.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 28px 0 10px;
}
.prose h4 { font-size: 16px; font-weight: 700; color: var(--text); margin: 22px 0 8px; }
.prose p { margin: 0 0 18px; color: var(--text); }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 26px; }
.prose li { margin-bottom: 9px; padding-left: 4px; }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 700; color: var(--text); }
.prose em { font-style: italic; }
.prose a { color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
.prose blockquote {
  margin: 0 0 18px;
  padding: 12px 18px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
  color: var(--text-muted);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 5px;
}

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 20px; border-radius: 12px; border: 1px solid var(--border); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.prose thead th {
  background: var(--surface-2);
  text-align: left;
  font-weight: 700;
  color: var(--text);
  padding: 11px 14px;
  white-space: nowrap;
}
.prose tbody td { padding: 10px 14px; border-top: 1px solid var(--border); color: var(--text-muted); }
.prose tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface) 50%, transparent); }

/* ---------- CTA box (link back to the app) ---------- */
.cta {
  margin: 36px 0 8px;
  padding: 22px 22px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.cta h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: var(--text); }
.cta p { margin: 0 0 14px; color: var(--text-muted); font-size: 14.5px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--accent-strong);
  color: #fff;
  font-weight: 600;
  font-size: 14.5px;
}
.btn:hover { background: var(--accent); text-decoration: none; }

/* ---------- Related / blog list ---------- */
.related { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--border); }
.related h2 { font-size: 19px; font-weight: 700; color: var(--text); margin: 0 0 16px; letter-spacing: -0.02em; }
.card-grid { display: grid; gap: 12px; }
@media (min-width: 620px) { .card-grid { grid-template-columns: 1fr 1fr; } }
.post-card {
  display: block;
  padding: 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.2s;
}
.post-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.post-card .pc-title { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.35; margin-bottom: 6px; }
.post-card .pc-desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; }

/* Blog index list */
.lede { font-size: 17px; color: var(--text-muted); margin: 0 0 28px; max-width: 60ch; }

/* ---------- FAQ ---------- */
.faq { margin-top: 12px; }
.faq details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 20px; font-weight: 400; flex-shrink: 0; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > p { padding: 0 18px 16px; margin: 0; color: var(--text-muted); font-size: 14.5px; }

/* ---------- Footer ---------- */
.site-footer {
  flex-shrink: 0;
  margin-top: 48px;
  padding: 36px 20px 40px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.footer-tag { max-width: 46ch; margin: 0 auto 18px; color: var(--text-muted); font-size: 14px; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 20px; }
.footer-nav a { color: var(--text-muted); font-weight: 600; font-size: 14px; }
.footer-nav a:hover { color: var(--accent); }
.footer-fine { max-width: 70ch; margin: 0 auto 12px; color: var(--text-faint); font-size: 12px; line-height: 1.6; }
.footer-copy { color: var(--text-faint); font-size: 12.5px; }

/* ---------- Static page hero ---------- */
.page-title { font-size: clamp(28px, 7vw, 40px); font-weight: 800; letter-spacing: -0.03em; margin: 0 0 10px; }
.page-sub { font-size: 17px; color: var(--text-muted); margin: 0 0 8px; }
.updated { font-size: 13px; color: var(--text-faint); margin-bottom: 28px; }
