/* Tokens mirror the app: lib/providers/theme_provider.dart (AppColors) and
   lib/theme/design_system.dart (AppRadius, AppSpacing, AppShadows). */
:root {
  --primary: #2196f3;
  --on-primary: #ffffff;
  --bg: #f8f9fa;
  --surface: #ffffff;
  --on-surface: #212121;
  --muted: rgba(33, 33, 33, 0.62);
  --chip-fill: rgba(33, 33, 33, 0.05);
  --chip-line: rgba(33, 33, 33, 0.2);
  --divider: rgba(33, 33, 33, 0.08);
  --shadow: 0 4px 10px rgba(33, 33, 33, 0.05);
  --link: #1976d2;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #64b5f6;
    --on-primary: #000000;
    --bg: #0d1418;
    --surface: #192734;
    --on-surface: #e7e9ea;
    --muted: rgba(231, 233, 234, 0.62);
    --chip-fill: rgba(231, 233, 234, 0.05);
    --chip-line: rgba(231, 233, 234, 0.2);
    --divider: rgba(231, 233, 234, 0.1);
    --shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    --link: #64b5f6;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--on-surface);
  font-family: Roboto, "Segoe UI", system-ui, -apple-system, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

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

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

.card {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

/* Nav */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  color: var(--on-surface);
  text-decoration: none;
}

.brand img { width: 40px; height: 40px; display: block; }

.nav-links { display: flex; gap: 24px; font-size: 15px; font-weight: 500; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--on-surface); }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: center;
  gap: 48px;
  padding: 56px 0 72px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero p { margin: 0 0 28px; max-width: 30em; font-size: 1.15rem; color: var(--muted); }

.hero-art img { display: block; width: 100%; max-width: 260px; height: auto; margin: 0 auto; }

.button {
  display: inline-block;
  padding: 16px 24px;
  border-radius: 12px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.button-note { display: block; margin-top: 12px; font-size: 14px; color: var(--muted); }

/* Sections */

section h2 { margin: 0 0 20px; font-size: 1.6rem; font-weight: 700; }

.features { padding-bottom: 72px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.feature { padding: 24px; }
.feature img { width: 40px; height: 40px; display: block; margin-bottom: 16px; }
.feature h3 { margin: 0 0 6px; font-size: 19px; font-weight: 600; }
.feature p { margin: 0; color: var(--muted); }

.practice { padding-bottom: 72px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.item { display: flex; align-items: flex-start; gap: 16px; padding: 20px; }
.item img { flex: none; width: 32px; height: 32px; }
.item h3 { margin: 0 0 2px; font-size: 17px; font-weight: 600; }
.item p { margin: 0; font-size: 15px; color: var(--muted); }

/* Text pages */

.doc { max-width: 720px; padding: 32px 0 72px; }
.doc h1 { margin: 0 0 4px; font-size: 2.2rem; line-height: 1.15; }
.doc .updated { margin: 0 0 28px; font-size: 14px; color: var(--muted); }
.doc h2 { margin: 36px 0 8px; font-size: 1.3rem; }
.doc h3 { margin: 22px 0 4px; font-size: 1.05rem; }
.doc p, .doc ul, .doc ol { margin: 0 0 14px; line-height: 1.6; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 6px; }

footer { border-top: 1px solid var(--divider); font-size: 14px; color: var(--muted); }

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 24px;
  padding-bottom: 32px;
}

footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { color: var(--muted); }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 24px 0 48px; }
  .hero-art { order: -1; }
  .hero-art img { max-width: 140px; margin: 0; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .features, .practice { padding-bottom: 48px; }
  .nav-links { gap: 16px; }
}
