/* ============================================================
   THE CONTRACT YOU DIDN'T SIGN
   style.css
   ============================================================ */

/* ------------------------------------------------------------
   CUSTOM PROPERTIES
   ------------------------------------------------------------ */
:root {
  --bg:           #0a0a0a;
  --bg-raised:    #111111;
  --bg-card:      #131210;
  --text:         #e8e4de;
  --text-muted:   #9a9590;
  --gold:         #c9a84c;
  --gold-dim:     #a68a3e;
  --gold-faint:   rgba(201, 168, 76, 0.12);
  --red:          #8b3a3a;
  --border:       rgba(232, 228, 222, 0.08);
  --border-gold:  rgba(201, 168, 76, 0.25);

  --font-serif:  'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --font-sans:   'Inter', system-ui, -apple-system, sans-serif;

  --max-width:   880px;
}

/* ------------------------------------------------------------
   RESET & BASE
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ------------------------------------------------------------
   TYPOGRAPHY
   ------------------------------------------------------------ */
h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 9vw, 6.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);
}

h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--text);
}

h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 0.75rem;
}

h4 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.2em;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

/* ------------------------------------------------------------
   SCROLL ANIMATIONS
   ------------------------------------------------------------ */
.fade-in {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity  0.85s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .fade-in,
  .timeline-node,
  .clause-hidden {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    max-height: 300px !important;
  }

  .scroll-arrow { animation: none !important; }
}

/* ------------------------------------------------------------
   LAYOUT
   ------------------------------------------------------------ */
.section-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 8rem 0;
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.section-tagline {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.25rem;
  margin-bottom: 0;
}

.section-intro {
  margin-bottom: 4rem;
}

.section-intro p {
  font-size: 1.1rem;
  line-height: 1.9;
  max-width: 64ch;
}

.content-block {
  margin-bottom: 4rem;
}

.content-block p {
  font-size: 1.05rem;
  line-height: 1.85;
  max-width: 64ch;
}

/* ------------------------------------------------------------
   SITE HEADER
   ------------------------------------------------------------ */
.site-header {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 10rem;
  position: relative;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 60% at 50% 55%,
    rgba(201, 168, 76, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.header-content {
  position: relative;
  z-index: 1;
  max-width: 880px;
}

.header-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2rem;
  max-width: none;
}

.header-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-muted);
  max-width: 52ch;
  margin: 2rem auto 0;
  font-style: italic;
  line-height: 1.65;
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.5s ease;
}

.scroll-arrow {
  font-size: 1.4rem;
  color: var(--gold);
  animation: bounce 2.2s ease-in-out infinite;
  line-height: 1;
}

.scroll-label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(9px); }
}

/* ------------------------------------------------------------
   TRANSITION MOMENTS
   ------------------------------------------------------------ */
.transition-moment {
  min-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem;
  position: relative;
  background: var(--bg);
}

.transition-moment::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(201, 168, 76, 0.025) 50%,
    transparent 100%
  );
  pointer-events: none;
}

.transition-text {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--text);
  max-width: 22ch;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ------------------------------------------------------------
   SECTION 1: THINKER CARDS
   ------------------------------------------------------------ */
.section--1 {
  background: var(--bg);
}

.thinkers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 4rem;
}

.thinker-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid rgba(201, 168, 76, 0.3);
  padding: 0 0 2.5rem;
  overflow: hidden;
  transition:
    border-top-color 0.3s ease,
    box-shadow 0.3s ease;
}

.thinker-card > *:not(.thinker-portrait) {
  padding-left: 2rem;
  padding-right: 2rem;
}

