/* Knowware Ventures — house system
   Shared family with the wider brand world, distinct expression.
   No frameworks. Light + dark via prefers-color-scheme. */

@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('/fonts/cabinet-grotesk-500.woff2') format('woff2');
  font-weight: 500; font-display: swap; font-style: normal;
}
@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('/fonts/cabinet-grotesk-700.woff2') format('woff2');
  font-weight: 700; font-display: swap; font-style: normal;
}
@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('/fonts/cabinet-grotesk-800.woff2') format('woff2');
  font-weight: 800; font-display: swap; font-style: normal;
}

:root {
  /* Paper / ink */
  --paper: #faf8f4;
  --paper-raised: #fffefb;
  --ink: #1a1917;
  --ink-soft: #57534c;
  --ink-faint: #8a857c;
  --hairline: #e4e0d8;
  --hairline-strong: #c9c4ba;

  /* One spot color. Products carry values of it (ink density), not hues. */
  --spot: #d92600;
  --spot-100: var(--spot);
  --spot-90: color-mix(in oklab, var(--spot) 90%, var(--paper));
  --spot-80: color-mix(in oklab, var(--spot) 80%, var(--paper));
  --spot-70: color-mix(in oklab, var(--spot) 70%, var(--paper));
  --spot-60: color-mix(in oklab, var(--spot) 60%, var(--paper));
  --spot-50: color-mix(in oklab, var(--spot) 50%, var(--paper));

  --measure: 62ch;
  --site-pad: clamp(1.25rem, 4vw, 3rem);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: 'Cabinet Grotesk', var(--sans);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease-exit: cubic-bezier(0.32, 0.72, 0, 1);
  --shadow-lift:
    0 2.8px 2.2px rgba(0,0,0,0.02),
    0 6.7px 5.3px rgba(0,0,0,0.028),
    0 12.5px 10px rgba(0,0,0,0.035),
    0 22.3px 17.9px rgba(0,0,0,0.042),
    0 41.8px 33.4px rgba(0,0,0,0.05),
    0 100px 80px rgba(0,0,0,0.07);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131211;
    --paper-raised: #1b1a18;
    --ink: #e8e5df;
    --ink-soft: #a8a299;
    --ink-faint: #6e6960;
    --hairline: #2a2825;
    --hairline-strong: #3d3a35;
    --spot: #ff2800;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration-color: var(--hairline-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 1px;
}

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

/* ---------- structure ---------- */

.shell {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--site-pad);
  position: relative;
  isolation: isolate;
}
/* container guide lines at content edges */
.shell::before, .shell::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--hairline);
  pointer-events: none;
  z-index: -1;
}
.shell::before { left: calc(var(--site-pad) - 1px); }
.shell::after { right: calc(var(--site-pad) - 1px); }

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--hairline);
}

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark .vent {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.72em;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-left: 0.45em;
}

.masthead nav {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  display: flex;
  gap: 1.5rem;
}
.masthead nav a { text-decoration: none; color: var(--ink-soft); }
.masthead nav a:hover { color: var(--ink); }

/* mono utility label */
.label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1rem;
}
.label::before { content: "/ "; color: var(--hairline-strong); }
main { counter-reset: sec; }
main > section:has(> .label) { counter-increment: sec; }
main > section > .label::before {
  content: "/ " counter(sec, decimal-leading-zero) "  ";
  color: var(--hairline-strong);
}

section { padding: clamp(3rem, 8vw, 5.5rem) 0; border-bottom: 1px solid var(--hairline); }
section:last-of-type { border-bottom: none; }

/* editorial offset: mono label rail on wide screens */
@media (min-width: 64rem) {
  section, .product-hero {
    display: grid;
    grid-template-columns: 10rem minmax(0, 1fr);
    column-gap: clamp(2rem, 5vw, 4rem);
  }
  section > *, .product-hero > * { grid-column: 2; }
  section > .label, .product-hero > .kicker { grid-column: 1; margin-top: 0.35rem; }
  section.strip { display: block; }
}

h1, h2, h3 { font-family: var(--display); line-height: 1.06; letter-spacing: -0.015em; margin: 0 0 1rem; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6.2vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.005em; }

p { max-width: var(--measure); margin: 0 0 1rem; }
p.lede { font-size: clamp(1.15rem, 2.2vw, 1.35rem); line-height: 1.5; color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }

.kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- cinematic strip (landing) ---------- */

.strip {
  padding: 0;
  border-bottom: 1px solid var(--hairline);
  margin-inline: calc(50% - 50vw);
}
.strip .frames {
  display: flex;
  gap: 1px;
  background: var(--hairline);
  overflow-x: auto;
  scrollbar-width: none;
}
.strip .frames::-webkit-scrollbar { display: none; }
.strip a {
  flex: 1 0 clamp(11rem, 16vw, 16rem);
  display: block;
  background: var(--paper);
  padding: 0.5rem;
}
.strip img {
  display: block;
  width: 100%;
  height: clamp(7rem, 11vw, 10.5rem);
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--hairline);
  filter: saturate(0.92);
  transition: filter 320ms var(--ease-exit);
}
.strip a:hover img { filter: saturate(1); }
.strip .strip-caption {
  display: block;
  padding: 0.55rem 0.25rem 0.35rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- product cards (landing) ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  margin-top: 2.5rem;
  counter-reset: product;
}
.cards .card { counter-increment: product; }
.cards .card::after {
  content: counter(product, decimal-leading-zero);
  position: absolute;
  top: 1.1rem; right: 1.25rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.75rem;
  margin-top: 2rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.card {
  background: var(--paper);
  padding: 1.75rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-decoration: none;
  position: relative;
  transition: background 240ms var(--ease-exit);
}
.card:hover { background: var(--paper-raised); }
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 2.25rem; height: 3px;
  background: var(--accent, var(--ink-faint));
}
.card h3 { margin: 0; }
.card .tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--spot);
}
.card p { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }
.card .domain {
  margin-top: auto;
  padding-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
}

