/* Brainiac — design system.
   Paper ground, pine accent, ink on xuan-grain. Section breaks are tapered
   brush ticks; cards and the chrome are torn-sheet, not ruled boxes. */

:root {
  --paper:       #FAF7F0;
  --ink:         #1A1712;
  --dark:        #16120E;
  --accent:      #22513A;
  --accent-hover:#183C2B;
  --tint:        #E6EFE9;
  --cream:       #FFF4E1;
  --gold:        #FFEBB7;

  --rule:        rgba(17,17,17,.16);
  --rule-strong: rgba(17,17,17,.20);
  --rule-dark:   rgba(255,244,225,.16);

  --muted:       rgba(17,17,17,.70);
  --muted-soft:  rgba(17,17,17,.58);
  --muted-dark:  rgba(255,244,225,.76);

  --serif: 'Source Serif 4', Georgia, serif;
  --sans:  'Inter Tight', system-ui, -apple-system, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

  --wrap: 1328px;
  --pad: 44px;
}

@media (max-width: 900px) { :root { --pad: 28px; } }
@media (max-width: 380px) { :root { --pad: 22px; } }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 400;
  opacity: .045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

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

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

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------------------------------------------------------------- layout */

.page { position: relative; overflow-x: clip; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* Tapered ink ticks between bands — not a full-bleed hairline. */
.band { border-bottom: none; position: relative; z-index: 1; }
.band::after {
  content: "";
  display: block;
  width: min(42%, 420px);
  height: 10px;
  margin: 0 auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 16'%3E%3Cpath fill='%231A1712' d='M6 8.2 Q 70 3.4 148 7.8 Q 232 13.6 308 7.2 Q 354 4.2 394 8.6 L 394 9.6 Q 354 6.1 308 8.8 Q 232 15.4 148 9.4 Q 70 5.2 6 9.4 Z'/%3E%3C/svg%3E") center / 100% 10px no-repeat;
  opacity: .55;
}
.band__inner { padding-top: 76px; padding-bottom: 84px; }
.band--tight .band__inner { padding-top: 48px; padding-bottom: 52px; }

.band--tint {
  background: color-mix(in srgb, var(--tint) 55%, var(--paper));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.band:has(.hero)::after,
.band--tint::after,
.band:has(.cta)::after { content: none; }

.band--dark {
  background: var(--dark);
  color: var(--cream);
  border-bottom: none;
  overflow: hidden;
}
.band--dark a { color: var(--gold); }
.band--dark .band__inner { position: relative; z-index: 2; }
.band--dark::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 16'%3E%3Cpath fill='%23FFEBB7' d='M6 8.2 Q 70 3.4 148 7.8 Q 232 13.6 308 7.2 Q 354 4.2 394 8.6 L 394 9.6 Q 354 6.1 308 8.8 Q 232 15.4 148 9.4 Q 70 5.2 6 9.4 Z'/%3E%3C/svg%3E");
  opacity: .7;
}

/* ------------------------------------------------------------ typography */

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--accent);
  margin: 0 0 26px;
  text-transform: uppercase;
}
.band--dark .eyebrow { color: var(--gold); }

.micro {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--muted-soft);
  text-transform: uppercase;
}
.band--dark .micro { color: rgba(255,244,225,.50); }

/* Section kicker — a section's plain name, set as a serif italic sidehead.
   Deliberately not the mono/uppercase .eyebrow: no numbering, no letterspacing.
   Picks up the italic accent already used for <em> inside headings. */
.kicker {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.4;
  color: var(--accent);
  margin: 0 0 20px;
}
/* Numbered variant. Numeral upright against the italic name, so it reads as an
   enumerator rather than part of the phrase; the fixed column keeps I. / II. /
   III. aligned and hangs a wrapped name under the name, not under the numeral. */
.kicker--num { display: grid; grid-template-columns: 2.2em minmax(0,1fr); }
.kicker__n { font-style: normal; }
/* Inside a case-study card the kicker sits under a 24px heading, not a 34px one. */
.card .kicker { font-size: 15px; margin-bottom: 12px; }

/* Case-study facts. A labelled row per point, like the old deflist, but three
   rows instead of four and the value set ABOVE body size — the cards were dense
   with 14.5px text. Labels are sans in sentence case, not .micro's mono caps. */
