/* Chorios static site — shared stylesheet. Loaded by every page;
   Cloudflare Pages serves it with a far-future cache header (see _headers).

   Design system:
   - Primary purple matches AppColors.primary (#6366F1)
   - Body font: system stack for instant LCP, no webfont round-trip
   - Mobile-first: stack vertically under 720px
   - Single column max-width 720 keeps line-length readable on desktop */
:root {
  --primary: #6366F1;
  --primary-container: #E0E7FF;
  --on-surface: #1F1F23;
  --on-surface-variant: #5C5C66;
  --surface: #FFFFFF;
  --surface-low: #F7F7FA;
  --outline: #D1D1D6;
  --radius-pill: 999px;
  --radius-card: 14px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
               Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--on-surface);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

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

/* ─── Top bar ──────────────────────────────────────────────────── */
header.topbar {
  border-bottom: 1px solid var(--outline);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--surface);
}
header.topbar .brand {
  font-weight: 800;
  font-size: 20px;
  color: var(--on-surface);
  text-decoration: none;
  letter-spacing: -0.01em;
}
header.topbar .brand:hover { text-decoration: none; color: var(--primary); }
header.topbar .brand::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  vertical-align: -6px;
  background: var(--primary);
  border-radius: 6px;
  background-image:
    linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
}

nav.lang-picker {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
nav.lang-picker button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--on-surface-variant);
  cursor: pointer;
  transition: all 0.15s ease;
}
nav.lang-picker button:hover {
  background: var(--surface-low);
  color: var(--on-surface);
}
nav.lang-picker button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ─── Page layout ─────────────────────────────────────────────── */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

h1 {
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
h2 {
  font-size: 20px;
  margin: 32px 0 12px;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 16px;
  margin: 24px 0 8px;
  font-weight: 700;
}
p { margin: 0 0 14px; }
ul {
  padding-left: 22px;
  margin: 8px 0 14px;
}
li { margin: 4px 0; }

.updated {
  color: var(--on-surface-variant);
  font-size: 14px;
  margin-bottom: 28px;
}

.footer-note {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--outline);
  color: var(--on-surface-variant);
  font-size: 14px;
}

/* ─── Locale switching — only one .lang section visible at a time. */
section.lang { display: none; }
section.lang.active { display: block; }

/* ─── Landing page ────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 64px 20px 32px;
}
.hero h1 {
  font-size: 44px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .tagline {
  font-size: 18px;
  color: var(--on-surface-variant);
  max-width: 540px;
  margin: 0 auto 24px;
}
.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-row a {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  background: var(--primary);
  color: white;
  font-weight: 600;
  border-radius: var(--radius-pill);
  text-decoration: none;
}
.cta-row a:hover { background: #4F46E5; text-decoration: none; }
.cta-row a.secondary {
  background: var(--surface);
  color: var(--on-surface);
  border: 1px solid var(--outline);
}
.cta-row a.secondary:hover { background: var(--surface-low); }

footer.site-footer {
  border-top: 1px solid var(--outline);
  padding: 32px 20px;
  text-align: center;
  color: var(--on-surface-variant);
  font-size: 14px;
}
footer.site-footer a {
  margin: 0 8px;
  color: var(--on-surface-variant);
}

@media (max-width: 500px) {
  .hero { padding: 40px 20px 24px; }
  .hero h1 { font-size: 34px; }
  h1 { font-size: 26px; }
}
