@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400..800&family=Cormorant+Garamond:ital,wght@0,300..700;1,300..700&display=swap');

:root {
  --bg: #080706;
  --bg-2: #11100d;
  --ink: #f0e5d0;
  --muted: #b8aa92;
  --dim: #776d5e;
  --ember: #d06a2b;
  --ember-2: #f0a35b;
  --steel: #8fa0a5;
  --line: rgba(240, 229, 208, 0.16);
  --line-strong: rgba(240, 229, 208, 0.34);
  --panel: rgba(14, 13, 11, 0.82);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
  --max: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -10%, rgba(99, 72, 45, 0.22), transparent 34rem),
    linear-gradient(180deg, #090806 0%, #0f0e0b 46%, #080706 100%);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  text-rendering: geometricPrecision;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 92px 92px;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3 {
  margin: 0;
}

.progress-shell {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--ember), var(--steel), var(--ember-2));
  transform-origin: left;
}

.site-nav {
  position: fixed;
  top: 3px;
  left: 0;
  right: 0;
  z-index: 19;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 52px);
  color: rgba(240, 229, 208, 0.92);
  background: linear-gradient(180deg, rgba(8, 7, 6, 0.86), rgba(8, 7, 6, 0.32));
  backdrop-filter: blur(12px);
}

.portfolio-return {
  position: relative;
  display: grid;
  min-width: 150px;
  padding-left: 21.5px;
  color: rgba(240, 229, 208, 0.82);
  font-family: Inter, system-ui, sans-serif;
  font-size: 15px;
  text-transform: none;
  transition: color 180ms ease;
}

.portfolio-return__arrow {
  position: absolute;
  top: 50%;
  left: 9.5px;
  width: 5.6px;
  height: 70%;
  color: currentColor;
  opacity: 0.76;
  pointer-events: none;
  transform: translateY(-50%);
}

.portfolio-return__arrow path {
  fill: currentColor;
}

.portfolio-return-copy {
  display: grid;
  gap: 4px;
}

.portfolio-name {
  font-size: 1em;
  font-weight: 500;
  letter-spacing: 0.045em;
  line-height: 1.1;
}

.portfolio-name-short {
  display: none;
}

.portfolio-return small,
.chapter-nav a,
.eyebrow,
figcaption,
.hero-meta,
.hero-peek,
.rule-line,
.note {
  letter-spacing: 0;
}

.portfolio-return small {
  color: var(--muted);
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.7em;
  font-weight: 400;
  letter-spacing: 0.1em;
}

.portfolio-exit {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
}

.portfolio-return:hover,
.portfolio-return:focus-visible {
  color: var(--ink);
}

.portfolio-return:hover small,
.portfolio-return:focus-visible small {
  color: var(--ink);
}

.chapter-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(10px, 2vw, 26px);
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.chapter-nav a {
  position: relative;
  padding: 4px 0;
  white-space: nowrap;
}

.chapter-nav a::after {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  content: "";
  background: var(--ember);
  opacity: 0;
  transform: scaleX(0.4);
  transform-origin: left;
  transition: opacity 160ms ease, transform 160ms ease;
}

.chapter-nav a.is-active {
  color: var(--ink);
}

.chapter-nav a.is-active::after,
.chapter-nav a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.hero {
  position: relative;
  min-height: 94svh;
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: 150px clamp(22px, 6vw, 84px) 92px;
  isolation: isolate;
}

.hero-bg,
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-bg {
  background-image: url("assets/web/hero-temple-presence-v12.jpg");
  background-position: center;
  background-size: cover;
  filter: saturate(0.92) contrast(1.05);
  transform: scale(1.02);
}

.hero-scrim {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 7, 6, 0.9) 0%, rgba(8, 7, 6, 0.54) 36%, rgba(8, 7, 6, 0.12) 72%),
    linear-gradient(0deg, rgba(8, 7, 6, 0.96) 0%, rgba(8, 7, 6, 0.1) 34%),
    linear-gradient(180deg, rgba(8, 7, 6, 0.76) 0%, transparent 32%);
}

.hero-copy {
  width: min(760px, 100%);
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--ember-2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(70px, 14vw, 184px);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.01em;
}

.hero-line {
  max-width: 720px;
  margin-top: 30px;
  color: rgba(240, 229, 208, 0.9);
  font-size: clamp(20px, 3vw, 34px);
  line-height: 1.18;
  overflow-wrap: break-word;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 30px;
  color: rgba(240, 229, 208, 0.72);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-top: 1px solid rgba(240, 229, 208, 0.26);
}

.hero-peek {
  position: absolute;
  right: clamp(20px, 6vw, 84px);
  bottom: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(240, 229, 208, 0.62);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-peek span:first-child {
  color: var(--ember-2);
}

.chapter,
.split-band,
.canon,
.temple,
.duel,
.status {
  width: min(var(--max), calc(100% - clamp(36px, 8vw, 112px)));
  margin: 0 auto;
}

.chapter,
.split-band {
  display: grid;
  grid-template-columns: minmax(300px, 0.68fr) minmax(520px, 1.32fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
  min-height: auto;
  padding: clamp(86px, 9vw, 126px) 0;
}

.chapter.reverse {
  grid-template-columns: minmax(520px, 1.25fr) minmax(300px, 0.75fr);
}

.chapter.reverse .chapter-copy {
  order: 2;
}

.chapter-copy,
.band-copy {
  max-width: 440px;
}

h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(40px, 5.2vw, 68px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.005em;
}

h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 500;
  line-height: 1.10;
  letter-spacing: 0;
}

.chapter-copy > p:not(.eyebrow),
.band-copy > p:not(.eyebrow),
.section-head > p:not(.eyebrow),
.closing-line {
  margin-top: 18px;
  color: rgba(240, 229, 208, 0.76);
  font-size: clamp(16px, 1.35vw, 18px);
}

.note {
  padding-left: 18px;
  border-left: 2px solid rgba(208, 106, 43, 0.74);
  color: rgba(184, 170, 146, 0.86) !important;
}

.asset {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.asset-tall {
  height: min(72svh, 720px);
}

.asset img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.asset-tall img,
.portrait img {
  background: #0b0a08;
}

.asset-tall img {
  object-fit: cover;
  object-position: top center;
}

.portrait img {
  object-fit: contain;
}

#yuto {
  align-items: stretch;
}

#yuto .chapter-copy {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  height: 720px;
  min-height: 0;
}

