/* ════════════════════════════════════════════════════════════
   NEXUS — 02 · Hero, the world, the monolith
   ════════════════════════════════════════════════════════════ */

/* ── Image grade ────────────────────────────────────────────── */
.frame {
  position: relative;
  overflow: hidden;
}

.frame img,
.work__media img,
.threshold__media img,
.work-dialog__media img {
  filter: saturate(0.82) contrast(1.04) brightness(0.94) sepia(0.06);
}

.frame__wash,
.work__wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 8, 9, 0.12), transparent 42%, rgba(7, 8, 9, 0.38)),
    radial-gradient(120% 80% at 72% 18%, rgba(216, 185, 138, 0.1), transparent 62%);
}

.frame figcaption,
.frame + figcaption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

/* ── A · Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding-top: 124px;
  padding-bottom: 28px;
  overflow: clip;
  background: var(--c-obsidian);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(72% 64% at 80% 42%, rgba(184, 115, 51, 0.16), transparent 68%),
    radial-gradient(52% 48% at 12% 12%, rgba(110, 135, 148, 0.11), transparent 70%),
    linear-gradient(180deg, rgba(7, 8, 9, 0.2), transparent 40%, rgba(7, 8, 9, 0.85));
}

.hero::after {
  content: "";
  position: absolute;
  inset-inline-end: 0;
  bottom: 0;
  inset-inline-start: 0;
  z-index: 1;
  height: 22vh;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--c-obsidian));
}

.hero__blur {
  position: absolute;
  inset: -12%;
  z-index: 0;
  opacity: 0.42;
  pointer-events: none;
  overflow: hidden;
}

.hero__blur img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(90px) saturate(0.9) brightness(0.6);
  transform: scale(1.25);
}

.hero__grid-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.55;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(242, 237, 228, 0.05) 0 1px,
    transparent 1px calc(100% / 8)
  );
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 84%);
}

.hero__plan {
  position: absolute;
  top: 50%;
  inset-inline-end: -8vw;
  z-index: 1;
  width: min(62vw, 860px);
  color: var(--c-champagne);
  opacity: 0.12;
  pointer-events: none;
  transform: translateY(-50%);
}

.hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  align-items: center;
  width: min(calc(100% - var(--gutter) * 2), var(--container));
  margin-inline: auto;
  flex: 1 0 auto;
}

.hero__copy {
  grid-column: 1 / 8;
  padding-bottom: clamp(20px, 4vh, 54px);
}

.hero__title {
  margin-top: clamp(22px, 3.2vh, 38px);
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 400;
  line-height: 0.84;
  letter-spacing: -0.025em;
}

.hero__line {
  display: block;
  overflow: hidden;
}

.hero__line--offset {
  padding-inline-start: clamp(28px, 6vw, 104px);
}

.hero__word {
  display: inline-block;
}

.hero__title em {
  color: var(--accent);
}

.hero__period {
  color: var(--c-copper);
}

.hero__lede {
  max-width: 38ch;
  margin-top: clamp(24px, 3.4vh, 38px);
  color: #b9b3a7;
  font-size: var(--fs-lead);
  line-height: 1.68;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(18px, 2.4vw, 30px);
  margin-top: clamp(24px, 3.4vh, 34px);
}

.hero__meta {
  display: flex;
  gap: clamp(20px, 3vw, 48px);
  max-width: 660px;
  margin-top: clamp(30px, 4.4vh, 48px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.hero__meta dt {
  color: rgba(242, 237, 228, 0.4);
  font-size: 10px;
}

.hero__meta dd {
  margin-top: 7px;
  color: rgba(242, 237, 228, 0.85);
  font-size: 0.78rem;
  line-height: 1.55;
}

.hero__figure {
  position: relative;
  grid-column: 9 / 13;
  justify-self: end;
  width: 100%;
  max-width: 455px;
  will-change: transform;
}

.hero__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  padding: 10px;
  border: 1px solid rgba(216, 185, 138, 0.32);
  background: rgba(10, 8, 6, 0.35);
  box-shadow:
    0 50px 90px -44px rgba(0, 0, 0, 0.95),
    inset 0 0 70px rgba(184, 115, 51, 0.07);
  transform: translate3d(var(--hx, 0px), calc(var(--hy, 0px) + var(--sy, 0px)), 0);
  will-change: transform;
}

.hero__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 47%;
  filter: saturate(0.93) contrast(1.03) brightness(0.95);
}

.hero__corner {
  position: absolute;
  z-index: 2;
  width: 18px;
  height: 18px;
  border: 0 solid rgba(216, 185, 138, 0.8);
  pointer-events: none;
}

.hero__corner--tl {
  top: -1px;
  inset-inline-start: -1px;
  border-top-width: 1px;
  border-inline-start-width: 1px;
}

.hero__corner--br {
  inset-inline-end: -1px;
  bottom: -1px;
  border-inline-end-width: 1px;
  border-bottom-width: 1px;
}

.hero__figure-index {
  position: absolute;
  top: 22px;
  inset-inline-end: 22px;
  z-index: 2;
  padding: 6px 9px;
  border: 1px solid rgba(242, 237, 228, 0.25);
  background: rgba(7, 8, 9, 0.35);
  color: var(--c-champagne);
  font-size: 10px;
  letter-spacing: 0.14em;
  backdrop-filter: blur(6px);
}

.hero__caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 13px;
  color: rgba(242, 237, 228, 0.46);
  transform: translate3d(calc(var(--hx, 0px) * 0.4), calc(var(--sy, 0px) * 0.5), 0);
}

.hero__vertical {
  position: absolute;
  inset-inline-end: -28px;
  bottom: 2px;
  color: rgba(242, 237, 228, 0.32);
  font-size: 10px;
  letter-spacing: 0.22em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.hero__foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  width: min(calc(100% - var(--gutter) * 2), var(--container));
  margin: 28px auto 0;
  padding-top: 22px;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: rgba(242, 237, 228, 0.55);
  transition: color 0.3s linear;
}

.scroll-cue:hover {
  color: var(--accent);
}

.scroll-cue__line {
  position: relative;
  width: 64px;
  height: 1px;
  overflow: hidden;
  background: rgba(242, 237, 228, 0.22);
}

.scroll-cue__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  animation: cue 2.8s var(--ease-in-out) infinite;
}

@keyframes cue {
  0% {
    transform: translateX(102%);
  }
  55% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-102%);
  }
}

.hero__motto {
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: rgba(242, 237, 228, 0.42);
}

.hero__edition {
  color: rgba(242, 237, 228, 0.34);
  font-size: 10px;
}

/* ── B · The world ──────────────────────────────────────────── */
.world {
  background: var(--c-ink);
  overflow-x: clip;
}

