/* fund/raise content pages: home, explore, guide, founders, manifesto, calculator
   (src/pages/*.tsx, src/content/figure.tsx). Tokens and shared components live in
   brand.css. White first, black type, red only for the slash. The original art
   (/assets/*.webp, /assets/v2/*.webp) sits straight on white: no frames, no paper,
   no grey panels behind it. The owner's kit images (/assets/kit) are small and crisp. */

/* ---- The page's one engraving: small, captioned ---------------------------------- */

.engraving {
  margin: 0;
}
.engraving figcaption {
  margin-top: var(--space-3);
  font-size: var(--fs-label);
  line-height: 1.5;
  color: var(--muted);
}

/* ---- Home: hero (zip/ui-landing.png) ------------------------------------------------ */

/* As in the reference (app.js home()): the copy on the left, the hero plate on the
   right, its left edge dissolving into the white page under the end of the headline. */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  padding: var(--space-6) 0;
}
.home-hero > * {
  grid-area: 1 / 1;
}
.hero-copy {
  position: relative;
  z-index: 1;
}
.home-hero .hero-plate {
  justify-self: end;
  width: 62%;
}
.home-hero h1 {
  font-size: clamp(44px, 5.4vw, 80px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.home-hero .lead {
  max-width: 34ch;
  margin-top: var(--space-6);
  font-size: clamp(19px, 1.8vw, 24px);
  color: var(--ink);
}
.hero-plate,
.founder-plate,
.manifesto-seal,
.guide-faces {
  margin: 0;
}
.hero-plate .art {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 36%);
  mask-image: linear-gradient(to right, transparent, #000 36%);
}

/* The owner's kit engravings: black line work on white, kept small. */
.kit-seal {
  width: clamp(96px, 9vw, 128px);
}
.kit-faces {
  width: clamp(112px, 12vw, 156px);
}

.value-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-5);
  padding: var(--space-5) 0;
  border-top: var(--border);
  border-bottom: var(--border);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  line-height: 1.4;
  text-transform: uppercase;
}

/* ---- Home: sections ----------------------------------------------------------------- */

.raises-section,
.conviction-band,
.world-frieze,
.principles,
.manifesto-teaser {
  margin-top: var(--space-9);
}
.section-heading .eyebrow,
.principles-head .eyebrow {
  margin-bottom: var(--space-3);
}

/* The band after zip/hero-horizontal.png: a big statement and the red slash. */
.conviction-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-7);
  padding: var(--space-9) 0;
  border-top: var(--border);
  border-bottom: var(--border);
}
.conviction-band h2 {
  font-size: var(--fs-display);
  line-height: 1;
  letter-spacing: -0.03em;
}
.conviction-band p {
  margin-top: var(--space-7);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.band-slash {
  display: block;
  width: clamp(110px, 14vw, 200px);
  aspect-ratio: 220 / 410;
  margin-right: var(--space-6);
  background: var(--red);
  clip-path: polygon(70% 0, 100% 0, 30% 100%, 0 100%);
}

.principles {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-7);
  align-items: start;
}
.principles-head h2 {
  margin-bottom: var(--space-5);
}
.principle-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}
.principle-list article {
  padding: var(--space-6);
  border: var(--border);
  border-radius: var(--radius);
}
.principle-list .icon {
  width: 24px;
  height: 24px;
  margin-bottom: var(--space-6);
}
.principle-list h3 {
  margin-bottom: var(--space-2);
  font-size: 20px;
}
.principle-list p {
  font-size: 15px;
  color: var(--muted);
}

/* The world frieze (depth.js pageAtmosphere, before the principles) and the founders
   closing: the wide plate with a white copy card over its open sky. */
.world-frieze,
.founder-closing {
  position: relative;
}
.world-frieze > .art,
.founder-closing > .art {
  display: block;
}
.frieze-copy {
  position: absolute;
  top: var(--space-6);
  left: var(--space-6);
  max-width: 520px;
  padding: var(--space-6);
  background: var(--white);
}
.frieze-copy h2 {
  font-size: clamp(28px, 2.7vw, 38px);
}
.frieze-copy p {
  margin-top: var(--space-3);
  color: var(--muted);
}
.frieze-copy .text-link,
.frieze-copy .button {
  margin-top: var(--space-5);
}

/* The closing band: the seal, the line, the link, on white between two rules. */
.manifesto-teaser {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-5) var(--space-7);
  padding: var(--space-7) 0;
  border-top: var(--border);
  border-bottom: var(--border);
}

/* ---- Explore ------------------------------------------------------------------------ */

@media (min-width: 761px) {
  .explore-tools .search-field {
    flex: 0 0 300px;
  }
}

/* Wider heading art for the reference's explore frieze and calculator forge. */
.explore-heading .heading-art {
  width: clamp(280px, 36vw, 500px);
}
.calculator-heading .heading-art {
  width: clamp(240px, 28vw, 400px);
}
.explore-heading .heading-art .art,
.calculator-heading .heading-art .art {
  max-height: none;
}

