/* ============================================================
   YES. — A MANIFESTO
   ink on paper, stoic typography
   ============================================================ */

:root {
  --paper:        #f4f0e6;
  --paper-edge:   #ebe6d8;
  --ink:          #0a0a0a;
  --ink-soft:     #2a2a2a;
  --ink-mute:     #6b675c;
  --rule:         #1a1a1a;
  --sand:         #c8a060;   /* the hair / accent */
  --sand-soft:    #d9bf8d;

  --serif: "EB Garamond", "Times New Roman", serif;
  --sans:  "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --pad: clamp(20px, 4vw, 64px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* faint paper grain */
  background-image:
    radial-gradient(circle at 20% 10%, rgba(0,0,0,0.018) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,0.018) 0, transparent 40%);
}

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

/* ---------- META TEXT ---------- */
.meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ---------- TOP BAR ---------- */
.topbar {
  position: relative;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  z-index: 5;
}
.topbar__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px var(--pad);
  gap: 16px;
}
.meta--center { text-align: center; }
.meta--right  { text-align: right; }

/* ---------- SCROLL RAIL ---------- */
.rail {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  z-index: 50;
}
.rail__bar {
  height: 100%;
  width: 0;
  background: var(--ink);
  transition: width 80ms linear;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: clamp(40px, 7vw, 110px) var(--pad) 60px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 4vw, 80px);
  align-items: center;
  min-height: 70vh;
}
.kicker {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 24px;
}
.dot {
  width: 8px; height: 8px;
  background: var(--ink);
  border-radius: 50%;
  margin-right: 10px;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.7); }
}

.hero__yes {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(120px, 22vw, 320px);
  line-height: 0.82;
  letter-spacing: -0.04em;
  margin: 0;
  color: var(--ink);
}
.hero__dot {
  color: var(--sand);
  font-weight: 600;
}

.hero__sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.35;
  max-width: 28ch;
  color: var(--ink-soft);
  margin: 28px 0 36px;
  text-wrap: pretty;
}

.hero__meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 32px;
  max-width: 460px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 18px 0;
  margin-bottom: 36px;
}
.hero__meta > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero__meta b {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px 14px 24px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: transform 200ms ease, background 200ms ease;
}
.cta:hover {
  background: var(--sand);
  color: var(--ink);
  transform: translateY(-2px);
}

.hero__right {
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero__right img {
  width: 100%;
  max-width: 480px;
  filter: contrast(1.02);
  mix-blend-mode: multiply;     /* drops white bg into paper */
}
.hero__right figcaption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-mute);
  margin-top: 18px;
  text-align: center;
}

