/* LegalDebug.com - Japanese-minimal + Punk-zine aesthetic */
/* Colors: #F2EDE6 #6B6560 #0D0D0D #C78B6E #2D2926 #D4483B #3B8C7A */
/* Fonts: Zen Kaku Gothic New, Cormorant Garamond, IBM Plex Mono, Space Grotesk */

:root {
  --paper: #F2EDE6;
  --warm-gray: #6B6560;
  --black: #0D0D0D;
  --copper: #C78B6E;
  --charcoal: #2D2926;
  --red: #D4483B;
  --green: #3B8C7A;
  --elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

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

body {
  background: var(--paper);
  color: var(--charcoal);
  font-family: 'Cormorant Garamond', Georgia, serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ========== MANIFESTO BAR (Top Nav) ========== */
.manifesto-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: var(--black);
  display: flex;
  align-items: center;
  z-index: 100;
  border-bottom: 2px solid var(--red);
  overflow: hidden;
}

.manifesto-bar__logo {
  padding: 0 24px;
  flex-shrink: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-legal {
  color: var(--paper);
}

.logo-debug {
  color: var(--red);
}

.manifesto-bar__ticker {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-text {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  color: var(--warm-gray);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: ticker 30s linear infinite;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.manifesto-bar__stamp {
  padding: 0 24px;
  flex-shrink: 0;
}

.stamp-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--copper);
  letter-spacing: 0.1em;
}

/* ========== SCROLL CONTAINER ========== */
.scroll-container {
  margin-top: 48px;
  scroll-snap-type: y proximity;
  overflow-y: auto;
  height: calc(100vh - 48px);
}

/* ========== SPREAD LAYOUT ========== */
.spread {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  scroll-snap-align: start;
  position: relative;
}

.spread__left,
.spread__right {
  padding: 80px 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.spread__gutter {
  background: repeating-linear-gradient(
    to bottom,
    var(--charcoal) 0px,
    var(--charcoal) 8px,
    transparent 8px,
    transparent 16px
  );
  width: 1px;
  opacity: 0.4;
}

/* ========== OPENING FOLD ========== */
.opening-fold {
  background: var(--paper);
}

.opening-fold__content {
  max-width: 500px;
  position: relative;
}

.redaction-bar {
  height: 4px;
  background: var(--black);
  margin: 24px 0;
}

.redaction-bar--top {
  width: 60%;
}

.redaction-bar--bottom {
  width: 45%;
  margin-left: auto;
}

.opening-fold__title {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  line-height: 0.9;
  margin-bottom: 32px;
}

.title-line {
  display: block;
}

.title-line--1 {
  font-size: clamp(60px, 10vw, 120px);
  font-weight: 900;
  color: var(--charcoal);
  letter-spacing: -0.03em;
}

.title-line--2 {
  font-size: clamp(60px, 10vw, 120px);
  font-weight: 300;
  color: var(--red);
  letter-spacing: -0.03em;
}

.title-line--sub {
  font-size: clamp(20px, 3vw, 36px);
  font-weight: 500;
  color: var(--warm-gray);
  letter-spacing: 0.02em;
  margin-top: 8px;
}

.opening-fold__statement {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--charcoal);
  margin-bottom: 32px;
  font-style: italic;
}

.opening-fold__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--warm-gray);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.meta-divider {
  color: var(--copper);
}

/* ========== COLLAGE PANELS ========== */
.collage-panel {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 60vh;
}

.collage-layer {
  position: absolute;
  inset: 0;
}

.collage-layer--document {
  transform: rotate(2deg);
  opacity: 0.12;
  padding: 40px;
}

.legal-text-bg {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  line-height: 2;
  color: var(--charcoal);
  column-count: 1;
}

.legal-text-bg p {
  margin-bottom: 16px;
  text-indent: 2em;
}

.collage-layer--botanical {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.botanical-svg {
  width: 80%;
  height: 80%;
  max-width: 400px;
  max-height: 400px;
}

.botanical-svg--wisteria,
.botanical-svg--fern {
  max-height: 500px;
}

.collage-layer--redaction {
  pointer-events: none;
}

.redaction-mark {
  position: absolute;
  height: 16px;
  background: var(--black);
  opacity: 0.08;
}

.collage-layer--stamp {
  pointer-events: none;
}

.hanko-stamp {
  position: absolute;
  bottom: 20%;
  right: 15%;
  width: 100px;
  height: 100px;
  transform: rotate(-12deg);
  animation: stampPulse 4s ease-in-out infinite;
}

.hanko-stamp--small {
  width: 70px;
  height: 70px;
  position: absolute;
}

.hanko-svg {
  width: 100%;
  height: 100%;
}

.hanko-svg text {
  font-family: 'Space Grotesk', sans-serif;
}

@keyframes stampPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* ========== EVIDENCE SPREADS ========== */
.evidence-spread {
  background: var(--paper);
}

.evidence-spread:nth-child(odd) {
  background: linear-gradient(180deg, var(--paper) 0%, #EDE8E0 100%);
}

.evidence-content {
  max-width: 520px;
  width: 100%;
}

.section-marker {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--charcoal);
}

.section-number {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 48px;
  font-weight: 900;
  color: var(--red);
  line-height: 1;
  letter-spacing: -0.02em;
}

.section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--warm-gray);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.evidence-title {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 700;
  line-height: 0.95;
  color: var(--charcoal);
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

.evidence-body {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--charcoal);
}

.evidence-body p {
  margin-bottom: 20px;
}

.evidence-intro {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.55;
}

/* ========== CODE BLOCKS ========== */
.code-block {
  margin: 24px 0;
  border: 1px solid var(--charcoal);
  border-radius: 2px;
  overflow: hidden;
  background: var(--black);
}

.code-block__header {
  display: flex;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--charcoal);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--warm-gray);
}