/* ---- Guide -------------------------------------------------------------------------- */

.guide-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: var(--space-8);
  padding-top: var(--space-8);
}
.guide-sidebar {
  position: sticky;
  top: var(--space-5);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.guide-sidebar-title {
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: var(--tracking-heading);
  line-height: 1.1;
}
.guide-sidebar > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--muted);
}
.guide-sidebar > a .icon {
  width: 14px;
  height: 14px;
  opacity: 0;
}
.guide-sidebar > a:hover {
  color: var(--ink);
  background: var(--gray);
}
.guide-sidebar > a:hover .icon,
.guide-sidebar > a.active .icon {
  opacity: 1;
}
/* The current topic: grey fill and a thin red marker. */
.guide-sidebar > a.active {
  color: var(--ink);
  font-weight: 600;
  background: var(--gray);
  box-shadow: inset 2px 0 0 var(--red);
}
.guide-sidebar .guide-calculator {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: var(--border);
  border-radius: 0;
  color: var(--ink);
  font-weight: 500;
}
.guide-sidebar .guide-calculator:hover {
  background: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.guide-article {
  max-width: 880px;
}
.guide-head {
  padding-bottom: var(--space-7);
}
.guide-head .eyebrow {
  margin-bottom: var(--space-4);
}
.guide-article h1 {
  font-size: clamp(36px, 4.2vw, 60px);
}
/* The lead with the topic's plate beside it (depth.js pageAtmosphere .guide-plate). */
.guide-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  align-items: start;
  gap: var(--space-7);
  margin-top: var(--space-5);
}
.guide-head .lead {
  max-width: 56ch;
}
.guide-plate {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.guide-faces {
  padding: var(--space-6) 0;
  border-top: var(--border);
}
.guide-article section {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: var(--space-3) var(--space-6);
  padding: var(--space-5) 0;
  border-top: var(--border);
}
.guide-article h2 {
  font-size: 20px;
  line-height: 1.3;
}
.guide-article section p {
  font-size: 15px;
  color: var(--muted);
}
.guide-article > .button {
  margin-top: var(--space-2);
}

/* ---- Founders ----------------------------------------------------------------------- */

.founder-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-8) 0;
}
.manifesto-hero {
  padding: var(--space-9) 0 var(--space-8);
}
.founder-hero .eyebrow,
.manifesto-hero .eyebrow {
  margin-bottom: var(--space-5);
}
.founder-hero h1 {
  max-width: 14ch;
}
.founder-hero .lead {
  max-width: 44ch;
  margin-top: var(--space-5);
}
.founder-hero .guide-note {
  max-width: 60ch;
  margin-bottom: 0;
}

.founder-process {
  margin-top: var(--space-8);
}
.process-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}
.process-list li {
  padding-top: var(--space-5);
  border-top: 2px solid var(--black);
}
.process-list span {
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.process-list h3 {
  margin: var(--space-4) 0 var(--space-2);
  font-size: 20px;
}
.process-list p {
  font-size: 15px;
  color: var(--muted);
}

.founder-mood {
  margin-top: var(--space-9);
}
.mood-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
  align-items: start;
  margin-top: var(--space-6);
}
.mood-pair figure {
  margin: 0;
}
.mood-pair .art {
  mix-blend-mode: normal;
}
.mood-pair figcaption {
  margin-top: var(--space-3);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 760px) {
  .mood-pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

.founder-faq {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-7);
  align-items: start;
  margin-top: var(--space-9);
}
.founder-faq details:first-child {
  border-top: var(--border);
}

.founder-closing {
  margin-top: var(--space-9);
}

/* ---- Manifesto ---------------------------------------------------------------------- */

.manifesto-hero h1 {
  max-width: 12ch;
  font-size: var(--fs-display);
  line-height: 1;
  letter-spacing: -0.03em;
}
/* The reference's frieze, full width under the title. */
.manifesto-frieze {
  display: block;
  margin-top: var(--space-8);
}
/* The seal holds the left third; the copy reads in the other two. */
.manifesto-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--space-7);
  margin-top: var(--space-8);
}
.manifesto-seal {
  position: sticky;
  top: var(--space-6);
  align-self: start;
  justify-self: center;
  padding-top: var(--space-2);
}
.manifesto-seal .kit-seal {
  width: clamp(120px, 13vw, 176px);
}
.manifesto-copy {
  max-width: 720px;
}
.manifesto-copy p {
  margin-bottom: var(--space-5);
  font-size: var(--fs-lg);
  line-height: 1.75;
}
.manifesto-copy .manifesto-lead {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.3;
  letter-spacing: var(--tracking-heading);
}
.manifesto-copy h2 {
  margin: var(--space-8) 0 var(--space-5);
}
.manifesto-copy .hero-actions {
  margin-top: var(--space-6);
}