.thinker-card:hover {
  border-top-color: var(--gold);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.thinker-portrait {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.thinker-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(40%) contrast(1.05);
  transition: filter 0.4s ease;
}

.thinker-card:hover .thinker-portrait img {
  filter: grayscale(15%) contrast(1.1);
}

.thinker-year {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.thinker-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.thinker-work {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.thinker-idea {
  font-size: 0.92rem;
  line-height: 1.78;
  color: rgba(232, 228, 222, 0.82);
  margin-bottom: 0;
  max-width: none;
}

/* ------------------------------------------------------------
   CONTRACT ANIMATION
   ------------------------------------------------------------ */
.contract-animation-wrapper {
  padding: 4rem 2rem 8rem;
  display: flex;
  justify-content: center;
  background: var(--bg);
}

.contract-doc {
  max-width: 660px;
  width: 100%;
  background: #0d0c0a;
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-top: 4px solid var(--gold-dim);
  padding: 3.5rem;
  position: relative;
  box-shadow: 0 8px 60px rgba(0, 0, 0, 0.7);
}

/* Ruled-paper texture */
.contract-doc::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 27px,
    rgba(201, 168, 76, 0.035) 27px,
    rgba(201, 168, 76, 0.035) 28px
  );
  pointer-events: none;
}

.contract-header-doc {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  z-index: 1;
}

.contract-seal {
  width: 44px;
  height: 44px;
  border: 2px solid rgba(201, 168, 76, 0.5);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  position: relative;
}

.contract-seal::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 50%;
}

.contract-header-doc h3 {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  color: var(--gold-dim);
  margin-bottom: 0.4rem;
}

.contract-date {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-style: italic;
  max-width: none;
  margin-bottom: 0;
}

.contract-clause {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.contract-clause:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.clause-official {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  line-height: 1.75;
  color: rgba(232, 228, 222, 0.65);
  font-style: italic;
  max-width: none;
  margin-bottom: 0;
}

/* Hidden clauses — revealed when .in-view is added */
.clause-hidden {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    opacity    0.6s ease 0.35s,
    margin-top 0.5s ease;
  margin-top: 0;
}

.contract-doc.in-view .clause-hidden {
  max-height: 200px;
  opacity: 1;
  margin-top: 0.9rem;
}

.clause-hidden p {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--gold);
  border-left: 2px solid var(--red);
  padding-left: 0.85rem;
  margin-bottom: 0;
  max-width: none;
}

.redact-mark {
  color: var(--red);
  font-weight: 700;
}

.contract-footer-doc {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.sig-block { text-align: center; }

.sig-line {
  height: 1px;
  background: rgba(232, 228, 222, 0.25);
  width: 200px;
  margin: 0 auto 0.6rem;
}

.sig-label {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-style: italic;
  max-width: none;
  margin-bottom: 0;
}

/* ------------------------------------------------------------
   SECTION 2: THE RACIAL CONTRACT
   ------------------------------------------------------------ */
.section--2 {
  background: var(--bg);
}

.pull-quote {
  margin: 3.5rem 0;
  padding: 1.5rem 0 1.5rem 1.75rem;
  border-left: 3px solid var(--gold);
}

.pull-quote blockquote {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-style: italic;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 0.75rem;
  max-width: 56ch;
}

.pull-quote cite {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: normal;
}

.three-dimensions {
  margin-top: 5rem;
}

.dimensions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.dimension-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2rem;
}

.dimension-number {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  margin-bottom: 0.4rem;
}

.dimension-card h4 {
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
}

.dimension-card p {
  font-size: 0.93rem;
  line-height: 1.82;
  color: rgba(232, 228, 222, 0.82);
  max-width: none;
  margin-bottom: 0;
}

/* ------------------------------------------------------------
   SECTION 3: EPISTEMOLOGY
   ------------------------------------------------------------ */
.section--3 {
  background: #0c0b09;
}

.ignorance-levels {
  margin: 4rem 0;
}

.levels-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-top: 2rem;
}

.level-item {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 1.5rem;
  align-items: start;
}

.level-marker {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1.4;
}

.level-content h4 {
  font-size: 0.78rem;
  margin-bottom: 0.6rem;
}

.level-content p {
  font-size: 1.02rem;
  line-height: 1.85;
  max-width: 60ch;
  margin-bottom: 0;
}

/* ------------------------------------------------------------
   PAUSE AND CONSIDER
   ------------------------------------------------------------ */
.pause-prompt {
  margin: 5rem 0;
}

.pause-prompt-inner {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-left: 4px solid var(--gold);
  padding: 2.5rem;
  max-width: 660px;
}

.pause-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.pause-question {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 1.75rem;
  max-width: 54ch;
}

.pause-input-area {
  margin-top: 1.5rem;
}