.world::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  inset-inline-start: 0;
  height: 1px;
  background: linear-gradient(270deg, transparent, rgba(216, 185, 138, 0.35), transparent);
}

.world__spread {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  align-items: start;
}

.world__main {
  grid-column: 1 / 9;
}

.world__main .frame {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
}

.world__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.world__main figcaption,
.world__inset figcaption {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 13px;
  color: rgba(242, 237, 228, 0.44);
}

.world__aside {
  grid-column: 9 / 13;
  padding-top: clamp(40px, 8vw, 140px);
}

.world__note {
  font-family: var(--font-display);
  font-size: clamp(1.28rem, 1.85vw, 1.7rem);
  line-height: 1.44;
  letter-spacing: -0.005em;
  color: var(--c-parchment);
}

.world__inset {
  position: relative;
  z-index: 2;
  width: 118%;
  margin-top: clamp(38px, 5vw, 72px);
  margin-inline-start: -22%;
}

.world__inset .frame {
  aspect-ratio: 1 / 1;
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--c-basalt);
}

.world__inset img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: clamp(64px, 8vw, 128px);
  border-top: 1px solid var(--line);
}

.stat {
  padding-top: 22px;
}

.stat + .stat {
  padding-inline-start: clamp(16px, 2.4vw, 36px);
  border-inline-start: 1px solid var(--line);
}

.stat dt {
  color: rgba(242, 237, 228, 0.4);
  font-size: 10px;
}