/* ---- Calculator --------------------------------------------------------------------- */

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-8);
  align-items: start;
}
.calculator-layout form {
  padding: var(--space-6);
  border: var(--border);
  border-radius: var(--radius);
}
.calculator-layout h2 {
  margin-bottom: var(--space-6);
  font-size: clamp(26px, 2.6vw, 36px);
}
.calculator-result {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  padding: var(--space-6);
  background: var(--gray);
  border-radius: var(--radius);
}
.calculator-result > span {
  font-size: var(--fs-sm);
  color: var(--muted);
}
.calculator-result strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 6vw, 88px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.calculator-result small {
  margin-left: var(--space-3);
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0;
}
#calculator-results .muted {
  margin-top: var(--space-4);
  font-size: 13px;
}
#calculator-results .text-link {
  margin-top: var(--space-5);
}
#calculator-results .summary-list dd {
  white-space: nowrap;
}

/* ---- Responsive --------------------------------------------------------------------- */

@media (max-width: 1000px) {
  /* The hero plate moves under the copy, full width; only its top edge dissolves. */
  .home-hero {
    row-gap: var(--space-6);
  }
  .home-hero > .hero-plate {
    grid-area: auto;
    width: auto;
    justify-self: stretch;
  }
  .hero-plate .art {
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%);
    mask-image: linear-gradient(to bottom, transparent, #000 16%);
  }
  .principles,
  .founder-faq {
    grid-template-columns: minmax(0, 1fr);
  }
  .guide-layout {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: var(--space-6);
  }
  .guide-lead {
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: var(--space-5);
  }
  .frieze-copy {
    position: static;
    max-width: 52ch;
    padding: var(--space-5) 0 0;
  }
  .process-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: var(--space-7);
  }
  .manifesto-body {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: var(--space-6);
  }
  .calculator-layout {
    gap: var(--space-6);
  }
}

@media (max-width: 760px) {
  .home-hero {
    padding: var(--space-7) 0 var(--space-6);
  }
  .home-hero h1,
  .conviction-band h2 {
    font-size: clamp(38px, 11.4vw, 56px);
  }
  .founder-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }
  .manifesto-teaser {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    gap: var(--space-4);
    padding: var(--space-6) 0;
  }
  .manifesto-teaser br {
    display: none;
  }
  .kit-seal {
    width: 88px;
  }
  .explore-heading .heading-art,
  .calculator-heading .heading-art {
    width: 100%;
    order: 0;
  }
  .value-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
  }
  .raises-section,
  .conviction-band,
  .world-frieze,
  .principles,
  .manifesto-teaser,
  .founder-faq,
  .founder-closing {
    margin-top: var(--space-8);
  }
  .conviction-band {
    gap: var(--space-4);
    padding: var(--space-8) 0;
  }
  .conviction-band p {
    margin-top: var(--space-5);
  }
  .band-slash {
    width: 64px;
    margin-right: 0;
  }
  .principle-list,
  .process-list,
  .calculator-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .principle-list article {
    padding: var(--space-5);
  }
  .principle-list .icon {
    margin-bottom: var(--space-4);
  }
  .process-list {
    row-gap: var(--space-6);
  }
  .founder-hero,
  .manifesto-hero {
    padding: var(--space-7) 0 var(--space-6);
  }
  .manifesto-frieze {
    margin-top: var(--space-6);
  }
  .manifesto-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: var(--space-2);
  }
  /* The wide plates crop to a taller frame on a phone. */
  .world-frieze > .art,
  .founder-closing > .art,
  .manifesto-frieze {
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: 62% 50%;
  }
  .manifesto-seal {
    position: static;
    justify-self: start;
    padding-top: 0;
  }
  .manifesto-seal .kit-seal {
    width: 96px;
  }
  .manifesto-hero h1 {
    font-size: var(--fs-h1);
  }
  .manifesto-copy {
    margin-top: var(--space-5);
  }
  .manifesto-copy p {
    font-size: var(--fs-md);
  }
  .manifesto-copy h2 {
    margin-top: var(--space-7);
  }

  .guide-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
    padding-top: var(--space-6);
  }
  .guide-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  .guide-sidebar-title {
    width: 100%;
    margin-bottom: var(--space-2);
  }
  .guide-sidebar > a {
    padding: 7px 12px;
    border: var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
  }
  .guide-sidebar > a .icon {
    display: none;
  }
  .guide-sidebar > a.active {
    background: var(--black);
    border-color: var(--black);
    color: var(--white);
    box-shadow: none;
  }
  .guide-sidebar .guide-calculator {
    margin: 0;
    padding: 7px 12px;
    border: var(--border-strong);
    border-radius: var(--radius-sm);
  }
  .guide-head {
    padding-bottom: var(--space-6);
  }
  .guide-lead {
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: var(--space-4);
  }
  .guide-article section {
    grid-template-columns: minmax(0, 1fr);
  }

  .calculator-layout form {
    padding: var(--space-5);
  }
  .calculator-result {
    padding: var(--space-5);
  }
}

@media (forced-colors: active) {
  .band-slash {
    forced-color-adjust: none;
    background: CanvasText;
  }
  .guide-sidebar > a.active {
    outline: 1px solid Highlight;
  }
}
