/* Phase two: editorial game graphics over the existing long-page skeleton. */

:root {
  --ink-black: #050b0f;
  --ink-blue: #081820;
  --ink-panel: #0d252e;
  --paper-mark: #d9b676;
  --paper-mark-dark: #a9834c;
  --line-ink: rgba(234, 238, 226, 0.18);
}

html,
body,
.site-main {
  background: var(--ink-black);
}

body {
  color: var(--paper);
}

.site-rail {
  border-right-color: rgba(243, 244, 236, 0.18);
  background: var(--ink-black);
}

.site-rail__panel {
  overflow: hidden;
}

.site-rail__panel::before {
  width: 2px;
  background: var(--cinnabar);
  box-shadow: -8px 0 0 rgba(217, 182, 118, 0.26), -16px 0 0 rgba(121, 185, 171, 0.16);
}

.site-rail__panel::after {
  position: absolute;
  right: -40px;
  bottom: 17%;
  width: 150px;
  height: 74px;
  border-top: 1px solid rgba(121, 185, 171, 0.3);
  border-bottom: 1px solid rgba(121, 185, 171, 0.14);
  content: "";
  opacity: 0.6;
  transform: rotate(-28deg) skewX(-24deg);
  pointer-events: none;
}

.site-rail__brand {
  z-index: 1;
}

.site-rail__brand-mark {
  border: 1px solid var(--paper-mark);
  background: var(--cinnabar);
  box-shadow: 4px 4px 0 var(--paper-mark-dark);
  transform: rotate(-5deg);
}

.site-rail__brand-name {
  font-weight: 800;
  letter-spacing: 0.12em;
}

.site-rail__nav {
  gap: 5px;
}

.site-rail__link {
  isolation: isolate;
  min-height: 58px;
  border-left: 0;
  background: transparent;
  transform: none;
}

