/* ── tokens ─────────────────────────────────────────────── */
:root {
  --cream: #f7f4ef;
  --ink: #1a1714;
  --muted: #9a9490;
  --rule: #d8d4ce;
  --accent: #c4a882;
}

/* ── base ───────────────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  cursor: none;
}

.fragment-mono-regular {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 400;
  font-style: normal;
}

.fragment-mono-regular-italic {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 400;
  font-style: italic;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── cursor ─────────────────────────────────────────────── */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
}

.cursor.big {
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid var(--ink);
}

/* ── hero / canvas ──────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  min-height: 95vh;
  border-bottom: 1px solid var(--rule);
}

.hero-left {
  padding: 10rem 8rem 8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  border-right: 1px solid var(--rule);
  animation: fadeIn 1s 0.2s both;
}

.hero-kicker {
  font-size: 0.9rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #55504c;
  margin-bottom: 2.5rem;
}

.hero-headline {
  font-family: "Radley", serif;
  font-size: clamp(3.8rem, 6vw, 7.5rem);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.01em;
}

.hero-headline em {
  font-style: italic;
}

.hero-footer {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.hero-sub {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #55504c;
  line-height: 2;
}

.hero-right {
  position: relative;
  overflow: hidden;
  background: #fbf9f6;
  animation: fadeIn 1s 0.4s both;
}

#heroCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: none;
}

.canvas-instruction {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.58rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 1s;
}

.pigment-sidebar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 62px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 0 2rem calc(1rem + 5px);
  background: transparent;
  z-index: 10;
}

.pigment-label {
  font-size: 0.5rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.pigment-colors {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}

.swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  outline: none;
  cursor: none;
  transition: transform 0.2s;
  position: relative;
  flex-shrink: 0;
}

.swatch:hover {
  transform: scale(1.4);
}

.swatch.active::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--ink);
}

.pigment-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
  margin-top: 0.4rem;
}

.action-btn {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: none;
  border: none;
  border-bottom: 1px solid var(--muted);
  color: var(--muted);
  cursor: none;
  transition: color 0.2s, border-color 0.2s;
  padding: 0 0 1px;
  white-space: nowrap;
}

.action-btn:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ── sections ───────────────────────────────────────────── */
.pull-quote {
  padding: 2rem 4rem 1rem;
  display: block;
}

.pq-rule {
  display: none;
}

.pq-body {
  text-align: left;
  padding: 0;
}

.pq-body blockquote {
  font-family: "Radley", serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.3;
  color: #7a3a2a;
}

.pq-body cite {
  display: none;
}

.process-section {
  padding: 2rem 4rem 7rem;
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
}

.process-header {
  margin-bottom: 4rem;
  margin-left: 4rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s, transform 0.7s;
}

.process-header.visible {
  opacity: 1;
  transform: translateY(0);
}

.process-eyebrow {
  display: block;
  font-size: 0.9rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #55504c;
  margin-bottom: 0.8rem;
}

.process-title {
  font-family: "Radley", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  font-style: italic;
  color: var(--ink);
}

.timeline {
  display: flex;
  flex-direction: column;
}

.tl-item {
  display: grid;
  grid-template-columns: 80px 32px 1fr;
  gap: 0 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s, transform 0.7s;
  min-height: 100px;
}

.tl-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.tl-left {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-top: 2px;
}

.tl-num {
  font-family: "Radley", serif;
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.tl-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 6px;
}

.tl-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  flex-shrink: 0;
}

.tl-line {
  width: 1px;
  flex: 1;
  background: var(--rule);
  margin-top: 6px;
  min-height: 50px;
}

.tl-line--last {
  background: transparent;
}

.tl-right {
  padding: 0 0 3.5rem;
}

.tl-term {
  font-family: "Radley", serif;
  font-size: 1.2rem;
  letter-spacing: 1px;
  text-transform: lowercase;
  color: var(--ink);
  margin-bottom: 0.8rem;
}

.tl-term::first-letter {
  text-transform: uppercase;
}

.tl-desc {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  line-height: 2;
  max-width: 44rem;
  color: #55504c;
}

/* ── credit ─────────────────────────────────────────────── */
.credit {
  margin-top: 4rem;
  margin-right: 4.5rem;
  text-align: right;
  font-family: "Radley", serif;
  font-style: italic;
  font-size: calc(0.95rem + 2px);
  color: var(--muted);
  white-space: nowrap;
}

.credit a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.credit a:hover {
  color: var(--accent);
}

/* ── responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-left {
    padding: 3rem 1.6rem 2.5rem;
    border-right: none;
    border-bottom: 1px solid var(--rule);
    min-height: auto;
  }

  .hero-right {
    height: auto;
    display: flex;
    flex-direction: column;
  }

  .hero-right canvas {
    height: 75vw;
    width: 100%;
  }

  .pigment-sidebar {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1.2rem;
    background: rgba(237, 234, 227, 0.95);
    border-top: 1px solid var(--rule);
  }

  .pigment-label {
    font-size: 0.48rem;
    margin-bottom: 0;
    margin-right: 0.3rem;
  }

  .pigment-colors {
    flex-direction: row;
    gap: 0.6rem;
  }

  .swatch {
    width: 20px;
    height: 20px;
  }

  .pigment-actions {
    flex-direction: row;
    gap: 1rem;
    margin-top: 0;
    margin-left: auto;
  }

  .canvas-instruction {
    display: none;
  }

  .pull-quote {
    padding: 2rem 1.6rem 1rem;
  }

  .pq-body {
    padding: 0;
  }

  .process-section {
    padding: 3rem 1.6rem 4rem;
  }

  .tl-item {
    grid-template-columns: 40px 24px 1fr;
  }

  .credit {
    margin-top: 2.5rem;
    margin-right: 2.4rem;
    font-size: calc(0.8rem + 2px);
  }
}
