/* Kicet — embossed label tape on galvanised steel. */

@font-face {
  font-family: "Kicet Label";
  src: url("/fonts/label-condensed.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Kicet Text";
  src: url("/fonts/text-regular.ttf") format("truetype");
  font-weight: 300 520;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Kicet Text";
  src: url("/fonts/text-semibold.ttf") format("truetype");
  font-weight: 530 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  --steel: #dde0df;
  --steel-deep: #cdd2d1;
  --rule: #a9b0af;
  --ink: #121314;
  --ink-2: #3a3f42;
  --paper: #fbfbf9;

  --tape-black: #18191b;
  --tape-red: #c41f29;
  --tape-blue: #1d4fb0;
  --emboss: #f3f3ef;

  --on-red-2: #fbe3e2;
  --on-black-2: #b9bec0;

  --label: "Kicet Label", "Arial Narrow", sans-serif-condensed, sans-serif;
  --text: "Kicet Text", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 76rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  background-color: #dde0df;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--ink-2) var(--steel-deep);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--steel);
  /* brushed steel: fine horizontal grain plus one broad sheen */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.004 0.9' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23b)'/%3E%3C/svg%3E"),
    linear-gradient(170deg, rgb(255 255 255 / 0.35), transparent 40%, rgb(0 0 0 / 0.03));
  background-attachment: scroll;
  caret-color: var(--tape-red);
  overflow-x: clip;
}

::selection { background: var(--tape-red); color: var(--emboss); }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--steel-deep); }
::-webkit-scrollbar-thumb { background: var(--ink-2); border-radius: 6px; border: 3px solid var(--steel-deep); }

img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-color: var(--tape-red); }

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--tape-black);
  color: var(--emboss);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 0.75rem; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

/* ---------- Tape ---------- */

.tape {
  --tape: var(--tape-black);
  display: inline;
  font-family: var(--label);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  line-height: 1;
  color: var(--emboss);
  padding: 0.12em 0.42em 0.08em;
  border-radius: 0.09em;
  background:
    linear-gradient(180deg,
      color-mix(in oklab, var(--tape), white 16%) 0,
      var(--tape) 18%,
      var(--tape) 80%,
      color-mix(in oklab, var(--tape), black 28%) 100%);
  text-shadow:
    0 0.035em 0 rgb(0 0 0 / 0.55),
    0 -0.025em 0 rgb(255 255 255 / 0.28);
  box-shadow:
    0 0.02em 0.04em rgb(0 0 0 / 0.35),
    0 0.2em 0.45em -0.18em rgb(0 0 0 / 0.4);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.tape--red { --tape: var(--tape-red); }
.tape--blue { --tape: var(--tape-blue); }
.tape--sm { font-size: 0.82rem; letter-spacing: 0.1em; padding: 0.3em 0.55em 0.22em; }

/* A tape that is a control: punched in on press. */
.tape-btn {
  display: inline-block;
  font-size: 1.15rem;
  padding: 0.62em 1em 0.55em;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.tape-btn:hover {
  transform: translateY(-2px) rotate(-0.6deg);
  box-shadow:
    0 0.03em 0.05em rgb(0 0 0 / 0.35),
    0 0.45em 0.8em -0.3em rgb(0 0 0 / 0.45);
}
.tape-btn:active {
  transform: translateY(1px);
  box-shadow: 0 0.02em 0.03em rgb(0 0 0 / 0.4);
  transition-duration: 60ms;
}

/* ---------- Header ---------- */

.site-head {
  padding-block: 1.1rem;
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  text-decoration: none;
}
.brand .tape { font-size: 1.45rem; letter-spacing: 0.12em; transform: rotate(-1.5deg); display: inline-block; }
.brand small {
  font-size: 0.8rem;
  color: var(--ink-2);
  font-style: italic;
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:not(.tape) { text-decoration: none; }
.site-nav a:not(.tape):hover { text-decoration: underline; text-decoration-color: var(--tape-red); }
.site-nav .tape-btn { font-size: 0.95rem; }

@media (max-width: 40rem) {
  .brand small { display: none; }
  .site-nav .hide-sm { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(2rem, 7vw, 5.5rem) clamp(3rem, 8vw, 6rem);
}
.hero h1 {
  margin: 0 0 clamp(1.75rem, 4vw, 2.75rem);
  font-weight: inherit;
  font-size: clamp(2.6rem, 8.4vw, 6rem);
  line-height: 1;
}
.hero h1 .line {
  display: block;
  margin-block: 0.18em;
  line-height: 1.32;
}
.hero h1 .line { transform: rotate(var(--r, 0deg)); transform-origin: 0 50%; }
.hero h1 .line:nth-child(1) { --r: -1.2deg; }
.hero h1 .line:nth-child(2) { --r: 0.7deg; padding-left: clamp(0rem, 9vw, 9rem); }
.hero h1 .line:nth-child(3) { --r: -0.5deg; font-size: max(0.42em, 1.25rem); margin-top: 0.7em; padding-left: clamp(0rem, 2vw, 2rem); }

.hero-body {
  display: grid;
  gap: 1.75rem;
  max-width: 42rem;
  margin-left: clamp(0rem, 2vw, 2rem);
}
.hero-body p {
  margin: 0;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  text-wrap: pretty;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
}
.actions .quiet { font-weight: 600; }

@media (prefers-reduced-motion: no-preference) {
  /* each strip is pressed onto the steel, like a label being stuck down */
  .hero h1 .line { animation: stick 700ms var(--ease-out) both; }
  .hero h1 .line:nth-child(2) { animation-delay: 120ms; }
  .hero h1 .line:nth-child(3) { animation-delay: 240ms; }
}
@keyframes stick {
  from { transform: translateY(-0.06em) rotate(calc(var(--r, 0deg) - 2.2deg)) scale(1.03); }
  to { transform: rotate(var(--r, 0deg)); }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(3.5rem, 9vw, 7rem); }
.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); max-width: 44rem; }
.section-head h2 {
  margin: 0 0 1rem;
  font-weight: inherit;
  font-size: clamp(1.9rem, 5.2vw, 3.4rem);
  line-height: 1.2;
}
.section-head h2 .tape { display: inline-block; transform: rotate(-0.8deg); line-height: 1.15; }
.section-head p { margin: 0; color: var(--ink-2); font-size: 1.125rem; text-wrap: pretty; }

/* ---------- Demo: label maker + thread ---------- */

.demo {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
@media (min-width: 60rem) {
  .demo { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); }
}

.maker {
  position: sticky;
  top: 1.5rem;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}
@media (max-width: 59.99rem) { .maker { position: static; } }

.maker label {
  font-weight: 600;
  font-size: 0.95rem;
}
.maker-field {
  display: flex;
  align-items: stretch;
  border-radius: 0.5rem;
  background: var(--tape-black);
  padding: 0.5rem;
  box-shadow: inset 0 2px 6px rgb(0 0 0 / 0.5), 0 1px 0 rgb(255 255 255 / 0.6);
}
.maker-field input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0.3rem;
  padding: 0.55rem 0.7rem 0.45rem;
  font-family: var(--label);
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--emboss);
  caret-color: var(--emboss);
  background: var(--tape-blue);
  text-shadow: 0 0.035em 0 rgb(0 0 0 / 0.55), 0 -0.025em 0 rgb(255 255 255 / 0.28);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.5);
}
.maker-field input::placeholder { color: rgb(243 243 239 / 0.7); }
.maker-field input:focus-visible { outline: 3px solid var(--emboss); outline-offset: 2px; }
.maker .hint { margin: 0; font-size: 0.9rem; color: var(--ink-2); }