/* ---------- principle list ---------- */

.mechanisms {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  max-width: var(--measure);
}
.mechanisms li {
  padding: 0.9rem 0;
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1rem;
  font-size: 0.97rem;
}
.mechanisms li:last-child { border-bottom: 1px solid var(--hairline); }
.mechanisms .who {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  padding-top: 0.2rem;
  color: var(--ink-soft);
}
@media (max-width: 34rem) {
  .mechanisms li { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* ---------- product page ---------- */

.product-hero { border-bottom: 1px solid var(--hairline); padding: clamp(3rem, 8vw, 5rem) 0; }
.product-hero .kicker { color: var(--spot); }
.product-hero h1 { margin-top: 0.5rem; }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-top: 1.75rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.meta-row .dot { color: var(--spot); }

/* pipeline / mechanism steps */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  max-width: var(--measure);
}
.steps li {
  counter-increment: step;
  padding: 1.1rem 0 1.1rem 3.1rem;
  border-top: 1px solid var(--hairline);
  position: relative;
}
.steps li:last-child { border-bottom: 1px solid var(--hairline); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: 1.2rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--spot);
}
.steps strong { display: block; margin-bottom: 0.15rem; }
.steps p { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }

/* callout — the demonstration */
.proof-block {
  --bkt: var(--ink-soft);
  --tint: color-mix(in oklab, var(--accent, var(--ink)) 4%, var(--paper-raised));
  margin-top: 2rem;
  border: 1px solid var(--hairline-strong);
  padding: 1.4rem 1.5rem;
  max-width: var(--measure);
  background:
    linear-gradient(var(--bkt), var(--bkt)) left top / 14px 1px no-repeat,
    linear-gradient(var(--bkt), var(--bkt)) left top / 1px 14px no-repeat,
    linear-gradient(var(--bkt), var(--bkt)) right top / 14px 1px no-repeat,
    linear-gradient(var(--bkt), var(--bkt)) right top / 1px 14px no-repeat,
    linear-gradient(var(--bkt), var(--bkt)) left bottom / 14px 1px no-repeat,
    linear-gradient(var(--bkt), var(--bkt)) left bottom / 1px 14px no-repeat,
    linear-gradient(var(--bkt), var(--bkt)) right bottom / 14px 1px no-repeat,
    linear-gradient(var(--bkt), var(--bkt)) right bottom / 1px 14px no-repeat,
    var(--tint);
}
.proof-block .label { margin-bottom: 0.6rem; }
.proof-block p { font-size: 0.97rem; }
.proof-block .big {
  font-family: var(--mono);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  letter-spacing: 0.02em;
  margin: 0.4rem 0;
  overflow-wrap: break-word;
}

/* ---------- captures (product experience figures) ---------- */

.capture {
  --bkt: var(--ink-soft);
  margin: 2.5rem 0 0;
  border: 1px solid var(--hairline-strong);
  padding: 0.75rem;
  background:
    linear-gradient(var(--bkt), var(--bkt)) left top / 14px 1px no-repeat,
    linear-gradient(var(--bkt), var(--bkt)) left top / 1px 14px no-repeat,
    linear-gradient(var(--bkt), var(--bkt)) right top / 14px 1px no-repeat,
    linear-gradient(var(--bkt), var(--bkt)) right top / 1px 14px no-repeat,
    linear-gradient(var(--bkt), var(--bkt)) left bottom / 14px 1px no-repeat,
    linear-gradient(var(--bkt), var(--bkt)) left bottom / 1px 14px no-repeat,
    linear-gradient(var(--bkt), var(--bkt)) right bottom / 14px 1px no-repeat,
    linear-gradient(var(--bkt), var(--bkt)) right bottom / 1px 14px no-repeat,
    var(--paper-raised);
  box-shadow: var(--shadow-lift);
}
.capture img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--hairline);
}
.capture figcaption {
  padding: 0.8rem 0.25rem 0.15rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.capture .fig { color: var(--spot); margin-right: 0.6em; }

.capture-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.5rem;
}
.capture-pair .capture { margin-top: 2.5rem; }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--hairline);
  padding: 2.5rem 0 3rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
footer .cols {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3rem;
  justify-content: space-between;
}
footer .fine {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}

/* paper grain — fixed overlay, no scroll repaints */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* scroll reveals (JS-gated; static without JS or with reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .js .aos { opacity: 0; }
  .js .aos.in { animation: aosIn 0.7s var(--ease-exit) both; }
}
@keyframes aosIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
