/*
  kenleedev.com — one stylesheet, no build step, no dependencies.

  Deliberately plain CSS. This site's job is to load instantly, work everywhere,
  and be editable by hand in a year without remembering a toolchain. A framework
  would add a build step and buy nothing a portfolio page needs.

  Light and dark both come from the reader's OS setting. There is no theme
  toggle, because a toggle needs JavaScript and this page needs none.
*/

:root {
  --ink: #14161a;
  --ink-soft: #4a5058;
  --ink-faint: #767d87;
  --paper: #ffffff;
  --paper-alt: #f6f7f9;
  --line: #e3e6ea;
  --accent: #1f5eff;
  --accent-soft: #eef2ff;
  --radius: 12px;
  --measure: 34rem;
  --wide: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef0f3;
    --ink-soft: #a8b0ba;
    --ink-faint: #7d858f;
    --paper: #101215;
    --paper-alt: #171a1f;
    --line: #262b32;
    --accent: #7fa2ff;
    --accent-soft: #1a2135;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
em { font-style: italic; }
code {
  font: 0.9em/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--paper-alt);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

/* Keyboard users get to the content without tabbing the whole nav. */
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--paper);
  border: 2px solid var(--accent);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
}

/* ---------------------------------------------------------------- header -- */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 5vw, 3rem);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark span { color: var(--ink-faint); font-weight: 500; }

.top nav { display: flex; flex-wrap: wrap; gap: clamp(0.8rem, 2vw, 1.6rem); }
.top nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}
.top nav a:hover { color: var(--ink); }

/* ------------------------------------------------------------------ hero -- */

.hero {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(3.5rem, 11vw, 8rem) clamp(1rem, 5vw, 3rem) clamp(2.5rem, 7vw, 5rem);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 6.2vw, 4rem);
  font-weight: 800;
  max-width: 24ch;
  margin-bottom: 1.4rem;
}

.lede {
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  color: var(--ink-soft);
  /* 52ch rather than 46 — at 46 this specific sentence orphans "do." onto its
     own line. Widening is cheaper than rewriting the copy to fit the CSS. */
  max-width: 52ch;
  margin-bottom: 1rem;
  text-wrap: pretty;
}

.sub { color: var(--ink-faint); max-width: 46ch; }

.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
}
.button:hover { filter: brightness(1.08); }

.button.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.button.ghost:hover { border-color: var(--ink-faint); filter: none; }

@media (prefers-color-scheme: dark) {
  .button { color: #0d1017; }
}

/* ----------------------------------------------------------------- bands -- */

.band {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 5vw, 3rem);
  border-top: 1px solid var(--line);
}
.band.tight { padding-top: clamp(2rem, 5vw, 3.5rem); }

.band h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  font-weight: 700;
  max-width: 30ch;
}

.section-lede {
  color: var(--ink-soft);
  max-width: var(--measure);
  margin-bottom: 2.5rem;
}

.prose { max-width: var(--measure); color: var(--ink-soft); }
.prose p:last-child { margin-bottom: 0; }

.prose .pull {
  font-size: 1.2rem;
  font-weight: 650;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: 1.1rem;
  margin: 1.8rem 0;
}

/* ----------------------------------------------------------------- grids -- */

.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }

.card, .feature, .mini {
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
}

.card h3, .feature h3 { font-size: 1.1rem; font-weight: 650; }
.card p, .feature p, .mini p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 0; }
.card p + p, .feature p + p { margin-top: 0.7rem; }

.feature { padding: 1.8rem; }
.feature h3 { font-size: 1.35rem; }
.feature h3 a { color: var(--ink); text-decoration: none; }
.feature h3 a:hover { color: var(--accent); }

.mini { padding: 1.2rem; }
.mini h4 { font-size: 0.98rem; font-weight: 650; }
.mini p { font-size: 0.9rem; }

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.meta {
  margin-top: 1rem !important;
  font-size: 0.85rem !important;
  color: var(--ink-faint) !important;
}

/* ----------------------------------------------------------------- legal -- */

/*
  Policy pages need a wider measure than body copy — the extensions policy has a
  three-column table that is unreadable squeezed into 34rem — and they need real
  heading and list rhythm, which the marketing sections never use.
*/
.prose.legal { max-width: 48rem; }
.prose h3 {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 650;
  margin-top: 2.2rem;
}
.prose h2 { color: var(--ink); font-size: 1.3rem; margin-top: 2.4rem; }
.prose ul { padding-left: 1.3rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.45em; }
.prose strong { color: var(--ink); }

/* The table scrolls inside its own box so the page body never scrolls sideways. */
.prose table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.92rem;
}
.prose th, .prose td {
  border: 1px solid var(--line);
  padding: 0.6rem 0.8rem;
  text-align: left;
  vertical-align: top;
  min-width: 9rem;
}
.prose th {
  background: var(--paper-alt);
  color: var(--ink);
  font-weight: 650;
  white-space: nowrap;
}

/* --------------------------------------------------------------- contact -- */

.contact { text-align: center; }
.contact h2, .contact .section-lede { margin-left: auto; margin-right: auto; }

.big-link a {
  font-size: clamp(1.2rem, 3.4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ---------------------------------------------------------------- footer -- */

.foot {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2rem clamp(1rem, 5vw, 3rem) 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-faint);
  font-size: 0.9rem;
}
.foot p { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.foot nav a { color: var(--ink-faint); text-decoration: none; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; }

/* Respect a reduced-motion preference — the only motion here is smooth scroll. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------ hub + pages -- */

.hero.narrow { padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.hero.narrow h1 { font-size: clamp(1.9rem, 4.8vw, 3rem); max-width: 30ch; }

/*
  A short highlighted line for "this is not for sale yet". It exists so the
  in-development pages cannot be mistaken for a shop, which matters more than
  looking polished.
*/
.notice {
  margin-top: 1.5rem;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink);
  max-width: 46rem;
}

/* Whole-card links to the section pages. */
.hubcard {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
}
.hubcard:hover { border-color: var(--accent); }
.hubcard h3 { font-size: 1.15rem; font-weight: 650; margin: 0; }
.hubcard p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }
.hubcard .go {
  margin-top: auto;
  padding-top: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}
.hubcard .go::after { content: ' \2192'; }

.aside {
  margin-top: 1.5rem;
  color: var(--ink-faint);
  font-size: 0.95rem;
  max-width: var(--measure);
}

.top nav a[aria-current='page'] { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- contact -- */

.formwrap {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  align-items: start;
}

.field { margin-bottom: 1.3rem; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.hint { margin: 0.4rem 0 0; font-size: 0.85rem; color: var(--ink-faint); }

/* The honeypot. Off-screen rather than display:none, because some bots skip
   hidden inputs but happily fill positioned ones. Kept out of the tab order and
   hidden from assistive tech by aria-hidden on the wrapper. */
.nope {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.status { margin: 1rem 0 0; font-size: 0.95rem; min-height: 1.4em; }
.status.good { color: #0a7a3d; font-weight: 600; }
.status.bad { color: #b3261e; font-weight: 600; }
@media (prefers-color-scheme: dark) {
  .status.good { color: #5fd08a; }
  .status.bad { color: #ff8a80; }
}

button.button { border: 0; cursor: pointer; font: inherit; font-weight: 600; }
button.button:disabled { opacity: 0.55; cursor: default; }

.sidenote {
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.sidenote h2 { font-size: 1.05rem; margin-bottom: 0.9rem; }
.sidenote p { color: var(--ink-soft); font-size: 0.93rem; }
.sidenote p:last-child { margin-bottom: 0; }
.sidenote strong { color: var(--ink); }
