/* Landing pages only — the app ships its own styles through emotion and never loads this.
   Colours mirror the app's palette (main.tsx): white / #f0f0f0 in light, black / #303030 in
   dark, brand #1976d2. */

:root {
  --bg: #ffffff;
  --surface: #f0f0f0;
  --text: #14181f;
  --muted: #4a5361;
  --brand: #1976d2;
  --brand-contrast: #ffffff;
  --border: #dfe3e8;
  --maxw: 62rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1d2733;
    --text: #eef2f7;
    --muted: #a8b3c1;
    --brand: #5b9bea;
    --brand-contrast: #0b1017;
    --border: #2b3644;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

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

img {
  max-width: 100%;
  height: auto;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--surface);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}

/* Header: the language switcher lives above the fold on purpose. The root redirects by
   Accept-Language, so a visitor who was sent to the wrong locale needs a visible way out
   without scrolling. */
.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: inherit;
  text-decoration: none;
}

.lang-switch {
  display: flex;
  gap: 0.25rem;
}

.lang-switch a,
.lang-switch button,
.lang-current {
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.lang-current {
  background: var(--brand);
  color: var(--brand-contrast);
}

/* On 404.html the switcher is buttons, not links: it rewrites the page instead of navigating.
   It has to end up looking identical, so this only strips the browser's button chrome — and
   the .lang-current rule below wins back the active state the reset would otherwise flatten. */
.lang-switch button {
  border: 0;
  background: none;
  font-family: inherit;
  line-height: inherit;
  color: var(--brand);
  cursor: pointer;
}

.lang-switch button.lang-current {
  background: var(--brand);
  color: var(--brand-contrast);
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

section {
  margin: 3.5rem 0;
}

h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.375rem;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}

h3 {
  font-size: 1.0625rem;
  margin: 1.75rem 0 0.25rem;
}

p {
  margin: 0 0 1rem;
}

.hero {
  margin-top: 2rem;
  max-width: 42rem;
}

.lede {
  font-size: 1.125rem;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.625rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--brand);
  color: var(--brand-contrast);
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}

.features {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.features article {
  background: var(--surface);
  border-radius: 0.875rem;
  padding: 1.25rem;
}

.features p {
  margin: 0;
  color: var(--muted);
}

.steps ol {
  margin: 0;
  padding-left: 1.25rem;
}

.steps li {
  margin-bottom: 0.5rem;
}

.course-size {
  color: var(--muted);
  font-size: 0.9375rem;
}

.faq p {
  color: var(--muted);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}

/* Root fallback page — only seen if the nginx language redirect is not in place. */
.chooser {
  text-align: center;
  padding-top: 4rem;
}

.chooser ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 0;
}

.chooser a {
  font-weight: 600;
  font-size: 1.125rem;
}

/* 404: the headline is the whole page, so it sits centred rather than left-aligned like a
   landing hero. Vertical padding scales with the viewport instead of centring on the full
   height — the header has to stay where it is on every other page. */
.notfound {
  text-align: center;
  padding-top: clamp(3rem, 14vh, 8rem);
}

.notfound h1 {
  margin-bottom: 2rem;
}

.notfound .code {
  color: var(--brand);
}

.notfound .actions {
  justify-content: center;
}
