:root {
  /* Compliance tokens from DESIGN.md: IBM Plex Mono 400+600 (Google Fonts); Interference Lines**: Lines*: Line*: Lines: Line: Thin horizontal lines (1px height; Intersection Observer fires. Duration: 600ms. Easing: `cubic-bezier(0.23; Intersection Observer trigger at 0.3 threshold that initiates the slide-reveal animations. */
  --sumi-black: #08080c;
  --asphalt-gray: #141418;
  --ink-field: #0a0a0f;
  --washi-white: #e8e4df;
  --torii-vermillion: #c23b22;
  --neon-cobalt: #2d5ef7;
  --concrete: #3d3d3d;
  --hazy-violet: #4a2d6b;
  --ease-stamp: cubic-bezier(0.23, 1, 0.32, 1);
}

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

html {
  background: #08080c;
  color: #e8e4df;
  font-family: "Zen Maru Gothic", Inter, system-ui, sans-serif;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  background: #08080c;
}

a {
  color: #2d5ef7;
  text-decoration: none;
  border-bottom: 1px solid #2d5ef7;
  transition: color 250ms ease, border-color 250ms ease, text-shadow 250ms ease;
}

a:hover {
  color: #c23b22;
  border-bottom-color: #c23b22;
  text-shadow: 0 0 16px rgba(45, 94, 247, 0.45);
}

.rain-grain {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0.03;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Crect width='1' height='1' x='3' y='7' fill='%23e8e4df'/%3E%3Crect width='1' height='1' x='18' y='54' fill='%23e8e4df'/%3E%3Crect width='1' height='1' x='35' y='22' fill='%23e8e4df'/%3E%3Crect width='1' height='1' x='51' y='68' fill='%23e8e4df'/%3E%3Crect width='1' height='1' x='72' y='13' fill='%23e8e4df'/%3E%3Crect width='1' height='1' x='64' y='41' fill='%23e8e4df'/%3E%3C/svg%3E");
}

.snap-stack {
  width: 100%;
}

.section {
  position: relative;
  min-height: 100vh;
  scroll-snap-align: start;
  overflow: hidden;
  isolation: isolate;
  background: #08080c;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: repeating-linear-gradient(to bottom, transparent 0px, transparent 47px, rgba(194, 59, 34, 0.15) 47px, rgba(194, 59, 34, 0.15) 48px);
  opacity: 0.72;
}

.section::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 28vh;
  background: linear-gradient(to top, rgba(45, 94, 247, 0.03) 0%, transparent 55%);
}

.display {
  font-family: "Zen Kaku Gothic New", "IBM Plex Mono", sans-serif;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: lowercase;
  color: #e8e4df;
  text-shadow: 0 0 20px rgba(45, 94, 247, 0.3), 0 0 60px rgba(45, 94, 247, 0.1), 0 0 120px rgba(74, 45, 107, 0.05);
}

.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%) rotateX(-15deg);
  transform-origin: 50% 100%;
}

.section.visible .char {
  animation: stamp-in 760ms var(--ease-stamp) forwards;
  animation-delay: calc(var(--char-index) * 50ms);
}

@keyframes stamp-in {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 600ms var(--ease-stamp), transform 600ms var(--ease-stamp);
  transition-delay: calc(var(--reveal-index, 0) * 80ms);
}

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

.section-entry {
  display: flex;
  align-items: center;
  padding-left: clamp(2rem, 8vw, 12rem);
}

.entry-mark {
  position: relative;
  width: 100%;
  min-height: 40vh;
}

.logotype {
  font-size: clamp(8rem, 22vw, 18rem);
  line-height: 0.9;
  white-space: nowrap;
}

.entry-rule {
  position: absolute;
  top: clamp(7rem, 11vw, 10rem);
  left: min(58vw, 48rem);
  right: 0;
  height: 1px;
  background: #3d3d3d;
  transform: scaleX(0);
  transform-origin: left;
}

.section-entry.visible .entry-rule {
  animation: rule-draw 900ms var(--ease-stamp) 300ms forwards;
}