.facts { display: grid; }
.facts__row {
  display: grid;
  grid-template-columns: 76px minmax(0,1fr);
  gap: 22px;
  padding: 15px 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.facts__k {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--muted-soft);
}
.facts__v { font-size: 15.5px; line-height: 1.55; color: var(--muted); }
@media (max-width: 560px) {
  .facts__row { grid-template-columns: minmax(0,1fr); gap: 5px; }
}
.band--dark .kicker { color: rgba(255,244,225,.62); }

h1, h2, h3, h4 { font-family: var(--serif); margin: 0; text-wrap: pretty; }

h1 {
  font-weight: 500;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.1;
  letter-spacing: -.015em;
  max-width: 20ch;
}

@media (max-width: 430px) { h1 { font-size: clamp(27px, 7.4vw, 32px); } }

h2 {
  font-weight: 500;
  font-size: clamp(27px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -.01em;
}

h3 { font-weight: 600; font-size: 22px; line-height: 1.25; }
h4 { font-weight: 600; font-size: 17px; line-height: 1.3; }

.band--dark h1, .band--dark h2, .band--dark h3 { color: var(--gold); }

em { font-style: italic; color: var(--accent); }
.band--dark em { color: var(--gold); }

p { margin: 0; line-height: 1.65; }

.lead {
  font-size: clamp(16.5px, 1.4vw, 17.5px);
  line-height: 1.62;
  color: var(--muted);
  max-width: 62ch;
}

.body { font-size: 14.5px; line-height: 1.65; color: var(--muted); }
.band--dark .body { color: var(--muted-dark); }

.prose p + p { margin-top: 1.1em; }
.prose { max-width: 68ch; }

/* ---------------------------------------------------------------- button */

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 16px 30px;
  border: 1px solid var(--accent);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }

.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: #fff; }

.band--dark .btn { background: var(--gold); color: var(--dark); border-color: var(--gold); }
.band--dark .btn:hover { background: #fff; border-color: #fff; color: var(--dark); }

.link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  display: inline-block;
  padding-bottom: 6px;
  position: relative;
  cursor: pointer;
}
.link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 12' preserveAspectRatio='none'%3E%3Cpath fill='%23000' d='M2 6.4 Q 18 2.8 36 6.1 Q 52 9.2 70 5.2 L 70 6.4 Q 52 10.2 36 7.2 Q 18 4.2 2 7.5 Z'/%3E%3C/svg%3E") left / 100% 6px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 12' preserveAspectRatio='none'%3E%3Cpath fill='%23000' d='M2 6.4 Q 18 2.8 36 6.1 Q 52 9.2 70 5.2 L 70 6.4 Q 52 10.2 36 7.2 Q 18 4.2 2 7.5 Z'/%3E%3C/svg%3E") left / 100% 6px no-repeat;
}
.link:hover { color: var(--accent-hover); }

.actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 36px; }

/* ------------------------------------------------------------------- nav */

.nav {
  border-bottom: none;
  background: transparent;
  overflow: visible;
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 30;
}
.nav::before {
  content: "";
  position: absolute;
  inset: 0 0 -28px 0;
  background: var(--dark);
  clip-path: polygon(
    0% 0%, 100% 0%,
    100% 72%, 84% 82%, 61% 98%, 38% 78%, 14% 92%, 0% 72%
  );
  pointer-events: none;
  z-index: 0;
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 64px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
  position: relative;
  z-index: 1;
}
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; color: var(--cream); white-space: nowrap; }
.brand img { width: 36px; height: 36px; margin-top: -2px; }
.brand__name {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.012em;
  line-height: 1;
  color: var(--cream);
}
.brand__sub {
  display: block;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .128em;
  color: rgba(255,244,225,.55);
  margin-top: 5px;
}
.nav__menu { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav__links { display: flex; gap: 26px; font-size: 14px; font-weight: 500; }
.nav__links a { color: rgba(255,244,225,.78); text-decoration: none; }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--gold); }
.nav .btn {
  font-size: 13.5px;
  padding: 9px 20px;
  background: var(--gold);
  color: var(--dark);
  border-color: var(--gold);
}
.nav .btn:hover,
.nav .btn[aria-current="page"] {
  background: #fff;
  border-color: #fff;
  color: var(--dark);
}