.code-block__body {
  padding: 16px;
  margin: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  line-height: 1.7;
  color: var(--paper);
  overflow-x: auto;
  white-space: pre;
}

.code-block__body code {
  font-family: inherit;
}

/* ========== STACK TRACE ========== */
.stack-trace {
  margin: 24px 0;
  padding: 16px;
  background: var(--black);
  border-left: 3px solid var(--red);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  line-height: 2;
}

.stack-trace__line {
  color: var(--warm-gray);
  padding: 2px 0;
}

.stack-trace__at {
  color: var(--green);
  margin-right: 8px;
  font-weight: 700;
}

.stack-trace__loc {
  color: var(--copper);
  opacity: 0.7;
}

.stack-trace__line--error {
  color: var(--red);
}

.stack-trace__line--error .stack-trace__at {
  color: var(--red);
  background: rgba(212, 72, 59, 0.15);
  padding: 0 4px;
}

/* ========== DIFF BLOCKS ========== */
.diff-block {
  margin: 24px 0;
  border: 1px solid var(--charcoal);
  border-radius: 2px;
  overflow: hidden;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  line-height: 1.8;
}

.diff-block__header {
  padding: 8px 16px;
  background: var(--charcoal);
  color: var(--warm-gray);
  font-size: 11px;
}

.diff-line {
  padding: 2px 16px;
  white-space: pre-wrap;
}

.diff-line--remove {
  background: rgba(212, 72, 59, 0.12);
  color: var(--red);
  border-left: 3px solid var(--red);
}

.diff-line--add {
  background: rgba(59, 140, 122, 0.12);
  color: var(--green);
  border-left: 3px solid var(--green);
}

/* ========== CLOSING ARGUMENT ========== */
.closing-argument {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--black);
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
}

.closing-argument__content {
  max-width: 700px;
  text-align: center;
  padding: 80px 40px;
  position: relative;
  z-index: 2;
}

.closing-argument__marker {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
}

.closing-argument__marker .section-number {
  font-size: 24px;
  color: var(--red);
}

.closing-argument__marker .section-label {
  color: var(--warm-gray);
}

.closing-argument__title {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: clamp(40px, 7vw, 96px);
  font-weight: 900;
  line-height: 0.95;
  color: var(--paper);
  letter-spacing: -0.03em;
  margin-bottom: 40px;
}

.closing-argument__body {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  line-height: 1.65;
  color: var(--warm-gray);
  margin-bottom: 48px;
}

.closing-argument__body p {
  margin-bottom: 20px;
}

.closing-argument__cta {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--copper);
  letter-spacing: 0.02em;
}

.closing-argument__verdict {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: center;
  margin-bottom: 48px;
}

.verdict-line {
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: var(--warm-gray);
  opacity: 0.3;
}

.verdict-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.15em;
  white-space: nowrap;
}

