/* Single source of truth for the marketing/legal site's styling. Linked once
  from base.html so every page shares the same chrome, prose treatment, and
  dark-mode behaviour. Class names follow BEM. */

:root {
  --brand-gradient: linear-gradient(135deg, #f2ab4e 0%, #eb9b34 100%);
  --font-stack: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text: #1a1a1a;
  --text-muted: #666;
  --link: #0b5cad;
  --background: #fff;
  --footer-border: #e6e6e6;
}

/* The body is a full-height flex column so the footer settles at the bottom
  even on short pages, while the page content grows to fill the space. */
html,
body {
  margin: 0;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font-stack);
  color: var(--text);
  background: var(--background);
}

/* Header — the brand bar carrying the wordmark on every page. */
.site-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--brand-gradient);
  padding: 0.5rem;
}
.site-header__wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #000;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.site-header__logo {
  height: 3.5rem;
  width: auto;
}
/* Language switcher: a no-JS <details> disclosure styled as a dropdown, so it
  scales from two languages to many without a bespoke control. */
.lang-switch {
  position: relative;
  margin-right: 0.5rem;
}
.lang-switch__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  color: #000;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
}
/* Hide the default disclosure triangle in both engines. */
.lang-switch__toggle::-webkit-details-marker {
  display: none;
}
.lang-switch__toggle:hover {
  background: rgba(0, 0, 0, 0.08);
}
.lang-switch__globe,
.lang-switch__caret {
  flex-shrink: 0;
}
.lang-switch__caret {
  transition: transform 0.15s ease;
}
.lang-switch[open] .lang-switch__caret {
  transform: rotate(180deg);
}
.lang-switch__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 10;
  min-width: 9rem;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--background);
  border: 1px solid var(--footer-border);
  border-radius: 0.6rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.lang-switch__item {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.4rem;
  color: var(--text);
  font-size: 0.95rem;
  text-decoration: none;
}
.lang-switch__item:hover {
  background: rgba(127, 127, 127, 0.15);
}
.lang-switch__item--current {
  font-weight: 700;
}

/* Page — the centered prose container shared by every content page. */
.page {
  flex: 1 0 auto;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  line-height: 1.6;
}
.page h1 {
  margin-bottom: 0.25rem;
}
.page h2 {
  margin-top: 2.5rem;
}
.page a {
  color: var(--link);
}
.page__updated {
  margin-top: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Footer — navigation between the site's pages. */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--footer-border);
  padding: 1.5rem 1.25rem;
}
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
  max-width: 42rem;
  margin: 0 auto;
}
.site-footer__link {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
}
.site-footer__link:hover {
  color: var(--link);
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6e6e6;
    --text-muted: #9a9a9a;
    --link: #6cb2ff;
    --background: #121212;
    --footer-border: #2a2a2a;
  }
}