.nav__toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid rgba(255,244,225,.28);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  padding: 0 16px;
  min-height: 44px;
  cursor: pointer;
  color: var(--cream);
}

/* Under 860px the links collapse into a panel below the bar. The Contact
   button rides along inside .nav__menu so nothing needs absolute positioning. */
@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__menu { display: none; }
  .nav[data-open="true"] .nav__menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    margin-left: 0;
    background: var(--dark);
    border-bottom: none;
    padding: 22px var(--pad) 26px;
    z-index: 2;
  }
  .nav[data-open="true"] .nav__links { flex-direction: column; gap: 2px; font-size: 17px; }
  .nav[data-open="true"] .nav__links a { display: block; padding: 12px 0; }
  .nav[data-open="true"] .nav__menu .btn {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
}

/* ------------------------------------------------------------------ hero */

/* Two columns: headline and CTAs on the left, a 5-point pentagon on the right
   that compares Brainiac with typical AI tools on T.R.A.C.E. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 28px 52px;
  align-items: center;
  padding: 108px 0 68px;
}
.hero__copy { padding: 0; }
.hero__copy h1 { max-width: 22ch; }
.hero__art { min-width: 0; }

.radar {
  min-width: 0;
  max-width: 420px;
}

.radar__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  margin: 0;
}

.radar__spoke {
  stroke: rgba(17,17,17,.14);
  stroke-width: 1;
}
.radar__them {
  fill: rgba(17,17,17,.03);
  stroke: rgba(17,17,17,.55);
  stroke-width: 1.4;
  stroke-dasharray: 4 3;
}
.radar__us {
  fill: rgba(34,81,58,.08);
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linejoin: miter;
  stroke-miterlimit: 2.4;
}
.radar__stroke {
  fill: var(--accent);
  opacity: .9;
}

.radar__pt { cursor: pointer; outline: none; }
.radar__hit { fill: transparent; }
.radar__ring {
  fill: var(--paper);
  stroke: var(--accent);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  transition: stroke-width .18s ease;
}
.radar__core { fill: var(--accent); }
.radar__mark {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(1);
  transition: transform .18s ease;
}
.radar__pt:hover .radar__mark,
.radar__pt.is-active .radar__mark { transform: scale(1.45); }
.radar__pt:focus-visible .radar__ring { stroke-width: 3; }

.radar__label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  fill: var(--muted-soft);
  cursor: pointer;
  font-weight: 500;
  transition: fill .18s ease;
}
.radar__label.is-active {
  fill: var(--accent);
  font-weight: 600;
}

.radar__callout {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  fill: var(--ink);
  pointer-events: none;
}
.radar__callout--us {
  fill: var(--accent);
  font-size: 10px;
  letter-spacing: .02em;
}
.radar__callout--us-stack { display: none; }
.radar__callout--them {
  font-weight: 500;
  fill: var(--muted-soft);
}

.radar__note {
  display: grid;
  border-top: none;
  padding-top: 18px;
  margin-top: 4px;
}
.radar__panel {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  visibility: hidden;
}
.radar__panel.is-active {
  visibility: visible;
}
.radar__axis {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -.01em;
  flex: 0 0 auto;
}
.radar__body {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .hero {
    gap: 36px;
    padding: 96px 0 56px;
  }
  .radar { max-width: 380px; }
  .radar__callout--us-line { font-size: 9px; }
}

/* When the nav becomes a menu, stack the hero into one centered column
   instead of a left-aligned leftover of the desktop split. Copy uses the
   full wrap so the right side isn't a leftover gutter. */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    text-align: center;
    gap: 28px;
    padding: 88px 0 48px;
  }
  .hero__copy {
    display: contents;
  }
  .hero__copy h1 {
    font-size: clamp(32px, 6vw, 44px);
    max-width: 18em;
    margin-inline: auto;
  }
  .hero__copy .lead {
    margin-inline: auto;
  }
  .hero__intro {
    order: 1;
  }
  .hero__art {
    order: 2;
    width: 100%;
  }
  .actions {
    order: 3;
    justify-content: center;
    margin-top: 4px;
  }
  .radar {
    width: 100%;
    max-width: 300px;
    margin-inline: auto;
  }
  .radar__callout { font-size: 12px; }
  .radar__callout--us-line { display: none; }
  .radar__callout--us-stack {
    display: block;
    font-size: 12px;
    letter-spacing: .02em;
  }
  .radar__note { display: none; }
}

