/* kiwiprojekt site. Tokens match /brand. Radius rule: buttons are pills, media and panels 14px. */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("../fonts/jetbrains-mono-400.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("../fonts/jetbrains-mono-500.woff2") format("woff2"); }

:root {
  --sage: #B6E09A;
  --lime: #C8E877;
  --yellow: #F0EF8E;

  --paper: #F5F6F1;
  --paper-2: #ECEEE6;
  --ink: #171A14;
  --ink-2: #4A5044;
  --line: #D9DCD2;
  --accent: #3D6B21;
  --accent-ink: #F5F6F1;
  --shadow: 0 1px 0 rgb(23 26 20 / .04), 0 24px 48px -24px rgb(42 58 22 / .28);

  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 14px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121510;
    --paper-2: #1A1E17;
    --ink: #EDF0E7;
    --ink-2: #A9B0A0;
    --line: #2A2F26;
    --accent: #B6E09A;
    --accent-ink: #121510;
    --shadow: 0 1px 0 rgb(0 0 0 / .2), 0 24px 48px -24px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121510;
  --paper-2: #1A1E17;
  --ink: #EDF0E7;
  --ink-2: #A9B0A0;
  --line: #2A2F26;
  --accent: #B6E09A;
  --accent-ink: #121510;
  --shadow: 0 1px 0 rgb(0 0 0 / .2), 0 24px 48px -24px rgb(0 0 0 / .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 30; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 999px; }

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

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.is-stuck { border-bottom-color: var(--line); }
.nav .wrap { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: auto; }
.brand span { font-weight: 600; letter-spacing: -0.02em; font-size: 1.15rem; }
.nav ul { list-style: none; display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; }
.nav a.link { text-decoration: none; color: var(--ink-2); font-size: .94rem; padding: 10px 12px; border-radius: 999px; transition: color .2s, background-color .2s; }
.nav a.link:hover, .nav a.link[aria-current="page"] { color: var(--ink); background: var(--paper-2); }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); cursor: pointer; transition: background-color .2s, color .2s; }
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-dark-only { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-dark-only { display: block; } :root:not([data-theme="light"]) .theme-light-only { display: none; } }
:root[data-theme="dark"] .theme-dark-only { display: block; }
:root[data-theme="dark"] .theme-light-only { display: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 500 1rem/1 var(--sans); text-decoration: none; white-space: nowrap; border: 1px solid transparent; transition: transform .2s var(--ease), background-color .2s, border-color .2s; }
.btn svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--accent)); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-2); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: clamp(80px, 12vw, 160px); }
.footer .wrap { padding-top: 40px; padding-bottom: 48px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.footer p { color: var(--ink-2); font-size: .9rem; }
.footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; }
.footer ul a { color: var(--ink-2); text-decoration: none; font-size: .9rem; padding: 10px 0; display: inline-block; }
.footer ul a:hover { color: var(--ink); }
@media (max-width: 640px) { .footer .wrap { grid-template-columns: 1fr; } }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; translate: 0 18px; animation: rise .9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 90ms + 60ms); }
  .reveal { opacity: 0; translate: 0 28px; transition: opacity .9s var(--ease), translate .9s var(--ease); }
  .reveal.is-in { opacity: 1; translate: 0 0; }
}
@keyframes rise { to { opacity: 1; translate: 0 0; } }
