/* Echonomy Ventures — site styles
 * Built on the Echonomy Design System (see tokens.css and brand/design-system.md).
 * Governing cues from the founding workshop: evidence, signal, clarity, restraint.
 * Structure comes from hairlines, not shadows. One primary colour, used to flag.
 * Pages are either paper or ink; never mid-gray. No gradients, no parallax. */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper-0);
  color: var(--text-body);
  font: var(--type-body);
  font-size: var(--text-md);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, p, figure, ul, ol { margin: 0; }

ul { padding: 0; list-style: none; }

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

:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ─────────────────────────────────────────── primitives */

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.caps {
  font: var(--type-caps);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-muted);
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.rule { border: 0; border-top: var(--border-rule) solid var(--ink-1); }

/* the wordmark is typographic — there is no drawn symbol */
.wordmark { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; }
.wordmark__name {
  font-weight: var(--weight-semibold);
  font-size: 17px;
  letter-spacing: -0.025em;
  color: var(--ink-1);
}
.wordmark__sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: var(--tracking-wordmark);
  text-transform: uppercase;
  color: var(--gray-3);
}
.on-ink .wordmark__name { color: var(--paper-0); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border: var(--border-rule) solid var(--ink-1);
  border-radius: var(--radius-1);
  background: var(--ink-1);
  color: var(--paper-0);
  font: var(--weight-medium) var(--text-base)/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.btn:hover { background: var(--ink-3); border-color: var(--ink-3); }

.btn--signal { background: var(--signal); border-color: var(--signal); }
.btn--signal:hover { background: var(--signal-dim); border-color: var(--signal-dim); }

.btn--ghost { background: transparent; color: var(--paper-0); border-color: var(--paper-0); }
.btn--ghost:hover { background: rgba(255, 255, 255, .08); border-color: var(--paper-0); }

.btn--quiet { background: transparent; color: var(--ink-1); }
.btn--quiet:hover { background: var(--paper-1); border-color: var(--ink-1); }

/* ─────────────────────────────────────────── header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--sheet);
  border-bottom: var(--border-hairline) solid transparent;
  transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.site-header.is-paper { background: var(--paper-0); border-bottom-color: var(--border-subtle); }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  height: 68px;
}

.nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.nav a {
  font-size: 13.5px;
  font-weight: var(--weight-medium);
  color: var(--paper-0);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.nav a:hover { color: var(--signal-bright); }
.site-header.is-paper .nav a { color: var(--ink-1); }
.site-header.is-paper .nav a:hover { color: var(--signal-dim); }
.site-header.is-paper .wordmark__name { color: var(--ink-1); }

.nav__cta { padding: 9px 15px; font-size: 13px; }
/* the CTA keeps its outline in both header states */
.site-header.is-paper .nav__cta {
  color: var(--ink-1);
  border-color: var(--ink-1);
  background: transparent;
}
.site-header.is-paper .nav__cta:hover { background: var(--ink-1); color: var(--paper-0); }

/* ─────────────────────────────────────────── hero: the drafting sheet
 * The photograph is the built thing. The page around it is the drawing it came
 * from — the same 40px grid, the same vermilion hairlines, continuing past the
 * edge of the plate. The plate's ground is sampled from the photograph itself so
 * there is no visible boundary: it floats. */

.hero {
  position: relative;
  background: var(--sheet);
  color: var(--paper-0);
  overflow: hidden;
  padding-block: clamp(32px, 5vw, 64px) clamp(48px, 7vw, 96px);
}

.hero__sheet {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--draft-line-faint) 1px, transparent 1px),
    linear-gradient(to bottom, var(--draft-line-faint) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 45%, #000 30%, transparent 78%);
          mask-image: radial-gradient(120% 90% at 50% 45%, #000 30%, transparent 78%);
}

.hero__inner { position: relative; }

/* the sheet header: mono metadata, left and right, over a vermilion rule */
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-4);
  padding-bottom: 10px;
  border-bottom: var(--border-hairline) solid var(--draft-rule);
  color: var(--gray-3);
}
.sheet-head .mono { color: var(--gray-3); }
.sheet-head strong { color: var(--signal); font-weight: var(--weight-regular); }

/* the plate — the photograph, floating */
.plate {
  position: relative;
  margin-block: clamp(28px, 4vw, 52px);
}
.plate img {
  width: 100%;
  height: auto;
  max-height: clamp(300px, 54vh, 620px);
  object-fit: contain;
  border-radius: var(--radius-0);
}

/* dimension marks: station ticks that run out of the plate into the page */
.plate::before,
.plate::after {
  content: "";
  position: absolute;
  left: -100vw;
  right: -100vw;
  height: 1px;
  background: var(--draft-line);
}
.plate::before { top: -18px; }
.plate::after { bottom: -18px; }

.plate__ticks {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  height: 1px;
  display: flex;
  justify-content: space-between;
}
.plate__ticks span {
  width: 1px;
  height: 9px;
  background: var(--draft-rule);
  transform: translateY(-4px);
}

/* the title block — the drawing sheet's own convention, carrying the claim */
.title-block {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  padding-top: clamp(24px, 3vw, 36px);
  border-top: var(--border-rule) solid var(--draft-rule);
}

.hero h1 {
  font: var(--weight-semibold) clamp(34px, 5.4vw, 60px)/1.04 var(--font-sans);
  letter-spacing: var(--tracking-tight);
  color: var(--paper-0);
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--signal); }