@media (max-width: 720px) {
  .hero { padding: 80px 0 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .radar__ring, .radar__mark { transition: none; }
}

/* ------------------------------------------------------- credibility strip */

.strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px 36px;
  padding: 22px 0;
}
.strip .micro {
  flex: 0 0 auto;
  line-height: 1.5;
  text-align: right;
  font-weight: 700;
  font-synthesis: weight;
  color: var(--ink);
}
.strip__list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px 22px;
}
.strip__item { font-family: var(--serif); font-size: 15px; font-style: italic; color: var(--muted); white-space: nowrap; }

/* The marker leads each item rather than sitting between two of them. */
.strip__item::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 4px;
  border-radius: 60% 40% 55% 45%;
  background: var(--accent);
  margin-right: 13px;
  vertical-align: .18em;
}

/* When the inline row no longer fits, stack a centered label over a 2×2 of
   industries so wrapping cannot orphan a single item. */
@media (max-width: 1100px) {
  .strip {
    flex-direction: column;
    gap: 14px;
  }
  .strip .micro {
    text-align: center;
  }
  .strip .micro br { display: none; }
  .strip__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-items: center;
    gap: 8px 40px;
  }
  .strip__item { white-space: normal; }
  .strip__item::before { display: none; }
}
@media (max-width: 520px) {
  .strip__list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

/* ----------------------------------------------------------------- cards */

.grid { display: grid; gap: 26px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 28px 22px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }

/* Below the 3-up width, keep the row and scroll sideways — wrapping left
   the last card spanning full width, which is the thing to avoid. */
@media (max-width: 1100px) {
  .grid--3 {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 18px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(34,81,58,.35) transparent;
    -webkit-overflow-scrolling: touch;
  }
  .grid--3 > * {
    flex: 0 0 min(300px, 70%);
    min-width: 0;
    scroll-snap-align: start;
    scroll-margin-inline: 4px;
    margin-top: 0;
    grid-column: auto;
  }
}
@media (max-width: 720px)  {
  .grid--2 { grid-template-columns: minmax(0,1fr); }
}

/* Edge fades + prev/next. JS adds .h-scroll around a row that can overflow;
   .is-scrollable only when it actually does. */
.h-scroll { position: relative; isolation: isolate; }
.h-scroll::before,
.h-scroll::after {
  content: none;
  position: absolute;
  top: 0;
  bottom: 10px;
  width: 52px;
  pointer-events: none;
  z-index: 1;
}
.h-scroll.is-scrollable:not(.is-start)::before {
  content: "";
  left: 0;
  background: linear-gradient(to right, var(--paper), transparent);
}
.h-scroll.is-scrollable:not(.is-end)::after {
  content: "";
  right: 0;
  background: linear-gradient(to left, var(--paper), transparent);
}
.h-scroll__btn {
  display: none;
  position: absolute;
  top: 42%;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--paper);
  color: var(--accent);
  border: 1px solid var(--accent);
  cursor: pointer;
  transform: translateY(-50%);
}
.h-scroll.is-scrollable:not(.is-start) .h-scroll__btn--prev,
.h-scroll.is-scrollable:not(.is-end) .h-scroll__btn--next {
  display: grid;
  place-items: center;
}
.h-scroll.is-scrollable.is-start:not(.is-end) .h-scroll__btn--next {
  background: var(--accent);
  color: #fff;
}
.h-scroll__btn--prev { left: 0; }
.h-scroll__btn--next { right: 0; }
.h-scroll__btn:hover,
.h-scroll__btn:focus-visible { background: var(--accent); color: #fff; }
.h-scroll__btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.h-scroll__btn:disabled { display: none; }
.h-scroll__btn::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  margin-left: -2px;
}
.h-scroll__btn--prev::before {
  transform: rotate(135deg);
  margin-left: 2px;
}

