:root {
  --kw-yellow: #ffed71;
  --kw-yellow-soft: #fff6b8;
  --kw-white: #ffffff;
  --kw-ink: #0a0a0a;
  --kw-muted: #5b5423;
  --kw-line-on-yellow: #dccb5f;
  --kw-line-on-white: #e8e4cc;
  --kw-surface: var(--kw-white);
  --kw-text: var(--kw-ink);

  --kw-font-display: "Archivo", system-ui, sans-serif;
  --kw-font-body: "Inter", system-ui, sans-serif;
  --kw-radius-control: 8px;
  --kw-border: 2px;
  --kw-control-h: 56px;
  --kw-space-1: 8px;
  --kw-space-2: 16px;
  --kw-space-3: 24px;
  --kw-space-4: 40px;
  --kw-space-5: 64px;
  --kw-space-6: 96px;
  --kw-gutter: clamp(20px, 6vw, 120px);
  --kw-frame: 1440px;
  --kw-inset: max(var(--kw-gutter), calc((100vw - var(--kw-frame)) / 2 + var(--kw-frame) * 0.06));
  --kw-measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --kw-surface: #0e0d08;
    --kw-text: #ffed71;
    --kw-muted: #b8ae6a;
    --kw-line-on-white: #2a2817;
  }
}

:root[data-theme="dark"] {
  --kw-surface: #0e0d08;
  --kw-text: #ffed71;
  --kw-muted: #b8ae6a;
  --kw-line-on-white: #2a2817;
}

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo.woff2") format("woff2");
  font-weight: 800 900;
  font-stretch: 112%;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--kw-surface);
  color: var(--kw-text);
  font: 400 1.0625rem/1.6 var(--kw-font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, dl { margin: 0; }

a { color: inherit; }

::selection {
  background: var(--kw-text);
  color: var(--kw-surface);
}

.yellow ::selection {
  background: var(--kw-ink);
  color: var(--kw-yellow);
}

:focus-visible {
  outline: 3px solid var(--kw-ink);
  outline-offset: 4px;
}

.skip {
  position: absolute;
  left: var(--kw-inset);
  top: -100px;
  z-index: 10;
  padding: 12px 16px;
  border-radius: var(--kw-radius-control);
  background: var(--kw-ink);
  color: var(--kw-white);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus { top: 16px; }

.yellow {
  background: var(--kw-yellow);
  color: var(--kw-ink);
  --kw-muted: #5b5423;
}

.wrap { padding-inline: var(--kw-inset); }

.bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 72px;
}

.sender {
  --logo-h: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(var(--logo-h) / 2 - 0.727em);
  height: var(--logo-h);
  font-size: 0.625rem;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sender span { text-box: trim-both cap alphabetic; }

.logo { display: flex; width: 56px; color: var(--kw-ink); }
.logo svg { width: 100%; height: auto; fill: currentColor; }

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.display, .title, .big {
  font-family: var(--kw-font-display);
  font-stretch: 112%;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.display {
  font-size: clamp(3.25rem, 9vw, 8rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.035em;
}

.title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.big {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 0.95;
}

.lead {
  font-size: clamp(1.1875rem, 1.6vw, 1.375rem);
  line-height: 1.45;
  max-width: 44ch;
  text-wrap: pretty;
}

.muted { color: var(--kw-muted); }

.lead span { display: block; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  padding: 0 8px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.link svg { width: 18px; height: 18px; transition: translate 0.15s; }
.link:hover svg { translate: 2px -2px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 24px;
  border: var(--kw-border) solid var(--kw-ink);
  border-radius: var(--kw-radius-control);
  background: var(--kw-white);
  color: var(--kw-ink);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}

.btn svg { width: 18px; height: 18px; flex: none; }

.btn.primary {
  background: var(--kw-ink);
  color: var(--kw-white);
}

.btn:hover, .btn.primary:hover {
  background: var(--kw-yellow);
  color: var(--kw-ink);
}

.yellow .btn:hover, .yellow .btn.primary:hover {
  background: var(--kw-yellow-soft);
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow: hidden;
}

.hero canvas {
  position: absolute;
  right: -45vw;
  top: 12svh;
  width: min(140vw, 640px);
  aspect-ratio: 1;
  color: var(--kw-ink);
  opacity: 0.16;
  cursor: pointer;
  mask-image: radial-gradient(closest-side, #000 80%, transparent 100%);
}

.hero .bar, .hero-body { position: relative; }

.hero-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 24px;
  max-width: 860px;
  padding-bottom: 48px;
  pointer-events: none;
}

.hero-body a { pointer-events: auto; }

section.block {
  padding-block: clamp(72px, 10vw, 120px);
}

.about {
  display: grid;
  gap: 24px;
}

.about .text {
  display: grid;
  gap: 20px;
  max-width: 62ch;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
}

.focus {
  padding-top: 0;
  display: grid;
  gap: 40px;
}

.focus ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 28px;
}

.focus li {
  display: grid;
  gap: 12px;
  padding-top: 20px;
  border-top: var(--kw-border) solid currentColor;
}

.focus h3 {
  font-family: var(--kw-font-display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
}

.focus p { font-size: 1rem; line-height: 1.55; }

.contact {
  display: grid;
  gap: 28px;
  border-top: var(--kw-border) solid var(--kw-ink);
}

.contact p { font-size: clamp(1.0625rem, 1.4vw, 1.25rem); max-width: 44ch; }

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: space-between;
  align-items: center;
  padding-block: 28px;
  font-size: 0.8125rem;
  color: var(--kw-muted);
}

body > footer { border-top: 1px solid var(--kw-line-on-white); }
main:has(> .yellow:last-child) + footer { border-top: 0; }

.foot nav, .foot .links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
}

.foot .lang details { position: relative; }

.foot .lang summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--kw-line-on-white);
  border-radius: var(--kw-radius-control);
  color: var(--kw-text);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.foot .lang summary::-webkit-details-marker { display: none; }

.foot .lang summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin: -3px 2px 0 4px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  rotate: 45deg;
  transition: rotate 0.15s;
}

.foot .lang details[open] summary::after { rotate: 225deg; margin-top: 3px; }

.foot .lang .globe { width: 18px; height: 18px; flex: none; color: var(--kw-muted); }

.theme {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--kw-line-on-white);
  border-radius: var(--kw-radius-control);
  background: none;
  color: var(--kw-text);
  cursor: pointer;
}

