/* Self-hosted fonts (no third-party requests, GDPR-friendly) */
@font-face {
  font-family: "Barlow Semi Condensed";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("fonts/barlow-semi-condensed-600.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/barlow-400.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("fonts/barlow-500.woff2") format("woff2");
}

/* Tokens */
:root {
  --lime: #e4e3df;
  --ink: #161616;
  --smoke: #6f6d68;
  --margin: clamp(1.5rem, 5vw, 4.5rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  background: var(--lime);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto 1fr auto;
  column-gap: 1.5rem;
  padding: var(--margin);
  font-family: "Barlow", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
}

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

header {
  grid-column: 1 / -1;
  grid-row: 1;
}

h1 {
  margin: 0;
  font-family: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: clamp(3.25rem, 11vw, 6rem);
  line-height: 0.88;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  /* optically align the K with the left edge of the line below */
  margin-left: -0.04em;
}

.tagline {
  margin: clamp(1rem, 2.4vw, 1.75rem) 0 0;
  font-size: clamp(1.5rem, 4.2vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 14em;
  text-wrap: balance;
}

.tagline .smoke { color: var(--smoke); }

footer {
  grid-column: 1 / -1;
  grid-row: 3;
  justify-self: end;
  padding-top: 4rem;
}

.mail {
  display: inline-block;
  font-weight: 500;
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  letter-spacing: 0;
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--ink);
  padding-block: 0.25em;
  transition:
    text-decoration-thickness 240ms var(--ease-out),
    text-underline-offset 240ms var(--ease-out),
    color 240ms var(--ease-out);
}

.mail:hover {
  text-decoration-thickness: 3px;
  text-underline-offset: 0.3em;
}

.mail:active { color: var(--smoke); }

.mail:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 0.3em;
}

/* The line rises once, word by word, like smoke. */
@media (prefers-reduced-motion: no-preference) {
  .tagline .word {
    display: inline-block;
    animation: rise 1600ms var(--ease-out) backwards;
    animation-delay: calc(350ms + var(--i) * 140ms);
  }
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(0.45em);
      filter: blur(6px);
    }
  }
}