.closing-argument__botanical {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.botanical-svg--closing {
  width: 100%;
  height: auto;
}

/* ========== INK SPLATTERS ========== */
.ink-splatter {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.ink-splatter--1 {
  width: 300px;
  height: 300px;
  top: -50px;
  left: -80px;
  background: radial-gradient(ellipse, var(--red) 0%, transparent 70%);
  opacity: 0.06;
  transform: rotate(20deg) scale(1.5, 1);
}

.ink-splatter--2 {
  width: 200px;
  height: 200px;
  bottom: -30px;
  right: -60px;
  background: radial-gradient(ellipse, var(--green) 0%, transparent 70%);
  opacity: 0.08;
  transform: rotate(-15deg) scale(1, 1.3);
}

/* ========== SCROLL PROGRESS ========== */
.scroll-progress {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: rgba(45, 41, 38, 0.15);
  z-index: 100;
}

.scroll-progress__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--red), var(--copper));
  transition: width 0.1s linear;
}

/* ========== SECTION INDICATORS ========== */
.section-indicators {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
}

.section-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--charcoal);
  background: transparent;
  transition: all 0.4s var(--elastic);
  text-decoration: none;
}

.section-indicator--active {
  background: var(--red);
  border-color: var(--red);
  transform: scale(1.3);
}

/* ========== REVEAL ANIMATIONS ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--smooth), transform 0.8s var(--elastic);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ========== BOTANICAL FLOAT ANIMATION ========== */
@keyframes botanicalFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

.collage-layer--botanical {
  animation: botanicalFloat 8s ease-in-out infinite;
}

/* ========== PETAL ROTATION ========== */
@keyframes petalSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.petal-ring--1 {
  animation: petalSpin 60s linear infinite;
}

.petal-ring--2 {
  animation: petalSpin 90s linear infinite reverse;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
  .spread__left,
  .spread__right {
    padding: 60px 40px;
  }
}

@media (max-width: 900px) {
  .spread {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .spread__gutter {
    width: 100%;
    height: 1px;
    background: repeating-linear-gradient(
      to right,
      var(--charcoal) 0px,
      var(--charcoal) 8px,
      transparent 8px,
      transparent 16px
    );
  }

  .spread__left,
  .spread__right {
    padding: 40px 24px;
  }

  .collage-panel {
    min-height: 40vh;
  }

  .section-indicators {
    right: 12px;
  }

  .section-indicator {
    width: 8px;
    height: 8px;
  }
}

@media (max-width: 600px) {
  .manifesto-bar__ticker {
    display: none;
  }

  .opening-fold__title .title-line--1,
  .opening-fold__title .title-line--2 {
    font-size: 48px;
  }

  .evidence-title {
    font-size: 36px;
  }

  .closing-argument__title {
    font-size: 36px;
  }

  .spread__left,
  .spread__right {
    padding: 32px 20px;
  }
}

/* ========== SECTION TORN EDGES ========== */
.evidence-spread::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--charcoal) 5%,
    transparent 8%,
    var(--charcoal) 12%,
    transparent 15%,
    var(--charcoal) 20%,
    transparent 23%,
    var(--charcoal) 28%,
    transparent 32%,
    var(--charcoal) 38%,
    transparent 42%,
    var(--charcoal) 48%,
    transparent 52%,
    var(--charcoal) 58%,
    transparent 62%,
    var(--charcoal) 68%,
    transparent 72%,
    var(--charcoal) 78%,
    transparent 82%,
    var(--charcoal) 88%,
    transparent 92%,
    var(--charcoal) 96%,
    transparent 100%
  );
  opacity: 0.15;
  z-index: 1;
}

/* ========== HANKO HOVER EFFECT ========== */
.hanko-stamp:hover {
  transform: rotate(-12deg) scale(1.1);
  transition: transform 0.4s var(--elastic);
}

/* ========== COLLAGE PANEL VARIATIONS ========== */
.collage-panel--evidence1 .collage-layer--document {
  transform: rotate(-1.5deg);
}

.collage-panel--evidence2 .collage-layer--document {
  transform: rotate(2.5deg);
}

.collage-panel--evidence3 .collage-layer--document {
  transform: rotate(-2deg);
}

/* ========== TEXT SELECTION ========== */
::selection {
  background: var(--red);
  color: var(--paper);
}

/* ========== SCROLLBAR ========== */
.scroll-container::-webkit-scrollbar {
  width: 6px;
}

.scroll-container::-webkit-scrollbar-track {
  background: var(--paper);
}

.scroll-container::-webkit-scrollbar-thumb {
  background: var(--charcoal);
  border-radius: 3px;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
  background: var(--red);
}