.theme:hover { background: var(--kw-yellow); color: var(--kw-ink); border-color: var(--kw-yellow); }
.theme svg { width: 20px; height: 20px; }
.theme .sun { display: none; }

:root[data-theme="dark"] .theme .sun { display: block; }
:root[data-theme="dark"] .theme .moon { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .sun { display: block; }
  :root:not([data-theme="light"]) .theme .moon { display: none; }
}

.foot .lang ul {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 5;
  min-width: 100%;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--kw-surface);
  border: var(--kw-border) solid var(--kw-text);
  border-radius: var(--kw-radius-control);
}

.foot .lang ul a {
  display: block;
  padding: 10px 12px;
  border-radius: 4px;
  color: var(--kw-text);
  font-weight: 600;
  white-space: nowrap;
}

.foot .lang ul a:hover { background: var(--kw-yellow); color: var(--kw-ink); text-decoration: none; }
.foot .lang ul a[aria-current]::after { content: " ✓"; }

.foot a {
  color: var(--kw-muted);
  text-decoration: none;
  padding-block: 12px;
}

.foot a:hover { color: var(--kw-text); text-decoration: underline; }
.foot a[aria-current] { color: var(--kw-text); }

.page-head { border-bottom: var(--kw-border) solid var(--kw-ink); }

.doc {
  display: grid;
  gap: 40px;
  max-width: var(--kw-measure);
  padding-block: clamp(56px, 8vw, 96px);
}

.doc .body { display: grid; gap: 32px; }
.doc section { display: grid; gap: 10px; }
.doc h2 { font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.doc h3 { font-size: 1rem; font-weight: 600; }
.doc ul { padding-left: 1.2em; display: grid; gap: 6px; }
.doc p + p { margin-top: 0.4em; }
.doc a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.doc .stand { font-size: 0.875rem; }

@media (min-width: 768px) {
  .bar { height: 104px; gap: 20px; }
  .sender { --logo-h: 36px; font-size: 0.75rem; }
  .logo { width: 72px; }

  .hero-body {
    justify-content: center;
    gap: 32px;
    max-width: 720px;
    padding-bottom: 72px;
  }

  .about { grid-template-columns: 360px minmax(0, 1fr); gap: 64px; }
  .focus ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .btn { min-height: var(--kw-control-h); padding: 0 28px; }
}

@media (min-width: 1024px) {
  .hero { --title: min(7vw, calc(var(--kw-frame) * 0.07)); }
  .hero .display { font-size: var(--title); }
  .hero-body { max-width: calc(5.6 * var(--title)); }
  .hero .lead { font-size: max(1rem, calc(var(--title) * 0.175)); max-width: none; }

  .hero canvas {
    right: var(--kw-inset);
    top: calc(50% + 52px);
    width: min(640px, calc(100vw - 2 * var(--kw-inset) - 5.6 * var(--title) - 96px));
    translate: 0 -50%;
    opacity: 1;
  }
}

@media (min-width: 1100px) {
  .focus ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 768px) and (max-height: 640px) {
  .hero { min-height: 640px; }
}