.site-rail__link::before {
  position: absolute;
  inset: 0 10px 0 0;
  z-index: -1;
  background: var(--ink-panel);
  content: "";
  opacity: 0;
  clip-path: polygon(0 0, 94% 0, 100% 22%, 96% 100%, 0 100%);
  transform: translateX(-12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-rail__link::after {
  right: 18px;
  bottom: 9px;
  width: 28px;
  height: 3px;
  background: var(--cinnabar);
  transform: translateX(-8px) skewX(-32deg);
}

.site-rail__link:hover,
.site-rail__link.is-active {
  background: transparent;
  border-left-color: transparent;
  transform: translateX(7px);
}

.site-rail__link:hover::before,
.site-rail__link.is-active::before {
  opacity: 1;
  transform: none;
}

.site-rail__link:hover::after,
.site-rail__link.is-active::after {
  transform: translateX(0) skewX(-32deg);
}

.site-rail__index,
.site-rail__label {
  position: relative;
  z-index: 1;
}

.site-rail__index {
  color: var(--jade);
  font-size: 0.66rem;
}

.site-rail__link.is-active .site-rail__index {
  color: var(--paper-mark);
}

.hero {
  min-height: min(100svh, 980px);
  background: var(--ink-black);
  border-bottom-color: var(--line-ink);
}

.hero::before {
  right: -8vw;
  width: 61%;
  background: var(--ink-blue);
  opacity: 0.92;
  clip-path: polygon(18% 0, 100% 0, 100% 76%, 72% 100%, 0 100%);
}

.hero::after {
  top: 18%;
  right: 40%;
  width: 39vw;
  height: 2px;
  background: var(--cinnabar);
  box-shadow: 0 15px 0 rgba(217, 182, 118, 0.48), 0 30px 0 rgba(121, 185, 171, 0.24);
  transform: rotate(-29deg);
}

.hero__inner {
  min-height: min(100svh, 980px);
  padding-top: clamp(94px, 14vh, 160px);
  padding-bottom: clamp(94px, 14vh, 160px);
}

.hero__copy {
  padding-left: clamp(18px, 2vw, 34px);
  border-left: 1px solid rgba(217, 182, 118, 0.48);
}

.hero__copy::before {
  width: 92px;
  height: 8px;
  margin-bottom: 30px;
  background: var(--cinnabar);
  box-shadow: 18px 8px 0 var(--paper-mark);
}

.hero__copy::after {
  position: absolute;
  top: 12px;
  left: -1px;
  width: 68px;
  height: 70%;
  border-top: 1px solid rgba(121, 185, 171, 0.36);
  border-bottom: 1px solid rgba(121, 185, 171, 0.14);
  content: "";
  opacity: 0.7;
  transform: skewY(-24deg);
  pointer-events: none;
}

.hero__title {
  color: var(--paper-light);
  font-size: clamp(3.4rem, 6vw, 6.8rem);
  font-weight: 900;
  text-shadow: 8px 8px 0 rgba(255, 79, 71, 0.13), -4px 0 0 rgba(121, 185, 171, 0.1);
  transform: skewX(-3deg);
  transform-origin: left center;
}

.hero__lead {
  max-width: 41ch;
  color: rgba(243, 244, 236, 0.72);
}

.hero__visual-slot {
  min-height: clamp(480px, 68vh, 720px);
  border: 1px solid rgba(243, 244, 236, 0.32);
  background: var(--ink-panel);
  box-shadow: 20px 20px 0 rgba(0, 0, 0, 0.32), -12px -12px 0 rgba(121, 185, 171, 0.12);
  clip-path: polygon(8% 0, 100% 0, 93% 100%, 0 100%);
}

.hero__visual-slot::before {
  inset: 7% 7% 6% 8%;
  border-color: rgba(217, 182, 118, 0.44);
  box-shadow: 10px 10px 0 rgba(5, 11, 15, 0.52);
}

.hero__visual-slot::after {
  top: 8%;
  right: 7%;
  width: clamp(76px, 8vw, 118px);
  background: var(--cinnabar);
  box-shadow: 10px 10px 0 var(--paper-mark-dark);
}

.hero__stamp {
  position: absolute;
  top: clamp(38px, 6vh, 72px);
  right: clamp(30px, 4vw, 76px);
  z-index: 5;
  display: inline-flex;
  width: 48px;
  height: 76px;
  align-items: center;
  justify-content: center;
  background: var(--cinnabar);
  color: var(--paper-light);
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 900;
  box-shadow: 7px 7px 0 var(--paper-mark-dark);
  clip-path: polygon(8% 0, 92% 0, 100% 16%, 94% 100%, 0 88%, 4% 12%);
  transform: rotate(8deg);
}

.hero__stamp::after {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(243, 244, 236, 0.55);
  content: "";
}

.hero__scroll {
  color: var(--paper-mark);
}

.page-flow > .section {
  overflow: hidden;
  background: var(--ink-black);
  border-bottom-color: var(--line-ink);
}

.page-flow > .section:nth-child(even) {
  background: var(--ink-blue);
}

.page-flow > .section[data-section-index]::before {
  position: absolute;
  top: clamp(36px, 6vw, 92px);
  right: clamp(18px, 5vw, 90px);
  color: rgba(217, 182, 118, 0.08);
  content: attr(data-section-index);
  font-family: var(--font-mono);
  font-size: clamp(7rem, 16vw, 15rem);
  font-weight: 900;
  line-height: 0.75;
  letter-spacing: 0;
  transform: skewX(-12deg);
  pointer-events: none;
}

.page-flow > .section[data-section-index]::after {
  position: absolute;
  top: 18%;
  right: -6%;
  width: 42%;
  height: 1px;
  background: rgba(121, 185, 171, 0.24);
  box-shadow: 0 12px 0 rgba(217, 182, 118, 0.12);
  content: "";
  transform: rotate(-18deg);
  pointer-events: none;
}

.page-flow > .section > * {
  position: relative;
  z-index: 1;
}

.section__head {
  padding-top: 18px;
  border-top: 1px solid rgba(217, 182, 118, 0.44);
}

.section__title {
  color: var(--paper-light);
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 900;
  transform: skewX(-2deg);
}

.section__title::before {
  width: 12px;
  background: var(--cinnabar);
  box-shadow: 7px 0 0 var(--paper-mark);
}

.section__subtitle,
.about__lead {
  color: rgba(243, 244, 236, 0.64);
}

@media (max-width: 820px) {
  .hero__inner {
    min-height: 0;
  }

  .hero__copy {
    padding-left: 14px;
  }

  .hero__stamp {
    top: 22px;
    right: 24px;
    width: 40px;
    height: 62px;
    font-size: 1rem;
  }

  .page-flow > .section[data-section-index]::before {
    top: 30px;
    right: 18px;
    font-size: 7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-rail__link::before {
    transition: none;
  }
}
