/* =========================================================
   KODE — Design Tokens
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;700&family=IBM+Plex+Sans:wght@400;500;600&display=swap");

:root {
  --paper:        #F4F1EA;
  --paper-2:      #ECE7DB;
  --paper-3:      #E2DCCC;
  --ink:          #0E0E0C;
  --ink-2:        #3B3A36;
  --ink-3:        #7A776E;
  --ink-4:        #B0AC9F;

  --rule:         #0E0E0C;
  --rule-soft:    #D9D4C7;

  --hi-vis:       #FF5A1F;
  --hi-vis-2:     #E64A0F;

  --ok:           #2F7A3E;
  --warn:         #B5701A;
  --danger:       #B23A2A;

  --font-sans:    "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --t-display-xl: 96px;
  --t-display-l:  64px;
  --t-display-m:  44px;
  --t-h1:         32px;
  --t-h2:         24px;
  --t-h3:         18px;
  --t-body-l:     18px;
  --t-body:       16px;
  --t-body-s:     14px;
  --t-label:      11px;
  --t-mono:       14px;

  --w-regular:    400;
  --w-medium:     500;
  --w-semibold:   600;
  --w-bold:       700;

  --lh-tight:     1.05;
  --lh-snug:      1.2;
  --lh-normal:    1.5;
  --lh-loose:     1.65;

  --ls-tight:    -0.02em;
  --ls-normal:    0em;
  --ls-label:     0.08em;
  --ls-mono:     -0.005em;

  --s-1:   4px;
  --s-2:   8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  40px;
  --s-8:  48px;
  --s-10: 64px;
  --s-12: 96px;
  --s-16: 144px;

  --radius-0: 0px;
  --radius-1: 2px;

  --bw-1: 1px;
  --bw-2: 2px;
  --bw-4: 4px;

  --shadow-pop: 0 1px 0 var(--rule), 0 12px 24px -16px rgba(14,14,12,0.18);

  --ease:       cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast:   150ms;
  --dur-base:   220ms;

  --maxw-content: 1280px;
  --gutter:       24px;
  --margin-x:     64px;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease);
}
a:hover { border-bottom-color: var(--hi-vis); }
a:focus-visible {
  outline: 2px solid var(--hi-vis);
  outline-offset: 2px;
  border-radius: 1px;
}

h1, h2, h3, h4, h5, h6 { margin: 0; }

.display-xl {
  font-family: var(--font-mono);
  font-weight: var(--w-bold);
  font-size: var(--t-display-xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
}

.display-l, h1 {
  font-family: var(--font-mono);
  font-weight: var(--w-bold);
  font-size: var(--t-display-l);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

.display-m, h2 {
  font-family: var(--font-mono);
  font-weight: var(--w-bold);
  font-size: var(--t-display-m);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
}

.h1 {
  font-family: var(--font-mono);
  font-weight: var(--w-bold);
  font-size: var(--t-h1);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
}

h3 {
  font-family: var(--font-sans);
  font-weight: var(--w-semibold);
  font-size: var(--t-h2);
  line-height: var(--lh-snug);
}

h4 {
  font-family: var(--font-sans);
  font-weight: var(--w-semibold);
  font-size: var(--t-h3);
  line-height: var(--lh-snug);
}

.body-l, .lede {
  font-family: var(--font-sans);
  font-weight: var(--w-regular);
  font-size: var(--t-body-l);
  line-height: var(--lh-loose);
  color: var(--ink-2);
}

.body, p {
  font-family: var(--font-sans);
  font-weight: var(--w-regular);
  font-size: var(--t-body);
  line-height: var(--lh-normal);
  margin: 0 0 var(--s-4);
}
p:last-child { margin-bottom: 0; }

small {
  font-family: var(--font-sans);
  font-size: var(--t-body-s);
  line-height: var(--lh-normal);
  color: var(--ink-2);
}

.label {
  font-family: var(--font-mono);
  font-weight: var(--w-medium);
  font-size: var(--t-label);
  line-height: 1;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-2);
}

code, kbd, pre, samp {
  font-family: var(--font-mono);
  font-size: var(--t-mono);
  letter-spacing: var(--ls-mono);
}

.heavy-rule {
  border: 0;
  border-top: var(--bw-4) solid var(--rule);
  margin: 0;
}
.hairline {
  border: 0;
  border-top: var(--bw-1) solid var(--rule);
  margin: 0;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-sans);
  font-weight: var(--w-semibold);
  font-size: var(--t-body);
  line-height: 1;
  padding: 14px 20px;
  border: var(--bw-1) solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-0);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              filter var(--dur-fast) var(--ease);
}
.btn:hover { background: var(--ink-2); border-color: var(--ink-2); border-bottom-color: var(--ink-2); }
.btn:active { filter: brightness(0.92); }
.btn:focus-visible { outline: 2px solid var(--hi-vis); outline-offset: 2px; }

.btn--hi-vis {
  background: var(--hi-vis);
  border-color: var(--hi-vis);
  color: var(--ink);
}
.btn--hi-vis:hover { background: var(--hi-vis-2); border-color: var(--hi-vis-2); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- Form inputs ---------- */

input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="tel"],
textarea,
select {
  font-family: var(--font-sans);
  font-size: var(--t-body);
  font-weight: var(--w-regular);
  color: var(--ink);
  background: var(--paper);
  border: var(--bw-1) solid var(--ink);
  border-radius: var(--radius-0);
  padding: 12px 14px;
  width: 100%;
  transition: border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--hi-vis);
  box-shadow: inset 0 0 0 1px var(--hi-vis);
}
input::placeholder,
textarea::placeholder {
  color: var(--ink-4);
}
