/* kossim.com: one page, no scripts. Colours, type and rules follow DESIGN.md (dark by default, the light
   theme follows the visitor's system). The fonts are the self-hosted subsets also used by nameless.is. */
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark light;
  --bg: #07080a;
  --fg: #f4f5f6;
  --muted: #a3a8b1;
  --border: rgb(255 255 255 / 0.08);
  --border-strong: rgb(255 255 255 / 0.16);
  --accent: #93c5fd;
  --g1: #6ee7b7;
  --g2: #93c5fd;
  --g3: #c4b5fd;
  --selection: rgb(147 197 253 / 0.3);
  --display: "Plus Jakarta Sans", "Inter", ui-sans-serif, system-ui, sans-serif;
  --sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfbfa;
    --fg: #0b0c0e;
    --muted: #555a62;
    --border: rgb(0 0 0 / 0.08);
    --border-strong: rgb(0 0 0 / 0.16);
    --accent: #2563eb;
    --g1: #059669;
    --g2: #2563eb;
    --g3: #7c3aed;
    --selection: rgb(37 99 235 / 0.18);
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--selection);
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* The gradient the mark's strokes and dots refer to. It is declared once, in the page. */
.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.g1 {
  stop-color: var(--g1);
}
.g2 {
  stop-color: var(--g2);
}
.g3 {
  stop-color: var(--g3);
}
.mark path {
  fill: none;
  stroke: url(#kossim-gradient);
  stroke-width: 2.4;
  stroke-linecap: round;
}
.mark circle {
  fill: url(#kossim-gradient);
}

/* Top bar */
.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 1.5rem 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--fg);
  font: 700 1.125rem/1 var(--display);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand .mark {
  width: 1.5rem;
  height: 1.5rem;
}
.bar-link {
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
}
.bar-link:hover {
  color: var(--fg);
}

/* The statement */
.hero {
  display: grid;
  gap: 3.5rem;
  padding: 5rem 0 7rem;
}
@media (min-width: 56rem) {
  .hero {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: center;
    padding: 7rem 0 9rem;
  }
}
h1 {
  margin: 0;
  max-width: 14ch;
  font: 700 clamp(2.5rem, 7vw, 4.75rem) / 1.05 var(--display);
  letter-spacing: -0.035em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.lede {
  max-width: 29rem;
  margin: 2rem 0 0;
  color: var(--muted);
}
.button {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.85rem 1.25rem;
  text-align: center;
  overflow-wrap: anywhere;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.button:hover {
  opacity: 0.88;
}
@media (forced-colors: active) {
  .button {
    border: 2px solid ButtonText;
  }
}
.hero-mark {
  width: min(22rem, 64vw);
  height: auto;
  justify-self: start;
}
@media (min-width: 56rem) {
  .hero-mark {
    justify-self: end;
  }
}

/* The ledger: rows between hairlines, label left, text right. */
.about {
  padding-bottom: 7rem;
}
h2 {
  margin: 0;
  font: 700 clamp(1.5rem, 3.4vw, 2.125rem) / 1.15 var(--display);
  letter-spacing: -0.03em;
}
.ledger {
  margin: 2.5rem 0 0;
  border-top: 1px solid var(--border-strong);
}
.ledger div {
  display: grid;
  gap: 0.4rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 48rem) {
  .ledger div {
    grid-template-columns: 12rem minmax(0, 29rem);
    gap: 2rem;
  }
}
.ledger dt {
  font-weight: 600;
}
.ledger dd {
  margin: 0;
  color: var(--muted);
}

/* Contact: one line, the address itself is the heading's answer. */
.contact {
  padding-bottom: 8rem;
}
.address {
  display: inline-block;
  margin-top: 1.5rem;
  font: 700 clamp(1.5rem, 4.4vw, 2.5rem) / 1.2 var(--display);
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.follow {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
}

.foot {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9375rem;
}
.foot .mark {
  width: 1rem;
  height: 1rem;
}

/* The 404 page */
.lost {
  padding: 6rem 0 10rem;
}
.lost p {
  max-width: 30rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
}

/* The mark builds itself once, the way the cell it is drawn from does: the stem, then the arms, then the
   terminals light up. Without the preference for no motion nothing moves and the mark is already whole. */
@media (prefers-reduced-motion: no-preference) {
  .hero-mark .stem,
  .hero-mark .arm {
    stroke-dasharray: 1 1;
    animation: draw 0.8s var(--ease) both;
  }
  .hero-mark .stem {
    animation-delay: 0.15s;
  }
  .hero-mark .arm {
    animation-delay: 0.7s;
  }
  .hero-mark .dot {
    transform-box: fill-box;
    transform-origin: center;
    animation: land 0.6s var(--ease) both;
  }
  .hero-mark .body {
    animation-delay: 0.1s;
  }
  .hero-mark .tip {
    animation-delay: 1.3s;
  }
}
@keyframes draw {
  from {
    stroke-dashoffset: 1;
    opacity: 0;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}
@keyframes land {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
