/* Pipeline — "Shear".
   Two colours from the logo, one type family, and one angle: every diagonal
   on the page is the logo's stripe angle (33 degrees off vertical). */

@property --d {
  syntax: "<length>";
  inherits: true;
  initial-value: 0px;
}

:root {
  --ink: #191919;
  --paper: #fff7f5;
  --soft: #5a5552; /* secondary text, 7:1 on paper */
  --bad: #a3231a;

  --font: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --rule: 3px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --tan: 0.6494; /* tan(33deg) */
  --skew: -33deg;

  /* Headline geometry. Everything below is derived from these, which is what
     keeps the cuts, the slot and the signup bar from colliding at any size. */
  --fs: clamp(2.5rem, min(12.6vw, 16.5svh), 13.5rem);
  --lh: calc(var(--fs) * 0.86);
  --pad: calc(var(--fs) * 0.08);
  --slot: 10.5rem;
  --bar: 5.25rem;
  --block: calc(var(--lh) * 4 + var(--slot) + var(--pad) * 2);
  --run: calc(var(--block) * var(--tan));
  --c1: calc(var(--fs) * 3.6);
  --c2: calc(var(--fs) * 6.6);
  --open: calc(var(--fs) * 0.15);
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
  scrollbar-color: var(--ink) var(--paper);
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 500 1.125rem/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 3px; }

:focus-visible { outline: var(--rule) solid var(--ink); outline-offset: 4px; }

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

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

.display {
  font-weight: 900;
  font-stretch: 125%;
  text-transform: uppercase;
}

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

.top { padding: 1.1rem var(--gutter) 0; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-transform: uppercase;
  text-decoration: none;
}

.mark {
  width: clamp(2.5rem, 3.4vw, 3rem);
  height: clamp(2.5rem, 3.4vw, 3rem);
  border-radius: 6px;
  box-shadow: 0 0 0 1.5px var(--ink);
}