@keyframes rule-draw {
  to { transform: scaleX(1); }
}

.entry-line {
  max-width: 42rem;
  margin-top: 2.8rem;
  font-size: clamp(0.95rem, 1.1vw, 1.15rem);
  line-height: 1.85;
  letter-spacing: 0.02em;
  font-weight: 400;
}

.section-context {
  display: flex;
  align-items: flex-start;
  padding: clamp(5rem, 12vw, 14rem) clamp(2rem, 8vw, 12rem);
}

.vermillion-anchor {
  position: absolute;
  inset: 0 auto 0 0;
  width: 1px;
  background: #c23b22;
  animation: vermillion-pulse 4s ease-in-out infinite;
}

@keyframes vermillion-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.context-column {
  max-width: 560px;
  margin-left: clamp(2rem, 8vw, 12rem);
}

.context-block + .context-block {
  margin-top: 4rem;
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
  font-size: clamp(3.5rem, 10vw, 9rem);
  line-height: 0.92;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.9rem;
  width: 100%;
  height: 1px;
  background: #c23b22;
  transform: scaleX(0);
  transform-origin: left;
}

.section.visible .section-title::after {
  animation: rule-draw 800ms var(--ease-stamp) 600ms forwards;
}

.context-block h3 {
  margin-bottom: 1.2rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(0.8rem, 0.9vw, 0.95rem);
  line-height: 1.6;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: #2d5ef7;
}

.context-block p {
  font-size: clamp(0.95rem, 1.1vw, 1.15rem);
  line-height: 1.85;
  letter-spacing: 0.02em;
  font-weight: 400;
}

.section-work {
  padding: clamp(3rem, 6vw, 5rem) clamp(2rem, 8vw, 12rem);
  display: flex;
  align-items: center;
}

.signal-run {
  width: 100%;
}

.signal-block {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(42vw, 480px);
  aspect-ratio: 16 / 9;
  background: #0a0a0f;
  box-shadow: inset 0 0 0 1px rgba(61, 61, 61, 0.55), 0 0 42px rgba(74, 45, 107, 0.08);
}

.signal-block + .signal-block {
  margin-top: clamp(2rem, 6vw, 6rem);
}

.signal-block.right {
  margin-left: auto;
}

.signal-block::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 3px;
  height: 40%;
  background: #c23b22;
}

.signal-block::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(45, 94, 247, 0.04), transparent 34%, rgba(194, 59, 34, 0.03));
  opacity: 0;
  transition: opacity 250ms ease;
}

.signal-block:hover::after {
  opacity: 1;
}

code {
  position: relative;
  z-index: 1;
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(0.8rem, 0.9vw, 0.95rem);
  line-height: 1.6;
  letter-spacing: 0.05em;
  font-weight: 400;
  color: #e8e4df;
}

.section-exit {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: clamp(2rem, 8vw, 12rem);
}

.exit-corner {
  text-align: right;
}

.exit-logo,
.exit-contact {
  font-size: clamp(0.95rem, 1.1vw, 1.15rem);
  line-height: 1.85;
  letter-spacing: 0.02em;
  font-weight: 400;
}

.exit-contact {
  margin-top: 0.75rem;
}

.cursor-trail {
  position: fixed;
  z-index: 29;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(45, 94, 247, 0.4);
  box-shadow: 0 0 18px rgba(45, 94, 247, 0.55);
  transform: translate(-50%, -50%);
  transition: opacity 400ms ease, transform 400ms ease;
}

.cursor-trail.fade {
  opacity: 0;
  transform: translate(-50%, -50%) scale(2.2);
}

@media (max-width: 760px) {
  .section-entry,
  .section-context,
  .section-work,
  .section-exit {
    padding: 2rem;
  }

  .entry-rule {
    left: 55vw;
  }

  .context-column {
    margin-left: 1.5rem;
  }

  .signal-block {
    width: 100%;
  }

  .signal-block.right {
    margin-left: 0;
  }
}