.steps {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.9rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
}
.steps li { display: grid; gap: 0.2rem; }
.steps strong { font-weight: 650; }
.steps span { color: var(--ink-2); font-size: 0.97rem; }

.thread {
  display: grid;
  gap: 1.5rem;
  min-width: 0;
}
.thread-note { margin: 0; font-size: 0.85rem; color: var(--ink-2); }

.item {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
@media (min-width: 48rem) {
  .item { grid-template-columns: minmax(0, 1fr) 13.5rem; gap: 0 1.25rem; }
  .item .note { position: relative; padding-left: 1.4rem; }
  .item .note::before {
    content: "";
    position: absolute;
    left: -0.6rem;
    top: 1.05rem;
    width: 1.7rem;
    border-top: 1.5px solid var(--ink);
  }
}
.note .tape { display: inline-block; transform: rotate(-1deg); margin-bottom: 0.45rem; }
.note p { margin: 0; font-size: 0.9rem; line-height: 1.45; color: var(--ink-2); }
@media (max-width: 47.99rem) { .item .note { order: -1; } }

.card {
  background: var(--paper);
  border-radius: 0.6rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgb(18 19 20 / 0.12), 0 10px 24px -14px rgb(18 19 20 / 0.35);
}
.who { display: flex; align-items: center; gap: 0.6rem; font-size: 0.92rem; }
.who b { font-weight: 650; }
.who time { color: var(--ink-2); font-size: 0.82rem; }
.avatar {
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--emboss);
  background: var(--tape-blue);
}
.avatar--you { background: var(--tape-red); }
.card p { margin: 0.45rem 0 0 2.6rem; }
.card.reply { margin-left: clamp(1rem, 4vw, 2.6rem); }
.card .kw { font-size: 0.8em; padding: 0.18em 0.45em 0.12em; vertical-align: 0.06em; }

.variant-btn {
  margin: 0.7rem 0 0 2.6rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--tape-blue);
  background: none;
  border: 0;
  padding: 0.2rem 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.variant-btn:hover { color: var(--ink); }

.dm { display: grid; gap: 0.5rem; }
.bubble {
  max-width: 34rem;
  padding: 0.7rem 0.95rem;
  border-radius: 1.1rem 1.1rem 1.1rem 0.3rem;
  background: var(--paper);
  font-size: 0.97rem;
  box-shadow: 0 1px 2px rgb(18 19 20 / 0.12);
}
.bubble--them { justify-self: end; border-radius: 1.1rem 1.1rem 0.3rem 1.1rem; background: var(--tape-blue); color: var(--emboss); }
.bubble--you { background: var(--tape-black); color: var(--emboss); }
.bubble a { font-weight: 600; overflow-wrap: anywhere; }
.bubble .link-btn {
  display: inline-block;
  margin-top: 0.55rem;
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  border: 1.5px solid var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
}
.dm-head { font-size: 0.82rem; color: var(--ink-2); margin: 0 0 0.25rem; }

