:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1e2233;
  --muted: #636b80;
  --border: #e4e7f0;
  --primary: #6d5efc;
  --primary-hover: #5a4de0;
  --primary-light: #eeecff;
  --gradient: linear-gradient(135deg, #6d5efc 0%, #a06bfa 100%);
  --radius: 16px;
  --shadow: 0 4px 10px rgba(30, 34, 51, 0.08), 0 2px 4px rgba(30, 34, 51, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141d;
    --surface: #1b1e2b;
    --text: #e8eaf3;
    --muted: #a0a7bd;
    --border: #2b2f42;
    --primary: #8b7fff;
    --primary-hover: #a096ff;
    --primary-light: #272446;
    --shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5rem; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--muted); }

.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

/* Header and footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.bar nav { white-space: nowrap; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.site-header nav a, .site-footer nav a { margin-left: 1.25rem; text-decoration: none; color: var(--muted); }
.site-header nav a:hover, .site-footer nav a:hover { color: var(--primary); }

.site-footer { border-top: 1px solid var(--border); margin-top: 3rem; padding: 1.5rem 0; color: var(--muted); font-size: 0.9rem; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; }
.site-footer p { margin: 0; }

/* Hero */
.hero { background: var(--gradient); color: #fff; padding: 4rem 0; text-align: center; }
.hero .lead { font-size: 1.25rem; max-width: 640px; margin: 0.5rem auto 0; opacity: 0.95; }
.app-icon { border-radius: 24px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); margin-bottom: 1rem; }
.hero .summary { max-width: 640px; margin: 1rem auto 0; opacity: 0.9; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1.5rem; }

.button {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: #fff;
  color: #4b3fd0;
  font-weight: 600;
  text-decoration: none;
}
.button:hover { color: #3a2fb5; background: #f1efff; }
.button.secondary { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, 0.7); }
.button.secondary:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.badge-soon { display: inline-block; margin: 0; padding: 0.6rem 1.2rem; border-radius: 999px; background: rgba(255, 255, 255, 0.2); font-weight: 600; }

/* Sections and cards */
.section { padding-top: 2.5rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); list-style: none; padding: 0; margin: 1rem 0 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.card p { margin: 0; }
.app-card { display: flex; gap: 1rem; color: inherit; text-decoration: none; }
.app-card:hover { color: inherit; border-color: var(--primary); }
.app-card img { border-radius: 16px; flex: none; align-self: flex-start; }
.app-card p.muted { margin-bottom: 0.5rem; }

.shots { display: flex; gap: 1rem; overflow-x: auto; padding: 1rem 1.25rem; scroll-snap-type: x proximity; scroll-padding-left: 1.25rem; }
@media (min-width: 1040px) { .shots { padding-left: calc((100vw - 1040px) / 2 + 1.25rem); scroll-padding-left: calc((100vw - 1040px) / 2 + 1.25rem); } }
.shots figure { margin: 0; flex: none; width: 270px; scroll-snap-align: start; }
.shots img { border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow); display: block; }
.shots figcaption { margin-top: 0.5rem; text-align: center; color: var(--muted); font-size: 0.9rem; }

.links { padding-left: 1.25rem; }
.links li { margin-bottom: 0.4rem; }

/* Legal and text pages */
.prose { max-width: 760px; padding-top: 2.5rem; }
.prose h1 { font-size: 2rem; }
.prose section { margin-top: 1.75rem; }
.prose h2 { font-size: 1.2rem; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 0.4rem; }
.crumb { font-size: 0.95rem; }

@media (max-width: 520px) {
  .hero { padding: 3rem 0; }
  .app-card { flex-direction: column; }
}
