:root {
  color-scheme: light dark;
  --bg: #f6f8fb;
  --fg: #0e1726;
  --muted: #55627a;
  --line: rgba(14, 23, 38, 0.12);
  --accent: #0a7cff;
  --accent-2: #00b8a9;
  --pill-bg: rgba(10, 124, 255, 0.1);
  --glow: rgba(10, 124, 255, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070b14;
    --fg: #eef2fa;
    --muted: #93a0b8;
    --line: rgba(238, 242, 250, 0.14);
    --accent: #4da3ff;
    --accent-2: #2dd4bf;
    --pill-bg: rgba(77, 163, 255, 0.14);
    --glow: rgba(77, 163, 255, 0.22);
  }
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(60rem 30rem at 50% -10%, var(--glow), transparent 70%),
    var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }

/* header / footer */

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 1.25rem 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--fg);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img { display: block; }

.site-footer {
  justify-content: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer a { color: inherit; }
.site-footer a:hover { color: var(--fg); }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 600;
}
.lang-switch a {
  padding: 0.3rem 0.8rem;
  color: var(--muted);
  text-decoration: none;
}
.lang-switch a:hover { color: var(--fg); }
.lang-switch a.is-active {
  background: var(--pill-bg);
  color: var(--accent);
}

/* hero (home + 404) */

.hero {
  flex: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.25rem;
  padding: 3rem 1.5rem 4rem;
  text-align: center;
}

.hero-logo { width: 4.5rem; height: 4.5rem; }

.hero h1 {
  margin: 0;
  font-size: clamp(2.75rem, 9vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pill {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lead {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--muted);
}

.error-code {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.2em;
}

.actions {
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-ghost { border-color: var(--line); color: var(--fg); }
.btn:hover { filter: brightness(1.1); }

/* legal pages */

.legal-main {
  flex: 1;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}
.legal-back:hover { color: var(--fg); }
.legal-back svg { width: 1.1rem; height: 1.1rem; }

.legal-main h1 {
  margin: 0 0 2rem;
  font-size: clamp(2rem, 6vw, 2.75rem);
  letter-spacing: -0.02em;
}

.legal-section { padding: 1.25rem 0; border-top: 1px solid var(--line); }
.legal-section h2 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.legal-section p { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
