:root {
  --black: #070807;
  --charcoal: #10120f;
  --graphite: #1b201b;
  --ink: #f4efe4;
  --paper: #ebe5d8;
  --muted: #b7b0a2;
  --copper: #e66b3f;
  --amber: #f1ba68;
  --cyan: #93d6d2;
  --moss: #879c73;
  --line: rgba(244, 239, 228, 0.16);
  --dark-line: rgba(7, 8, 7, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

body::selection {
  background: var(--copper);
  color: var(--black);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-nav {
  position: fixed;
  z-index: 40;
  top: 18px;
  left: 50%;
  display: flex;
  width: min(1120px, calc(100% - 32px));
  min-height: 48px;
  transform: translate3d(-50%, 0, 0);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 10px 8px 14px;
  border: 1px solid rgba(244, 239, 228, 0.14);
  border-radius: 8px;
  background: rgba(7, 8, 7, 0.9);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  contain: paint;
}

.wordmark {
  display: inline-grid;
  width: 42px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(244, 239, 228, 0.22);
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 6px;
  color: rgba(244, 239, 228, 0.76);
  font-size: 0.86rem;
  font-weight: 650;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(244, 239, 228, 0.11);
  color: var(--ink);
  outline: none;
}

.hero {
  position: relative;
  display: grid;
  min-height: 88svh;
  align-items: end;
  padding: 116px 24px 58px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(7, 8, 7, 0.98) 0%, rgba(7, 8, 7, 0.84) 28%, rgba(7, 8, 7, 0.36) 58%, rgba(7, 8, 7, 0.22) 100%),
    linear-gradient(0deg, rgba(7, 8, 7, 0.96) 0%, rgba(7, 8, 7, 0.08) 38%, rgba(7, 8, 7, 0.38) 100%),
    url("assets/peak-reddit-hero.png") center / cover no-repeat;
}

@supports (background-image: image-set(url("assets/peak-reddit-hero.webp") type("image/webp"))) {
  .hero {
    background:
      linear-gradient(90deg, rgba(7, 8, 7, 0.98) 0%, rgba(7, 8, 7, 0.84) 28%, rgba(7, 8, 7, 0.36) 58%, rgba(7, 8, 7, 0.22) 100%),
      linear-gradient(0deg, rgba(7, 8, 7, 0.96) 0%, rgba(7, 8, 7, 0.08) 38%, rgba(7, 8, 7, 0.38) 100%),
      image-set(url("assets/peak-reddit-hero.webp") type("image/webp"), url("assets/peak-reddit-hero.png") type("image/png")) center / cover no-repeat;
  }
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  content: "";
  pointer-events: none;
  background: linear-gradient(0deg, var(--black), rgba(7, 8, 7, 0));
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.eyebrow,
.section-kicker,
.equation-label {
  margin: 0 0 18px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: 5.7rem;
  line-height: 0.98;
  text-wrap: balance;
}

.hero__lede {
  max-width: 760px;
  margin-bottom: 28px;
  color: rgba(244, 239, 228, 0.82);
  font-size: 1.24rem;
}

.hero__claims {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__claims span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 1px solid rgba(244, 239, 228, 0.18);
  border-radius: 6px;
  padding: 8px 12px;
  background: rgba(7, 8, 7, 0.48);
  color: rgba(244, 239, 228, 0.82);
  font-size: 0.9rem;
  font-weight: 700;
}

.section {
  scroll-margin-top: 96px;
  padding: 92px 24px;
}

.section__inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.section h2 {
  margin-bottom: 0;
  font-size: 3.15rem;
  line-height: 1.05;
  text-wrap: balance;
}

.section h3 {
  margin-bottom: 12px;
  font-size: 1.14rem;
  line-height: 1.25;
}

.section p {
  color: rgba(244, 239, 228, 0.74);
}

.section--claim {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(230, 107, 63, 0.13), transparent 34%),
    var(--charcoal);
}

.thesis-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
  gap: 70px;
  align-items: start;
}

.thesis-copy p {
  margin-bottom: 22px;
  font-size: 1.14rem;
}

.thesis-copy p:last-child {
  margin-bottom: 0;
}

.section--equation {
  padding: 44px 24px;
  background: var(--paper);
  color: var(--black);
}

.section--equation p,
.section--equation small {
  color: rgba(7, 8, 7, 0.72);
}

.equation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 42px;
  align-items: center;
}

