/*
 * Shared foundation for every page: type, spacing, header, buttons, footer.
 * Colours come from themes.css.
 */
:root {
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --page: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, p { margin-top: 0; }
[hidden] { display: none !important; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }

/* Header: wordmark on the left, navigation on the right. */
.masthead {
  max-width: var(--page); margin: 0 auto; padding: 22px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 84px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap;
}
.brand-mark {
  width: 22px; height: 22px; border-radius: 6px; background: var(--accent);
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 5px; flex: none;
}
.brand-mark i { display: block; border-radius: 50%; background: var(--on-accent); opacity: .9; }
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a {
  padding: 8px 12px; border-radius: 999px; font-size: 14px; color: var(--muted);
  transition: color .15s, background-color .15s;
}
.site-nav a:hover { color: var(--ink); background: var(--soft); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.site-nav .nav-lang {
  margin-left: 6px; border: 1px solid var(--line); color: var(--ink);
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
}

/* Buttons: one filled, one outlined, one quiet. Same size everywhere. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent);
  font-size: 14px; font-weight: 600; line-height: 1.2; text-align: center; white-space: nowrap;
  transition: filter .15s, background-color .15s, border-color .15s;
}
.btn:hover { filter: brightness(.92); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { filter: none; border-color: var(--ink); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--muted); padding: 0 6px; }
.btn.quiet:hover { filter: none; color: var(--ink); }

/* Footer: one quiet line of links and the trademark note. */
.site-footer { border-top: 1px solid var(--line); margin-top: 0; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 14px 32px; padding-top: 28px; padding-bottom: 36px;
  font-size: 12.5px; color: var(--muted);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { color: var(--ink); }
.footer-links a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.footer-note { margin: 0; max-width: 620px; line-height: 1.6; }

@media (max-width: 600px) {
  .masthead { flex-wrap: wrap; gap: 6px 12px; min-height: 0; padding-top: 22px; padding-bottom: 14px; }
  .masthead .site-nav { width: 100%; justify-content: flex-start; margin-left: -12px; flex-wrap: nowrap; overflow-x: auto; }
  .site-nav a { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
