/* kathekon.dev. Kathekon's own identity: paper and ink grounds, one amber accent, Sora.
   Light and dark follow the visitor's system setting. Amber is never text on paper: on light grounds
   accent graphics use the darker amber, and text stays ink. The Slack sample is dark in both themes. */

@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/sora-5.3.0-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/sora-5.3.0-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/sora-5.3.0-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/sora-5.3.0-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Palette */
:root {
  --ink: #101215;
  --raised: #1b1e24;
  --paper: #f3f1ea;
  --amber: #f2b233;
  --amber-dark: #966e20;

  /* Light: paper ground */
  color-scheme: light;
  --ground: var(--paper);
  --text: var(--ink);
  --muted: #5e636b;
  --line: #d9d5ca;
  --field-line: #5e636b;
  --tint: rgba(16, 18, 21, 0.045);
  --accent: var(--amber-dark); /* graphics only on paper: underlines, rules, rings, dots */
  --link: var(--ink);
  --button: var(--ink);
  --button-text: var(--paper);
  --button-hover: var(--raised);
  --button-hover-text: var(--paper);
  --p1: var(--ink);
  --p1-text: var(--paper);

  --sans: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --slack-sans: Lato, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --gutter: clamp(20px, 4vw, 48px);
  --max: 1248px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark: ink ground */
    color-scheme: dark;
    --ground: var(--ink);
    --text: var(--paper);
    --muted: #9ba1a8;
    --line: rgba(243, 241, 234, 0.13);
    --field-line: #9ba1a8;
    --tint: var(--raised);
    --accent: var(--amber);
    --link: var(--amber);
    --button: var(--amber);
    --button-text: var(--ink);
    --button-hover: var(--paper);
    --button-hover-text: var(--ink);
    --p1: var(--amber);
    --p1-text: var(--ink);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 16.5px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
dl,
dd,
ul,
figure,
table {
  margin: 0;
}
ul {
  padding: 0;
  list-style: none;
}

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

a {
  color: var(--link);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
a:hover {
  text-decoration-thickness: 3px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 0.12em 0.38em;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 3px;
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 10px 14px;
  background: var(--button);
  color: var(--button-text);
  font-weight: 600;
  z-index: 20; /* above the sticky header */
}
.skip:focus {
  top: 12px;
}

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

/* A hairline across the content width, not into the gutters. */
.ruled {
  background: linear-gradient(var(--line), var(--line)) no-repeat center top / calc(100% - 2 * var(--gutter)) 1px;
}

/* Header */

/* Stays in reach on a long page: the sign-up is one tap away from any section. Full width, so nothing
   shows through at the sides on wide screens. */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ground);
  box-shadow: 0 1px 0 var(--line);
}
.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 10px;
}
/* Both header links are at least 44px tall, so they are easy to hit with a thumb. */
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 10px;
  color: var(--text);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
  text-decoration: none;
}
.wordmark .mark {
  display: block;
  width: 28px;
  height: 28px;
}
.top-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
}
/* Anchors land below the sticky header, not under it. */
[id] {
  scroll-margin-top: 80px;
}

/* Hero */

