/*
  DecoupleX: one idea, shown once. The wordmark is split by a cut line,
  the X pulled away from "Decouple". Everything else stays quiet.
*/
:root {
  --bg: #eceef1;
  --surface: #f8f9fa;
  --ink: #15171b;
  --muted: #5b616b;
  --line: #c9ced5;
  --signal: #2b44e6;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 60ch;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.55 var(--font);
  padding: 0 clamp(1.25rem, 5vw, 4rem);
}
main { flex: 1; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.5rem 0;
}
.mark { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; letter-spacing: -0.02em; text-decoration: none; }
/* D/X in plain letters, cut like the wordmark below. */
.mark { gap: 0; font-size: 1.875rem; font-weight: 850; letter-spacing: -0.04em; line-height: 1; }
/* The cut is drawn (not a CSS border) so its dashes stay crisp and even at small sizes. */
.mark-cut { width: 0.34em; height: 1em; margin: 0 0.14em; fill: none; stroke: var(--signal); stroke-width: 2.2; stroke-dasharray: 5.2 3.4; stroke-linecap: butt; overflow: visible; }
.mark-x { color: var(--signal); }
.top-link { color: var(--muted); font-size: 0.875rem; text-underline-offset: 3px; }
.top-link:hover { color: var(--ink); }

/* The wordmark. */
.hero { padding: clamp(3rem, 12vh, 8rem) 0 clamp(3rem, 8vh, 5rem); }
.word {
  margin: 0;
  display: flex;
  align-items: flex-end;
  font-size: clamp(3.25rem, 13vw, 11rem);
  line-height: 0.85;
  font-weight: 850;
  letter-spacing: -0.055em;
}
.word-cut {
  align-self: stretch;
  width: 0;
  margin: 0 clamp(0.6rem, 2.4vw, 2rem);
  border-left: 2px dashed var(--signal);
  transform: skewX(-12deg);
}
.word-x {
  color: var(--signal);
  transform: translateY(-0.12em);
}
/* D/X unfolds into Decouple/X: "ecouple" grows out of the gap after the D,
   pushing the cut line and the X to where they rest. Plays once on load. */
.word-left { display: inline-flex; align-items: flex-end; }
.word-unfold { display: inline-grid; grid-template-columns: 1fr; }
.word-unfold > span { min-width: 0; }
@media (prefers-reduced-motion: no-preference) {
  .word-unfold { animation: unfold 1100ms cubic-bezier(.65, 0, .2, 1) 450ms both; }
  /* Clip only while it unfolds; when done, clipping switches off entirely so the
     last "e" keeps its full shape in any font. */
  .word-unfold > span { overflow: hidden; animation: fade 800ms ease-out 450ms both, release 1ms linear 1560ms both; }
  .word-x { animation: settle 1100ms cubic-bezier(.65, 0, .2, 1) 450ms both; }
  .word-cut { animation: cut 500ms ease-out both; }
}
@keyframes unfold { from { grid-template-columns: 0fr; } to { grid-template-columns: 1fr; } }
@keyframes release { from { overflow: hidden; } to { overflow: visible; } }
@keyframes fade { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: none; } }
@keyframes settle { from { transform: translateY(0); } to { transform: translateY(-0.12em); } }
@keyframes cut { from { opacity: 0; } to { opacity: 1; } }

.lede {
  margin: 1.75rem 0 0;
  max-width: 30ch;
  font-size: clamp(1.25rem, 2.4vw, 1.625rem);
  line-height: 1.3;
  color: var(--muted);
  text-wrap: balance;
}

/* Products. */
.products { max-width: 46rem; padding-bottom: 4rem; }
.products h2 { font-size: 1.125rem; font-weight: 750; margin: 0 0 0.75rem; }
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.product { border-bottom: 1px solid var(--line); }
.product-link {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.25rem 1.5rem;
  padding: 1.25rem 0;
  text-decoration: none;
}
.product-name { text-decoration: none; }
.product-name:hover, .product-host:hover { color: var(--signal); }
.product-name { font-size: 1.5rem; font-weight: 750; letter-spacing: -0.02em; line-height: 1.2; }
.product-what { max-width: var(--measure); }
.product-meta { grid-column: 2; color: var(--muted); font-size: 0.875rem; }
.product-host { margin-left: 0.75rem; text-decoration: underline; text-underline-offset: 3px; }
.more { color: var(--muted); margin: 1rem 0 0; }

.foot { padding: 1.5rem 0; color: var(--muted); font-size: 0.8125rem; border-top: 1px solid var(--line); }

@media (max-width: 40rem) {
  .product-link { grid-template-columns: 1fr; }
  .product-meta { grid-column: 1; }
  .top-link { font-size: 0.8125rem; text-align: right; }
}

/* Product pages (automotive.html): the same quiet system, one readable column. */
.page { max-width: 46rem; padding-bottom: 4rem; }
.page-hero { padding: clamp(2.5rem, 9vh, 6rem) 0 2rem; }
.kicker { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.875rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; }
.page-word { margin: 0; display: flex; align-items: center; font-size: clamp(3rem, 10vw, 6.5rem); line-height: 0.9; font-weight: 850; letter-spacing: -0.05em; }
.page-cut { width: 0.3em; height: 0.95em; margin: 0 0.1em; fill: none; stroke: var(--signal); stroke-width: 1.4; stroke-dasharray: 3.4 2.4; overflow: visible; }
.page-word-light { font-weight: 400; color: var(--muted); letter-spacing: -0.03em; }
.page .lede { max-width: none; }
.intro { max-width: var(--measure); font-size: 1.0625rem; margin: 1.25rem 0 0; }
.status { display: flex; gap: 0.6rem; align-items: baseline; color: var(--muted); font-size: 0.9375rem; margin: 1.25rem 0 0; }
.dot { flex: none; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--signal); transform: translateY(-0.05rem); }
.block { border-top: 1px solid var(--line); padding: 2rem 0 0.5rem; }
.block h2 { font-size: 1.375rem; font-weight: 750; letter-spacing: -0.015em; margin: 0 0 0.75rem; }
.block p { max-width: var(--measure); margin: 0 0 1rem; }
.features { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.features li { max-width: var(--measure); padding: 0.5rem 0 0.5rem 1.1rem; position: relative; }
.features li::before { content: ""; position: absolute; left: 0; top: 1.2rem; width: 0.4rem; height: 2px; background: var(--signal); }
figure { margin: 0.5rem 0 1.5rem; }
figure img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: #0d1117; }
figcaption { color: var(--muted); font-size: 0.8125rem; margin-top: 0.5rem; }
.follow a { font-weight: 650; text-underline-offset: 3px; }
.follow a:hover { color: var(--signal); }

/* Calls to action on product pages. */
.page-word-text { font-size: clamp(2.5rem, 7vw, 4.75rem); letter-spacing: -0.045em; line-height: 1; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 1.5rem 0 0; }
.button { display: inline-block; padding: 0.7rem 1.2rem; border-radius: 8px; background: var(--ink); color: var(--bg); font-weight: 650; text-decoration: none; }
.button:hover { background: var(--signal); }
.button-quiet { color: var(--muted); font-weight: 600; text-underline-offset: 3px; }
.button-quiet:hover { color: var(--ink); }
.block .actions { margin: 0.5rem 0 1rem; }
