:root {
  --paper: #f5ecd7;
  --soft: rgba(245, 236, 215, 0.72);
  --line: rgba(245, 236, 215, 0.18);
  --glass: rgba(11, 15, 12, 0.36);
  --amber: #d2a65f;
  --green: #6f9a73;
  --deep: #050706;
  font-family: "Times New Roman", "Yu Mincho", "Hiragino Mincho ProN", serif;
  color: var(--paper);
  background: var(--deep);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  min-height: 100dvh;
}

#world {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  display: block;
  z-index: 0;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.14) 48%, rgba(0, 0, 0, 0.58)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 4px);
  mix-blend-mode: normal;
}

.navline,
.hud {
  position: fixed;
  left: clamp(18px, 4vw, 58px);
  right: clamp(18px, 4vw, 58px);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font: 700 11px/1.1 Inter, "Noto Sans JP", system-ui, sans-serif;
  letter-spacing: 0;
  text-transform: uppercase;
  color: rgba(245, 236, 215, 0.78);
}

.navline {
  top: max(18px, env(safe-area-inset-top));
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.hud {
  bottom: max(18px, env(safe-area-inset-bottom));
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.bar {
  position: relative;
  flex: 0 1 220px;
  height: 4px;
  overflow: hidden;
  background: rgba(245, 236, 215, 0.18);
}

.bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--paper);
}

.stage {
  position: relative;
  z-index: 2;
  width: 100vw;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}

.stage::-webkit-scrollbar {
  display: none;
}

.panel {
  position: relative;
  min-height: 100dvh;
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: clamp(24px, 5vw, 76px);
  align-items: center;
  padding: clamp(82px, 12vh, 118px) clamp(20px, 5vw, 76px) clamp(74px, 11vh, 112px);
}

.hero-copy {
  max-width: min(760px, 62vw);
  transform: translate3d(var(--copy-x, 0px), var(--copy-y, 0px), 0);
  opacity: var(--copy-opacity, 1);
  transition: opacity 240ms linear;
}

.eyebrow {
  margin: 0 0 14px;
  color: rgba(245, 236, 215, 0.72);
  font: 700 12px/1.2 Inter, "Noto Sans JP", system-ui, sans-serif;
}

h1 {
  margin: 0;
  font-weight: 500;
  font-size: clamp(72px, 11vw, 162px);
  line-height: 0.82;
  letter-spacing: 0;
  text-shadow: 0 18px 68px rgba(0, 0, 0, 0.72);
}

.lead {
  max-width: 520px;
  margin: clamp(22px, 4vh, 34px) 0 0;
  color: var(--soft);
  font: 500 clamp(15px, 1.3vw, 18px)/1.75 Inter, "Noto Sans JP", system-ui, sans-serif;
}

.card-rail {
  justify-self: end;
  width: 100%;
  display: grid;
  gap: 16px;
  perspective: 1000px;
  transform: translate3d(var(--cards-x, 0px), var(--cards-y, 0px), 0);
}

.glass-card {
  min-height: 126px;
  padding: 20px;
  border: 1px solid rgba(245, 236, 215, 0.19);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(245, 236, 215, 0.14), rgba(10, 16, 12, 0.36)),
    rgba(10, 14, 12, 0.24);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(20px);
  transform: rotateY(-10deg) translateZ(0);
}

.glass-card:nth-child(2) {
  margin-left: 28px;
}

.glass-card:nth-child(3) {
  margin-left: -18px;
}

.glass-card span {
  color: var(--amber);
  font: 700 11px/1 Inter, "Noto Sans JP", system-ui, sans-serif;
}

.glass-card h2 {
  margin: 14px 0 8px;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1;
}

.glass-card p {
  margin: 0;
  color: var(--soft);
  font: 600 14px/1.65 Inter, "Noto Sans JP", system-ui, sans-serif;
}

.card-large {
  min-height: 168px;
}

@media (max-width: 820px) {
  .navline span:nth-child(2) {
    display: none;
  }

  .panel {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: end;
    gap: 18px;
    padding: calc(68px + env(safe-area-inset-top)) 18px calc(74px + env(safe-area-inset-bottom));
  }

  .hero-copy {
    align-self: center;
    max-width: none;
  }

  h1 {
    font-size: clamp(62px, 19vw, 86px);
    max-width: 7ch;
  }

  .lead {
    max-width: 330px;
    font-size: 13px;
    line-height: 1.55;
  }

  .card-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .panel:nth-child(n + 2) .card-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .glass-card,
  .card-large {
    min-height: 104px;
    padding: 12px;
    transform: none;
  }

  .glass-card:nth-child(2),
  .glass-card:nth-child(3) {
    margin-left: 0;
  }

  .glass-card h2 {
    margin: 8px 0 5px;
    font-size: 17px;
  }

  .glass-card p {
    font-size: 11.5px;
    line-height: 1.45;
  }

  .hud span:last-child {
    max-width: 92px;
    text-align: right;
    line-height: 1.35;
  }
}
