/* BOOTSTRAP — manifesto stylesheet
   Tokens on :root, dark scheme via prefers-color-scheme, print at the end. */

@font-face {
  font-family: "Jost";
  src: url("fonts/jost-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("fonts/jost-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("fonts/jost-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f6f3ec;
  --ink: #16140f;
  --muted: #76705f;
  --rule: #d9d3c4;
  --accent: #d8311f;

  --font: "Jost", "Futura", "Avenir Next", "Century Gothic", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --measure: 36rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --label-size: 0.78rem;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0e;
    --ink: #ebe6db;
    --muted: #8d877a;
    --rule: #2b2924;
    --accent: #ff4b37;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

p { margin: 0; }

.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;
}

.col {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
}

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

.hero {
  display: flex;
  flex-direction: column;
  min-height: 84vh;
  min-height: clamp(28rem, 84svh, 54rem);
  padding: var(--gutter);
}
@media (orientation: portrait) {
  .hero { min-height: clamp(26rem, 74svh, 50rem); }
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: var(--label-size);
  letter-spacing: 0.06em;
  color: var(--muted);
}
.topbar a {
  color: var(--ink);
  text-decoration: none;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
.topbar a:hover,
.topbar a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  outline: none;
}

.wordmark {
  margin: clamp(0.75rem, 3vh, 2.5rem) 0 0;
  line-height: 0;
}
.wordmark svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  pointer-events: none;
}
.wordmark text {
  font-family: var(--font);
  font-weight: 700;
  font-size: 170px;
  fill: currentColor;
  user-select: none;
}

.hero-foot {
  margin-top: clamp(0.75rem, 2vw, 1.5rem);
  padding-top: 0.8rem;
  border-top: 2px solid var(--ink);
}

.subtitle {
  font-size: clamp(1.375rem, 1rem + 1.9vw, 2.625rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.lede {
  margin-top: auto;
  padding-top: clamp(3rem, 8vh, 6rem);
}
.lede .line {
  font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.375rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* ---------- dialogue (They say / We say) ---------- */

.dialogue p {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  column-gap: 1rem;
  align-items: baseline;
}
.dialogue p + p { margin-top: 0.9rem; }

.voice {
  font-family: var(--mono);
  font-size: var(--label-size);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.we .voice { color: var(--accent); }

.they .line { color: var(--muted); }
.we .line { font-weight: 700; color: var(--ink); }

.dialogue .line {
  font-size: 1.25em;
  line-height: 1.22;
  letter-spacing: -0.01em;
}

@media (max-width: 30rem) {
  .dialogue p {
    grid-template-columns: 1fr;
    row-gap: 0.25rem;
  }
  .dialogue p + p { margin-top: 1.1rem; }
}

/* ---------- manifesto body ---------- */

main {
  padding: 0 var(--gutter);
}

.manifesto {
  padding-top: clamp(3rem, 8vh, 6rem);
}

.s {
  position: relative;
  border-top: 1px solid var(--rule);
  padding-top: 3rem;
  margin-top: 3.25rem;
}
.s:first-child { margin-top: 0; }

.s > * + * { margin-top: 1.4em; }
.s > .idx + * { margin-top: 0; }
.s > .strong + .strong { margin-top: 1.1em; }

.idx {
  position: absolute;
  top: -0.7em;
  left: 0;
  padding-right: 0.75rem;
  background: var(--bg);
  font-family: var(--mono);
  font-size: var(--label-size);
  letter-spacing: 0.12em;
  color: var(--muted);
  line-height: 1.4;
}
.idx::before {
  content: "";
  display: inline-block;
  width: 0.75rem;
  height: 2px;
  margin-right: 0.6rem;
  vertical-align: 0.25em;
  background: var(--accent);
}

@media (min-width: 64rem) {
  .idx {
    left: -5rem;
    padding-right: 0;
    background: none;
    top: 3rem;
    line-height: 2.4em;
  }
}

.strong {
  font-weight: 700;
  font-size: 1.25em;
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.aside {
  font-style: italic;
  color: var(--muted);
}

.nw { white-space: nowrap; }

.s-final {
  padding-bottom: clamp(5rem, 14vh, 9rem);
}

.final {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  line-height: 0;
}
.final svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  pointer-events: none;
}
.final text {
  font-family: var(--font);
  font-weight: 700;
  font-size: 142px;
  fill: currentColor;
  user-select: none;
}
.caret-block {
  fill: var(--accent);
}

/* ---------- caret ---------- */

.caret {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 0.4em;
  vertical-align: -0.15em;
  background: var(--accent);
}
@media (prefers-reduced-motion: no-preference) {
  .caret,
  .caret-block { animation: blink 1.1s steps(1, end) infinite; }

  .hero > * {
    animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hero > *:nth-child(2) { animation-delay: 0.06s; }
  .hero > *:nth-child(3) { animation-delay: 0.14s; }
  .hero > *:nth-child(4) { animation-delay: 0.26s; }
}

@keyframes blink {
  50% { opacity: 0; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(0.75rem); }
}

/* ---------- print ---------- */

@media print {
  :root {
    --bg: #fff;
    --ink: #000;
    --muted: #444;
    --rule: #999;
    --accent: #000;
  }
  body { font-size: 11.5pt; }
  .hero { min-height: 0; padding-bottom: 0; }
  .lede { padding-top: 2rem; }
  .caret,
  .caret-block { display: none; }
  .hero > * { animation: none; }
  .s { break-inside: avoid; }
  p { orphans: 3; widows: 3; }
}