.stat dd {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.6vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat dd small {
  color: rgba(242, 237, 228, 0.4);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.world__quote {
  position: relative;
  max-width: 1120px;
  margin: clamp(84px, 10vw, 154px) auto;
  text-align: center;
}

.world__quote-mark {
  display: block;
  height: 0.62em;
  color: rgba(216, 185, 138, 0.22);
  font-family: var(--font-display);
  font-size: clamp(4.4rem, 9vw, 9rem);
  line-height: 0.9;
}

.world__quote blockquote {
  margin-top: 0.1em;
  font-family: var(--font-display);
  font-size: clamp(1.95rem, 4.3vw, 4.3rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.world__quote figcaption {
  margin-top: clamp(22px, 3vw, 34px);
  color: rgba(242, 237, 228, 0.38);
}

.world__strip {
  width: 100vw;
  margin-top: clamp(72px, 9vw, 132px);
  margin-inline-start: calc(50% - 50vw);
}

.world__strip .frame {
  aspect-ratio: 21 / 9;
}

.world__strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.world__strip figcaption {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px var(--gutter) 0;
  color: rgba(242, 237, 228, 0.44);
}

/* ── C · The monolith ───────────────────────────────────────── */
.monolith {
  position: relative;
  min-height: 100svh;
  padding-block: 0;
  overflow: clip;
  background:
    radial-gradient(82% 76% at 66% 44%, #1b130c 0%, #0b0b0c 54%, var(--c-obsidian) 100%);
}

.monolith__stage {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.monolith__canvas {
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: grab;
  touch-action: pan-y;
  transition: opacity 1.2s var(--ease-out);
}

.monolith.is-live .monolith__canvas {
  opacity: 1;
}

.monolith__canvas:active {
  cursor: grabbing;
}

.monolith__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 0.8s var(--ease-out);
}

.monolith.is-live .monolith__fallback {
  opacity: 0;
  pointer-events: none;
}

.fallback-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transform: rotate(3deg);
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.6));
}

.fallback-stack span {
  display: block;
  width: calc(240px - var(--i) * 6px);
  height: 10px;
  border: 1px solid rgba(216, 185, 138, 0.28);
  background: linear-gradient(180deg, #d39a5e, #8f5427 48%, #5c3418);
  transform: translateX(calc(22px - var(--i) * 4px));
  opacity: calc(0.72 + var(--i) * 0.02);
}

.fallback-stack span:nth-child(4n) {
  background: linear-gradient(180deg, #4a4a48, #232322);
}

.fallback-glow {
  position: absolute;
  top: 50%;
  inset-inline-start: 50%;
  width: 540px;
  height: 540px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 115, 51, 0.2), transparent 64%);
  transform: translate(50%, -50%);
  filter: blur(18px);
}

.monolith__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(270deg, rgba(7, 8, 9, 0.94) 0%, rgba(7, 8, 9, 0.55) 34%, transparent 64%),
    linear-gradient(0deg, rgba(7, 8, 9, 0.88), transparent 38%);
}

.monolith__lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(242, 237, 228, 0.04) 0 1px,
    transparent 1px calc(100% / 12)
  );
  mask-image: linear-gradient(270deg, rgba(0, 0, 0, 0.8), transparent 70%);
}

.monolith__head {
  position: relative;
  z-index: 3;
  width: min(calc(100% - var(--gutter) * 2), var(--container));
  margin-inline: auto;
  padding-top: clamp(96px, 12vh, 150px);
}

.monolith__head .section-head__aside {
  grid-column: auto;
}

.monolith__title {
  margin-top: clamp(20px, 3vh, 32px);
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.025em;
}

.monolith__title em {
  color: var(--accent);
}

.monolith__copy {
  position: absolute;
  bottom: clamp(44px, 7vh, 86px);
  inset-inline-start: max(var(--gutter), calc((100vw - var(--container)) / 2));
  z-index: 3;
  width: min(380px, 34vw);
}

.monolith__copy > p:first-child {
  max-width: 37ch;
  color: var(--fg-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.monolith__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
}

.monolith__nudge {
  display: flex;
  gap: 8px;
}

.monolith__hint {
  margin-top: 14px;
  color: rgba(242, 237, 228, 0.34);
  font-size: 10px;
}

.monolith__hint span {
  margin-inline: 6px;
  color: var(--c-copper);
}

.monolith__legend {
  position: absolute;
  inset-inline-end: var(--gutter);
  bottom: clamp(44px, 7vh, 86px);
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.monolith__legend li {
  display: grid;
  grid-template-columns: 10px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  min-width: 160px;
}

.monolith__legend .mono {
  color: rgba(242, 237, 228, 0.52);
  font-size: 10px;
}

.monolith__legend em {
  grid-column: 2;
  color: rgba(242, 237, 228, 0.3);
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.2;
}

.swatch {
  grid-row: 1 / 3;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.swatch--copper {
  background: linear-gradient(135deg, #e2b478, #8d4e22);
  box-shadow: 0 0 12px rgba(184, 115, 51, 0.5);
}

.swatch--basalt {
  background: #2b2c2c;
  border: 1px solid rgba(242, 237, 228, 0.3);
}

.swatch--light {
  background: #f2ede4;
  box-shadow: 0 0 14px rgba(242, 237, 228, 0.55);
}

.monolith__badge {
  position: absolute;
  top: clamp(96px, 12vh, 150px);
  inset-inline-end: var(--gutter);
  z-index: 3;
  color: rgba(242, 237, 228, 0.28);
  font-size: 10px;
}

.monolith__status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
