/* Shared design tokens + components for tomescroll.app — mirrors lib/theme/app_theme.dart
   in the Flutter app (gold #D38F56 / blue #4A90D9 accents, near-black surfaces). Keep the
   two in sync: if the app's AppTheme colors change, update --gold/--blue here too. */

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

:root {
  --gold: #D38F56;
  --blue: #4A90D9;
  --bg: #121212;
  --bg-elevated: #1A1A1A;
  --surface: #1E1E1E;
  --text: #F0F0F0;
  --text-muted: rgba(240, 240, 240, 0.65);
  --text-dim: rgba(240, 240, 240, 0.45);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Nav ─── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 18, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav-logo svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav a:not(.nav-logo) {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

nav a:not(.nav-logo):hover {
  color: var(--text);
}

/* ─── Store badges ─── */
.badges {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.7rem 1.4rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.2s, transform 0.15s;
}

.badge-btn:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.badge-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.badge-btn .badge-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
  display: block;
  line-height: 1;
}

.badge-btn .badge-label {
  display: block;
  line-height: 1.2;
}

@media (max-width: 500px) {
  .badges {
    flex-direction: column;
    align-items: center;
  }
}

/* ─── Footer ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

footer a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--gold);
}

footer .footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

/* ─── Legal / doc pages (privacy, terms, delete-account) ─── */
main.doc {
  flex: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
  width: 100%;
}

.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.page-header .last-updated {
  color: var(--text-muted);
  font-size: 0.9rem;
}

main.doc h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

main.doc h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
}

main.doc p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

main.doc ul,
main.doc ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

main.doc li {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

main.doc a {
  color: var(--blue);
  text-decoration: none;
}

main.doc a:hover {
  text-decoration: underline;
}

.highlight-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.highlight-box p {
  margin: 0;
  font-size: 0.9rem;
}
