/* martiallaw.quest - Design Language Styles */
/* Colors: #D4C8B5, #8B6914, #3D3225, #C8553D, #1A1610, #6B7B3A, #A69279, #F5EDE0 */
/* Fonts: Share Tech Mono, Cormorant, Inter */

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

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  font-size: 16px;
}

body {
  background-color: #1A1610;
  color: #D4C8B5;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  line-height: 1.8;
  overflow-x: hidden;
  position: relative;
}

/* SVG filters hidden */
.svg-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Leather grain overlay */
.leather-grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.03;
  filter: url(#leather-grain);
  background: #A69279;
}

/* Article sections */
.article-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vh 5vw;
  scroll-snap-align: start;
  overflow: hidden;
}

/* Ghost article numbers */
.ghost-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Share Tech Mono', monospace;
  font-size: 20vw;
  color: #3D3225;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
  letter-spacing: 0.05em;
  line-height: 1;
  user-select: none;
  transition: opacity 1.2s ease;
}

.article-section.is-visible .ghost-number {
  opacity: 0.12;
}

/* Article grid - asymmetric layout */
.article-grid {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 2fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  gap: 0 1.5rem;
  width: 100%;
}

/* Article label positioning */
.article-label {
  grid-column: 1 / 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 0.5rem;
}

.article-prefix {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: #8B6914;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.25rem;
}

.article-num {
  font-family: 'Share Tech Mono', monospace;
  font-size: 3.5rem;
  color: #8B6914;
  letter-spacing: 0.05em;
  line-height: 1;
  opacity: 0.9;
}

/* Article content - occupies 30-45% of screen width */
.article-content {
  grid-column: 5 / 10;
}

.article-title {
  font-family: 'Cormorant', serif;
  font-weight: 300;
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: #F5EDE0;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease 0.2s, transform 1s ease 0.2s;
}

.article-section.is-visible .article-title {
  opacity: 1;
  transform: translateY(0);
}

.article-date {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: #A69279;
  text-transform: uppercase;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(139, 105, 20, 0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease 0.4s, transform 0.8s ease 0.4s;
}

.article-section.is-visible .article-date {
  opacity: 1;
  transform: translateY(0);
}

.article-body {
  font-family: 'Cormorant', serif;
  font-weight: 400;
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  line-height: 1.9;
  color: #D4C8B5;
  margin-bottom: 1.5rem;
  max-width: 60ch;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease 0.6s, transform 1s ease 0.6s;
}

.article-section.is-visible .article-body {
  opacity: 1;
  transform: translateY(0);
}

.article-body:last-child {
  margin-bottom: 0;
}

.article-body em {
  font-style: italic;
  color: #C8553D;
}

/* Wave dividers */
.wave-divider {
  position: relative;
  width: 100%;
  height: 80px;
  margin-top: 4rem;
  z-index: 1;
}

.wave-canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1.5s ease 0.8s;
}

.article-section.is-visible .wave-canvas {
  opacity: 1;
}

/* Colophon */
.colophon {
  position: relative;
  padding: 8vh 5vw 4vh;
  text-align: center;
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.colophon-grid {
  position: relative;
  z-index: 1;
}

.colophon-text {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  color: #8B6914;
  margin-bottom: 1rem;
}

.colophon-citation {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: #A69279;
  opacity: 0.5;
}

.final-wave {
  width: 60%;
  height: 60px;
  margin-top: 3rem;
}

.final-wave .wave-canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.4;
}

/* Redaction hover effect on article bodies */
.article-body .redact-word {
  position: relative;
  display: inline;
  transition: color 0.3s ease;
}

.article-body .redact-word::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #1A1610;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.article-body .redact-word:hover::after {
  transform: scaleX(1);
}

/* Vertical stamp marks on left edge */
.article-section::before {
  content: attr(data-article);
  position: absolute;
  left: 1.5vw;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.5em;
  color: #3D3225;
  opacity: 0.3;
  white-space: nowrap;
}

/* Horizontal line accents */
.article-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #8B6914 10%,
    #8B6914 15%,
    transparent 40%
  );
  opacity: 0.15;
}

/* Responsive */
@media (max-width: 1024px) {
  .article-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 0 2rem;
  }

  .article-label {
    flex-direction: row;
    align-items: baseline;
    gap: 1rem;
  }

  .article-num {
    font-size: 2.5rem;
  }

  .ghost-number {
    font-size: 30vw;
  }

  .article-section::before {
    display: none;
  }
}

@media (max-width: 640px) {
  .article-section {
    padding: 6vh 4vw;
  }

  .ghost-number {
    font-size: 40vw;
    opacity: 0.05;
  }

  .article-title {
    font-size: 1.8rem;
  }

  .article-body {
    font-size: 1rem;
    line-height: 1.75;
  }

  .colophon-text {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
  }

  .final-wave {
    width: 90%;
  }
}

/* Selection color */
::selection {
  background: #8B6914;
  color: #1A1610;
}