.copy-asset {
  height: auto;
  min-height: 0;
  margin-top: clamp(22px, 3vw, 32px);
  align-self: stretch;
}

.copy-asset img {
  object-fit: contain;
  background: #0b0a08;
}

figcaption {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 2;
  max-width: calc(100% - 24px);
  color: rgba(240, 229, 208, 0.68);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-align: right;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.92);
  text-transform: uppercase;
  pointer-events: none;
}

.split-band {
  width: min(var(--max), calc(100% - clamp(36px, 8vw, 112px)));
  row-gap: 16px;
}

.scorpido-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  grid-column: 1 / -1;
}

.scorpido-main {
  aspect-ratio: 800 / 662;
  width: min(100%, 800px);
  justify-self: end;
}

.scorpido-main img {
  height: auto;
  min-height: 0;
  object-fit: contain;
}

.scorpido-reference {
  aspect-ratio: 2 / 1;
}

.scorpido-reference img {
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.canon,
.temple,
.duel,
.status {
  padding: clamp(86px, 9vw, 132px) 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(30px, 5vw, 56px);
}

.canon-grid,
.keyframe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.canon-grid .feature,
.keyframe-grid .feature,
.canon-grid .asset:not(.feature),
.keyframe-grid .asset:not(.feature) {
  grid-column: auto;
}

.canon-grid .asset,
.keyframe-grid .asset {
  aspect-ratio: 16 / 9;
}

.final-keyframe {
  width: 100vw;
  margin-top: clamp(28px, 4vw, 52px);
  margin-left: 50%;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  transform: translateX(-50%);
}

.final-keyframe img {
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
}

.rule-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  color: rgba(240, 229, 208, 0.7);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.rule-line span {
  padding-top: 8px;
  border-top: 1px solid rgba(208, 106, 43, 0.62);
}

.portrait-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.portrait {
  height: 720px;
  min-height: 0;
}

.stacked {
  display: grid;
  gap: 16px;
}

.stacked .asset {
  height: 351px;
  min-height: 0;
}

.triptych {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.triptych .asset {
  height: 430px;
  min-height: 0;
}

.status {
  padding-top: clamp(24px, 4vw, 42px);
}

.status-inner {
  max-width: 760px;
}

.coming-line {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .site-nav {
    align-items: flex-start;
    padding-top: 12px;
  }

  .chapter-nav {
    max-width: min(68vw, calc(100vw - 188px));
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .chapter,
  .split-band,
  .chapter.reverse {
    grid-template-columns: 1fr;
  }

  .chapter.reverse .chapter-copy {
    order: 0;
  }

  #yuto .chapter-copy {
    display: block;
    height: auto;
  }

  .copy-asset {
    height: clamp(300px, 72vw, 420px);
  }

  .canon-grid,
  .keyframe-grid,
  .portrait-grid,
  .scorpido-pair,
  .triptych {
    grid-template-columns: 1fr;
  }

  .canon-grid .feature,
  .keyframe-grid .feature,
  .canon-grid .asset:not(.feature),
  .keyframe-grid .asset:not(.feature) {
    grid-column: auto;
  }

  .portrait {
    height: 620px;
  }

  .triptych .asset,
  .stacked .asset {
    height: auto;
    min-height: 280px;
  }

  .hero {
    min-height: 92svh;
    padding-top: 128px;
  }
}

@media (max-width: 640px) {
  .site-nav {
    gap: 8px;
    overflow: hidden;
  }

  .portfolio-return {
    min-width: 96px;
    padding-left: 18.5px;
    font-size: 12px;
  }

  .portfolio-return-copy {
    display: grid;
  }

  .portfolio-name-full {
    display: none;
  }

  .portfolio-name-short {
    display: inline;
  }

  .portfolio-name {
    font-size: 1em;
  }

  .portfolio-return small {
    font-size: 0.62em;
  }

  .portfolio-exit {
    gap: 4px;
  }

  .portfolio-return__arrow {
    left: 3.5px;
  }

  .chapter-nav {
    flex: 1;
    justify-content: flex-start;
    min-width: 0;
    max-width: none;
    gap: 10px;
    font-size: 11px;
  }

  .hero {
    padding: 118px 18px 78px;
  }

  .hero-copy {
    width: min(100%, calc(100vw - 36px));
  }

  .hero-bg {
    background-position: 58% center;
  }

  .hero-line {
    max-width: 20rem;
    font-size: 19px;
  }

  .hero-meta {
    display: grid;
    max-width: calc(100vw - 36px);
  }

  .hero-peek {
    right: auto;
    left: 18px;
    bottom: 18px;
  }

  .chapter,
  .canon,
  .temple,
  .duel {
    width: calc(100% - 36px);
  }

  .asset img {
    min-height: 190px;
  }

  .asset-tall {
    height: min(68svh, 620px);
  }

  .portrait {
    height: 560px;
  }

}