.hero .lede {
  margin-top: var(--space-5);
  max-width: 54ch;
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--gray-2);
}

.hero__actions { margin-top: var(--space-8); display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* the right column of the title block: mono field/value pairs, as on a drawing */
.spec { display: grid; gap: 1px; background: var(--ink-4); border: 1px solid var(--ink-4); }
.spec > div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 11px 14px;
  background: var(--sheet-deep);
}
.spec dt, .spec .k {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--gray-3);
}
.spec dd, .spec .v {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--gray-2);
  text-align: right;
}
.spec .v--signal { color: var(--signal); }

/* ─────────────────────────────────────────── paper sections */

.section { padding-block: clamp(56px, 8vw, 104px); }
.section--sunken { background: var(--paper-1); }
.section + .section:not(.section--sunken) { padding-top: 0; }

.section__head { margin-bottom: clamp(28px, 4vw, 48px); }
.section__head .caps { display: block; margin-bottom: var(--space-3); }
.section__head h2 {
  font: var(--weight-semibold) clamp(26px, 3.4vw, 38px)/1.12 var(--font-sans);
  letter-spacing: -0.015em;
  color: var(--ink-1);
  text-wrap: balance;
}
.section__head p {
  margin-top: var(--space-4);
  max-width: 64ch;
  color: var(--text-body);
  line-height: var(--leading-normal);
}

.grid { display: grid; gap: clamp(20px, 3vw, 36px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* a numbered item under a heavy rule — the loop, the strategies */
.item { border-top: 2px solid var(--ink-1); padding-top: var(--space-4); }
.item__no {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal-dim);
  margin-bottom: var(--space-2);
}
.item h3 {
  font: var(--weight-semibold) var(--text-md)/1.3 var(--font-sans);
  color: var(--ink-1);
  margin-bottom: var(--space-2);
}
.item p { font-size: 14.5px; line-height: var(--leading-normal); color: var(--text-body); }

/* a flat card — 1px border, 2px radius, no shadow */
.card {
  background: var(--surface-card);
  border: var(--border-hairline) solid var(--border-subtle);
  border-radius: var(--radius-1);
  padding: var(--space-6);
}
.card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}
.card__head h3 { font: var(--weight-semibold) var(--text-md)/1.3 var(--font-sans); color: var(--ink-1); }
.card__meta { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-muted); }
.card p { font-size: 14.5px; line-height: var(--leading-normal); }
.card ul { margin-top: var(--space-4); display: grid; gap: var(--space-2); }
.card li {
  font-size: 14px;
  line-height: 1.45;
  padding-left: 18px;
  position: relative;
  color: var(--text-body);
}
.card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--signal);
}

/* a list of rows — used for intelligence and for the technology stack */
.rows { border-top: var(--border-rule) solid var(--ink-1); }
.row {
  display: flex;
  align-items: baseline;
  gap: clamp(14px, 2.5vw, 28px);
  padding: var(--space-5) var(--space-1);
  border-bottom: var(--border-hairline) solid var(--border-subtle);
  text-decoration: none;
  color: var(--ink-1);
  transition: background var(--dur-fast) var(--ease-out);
}
a.row:hover { background: var(--paper-1); }
.row__no { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--signal-dim); white-space: nowrap; }
.row__title { font-size: var(--text-md); font-weight: var(--weight-semibold); flex: 1; min-width: 0; }
.row__note { font-size: 14px; color: var(--text-muted); flex: 1.2; min-width: 0; line-height: 1.45; }
.row__meta { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--gray-4); text-transform: uppercase; white-space: nowrap; }

/* a pending state, stated plainly rather than faked */
.pending {
  border: var(--border-hairline) dashed var(--border-mid);
  border-radius: var(--radius-1);
  padding: var(--space-8);
  text-align: center;
  background: var(--paper-0);
}
.pending .caps { display: block; margin-bottom: var(--space-3); color: var(--signal-dim); }
.pending p { max-width: 58ch; margin: 0 auto; color: var(--text-body); }
.pending .btn { margin-top: var(--space-6); }

/* ─────────────────────────────────────────── contact + footer */

.contact { background: var(--ink-1); color: var(--paper-0); }
.contact .section__head h2 { color: var(--paper-0); }
.contact .section__head p { color: var(--gray-2); }
.contact .caps { color: var(--gray-3); }

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.site-footer {
  background: var(--ink-1);
  color: var(--gray-3);
  border-top: var(--border-hairline) solid var(--ink-4);
  padding-block: var(--space-10);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.site-footer .mono { color: var(--gray-3); }
.site-footer small { font-size: 12.5px; color: var(--gray-3); }

/* ─────────────────────────────────────────── responsive */

@media (max-width: 900px) {
  .title-block { grid-template-columns: minmax(0, 1fr); }
  .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { gap: 18px; }
  .nav a { font-size: 13px; }
}

@media (max-width: 700px) {
  body { font-size: var(--text-base); }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .nav__link { display: none; }
  .row { flex-wrap: wrap; }
  .row__note { flex-basis: 100%; }
  .sheet-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}

/* print — the report/leave-behind case: paper only, hairlines survive */
@media print {
  .site-header, .hero__actions, .nav { display: none; }
  .hero, .contact, .site-footer { background: var(--paper-0); color: var(--ink-1); }
  .hero h1, .contact .section__head h2 { color: var(--ink-1); }
}