.pause-input-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.77rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.pause-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid rgba(232, 228, 222, 0.1);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 0.92rem;
  line-height: 1.7;
  padding: 0.85rem 1rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease;
  border-radius: 0;
  appearance: none;
}

.pause-textarea:focus {
  border-color: rgba(201, 168, 76, 0.4);
}

.pause-textarea::placeholder {
  color: rgba(154, 149, 144, 0.5);
}

.pause-privacy-note {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: rgba(154, 149, 144, 0.55);
  margin-top: 0.5rem;
  font-style: italic;
  margin-bottom: 0;
}

/* ------------------------------------------------------------
   SECTION 4: TIMELINE
   ------------------------------------------------------------ */
.section--4 {
  background: var(--bg);
}

.timeline {
  position: relative;
  padding-left: 3.5rem;
  margin: 5rem 0;
}

.timeline-line {
  position: absolute;
  left: 0.85rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--gold) 0%,
    var(--gold-dim) 75%,
    transparent 100%
  );
  opacity: 0.35;
}

.timeline-node {
  position: relative;
  margin-bottom: 5rem;
  opacity: 0;
  transform: translateX(-18px);
  transition:
    opacity  0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-node:last-child {
  margin-bottom: 0;
}

.timeline-node.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-marker {
  position: absolute;
  left: -3.1rem;
  top: 0.3rem;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--gold-dim);
}

.timeline-period {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0.75rem;
}

.timeline-desc {
  font-size: 0.93rem;
  line-height: 1.82;
  color: rgba(232, 228, 222, 0.78);
  max-width: 60ch;
  margin-bottom: 0;
}

.timeline-figure {
  margin: 0.75rem 0 1.25rem;
  max-width: 480px;
}

.timeline-figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  filter: grayscale(30%);
  transition: filter 0.4s ease;
}

.timeline-figure img:hover {
  filter: grayscale(0%);
}

.timeline-figure figcaption {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
  line-height: 1.4;
}

/* ------------------------------------------------------------
   SECTION 5: FURTHER READING
   ------------------------------------------------------------ */
.section--5 {
  background: var(--bg);
}

.reading-list {
  margin-top: 5rem;
}

.reading-intro {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 2.5rem;
  max-width: 60ch;
}

.reading-items {
  list-style: none;
}

.reading-item {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}

.reading-item:first-child {
  border-top: 1px solid var(--border);
}

.reading-authors {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--gold-dim);
  margin-bottom: 0.3rem;
}

.reading-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.reading-pub {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.reading-note {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.65;
  color: rgba(154, 149, 144, 0.8);
  max-width: 62ch;
  margin-bottom: 0;
}

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 4rem 2rem;
  text-align: center;
  background: var(--bg);
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-credit {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  max-width: none;
}

.footer-note {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: rgba(154, 149, 144, 0.4);
  max-width: none;
  margin-bottom: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ---- Mobile base: ≤ 480px ---- */
@media (max-width: 480px) {
  html { font-size: 16px; }

  .section { padding: 5rem 0; }

  .section-container { padding: 0 1.25rem; }

  .site-header { padding: 5rem 1.25rem 8rem; }

  .thinkers-grid { grid-template-columns: 1fr; gap: 1rem; }

  .thinker-card { padding: 0 0 1.5rem; }

  .thinker-card > *:not(.thinker-portrait) {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .timeline-figure { max-width: 100%; }

  .contract-doc { padding: 2rem 1.5rem; }

  .pause-prompt-inner { padding: 1.75rem 1.5rem; }

  .timeline { padding-left: 2.5rem; }

  .timeline-marker { left: -2.2rem; }

  .transition-moment { min-height: 50vh; padding: 4rem 1.5rem; }
}

/* ---- Small tablet: 481px – 768px ---- */
@media (min-width: 481px) and (max-width: 768px) {
  .thinkers-grid { grid-template-columns: 1fr; }
}

/* ---- Desktop: ≥ 1024px ---- */
@media (min-width: 1024px) {
  .dimensions-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* ---- Large: ≥ 1440px ---- */
@media (min-width: 1440px) {
  :root { --max-width: 1040px; }
}