.hero {
  display: grid;
  gap: 56px;
  padding-block: clamp(28px, 5vw, 80px) clamp(56px, 7vw, 96px);
}
.hero h1 {
  font-size: clamp(40px, 4.9vw, 68px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.lead {
  margin-top: 24px;
  max-width: 32em;
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.6;
}

/* Sign-up */

.signup {
  margin-top: 36px;
  max-width: 34em;
}
.signup label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 600;
}
.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.field-row input {
  flex: 1 1 14em;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  background: transparent;
  border: 1px solid var(--field-line);
  border-radius: 4px;
  color: var(--text);
  font: inherit;
  font-size: 17px;
}
.field-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.field-row input[aria-invalid="true"] {
  border-color: var(--text);
  box-shadow: 0 0 0 1px var(--text);
}
.field-row button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 4px;
  background: var(--button);
  color: var(--button-text);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.field-row button {
  flex: 0 0 auto;
}
.field-row button:hover,
.button:hover {
  background: var(--button-hover);
  color: var(--button-hover-text);
}
.field-row button:disabled {
  cursor: progress;
  opacity: 0.7;
}
.note {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

/* Off-screen rather than display: none, which some bots skip. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Results: from the script (.signup-status), or from the fragment after a no-JS post (.result). */
.signup-status,
.result {
  margin-top: 16px;
  padding: 12px 16px;
  border-left: 3px solid var(--text);
  background: var(--tint);
  font-size: 15px;
  line-height: 1.55;
}
.signup-status:empty,
.result {
  display: none;
}
.result:target {
  display: block;
  outline: none;
}
.signup-status[data-state="sent"],
#signup-sent {
  border-left-color: var(--accent);
}
.signup:has(#signup-sent:target) .signup-form,
.signup[data-done] .signup-form {
  display: none;
}

.status-line {
  margin-top: 32px;
  font-size: 14.5px;
  color: var(--muted);
}

/* The Slack sample: dark in both themes, drawn in Kathekon's ink and raised greys. */

.slack {
  min-width: 0;
}
.slack-window {
  overflow: hidden;
  background: var(--raised);
  border: 1px solid rgba(243, 241, 234, 0.1);
  border-radius: 10px;
  color: rgba(243, 241, 234, 0.86);
  font-family: var(--slack-sans);
  font-size: 15px;
  line-height: 1.47;
}
.slack-window p {
  margin: 0;
}
.slack-bar {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(243, 241, 234, 0.1);
}
.slack-bar-title {
  color: var(--paper);
  font-size: 17px;
  font-weight: 700;
}
.slack-bar-channel {
  color: #9ba1a8;
  font-size: 13px;
}
.slack-body {
  padding: 16px 20px 20px;
}
.msg {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
}
.msg + .msg {
  margin-top: 14px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
}
/* The app's avatar is the icon (brand/icon.svg), which brings its own ink tile and corners. */
img.avatar {
  display: block;
  border-radius: 0;
}
.avatar-owner {
  background: #5e636b;
  color: var(--paper);
}
.msg-meta {
  line-height: 1.3;
  margin-bottom: 2px;
}
.msg-name {
  color: var(--paper);
  font-weight: 700;
}
.app-tag {
  display: inline-block;
  padding: 1px 3px;
  border-radius: 2px;
  background: rgba(243, 241, 234, 0.13);
  color: #9ba1a8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: 2px;
}
.msg-time {
  margin-left: 2px;
  color: #9ba1a8;
  font-size: 12px;
}
/* A blank line before each section, as Slack shows the brief's empty lines. */
.slack-window .brief-sec,
.slack-window .brief-foot {
  margin-top: 14px;
}
.slack b {
  color: var(--paper);
}
.opts {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5em;
  padding-left: 2.6em;
  color: #b9bec4;
}
.slack code {
  padding: 1px 4px;
  border: 1px solid rgba(243, 241, 234, 0.14);
  border-radius: 3px;
  background: rgba(243, 241, 234, 0.05);
  color: var(--paper);
  font-size: 12.5px;
}
.slack-window .replies {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: #9ba1a8;
  font-size: 13px;
}
.replies::after {
  content: "";
  flex: 1;
  border-top: 1px solid rgba(243, 241, 234, 0.1);
}
.slack figcaption {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--muted);
}

/* Sections */

.for h2,
.how h2,
.early h2 {
  font-size: clamp(28px, 3.1vw, 42px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.for,
.early {
  display: grid;
  gap: 20px;
  padding-block: clamp(56px, 7vw, 96px);
}
.for p,
.early p {
  max-width: 34em;
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.6;
}
.early .button {
  justify-self: start;
  margin-top: 8px;
}

.how {
  padding-block: clamp(56px, 7vw, 96px) 24px;
}
.row {
  display: grid;
  gap: 24px;
  padding-block: 40px;
}
.how h2 + .row {
  margin-top: 16px;
}
.row + .row {
  border-top: 1px solid var(--line);
}
.row-head h3 {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.row-head p {
  margin-top: 10px;
  max-width: 28em;
  font-size: 15.5px;
  color: var(--muted);
}

/* Holders */
.holders {
  display: grid;
  gap: 24px;
}
.holders > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 2px solid var(--text);
}
.holders dt {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.holders dd {
  font-size: 15.5px;
  line-height: 1.55;
}
.holders .ref {
  margin-top: auto;
  padding-top: 6px;
  font-size: 13.5px;
  color: var(--muted);
}

/* Priority */
.priority {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px 48px;
}
.matrix {
  border-collapse: separate;
  border-spacing: 4px;
  margin: -4px;
}
.matrix th {
  padding: 0 8px;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}
.matrix thead th {
  padding-bottom: 4px;
}
.matrix td {
  width: 64px;
  height: 52px;
  border-radius: 4px;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
}
.chip {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 28px;
  border-radius: 3px;
  font-size: 13.5px;
  font-weight: 600;
}
.chip + .chip {
  margin-left: 4px;
}
.p1 {
  background: var(--p1);
  color: var(--p1-text);
}
.p2 {
  box-shadow: inset 0 0 0 2px var(--accent);
}
.p3 {
  box-shadow: inset 0 0 0 1px var(--field-line);
}
.p4 {
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
}
.routes {
  display: grid;
  gap: 12px;
  font-size: 15.5px;
}
.routes li {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Duties */
.ladder {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
}
.ladder th,
.ladder td {
  padding: 13px 16px 13px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.ladder thead th {
  padding-top: 0;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--muted);
}
.ladder tbody th {
  width: 3.5em;
  font-weight: 600;
}
.ladder td:last-child {
  width: 8.5em;
  padding-right: 0;
}
/* The one level where Kathekon acts alone. */
.ladder td.auto::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 1px;
}
.never {
  margin-top: 24px;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--tint);
  font-size: 15px;
  line-height: 1.6;
}
.never strong {
  font-weight: 600;
}

/* Replies */
.replies-guide > div {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr);
  gap: 16px;
  padding-block: 11px;
  border-bottom: 1px solid var(--line);
}
.replies-guide > div:first-child {
  padding-top: 0;
}
.replies-guide dd {
  font-size: 15.5px;
}
.replies-guide code {
  font-size: 14px;
}

/* The name */
.name {
  display: grid;
  gap: 20px 48px;
  align-items: end;
  padding-block: clamp(56px, 7vw, 96px);
}
.headword {
  font-size: clamp(60px, 9vw, 136px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.045em;
}
.name-text p {
  max-width: 30em;
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--muted);
}
.name-text .maxim {
  margin-top: 16px;
  color: var(--text);
  font-size: clamp(21px, 1.9vw, 25px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

/* Footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 28px 40px;
  font-size: 14.5px;
  color: var(--muted);
}
.foot a {
  color: var(--muted);
}
/* Taller hit areas for the footer links, without moving the text. */
.foot nav a {
  display: inline-block;
  padding-block: 10px;
}
.foot nav {
  display: flex;
  gap: 24px;
  margin-block: -10px;
}

/* Wider screens: the hero, the sections and the rows share one 5/7 split. */
@media (min-width: 640px) {
  .holders {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .hero,
  .for,
  .early,
  .row,
  .name {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: clamp(40px, 5vw, 80px);
  }
  .hero {
    align-items: start;
  }
  .early {
    row-gap: 24px;
  }
  .early p {
    grid-column: 2;
    grid-row: 1;
  }
  .early .button {
    grid-column: 2;
    grid-row: 2;
    margin-top: 0;
  }
}

/* Phones */
@media (max-width: 520px) {
  .field-row button {
    flex: 1 1 100%;
  }
  .slack-window {
    font-size: 14px;
  }
  .slack-bar,
  .slack-body {
    padding-inline: 14px;
  }
  .msg {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
  }
  .avatar {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }
  .opts {
    padding-left: 1.2em;
    gap: 0 1.2em;
  }
  .replies-guide > div {
    grid-template-columns: 6.5em minmax(0, 1fr);
    gap: 12px;
  }
  .ladder td:last-child {
    width: 7em;
  }
}
