:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #5b616c;
  --line: #e3e2de;
  --accent: #b4232a;
  --accent-soft: #fbefee;
  --ok: #17703c;
  --ok-soft: #e7f4ec;
  --wip: #8a5a00;
  --wip-soft: #fbf2df;
  --wide: 64rem;
  --gutter: clamp(1rem, 5vw, 2.5rem);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121317;
    --surface: #1a1c21;
    --text: #ebe9e6;
    --muted: #a2a8b3;
    --line: #2c2f37;
    --accent: #4fd1c0;
    --accent-soft: #14272a;
    --ok: #6fd39a;
    --ok-soft: #16261d;
    --wip: #e8c070;
    --wip-soft: #2a2316;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

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

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 10; }

/* Header */
header.site { border-bottom: 1px solid var(--line); }
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4rem; flex-wrap: wrap;
}
.mark { font-weight: 650; font-size: 1.125rem; letter-spacing: -.01em; text-decoration: none; }
.mark span { color: var(--accent); }
nav.site ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
nav.site a { text-decoration: none; color: var(--muted); font-size: .95rem; }
nav.site a:hover { color: var(--text); }

/* Hero */
.hero { padding-block: clamp(3rem, 10vw, 6rem) clamp(2.5rem, 7vw, 4rem); }
.hero h1 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem);
  line-height: 1.1; letter-spacing: -.03em; font-weight: 650;
  margin: 0 0 1.5rem; text-wrap: balance;
}
.hero p { font-size: clamp(1.075rem, 1rem + .4vw, 1.25rem); color: var(--muted); max-width: 40rem; margin: 0; }
.hero .cta { margin-top: 2rem; display: flex; gap: .75rem; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: .7rem 1.2rem; border-radius: .5rem;
  text-decoration: none; font-weight: 550; font-size: .975rem;
  border: 1px solid var(--line); background: var(--surface);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { color: #fff; filter: brightness(1.08); }
@media (prefers-color-scheme: dark) { .btn.primary { color: #0b1f1d; } .btn.primary:hover { color: #0b1f1d; } }

/* Sections */
section { padding-block: clamp(2.5rem, 7vw, 4rem); border-top: 1px solid var(--line); }
section h2 { font-size: 1.6rem; letter-spacing: -.02em; margin: 0 0 .5rem; font-weight: 650; }
section .lead { color: var(--muted); margin: 0 0 2rem; max-width: 42rem; }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: .75rem;
  padding: 1.4rem 1.4rem 1.25rem; display: flex; flex-direction: column; gap: .6rem;
  transition: border-color .15s;
}
.card:hover { border-color: var(--muted); }
.card h3 { margin: 0; font-size: 1.15rem; letter-spacing: -.01em; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: " ↗"; color: var(--muted); font-weight: 400; }
.card p { margin: 0; color: var(--muted); font-size: .975rem; }
.card .for { font-size: .875rem; color: var(--muted); margin-top: auto; padding-top: .5rem; }
.card .for strong { color: var(--text); font-weight: 550; }

.tag {
  align-self: flex-start; font-size: .75rem; font-weight: 600; letter-spacing: .02em;
  padding: .15rem .55rem; border-radius: 99rem;
}
.tag.live { color: var(--ok); background: var(--ok-soft); }
.tag.wip { color: var(--wip); background: var(--wip-soft); }

.principles { display: grid; gap: 1.5rem 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.principles h3 { font-size: 1.025rem; margin: 0 0 .35rem; }
.principles p { margin: 0; color: var(--muted); font-size: .975rem; }

.contact { display: flex; flex-wrap: wrap; gap: 2rem 4rem; align-items: flex-start; }
.contact p { margin: 0 0 .25rem; }
.contact .big { font-size: 1.3rem; font-weight: 600; }

/* Footer */
footer.site { border-top: 1px solid var(--line); padding-block: 2rem; color: var(--muted); font-size: .9rem; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
footer.site ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }

/* Legal pages */
.legal { padding-block: 3rem 4rem; max-width: 42rem; }
.legal h1 { font-size: 2rem; letter-spacing: -.02em; margin: 0 0 1.5rem; }
.legal h2 { font-size: 1.15rem; margin: 2rem 0 .5rem; }
.legal p, .legal li { color: var(--muted); }
.legal address { font-style: normal; }