.brand .name {
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(1.75rem, 2.8vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.brand .sub {
  align-self: flex-end;
  margin: 0 0 0.22em -0.2rem;
  font-weight: 700;
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  line-height: 1;
  letter-spacing: 0.14em;
}

/* ---------- hero: the sheared headline ---------- */

main { flex: 1; }

.hero { padding: calc(var(--open) * 2 + 0.5rem) var(--gutter) 1rem; }

.shear {
  position: relative;
  height: var(--block);
  --d: var(--open);
  transition: --d 0.9s var(--ease);
  /* Opening: the cut stays closed while the words slide in, then splits. */
  animation: split 0.85s var(--ease) 1.1s backwards;
}
.shear.clap { --d: 0px; transition: --d 0.16s cubic-bezier(0.6, 0, 0.9, 0.4); }

@keyframes split {
  from { --d: 0px; }
}

.cut {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: var(--pad) 0;
  font: 900 var(--fs) / 0.86 var(--font);
  font-stretch: 125%;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cut span {
  display: block;
  height: var(--lh);
  animation: slide-in 1s var(--ease) backwards;
}
.cut span:nth-child(2) { animation-delay: 0.09s; }
.cut span:nth-child(4) { animation-delay: 0.2s; }
.cut span:nth-child(5) { animation-delay: 0.29s; }
.cut .gap { height: var(--slot); animation: none; }

/* Each line runs in from beyond the left edge. */
@keyframes slide-in {
  from { translate: -112% 0; }
}

div.cut { pointer-events: none; user-select: none; }

/* Three slices of one block. Each cut runs at the logo angle; the pieces are
   offset along the cut, so they part without ever overlapping. */
.cut-a {
  clip-path: polygon(-2% 0, var(--c1) 0, calc(var(--c1) - var(--run)) 100%, -2% 100%);
}
.cut-b {
  clip-path: polygon(var(--c1) 0, var(--c2) 0, calc(var(--c2) - var(--run)) 100%, calc(var(--c1) - var(--run)) 100%);
  transform: translate(calc(var(--d) * 0.545), calc(var(--d) * -0.839));
}
.cut-c {
  clip-path: polygon(var(--c2) 0, 130% 0, 130% 100%, calc(var(--c2) - var(--run)) 100%);
  transform: translate(calc(var(--d) * 1.09), calc(var(--d) * -1.678));
}

/* ---------- signup, in its own slot between lines two and three ---------- */

.slot {
  position: absolute;
  z-index: 2;
  left: 0;
  top: calc(var(--pad) + var(--lh) * 2 - var(--fs) * 0.035);
  width: min(100%, 64rem);
  height: var(--slot);
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: slide-in 1s var(--ease) 0.14s backwards;
}

.bar {
  display: flex;
  height: var(--bar);
  margin-inline: calc(var(--bar) * var(--tan) / 2);
  border: var(--rule) solid var(--ink);
  background: var(--paper);
  transform: skewX(var(--skew));
}
.bar:focus-within { outline: var(--rule) solid var(--ink); outline-offset: 5px; }

.bar input {
  flex: 1;
  min-width: 0;
  padding: 0 1.25rem 0 2.25rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  caret-color: var(--ink);
  font: 500 1.5rem/1.2 var(--font);
  transform: skewX(calc(var(--skew) * -1));
}
.bar input::placeholder { color: var(--soft); opacity: 1; }
.bar input:focus { outline: none; }

.bar button {
  display: inline-flex;
  align-items: center;
  margin: calc(var(--rule) * -1);
  padding: 0 2.25rem;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font: 900 1.35rem/1 var(--font);
  font-stretch: 125%;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}
.bar button span,
.bar button svg { transform: skewX(calc(var(--skew) * -1)); }
.bar button svg { margin-left: 0.75rem; transition: translate 0.4s var(--ease); }
.bar button:hover svg { translate: 6px 0; }
.bar button:active { background: #000; }
.bar button:focus-visible { outline: var(--rule) solid var(--paper); outline-offset: -9px; }
.bar button[disabled] { cursor: progress; }
.bar button[disabled] svg { animation: nudge 0.7s var(--ease) infinite alternate; }

@keyframes nudge { to { translate: 8px 0; } }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.status {
  position: absolute;
  left: calc(var(--bar) * var(--tan) / 2);
  right: 0;
  top: calc(50% + var(--bar) / 2 + 0.5rem);
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}
.status[data-kind="error"] { color: var(--bad); }

.slot[data-done] .bar { display: none; }
.slot[data-done] .status {
  position: static;
  font: 900 clamp(1.6rem, 4.4vw, 3.5rem) / 1 var(--font);
  font-stretch: 125%;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

/* ---------- footer: one small privacy disclosure ---------- */

.foot { padding: 0 var(--gutter) 0.9rem; }

.privacy { position: relative; display: inline-block; font-size: 0.8125rem; }

.privacy summary {
  display: inline-block;
  padding: 0.35rem 0;
  list-style: none;
  font-weight: 600;
  color: var(--soft);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  cursor: pointer;
}
.privacy summary::-webkit-details-marker { display: none; }
.privacy summary:hover,
.privacy[open] summary { color: var(--ink); }

.privacy-body {
  position: absolute;
  z-index: 5;
  left: 0;
  bottom: calc(100% + 0.4rem);
  width: min(30rem, 100vw - var(--gutter) * 2);
  padding: 1rem 1.15rem;
  border: var(--rule) solid var(--ink);
  background: var(--paper);
  font-size: 0.875rem;
  line-height: 1.5;
}
.privacy-body {
  max-height: calc(100svh - 4.5rem);
  overflow-y: auto;
  scrollbar-width: thin;
}
.privacy-body p { margin: 0; }
.privacy-body p + p { margin-top: 0.7rem; }

.contact {
  display: grid;
  gap: 0.35rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--ink);
}
.contact label { font-weight: 700; }
.contact label span { font-weight: 500; color: var(--soft); }
.contact label:not(:first-child) { margin-top: 0.45rem; }

.contact input[type="email"],
.contact textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  caret-color: var(--ink);
  font: 500 1rem/1.4 var(--font);
  resize: vertical;
}
.contact input:focus-visible,
.contact textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.contact-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }

.contact button {
  padding: 0.55rem 0.9rem;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 800 0.8125rem/1 var(--font);
  font-stretch: 125%;
  text-transform: uppercase;
  cursor: pointer;
}
.contact button + button { background: var(--ink); color: var(--paper); }
.contact button:hover { background: var(--ink); color: var(--paper); }
.contact button + button:hover { background: #000; }
.contact button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.contact button[disabled] { cursor: progress; opacity: 0.6; }

.contact-status { font-weight: 700; }
.contact-status:empty { display: none; }
.contact-status[data-kind="error"] { color: var(--bad); }

/* ---------- plain confirmation page (no-JavaScript fallback) ---------- */

.plain { padding: 12vh var(--gutter); max-width: 52rem; }
.plain h1 {
  margin: 0 0 1.25rem;
  font: 900 clamp(2.25rem, 7vw, 4.5rem) / 0.95 var(--font);
  font-stretch: 125%;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

/* ---------- narrow screens: one cut, a straight stacked field ---------- */

@media (max-width: 56rem) {
  :root {
    --slot: 11rem;
    --c1: calc(var(--fs) * 5.9);
    --c2: calc(var(--fs) * 30);
  }

  .slot { width: 100%; justify-content: flex-start; padding-top: 1.25rem; }

  .bar {
    flex-direction: column;
    height: auto;
    margin-inline: 0;
    transform: none;
  }
  .bar input { flex: none; height: 3.5rem; padding: 0 1rem; font-size: 1.2rem; transform: none; }
  .bar button { height: 3.5rem; margin: 0; justify-content: center; font-size: 1.15rem; }
  .bar button span, .bar button svg { transform: none; }

  .status { position: static; margin-top: 0.6rem; }
  .slot[data-done] { justify-content: center; padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .shear, .shear.clap { transition: none; animation: none; }
  .cut span, .slot { animation: none; }
  .bar button svg { transition: none; animation: none !important; }
}