.hero__floor {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 50px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
kbd {
  font-family: var(--mono);
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1px 6px;
  font-size: 10px;
  margin: 0 2px;
}

/* ============================================================
   SECTION HEAD (shared)
   ============================================================ */
.section-head {
  padding: clamp(40px, 6vw, 90px) var(--pad) 0;
  max-width: 1400px;
  margin: 0 auto;
}
.section-head--center { text-align: center; }
.section-head .meta { display: block; margin-bottom: 12px; }
.section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(60px, 9vw, 140px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
.section-head p {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(17px, 1.5vw, 22px);
  color: var(--ink-mute);
  margin: 8px 0 0;
}

/* ============================================================
   THE CODE / TENETS
   ============================================================ */
.code {
  padding-bottom: clamp(60px, 8vw, 120px);
  border-bottom: 1px solid var(--rule);
}
.tenets {
  list-style: none;
  margin: clamp(40px, 5vw, 80px) auto 0;
  padding: 0 var(--pad);
  max-width: 1400px;
  display: flex;
  flex-direction: column;
}
.tenet {
  display: grid;
  grid-template-columns: 100px 1fr 360px;
  align-items: center;
  gap: clamp(20px, 3vw, 60px);
  padding: clamp(28px, 4vw, 50px) 0;
  border-top: 1px solid var(--rule);
}
.tenet:last-child { border-bottom: 1px solid var(--rule); }

.tenet__num {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 500;
  color: var(--sand);
  line-height: 1;
  font-feature-settings: "lnum";
}
.tenet__body h3 {
  font-family: var(--serif);
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 500;
  line-height: 1.05;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.tenet__body p {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0;
  text-wrap: pretty;
}
.tenet__body i {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
}
.tenet__fig {
  margin: 0;
  display: flex;
  justify-content: flex-end;
}
.tenet__fig img {
  width: 100%;
  max-width: 340px;
  mix-blend-mode: multiply;
  transition: transform 600ms cubic-bezier(.2,.7,.2,1);
}
.tenet:hover .tenet__fig img { transform: scale(1.03) rotate(-0.4deg); }

.tenet--alt {
  grid-template-columns: 360px 1fr 100px;
}
.tenet--alt .tenet__fig  { grid-column: 1; grid-row: 1; justify-content: flex-start; }
.tenet--alt .tenet__body {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  text-align: right;
}
.tenet--alt .tenet__body p { margin-left: auto; }
.tenet--alt .tenet__num  { grid-column: 3; grid-row: 1; text-align: right; }

/* ============================================================
   THE LEXICON
   ============================================================ */
.lex {
  padding-bottom: clamp(60px, 8vw, 120px);
  border-bottom: 1px solid var(--rule);
}
.lex__cloud {
  max-width: 1100px;
  margin: clamp(40px, 5vw, 70px) auto 0;
  padding: 0 var(--pad);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: center;
  align-items: baseline;
}
.lex__word-btn {
  font-family: var(--serif);
  font-weight: 500;
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  letter-spacing: -0.01em;
  transition: color 160ms, transform 160ms;
}
.lex__word-btn:hover {
  color: var(--sand);
  transform: translateY(-2px);
}
.lex__word-btn.is-active {
  color: var(--sand);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* the live panel */
.lex__stage {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(30px, 4vw, 70px);
  max-width: 1200px;
  margin: clamp(40px, 5vw, 70px) auto 0;
  padding: 0 var(--pad);
  align-items: center;
}
.lex__panel {
  margin: 0;
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule);
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: zoom-in;
}
.lex__panel::before {
  content: "";
  position: absolute; inset: 8px;
  border: 1px solid rgba(0,0,0,0.08);
  pointer-events: none;
  z-index: 2;
}
.lex__panel img {
  width: 100%; height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  animation: lexFade 350ms ease both;
}
@keyframes lexFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.lex__meta { padding: 12px 0; }
.lex__meta .meta { display: block; margin-bottom: 12px; }
.lex__word {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(64px, 7vw, 110px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  animation: lexFade 350ms ease both;
}
.lex__note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--ink-soft);
  margin: 0 0 30px;
  max-width: 38ch;
  text-wrap: pretty;
  animation: lexFade 350ms ease both;
}
.lex__random {
  display: inline-flex; align-items: center; gap: 10px;
  background: transparent;
  border: 1px solid var(--ink);
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--ink);
  transition: background 160ms, color 160ms;
}
.lex__random:hover { background: var(--ink); color: var(--paper); }

/* ============================================================
   THE MAN
   ============================================================ */
.man {
  padding-bottom: clamp(60px, 8vw, 120px);
  border-bottom: 1px solid var(--rule);
}
.man__split {
  max-width: 1300px;
  margin: clamp(40px, 5vw, 70px) auto 0;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(20px, 3vw, 50px);
  align-items: center;
}
.man__half {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.man__half img {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4/5;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  background: var(--paper);
}
.man__half:nth-child(3) img {
  object-fit: contain;
  filter: none;
  mix-blend-mode: multiply;
}
.man__half figcaption {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-mute);
  margin-top: 16px;
  font-size: 15px;
  display: flex; align-items: center; gap: 10px;
}

.man__between {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  min-height: 200px;
  justify-content: center;
  gap: 14px;
}
.man__between-line {
  width: 1px;
  flex: 1;
  background: var(--rule);
  min-height: 60px;
}
.man__between-equals {
  font-family: var(--serif);
  font-size: 48px;
  color: var(--sand);
  line-height: 1;
}

.man__notes {
  max-width: 1300px;
  margin: clamp(40px, 5vw, 70px) auto 0;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 50px);
}
.man__notes article {
  border-top: 2px solid var(--ink);
  padding-top: 16px;
}
.man__notes .meta { display: block; margin-bottom: 10px; }
.man__notes p {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.45;
  margin: 0;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* ============================================================
   PLEDGE
   ============================================================ */
.pledge {
  padding: clamp(60px, 8vw, 120px) var(--pad);
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}
.pledge__lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2vw, 28px);
  color: var(--ink-soft);
  max-width: 36ch;
  margin: 0 auto 50px;
  line-height: 1.4;
  text-wrap: pretty;
}
.pledge__list {
  list-style: none;
  padding: 0;
  margin: 0 0 60px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 400;
  line-height: 1.35;
  text-wrap: balance;
}
.pledge__list li i {
  color: var(--sand);
  font-style: italic;
  font-weight: 500;
}

.pledge__final {
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}
.pledge__yes {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(140px, 26vw, 380px);
  line-height: 0.82;
  letter-spacing: -0.04em;
  margin: 0;
}
.pledge__yes span { color: var(--sand); font-weight: 600; }
.pledge__final .meta { margin-top: 30px; display: inline-block; }

/* ============================================================
   FOOTER
   ============================================================ */
.foot {
  border-top: 1px solid var(--rule);
  background: var(--paper-edge);
}
.foot__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--pad);
  gap: 20px;
  flex-wrap: wrap;
}

/* ============================================================
   OVERLAY
   ============================================================ */
.overlay {
  position: fixed; inset: 0;
  background: rgba(244, 240, 230, 0.96);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 80px);
  animation: overlayIn 250ms ease;
}
@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.overlay[hidden] { display: none; }
.overlay__close {
  position: absolute;
  top: 24px; right: 24px;
  background: transparent;
  border: 1px solid var(--ink);
  width: 48px; height: 48px;
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--ink);
  transition: background 160ms, color 160ms;
}
.overlay__close:hover { background: var(--ink); color: var(--paper); }
.overlay__panel {
  margin: 0;
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  display: flex; align-items: center; justify-content: center;
}
.overlay__panel img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__right { order: -1; }
  .hero__right img { max-width: 280px; }
  .hero__yes { font-size: clamp(96px, 32vw, 200px); }
  .tenet,
  .tenet--alt {
    grid-template-columns: 60px 1fr;
    grid-template-rows: auto auto;
  }
  .tenet__fig { grid-column: 1 / -1; justify-content: center; }
  .tenet--alt .tenet__fig { order: 0; }
  .lex__stage { grid-template-columns: 1fr; }
  .man__split { grid-template-columns: 1fr; }
  .man__between { flex-direction: row; min-height: 30px; width: 100%; }
  .man__between-line { width: 100%; min-height: 0; height: 1px; }
  .man__notes { grid-template-columns: 1fr; }
  .topbar__inner { grid-template-columns: 1fr; text-align: center; gap: 4px; }
  .meta--right { text-align: center; }
  .meta--center { text-align: center; }
}