.equation-block {
  border-left: 4px solid var(--copper);
  padding-left: 24px;
}

.equation-block p {
  margin-bottom: 8px;
  color: var(--black);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 1.25rem;
}

.equation-block strong {
  color: var(--black);
}

.equation-block small {
  display: block;
  max-width: 720px;
  font-size: 0.96rem;
}

.equation-note {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 750;
}

.section--model {
  background:
    linear-gradient(180deg, rgba(147, 214, 210, 0.09), rgba(7, 8, 7, 0)),
    var(--black);
}

.section-heading {
  max-width: 790px;
  margin-bottom: 42px;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.pillar,
.test {
  min-height: 278px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: rgba(244, 239, 228, 0.055);
  box-shadow: var(--shadow);
}

.pillar__index {
  display: block;
  margin-bottom: 54px;
  color: var(--copper);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  font-weight: 800;
}

.pillar p,
.test p {
  margin-bottom: 0;
  font-size: 0.98rem;
}

.section--contrast {
  background: #161812;
}

.contrast-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.15fr);
  gap: 56px;
  align-items: start;
}

.contrast-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contrast-list {
  border-top: 4px solid var(--moss);
  padding-top: 20px;
}

.contrast-list--denied {
  border-top-color: var(--copper);
}

.contrast-list ul {
  display: grid;
  gap: 14px;
  margin: 0;
  padding-left: 18px;
}

.contrast-list li {
  color: rgba(244, 239, 228, 0.76);
}

.section--tests {
  background:
    linear-gradient(90deg, rgba(230, 107, 63, 0.14), transparent 42%),
    linear-gradient(180deg, #0b0d0b, #11140f);
}

.tests-layout {
  display: grid;
  gap: 36px;
}

.test-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.test {
  min-height: 220px;
}

.closing-line {
  max-width: 800px;
  margin: 18px 0 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1.18;
}

.site-footer {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px max(24px, calc((100% - 1120px) / 2));
  border-top: 1px solid var(--line);
  background: var(--black);
  color: rgba(244, 239, 228, 0.68);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.site-footer span {
  color: rgba(244, 239, 228, 0.62);
}

@media (max-width: 940px) {
  h1 {
    max-width: 620px;
    font-size: 4rem;
  }

  .hero {
    min-height: 84svh;
    padding-top: 104px;
    padding-bottom: 42px;
    background-position: 58% center;
  }

  .hero__lede {
    max-width: 650px;
    font-size: 1.1rem;
  }

  .section {
    padding: 72px 20px;
  }

  .section h2 {
    font-size: 2.45rem;
  }

  .thesis-grid,
  .equation-layout,
  .contrast-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-nav {
    top: 10px;
    width: calc(100% - 20px);
  }

  .nav-links a {
    padding: 7px 9px;
    font-size: 0.8rem;
  }

  .hero {
    min-height: 82svh;
    padding: 88px 18px 32px;
    background-position: 63% center;
  }

  .eyebrow {
    margin-bottom: 12px;
    font-size: 0.72rem;
  }

  h1 {
    max-width: 360px;
    margin-bottom: 16px;
    font-size: 2.7rem;
  }

  .hero__lede {
    margin-bottom: 18px;
    font-size: 1rem;
  }

  .hero__claims {
    gap: 8px;
  }

  .hero__claims span {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.8rem;
  }

  .section {
    padding: 58px 18px;
  }

  .section h2 {
    font-size: 2rem;
  }

  .thesis-copy p {
    font-size: 1.02rem;
  }

  .pillars,
  .contrast-columns,
  .test-row {
    grid-template-columns: 1fr;
  }

  .pillar,
  .test {
    min-height: auto;
  }

  .pillar__index {
    margin-bottom: 28px;
  }

  .closing-line {
    font-size: 1.45rem;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-height: 680px) and (max-width: 640px) {
  .hero__claims {
    display: none;
  }

  .hero {
    min-height: 78svh;
    padding-bottom: 24px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