.card {
  border: none;
  padding: 34px 30px 30px 28px;
  background: rgba(34,81,58,.07);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
a.card:hover { background: rgba(34,81,58,.1); color: inherit; }
.card h3 { margin-bottom: 12px; }
.card .body { margin-bottom: 18px; }
.card .link { margin-top: auto; align-self: flex-start; }

.grid--3 > .card:nth-child(1) {
  clip-path: polygon(1.2% 2.4%, 99% 0%, 100% 97.2%, 1.6% 100%);
}
.grid--3 > .card:nth-child(2) {
  clip-path: polygon(0% 1.4%, 98.2% 3%, 99.4% 99%, 2.2% 96.8%);
  margin-top: 18px;
}
.grid--3 > .card:nth-child(3) {
  clip-path: polygon(1.8% 0%, 100% 1.8%, 97.6% 100%, 0% 97.6%);
  margin-top: 8px;
}
.grid--2 > .card:nth-child(1) {
  clip-path: polygon(1.2% 2.4%, 99% 0%, 100% 97.2%, 1.6% 100%);
}
.grid--2 > .card:nth-child(2) {
  clip-path: polygon(0% 1.4%, 98.2% 3%, 99.4% 99%, 2.2% 96.8%);
}
.grid--2 > .card:nth-child(3) {
  clip-path: polygon(1.8% 0%, 100% 1.8%, 97.6% 100%, 0% 97.6%);
}
.grid--2 > .card:nth-child(4) {
  clip-path: polygon(0.8% 1.6%, 100% 0.4%, 98.4% 98.6%, 1.2% 100%);
}

/* --------------------------------------------------------- T.R.A.C.E. pillars */

.pillars {
  border-top: 1px solid var(--rule);
  padding-top: 36px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 32px 24px;
  align-items: start;
}
.pillar + .pillar { border-left: 1px solid var(--rule); padding-left: 24px; }
.pillar__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 0;
}
.pillar__letter {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 600;
  line-height: .9;
  color: var(--accent);
}
.pillar__name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
}
.pillar p { margin-top: 16px; font-size: 14px; line-height: 1.55; color: var(--muted); }

@media (max-width: 1100px) {
  .pillars {
    display: flex;
    flex-wrap: nowrap;
    align-items: start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(34,81,58,.35) transparent;
    -webkit-overflow-scrolling: touch;
  }
  .pillar {
    flex: 0 0 200px;
    scroll-snap-align: start;
    scroll-margin-inline: 4px;
  }
  .pillars > :last-child:nth-child(odd) { grid-column: auto; }
}
@media (max-width: 720px) {
  .pillars {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    overflow: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }
  .pillar { flex: none; }
  .pillar + .pillar { border-left: none; padding-left: 0; }
}

/* ------------------------------------------------------------- step list */

.steps { counter-reset: step; display: grid; gap: 0; }
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 76px minmax(0,1fr) minmax(0,1.15fr);
  gap: 28px;
  padding: 30px 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.step:last-child { border-bottom: 1px solid var(--rule); }
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--accent);
  padding-top: 5px;
}
.step h3 { font-size: 20px; }
.band--dark .step { border-color: var(--rule-dark); }
.band--dark .step::before { color: var(--gold); }
@media (max-width: 860px) {
  .step { grid-template-columns: 44px minmax(0,1fr); gap: 16px 18px; }
  .step h3 { grid-column: 2; }
  .step .body { grid-column: 2; }
}

/* ------------------------------------------------------------ definition */

.deflist { display: grid; gap: 0; }
.deflist__row {
  display: grid;
  grid-template-columns: minmax(0,.85fr) minmax(0,2fr);
  gap: 28px;
  padding: 26px 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.deflist__row:last-child { border-bottom: 1px solid var(--rule); }
.band--dark .deflist__row { border-color: var(--rule-dark); }
@media (max-width: 800px) { .deflist__row { grid-template-columns: minmax(0,1fr); gap: 10px; } }

/* --------------------------------------------------------------- feature */

.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 56px; align-items: start; }
.split .body { max-width: 46ch; }
@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0,1fr); gap: 32px; }
  .split .body { max-width: none; }
  .note { max-width: none; }
}