.punch { animation: punch 260ms var(--ease-out); }
@keyframes punch {
  from { transform: scale(1.12); filter: blur(1.5px); }
  to { transform: none; filter: none; }
}
@media (prefers-reduced-motion: reduce) { .punch { animation: none; } }

/* ---------- Features: the drawer index ---------- */

.index {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1.5px solid var(--ink);
}
.index li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6rem 2rem;
  padding-block: 1.35rem;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 48rem) {
  .index li { grid-template-columns: 15rem minmax(0, 1fr); align-items: baseline; }
}
.index .tape { justify-self: start; font-size: 1.05rem; }
.index li:nth-child(3n+2) .tape { --tape: var(--tape-red); }
.index li:nth-child(3n) .tape { --tape: var(--tape-blue); }
.index p { margin: 0; max-width: 62ch; text-wrap: pretty; }
.index p b { font-weight: 650; }

/* ---------- Bands ---------- */

.band { color: var(--emboss); }
.band--red {
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--tape-red), white 8%), var(--tape-red) 30%, color-mix(in oklab, var(--tape-red), black 14%));
}
.band--black { background: var(--tape-black); }
.band .section-head p { color: var(--on-red-2); }
.band--black .section-head p { color: var(--on-black-2); }
.band h2 {
  font-family: var(--label);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.02;
  text-shadow: 0 0.035em 0 rgb(0 0 0 / 0.45), 0 -0.025em 0 rgb(255 255 255 / 0.25);
}
.band--red h2 { font-size: clamp(2.6rem, 9vw, 6rem); }

.reasons {
  display: grid;
  gap: 2rem 3rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.reasons li { border-top: 2px solid rgb(243 243 239 / 0.85); padding-top: 1rem; }
.reasons h3 { margin: 0 0 0.4rem; font-size: 1.2rem; font-weight: 650; line-height: 1.3; }
.reasons p { margin: 0; color: var(--on-red-2); text-wrap: pretty; }

.join {
  display: grid;
  gap: 2rem;
  align-items: end;
}
@media (min-width: 56rem) { .join { grid-template-columns: minmax(0, 1fr) auto; } }
.join h2 { margin: 0 0 1rem; font-size: clamp(2.4rem, 7vw, 4.6rem); }
.join p { margin: 0; max-width: 40rem; color: var(--on-black-2); font-size: 1.125rem; }
.join .tape-btn { font-size: 1.35rem; }
.band--black a:not(.tape) { color: var(--emboss); }

/* ---------- Footer ---------- */

.site-foot {
  padding-block: 2.5rem 3rem;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.site-foot .wrap { display: grid; gap: 1.25rem; }
.site-foot ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.site-foot a { color: var(--ink); font-weight: 500; }
.site-foot p { margin: 0; max-width: 60ch; }

/* ---------- Document pages ---------- */

.doc { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(3rem, 8vw, 6rem); }
.doc-head { margin-bottom: 2.5rem; }
.doc-head h1 {
  margin: 0 0 1rem;
  font-weight: inherit;
  font-size: clamp(2.2rem, 7vw, 4.2rem);
  line-height: 1.15;
}
.doc-head h1 .tape { display: inline-block; transform: rotate(-1deg); }
.doc-head p { margin: 0; color: var(--ink-2); }

.prose {
  max-width: 68ch;
}
.prose h2 {
  margin: 2.4em 0 0.6em;
  font-size: 1.55rem;
  line-height: 1.3;
  font-weight: 680;
}
.prose h3 { margin: 1.8em 0 0.4em; font-size: 1.2rem; font-weight: 650; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--tape-red); }
.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
  background: var(--steel-deep);
  padding: 0.1em 0.35em;
  border-radius: 0.25em;
}
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--rule); }
.prose th { font-weight: 650; border-bottom: 1.5px solid var(--ink); }
.table-scroll { overflow-x: auto; }

.notice {
  margin: 0 0 2rem;
  padding: 1.1rem 1.25rem;
  background: var(--paper);
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgb(18 19 20 / 0.12), 0 10px 24px -16px rgb(18 19 20 / 0.35);
}
.notice p { margin: 0; }
.notice p + p { margin-top: 0.5rem; }
.notice .code {
  font-family: var(--label);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
}
[hidden] { display: none !important; }

.lone {
  min-height: 60vh;
  display: grid;
  align-content: center;
  gap: 1.5rem;
  padding-block: 4rem;
}
.lone h1 {
  margin: 0;
  font-weight: inherit;
  font-size: clamp(2.6rem, 11vw, 6rem);
  line-height: 1.15;
}
.lone h1 .tape { display: inline-block; transform: rotate(-1.5deg); }
.lone p { margin: 0; max-width: 46ch; font-size: 1.15rem; color: var(--ink-2); }