.stack > * + * { margin-top: 14px; }
.stack-lg > * + * { margin-top: 26px; }

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li {
  position: relative;
  padding-left: 26px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}
.ticks li + li { margin-top: 12px; }
/* A check, drawn as two sides of a rotated box. Square stroke ends, 1.5px —
   the same hairline weight as the rules — rather than a rounded icon tick.
   An empty square read as an unchecked box, which inverted the meaning. */
.ticks li::before {
  content: "";
  position: absolute;
  left: 1px; top: 5px;
  width: 6px; height: 11px;
  border: solid var(--accent);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(42deg);
}
.band--dark .ticks li { color: var(--muted-dark); }
.band--dark .ticks li::before { border-color: var(--gold); }

/* Suggestions, not completed items — a hairline dash at the same 1.5px weight. */
.ticks--dash li::before {
  width: 9px;
  height: 1.5px;
  top: 11px;
  left: 0;
  border: none;
  background: var(--ink);
  opacity: .45;
  transform: none;
}

.split .deflist .body { max-width: none; }

/* ------------------------------------------------------------ pull quote */

/* No bar, no glyph, no box. The aside is set off by a hairline in the same
   colour and weight as the band separators — the site's own motif at small
   scale — and by the jump from 14.5px sans/muted body to 20px serif at full
   ink. Face, size and colour do the highlighting; the rule just anchors it. */
.note {
  max-width: 58ch;
  border-top: 1px solid var(--rule);
  padding-top: 24px;
}
.split > div > .note:first-child {
  border-top: none;
  padding-top: 0;
}
@media (max-width: 900px) { .note { max-width: none; } }
.band--dark .note { border-top-color: var(--rule-dark); }
.note p { font-family: var(--serif); font-size: 20px; line-height: 1.5; color: var(--ink); }
.band--dark .note p { color: var(--cream); }
.note p + p { margin-top: .8em; }

.sig { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.sig img { width: 26px; height: 26px; }
.sig__who { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.sig__who strong { color: var(--ink); font-weight: 600; display: block; }

/* ------------------------------------------------------------------- CTA */

.cta { padding-top: 112px; padding-bottom: 120px; text-align: center; }
.cta h2 { font-size: clamp(30px, 3.4vw, 38px); margin-inline: auto; }
.cta p { margin-top: 12px; font-size: 15px; color: rgba(17,17,17,.65); }
.cta .btn { margin-top: 28px; position: relative; z-index: 2; }

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

.footer {
  background: transparent;
  color: var(--cream);
  position: relative;
  z-index: 1;
  overflow: visible;
  padding-top: 48px;
}
.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--dark);
  /* High over the logo (left), dips in the gaps between cells. */
  clip-path: polygon(
    0% 8%, 10% 6%, 26% 28%, 48% 4%, 70% 22%, 88% 6%, 100% 14%,
    100% 100%, 0% 100%
  );
  z-index: 0;
  pointer-events: none;
}
.footer__inner {
  display: grid;
  grid-template-columns: auto repeat(4, minmax(0,1fr));
  color: rgba(255,244,225,.75);
  max-width: var(--wrap);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.footer__mark { padding: 16px 24px; border-right: 1px solid transparent; display: flex; align-items: center; }
.footer__mark img { width: 22px; height: 22px; }
.footer__cell { padding: 14px 20px; border-right: 1px solid transparent; }
.footer__cell:last-child { border-right: none; }
.footer__k {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .16em;
  color: rgba(255,244,225,.45);
  margin-bottom: 3px;
}
.footer__v { font-size: 12.5px; }
.footer a { color: var(--gold); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer__links { display: flex; gap: 14px; flex-wrap: wrap; }
.footer__inner > :first-child { padding-left: var(--pad); }
.footer__inner > :last-child  { padding-right: var(--pad); }

@media (max-width: 900px) {
  .footer::before {
    clip-path: polygon(
      0% 7%, 16% 5%, 40% 24%, 68% 6%, 100% 16%,
      100% 100%, 0% 100%
    );
  }
  .footer__inner { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer__mark { grid-column: 1 / -1; border-right: none; border-bottom: 1px solid transparent; }
  .footer__cell { border-bottom: 1px solid transparent; }
  .footer__inner > :last-child { padding-left: 20px; }
}

/* Must follow the 900px rule: two columns cannot hold the email address on the
   narrowest phones. */
@media (max-width: 520px) {
  .footer::before {
    clip-path: polygon(
      0% 8%, 22% 5%, 52% 22%, 100% 8%,
      100% 100%, 0% 100%
    );
  }
  .footer__inner { grid-template-columns: minmax(0,1fr); }
  .footer__cell { border-right: none; }
}

/* ------------------------------------------------------- page header (sub) */

.pagehead { padding-top: 118px; padding-bottom: 66px; }
.pagehead h1 { max-width: 20ch; }
.pagehead .lead { margin-top: 24px; }

/* Tablet keeps desktop type, but the phone-scale vertical rhythm starts
   once the nav is a menu — otherwise stacked sections leave a cavern
   between the last band and the CTA. */
@media (max-width: 860px) {
  .band__inner { padding-top: 56px; padding-bottom: 62px; }
  .cta { padding-top: 80px; padding-bottom: 86px; }
}

/* Desktop vertical rhythm is generous by design; on a phone the same values
   cost most of a screen before any content appears. */
@media (max-width: 720px) {
  .band__inner { padding-top: 52px; padding-bottom: 58px; }
  .band--tight .band__inner { padding-top: 36px; padding-bottom: 38px; }
  .pagehead { padding-top: 88px; padding-bottom: 42px; }
  .cta { padding-top: 74px; padding-bottom: 78px; }
  .hero__copy { padding: 0; }
  .hero__art { padding: 0; }
  .head-row { margin-bottom: 28px; gap: 10px; }
  .step { padding: 24px 0; }
  .deflist__row { padding: 22px 0; }
  .actions { margin-top: 28px; gap: 18px; }
}

/* -------------------------------------------------------------- the spine */
/* A single straight rule down the left gutter. .spine__rail mirrors the
   geometry of .wrap, so the line sits at half the page padding — parallel to
   the text column, never colliding with it, at every breakpoint. */

.spine {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.spine__rail {
  position: relative;
  height: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
}

.spine__track,
.spine__fill {
  position: absolute;
  left: calc(var(--pad) / 2 - 1px);
  top: 0;
  width: 3px;
  border-radius: 2px 1px 2px 1px;
}

.spine__track {
  background: linear-gradient(to bottom, transparent, rgba(26,23,18,.22) 8%, rgba(26,23,18,.1) 46%, rgba(26,23,18,.26) 78%, transparent);
}
.spine__fill  { background: var(--accent); height: 0; opacity: .88; }

.spine__marker {
  position: absolute;
  left: calc(var(--pad) / 2);
  top: 0;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3px;
  border-radius: 55% 40% 50% 45%;
  background: var(--accent);
  box-shadow: none;
  opacity: 0;
  transition: opacity .4s ease, background .2s ease;
}

/* Inside a dark band the same two segments render cream-on-ink. */
.spine--dark .spine__track {
  background: linear-gradient(to bottom, transparent, rgba(255,235,183,.18) 10%, rgba(255,235,183,.1) 90%, transparent);
}
.spine--dark .spine__fill  { background: var(--gold); }
.spine__marker[data-on-dark="true"] {
  background: var(--gold);
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .spine__marker { transition: none; }
}

/* ---------------------------------------------------------- contact card */

.contact-main {
  max-width: 34rem;
  margin-inline: auto;
  display: grid;
  gap: 40px;
}

.contact-card {
  border: none;
  background: rgba(34,81,58,.07);
  padding: 34px 30px 30px 28px;
  clip-path: polygon(1.2% 2.4%, 99% 0%, 100% 97.2%, 1.6% 100%);
}
.contact-card__mail {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 27px);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  word-break: break-word;
}
.contact-card__mail:hover { text-decoration: underline; }

/* --------------------------------------------------------------- utility */

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.mt-0  { margin-top: 0 !important; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 40px; }
.head-row .micro {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
}
.band--dark .head-row .micro { color: var(--gold); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: 12px 18px; z-index: 100;
  font-size: 14px; text-decoration: none;
}
.skip:focus { left: 0; color: #fff; }
