:root {
  --paper: #f4ede2;
  --paper-deep: #e8ddce;
  --ink: #191510;
  --ink-soft: rgba(25, 21, 16, 0.74);
  --line: rgba(25, 21, 16, 0.12);
  --cedar: #71543c;
  --cedar-dark: #3d2a1e;
  --moss: #52634f;
  --mist: rgba(244, 237, 226, 0.12);
  --shadow: 0 28px 70px rgba(25, 21, 16, 0.14);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

html[lang="ko"] {
  --serif: "Gowun Batang", Georgia, serif;
  --sans: "Noto Sans KR", -apple-system, sans-serif;
  word-break: keep-all;
}

html[lang="ja"] {
  --serif: "Noto Serif JP", "Yu Mincho", serif;
  --sans: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #ede5d8 0%, var(--paper) 28%, #ede4d7 100%);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, .intro-line {
  text-wrap: balance;
}

p, li {
  text-wrap: pretty;
}

img,
video {
  display: block;
  max-width: 100%;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1rem, 2vw, 2rem);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(23, 18, 13, 0.42), rgba(23, 18, 13, 0));
  backdrop-filter: blur(10px);
  mask-image: linear-gradient(180deg, black 0%, black 58%, transparent 100%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: #f6f0e7;
}

.brand img {
  width: 2.25rem;
  height: 2.25rem;
}

.brand-lockup {
  display: grid;
  gap: 0.1rem;
}

.brand-roman,
.brand-kana {
  line-height: 1;
}

.brand-roman {
  font-family: var(--serif);
  font-size: 1.4rem;
  letter-spacing: 0.22em;
}

.brand-kana {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  opacity: 0.82;
}

.locale-toggle {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.3rem;
  border: 1px solid rgba(246, 240, 231, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.locale-toggle button {
  border: 0;
  border-radius: 999px;
  padding: 0.48rem 0.82rem;
  background: transparent;
  color: rgba(246, 240, 231, 0.75);
  font: 500 0.74rem/1 var(--sans);
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}

.locale-toggle button.is-active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff9f2;
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: clip;
  background: #201912;
}

.hero-film,
.hero-scrim {
  position: absolute;
  inset: 0;
}

.hero-film video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1800ms ease;
  filter: saturate(0.9) contrast(0.92);
}

.hero-film video.is-active {
  opacity: 1;
}

.hero-scrim {
  background:
    linear-gradient(180deg, rgba(8, 6, 5, 0.08), rgba(8, 6, 5, 0.52)),
    linear-gradient(90deg, rgba(8, 6, 5, 0.42), rgba(8, 6, 5, 0.06) 55%, rgba(8, 6, 5, 0.34));
  backdrop-filter: blur(2px);
}

.hero-content {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(7rem, 10vw, 9rem) clamp(1.2rem, 3vw, 2.5rem) clamp(2rem, 5vw, 3rem);
  max-width: 48rem;
}

.hero-eyebrow,
.section-eyebrow,
.facts-label {
  margin: 0 0 0.9rem;
  color: rgba(255, 248, 240, 0.78);
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-title,
.story-copy h2,
.section-head h2,
.ritual-copy h2,
.set-copy h2,
.closing-band h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: 0.04em;
}

.hero-title {
  color: #fff9f2;
  font-size: clamp(4.7rem, 11vw, 8.3rem);
}

.hero-kana {
  margin: 0.9rem 0 0;
  color: rgba(255, 248, 240, 0.92);
  font-size: clamp(1rem, 2vw, 1.28rem);
  letter-spacing: 0.28em;
}

.hero-copy {
  margin: 1.5rem 0 0;
  color: #f7efe6;
  font-size: clamp(1.05rem, 1.8vw, 1.36rem);
  line-height: 1.7;
  max-width: 34rem;
}

.hero-note {
  margin: 1rem 0 0;
  color: rgba(247, 239, 230, 0.74);
  font-size: 0.96rem;
  line-height: 1.8;
  max-width: 28rem;
}

.hero-actions {
  margin-top: 1.7rem;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.8rem;
  padding: 0.85rem 1.2rem;
  border: 1px solid rgba(247, 239, 230, 0.24);
  border-radius: 999px;
  color: #fff9f2;
  background: rgba(255, 255, 255, 0.08);
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.section-inner {
  width: min(1180px, calc(100% - 2.4rem));
  margin: 0 auto;
}

.section-inner.narrow {
  width: min(760px, calc(100% - 2.4rem));
}

.intro-band,
.story-band,
.gallery-band,
.ritual-band,
.set-band,
.closing-band {
  position: relative;
}

.intro-band {
  padding: 4.5rem 0 2rem;
}

.story-band,
.gallery-band,
.ritual-band,
.set-band,
.closing-band {
  padding: clamp(4rem, 9vw, 7rem) 0;
}

.intro-line {
  margin: 0;
  color: var(--cedar-dark);
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.18;
  text-align: center;
}

.story-grid,
.ritual-grid,
.set-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.story-copy h2,
.section-head h2,
.ritual-copy h2,
.set-copy h2,
.closing-band h2 {
  font-size: clamp(2.1rem, 4vw, 3.6rem);
}

.story-copy p,
.section-head p,
.ritual-copy p,
.set-copy p,
.closing-band p {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.95;
}

.story-facts {
  padding: 1.4rem 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.28));
  box-shadow: var(--shadow);
}

.facts-label {
  color: var(--cedar);
}

.facts-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--cedar-dark);
  line-height: 1.9;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.2rem;
}

.gallery-carousel {
  --gallery-cycle: 5000ms;
  display: grid;
  gap: 1.35rem;
}

.gallery-stage {
  position: relative;
  min-height: clamp(31rem, 60vw, 47rem);
  overflow: hidden;
  border-radius: 1.45rem;
  background:
    radial-gradient(circle at top, rgba(113, 84, 60, 0.16), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.12));
  box-shadow: var(--shadow);
  isolation: isolate;
}

.gallery-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: inherit;
  pointer-events: none;
}

.gallery-stage::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 22%;
  background: linear-gradient(180deg, rgba(244, 237, 226, 0), rgba(244, 237, 226, 0.3));
  pointer-events: none;
}

.gallery-slide {
  --gallery-offset: -2rem;
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  padding: clamp(1rem, 2.5vw, 2rem);
  opacity: 0;
  pointer-events: none;
  filter: blur(16px);
  transform: translate3d(var(--gallery-offset), 0, 0) scale(0.985);
  transition:
    opacity 900ms ease,
    transform 1200ms cubic-bezier(0.2, 1, 0.2, 1),
    filter 900ms ease;
}

.gallery-slide[data-align="left"] {
  justify-items: start;
}

.gallery-slide[data-align="right"] {
  --gallery-offset: 2rem;
  justify-items: end;
}

.gallery-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  filter: blur(0);
  transform: translate3d(0, 0, 0) scale(1);
}

.gallery-cluster {
  width: min(100%, 64rem);
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(13rem, 0.74fr);
  gap: clamp(0.85rem, 2vw, 1.1rem);
  align-items: end;
}

.gallery-slide[data-align="right"] .gallery-cluster {
  grid-template-columns: minmax(13rem, 0.74fr) minmax(0, 1.28fr);
}

.gallery-panel,
.ritual-image,
.set-image {
  overflow: hidden;
  border-radius: 1.45rem;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: var(--shadow);
}

.gallery-panel {
  aspect-ratio: 1 / 1;
}

.ritual-image {
  position: relative;
  aspect-ratio: 0.92;
  min-height: 0;
}

.gallery-panel-feature {
  min-height: 0;
}

.gallery-panel-detail {
  max-width: min(100%, 22rem);
  margin-bottom: clamp(0.4rem, 1.4vw, 1rem);
  justify-self: end;
}

.gallery-slide[data-align="right"] .gallery-panel-feature {
  grid-column: 2;
  grid-row: 1;
}

.gallery-slide[data-align="right"] .gallery-panel-detail {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  align-self: center;
  margin-top: 0;
  margin-bottom: 0;
}

.gallery-panel img,
.set-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ritual-image-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  transition:
    opacity 900ms ease,
    transform 1200ms cubic-bezier(0.2, 1, 0.2, 1);
}

.ritual-image-frame.is-active {
  opacity: 1;
  transform: scale(1);
}

.ritual-image-frame[data-ritual-variant="closet"] {
  object-position: center center;
}

.ritual-image-frame[data-ritual-variant="desk"] {
  object-position: center center;
}

.gallery-pagination {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
}

.gallery-pill {
  position: relative;
  width: clamp(2.8rem, 7vw, 4rem);
  height: 0.48rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(25, 21, 16, 0.12);
  box-shadow: inset 0 0 0 1px rgba(25, 21, 16, 0.06);
  cursor: pointer;
  overflow: hidden;
  transition: background-color 180ms ease, transform 180ms ease;
}

.gallery-pill:hover {
  background: rgba(25, 21, 16, 0.18);
}

.gallery-pill:focus-visible {
  outline: 2px solid rgba(113, 84, 60, 0.45);
  outline-offset: 4px;
}

.gallery-pill.is-active {
  background: rgba(25, 21, 16, 0.16);
}

.gallery-pill-bar {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(113, 84, 60, 0.96), rgba(82, 99, 79, 0.92));
  transform: scaleX(0);
  transform-origin: left center;
}

.gallery-pill.is-active .gallery-pill-bar {
  animation: pillProgress var(--gallery-cycle) linear forwards;
}

.gallery-carousel.is-manual .gallery-pill.is-active .gallery-pill-bar,
.gallery-carousel.is-reduced-motion .gallery-pill.is-active .gallery-pill-bar {
  animation: none;
  transform: scaleX(1);
}

.ritual-copy {
  align-self: center;
}

.ritual-steps {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.ritual-steps div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.ritual-steps span {
  color: var(--cedar);
  font-family: var(--serif);
  font-size: 1.2rem;
}

.ritual-steps p {
  margin: 0;
}

.set-list {
  margin: 1.6rem 0 0;
  padding-left: 1.15rem;
  color: var(--cedar-dark);
  line-height: 2;
}

.closing-band {
  padding-bottom: 5rem;
  text-align: center;
}

.closing-mark {
  width: 3.8rem;
  margin: 0 auto 1.2rem;
  color: var(--cedar);
}

.floating-music-player {
  position: fixed;
  right: clamp(1rem, 2vw, 2rem);
  bottom: clamp(1rem, 2.2vw, 2rem);
  z-index: 40;
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  max-width: calc(100vw - 2rem);
  pointer-events: none;
  animation: musicPlayerBob 4.2s ease-in-out infinite;
}

.floating-music-copy,
.floating-music-button {
  pointer-events: auto;
}

.floating-music-copy {
  order: 1;
  flex: 0 1 auto;
  width: min(13.5rem, calc(100vw - 6.1rem));
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  opacity: 0;
  transform: translate3d(0.2rem, 0, 0);
  transform-origin: right center;
  transition:
    opacity 260ms ease,
    transform 380ms cubic-bezier(0.2, 1, 0.2, 1);
}

.floating-music-player.is-active .floating-music-copy {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.floating-music-kicker,
.floating-music-title {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  text-shadow:
    0 0 3px rgba(0, 0, 0, 0.92),
    0 0 8px rgba(0, 0, 0, 0.8),
    0 0 14px rgba(0, 0, 0, 0.6);
}

.floating-music-kicker {
  color: rgba(255, 222, 131, 0.95);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.floating-music-title {
  margin-top: 0.18rem;
  color: rgba(255, 247, 232, 0.98);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
}

.floating-music-button {
  order: 2;
  flex: 0 0 auto;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.45rem;
  height: 3.45rem;
  padding: 0;
  border: 1px solid rgba(255, 214, 90, 0.4);
  border-radius: 999px;
  color: #ffd65a;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 214, 90, 0.18), transparent 44%),
    rgba(10, 9, 8, 0.9);
  box-shadow: 0 12px 28px rgba(8, 6, 5, 0.38), 0 0 20px rgba(255, 214, 90, 0.18);
  cursor: pointer;
  isolation: isolate;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 220ms ease,
    background-color 220ms ease;
}

.floating-music-button::before {
  content: "";
  position: absolute;
  inset: 0.36rem;
  z-index: 0;
  border-radius: inherit;
  background: rgba(15, 11, 9, 0.92);
  box-shadow: inset 0 0 11px rgba(255, 214, 90, 0.12);
}

.floating-music-button:not(.is-playing):not(.is-loading) {
  animation: musicPlayerGlow 1.22s ease-in-out infinite;
}

.floating-music-button:hover,
.floating-music-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 214, 90, 0.62);
  box-shadow: 0 14px 32px rgba(8, 6, 5, 0.42), 0 0 28px rgba(255, 214, 90, 0.3);
}

.floating-music-button:focus-visible {
  outline: 2px solid rgba(255, 214, 90, 0.44);
  outline-offset: 4px;
}

.floating-music-button.is-playing,
.floating-music-button.is-loading {
  box-shadow: 0 14px 32px rgba(8, 6, 5, 0.42), 0 0 28px rgba(255, 214, 90, 0.28);
}

.floating-music-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: 1.2rem;
  height: 1.2rem;
}

.floating-music-icon svg {
  width: 100%;
  height: 100%;
}

.floating-music-icon-stop {
  display: none;
}

.floating-music-button.is-playing .floating-music-icon-play,
.floating-music-button.is-loading .floating-music-icon-play {
  display: none;
}

.floating-music-button.is-playing .floating-music-icon-stop,
.floating-music-button.is-loading .floating-music-icon-stop {
  display: inline-flex;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 900ms cubic-bezier(0.2, 1, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pillProgress {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes musicPlayerGlow {
  0%,
  100% {
    box-shadow: 0 12px 28px rgba(8, 6, 5, 0.38), 0 0 14px rgba(255, 214, 90, 0.2);
    filter: brightness(0.98);
  }

  50% {
    box-shadow: 0 16px 34px rgba(8, 6, 5, 0.44), 0 0 34px rgba(255, 214, 90, 0.58);
    filter: brightness(1.14);
  }
}

@keyframes musicPlayerBob {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -4px, 0);
  }
}

@media (min-width: 860px) {
  .story-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  }

  .ritual-grid,
  .set-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 859px) {
  .hero-content {
    padding-top: 8rem;
  }

  .hero-title {
    font-size: clamp(3.6rem, 16vw, 5.5rem);
  }

  .site-header {
    padding-inline: 1rem;
  }

  .brand-roman {
    font-size: 1.18rem;
  }

  .gallery-stage {
    min-height: clamp(38rem, 160vw, 44rem);
  }

  .ritual-image {
    aspect-ratio: 1 / 1;
  }

  .gallery-slide {
    padding: 1rem;
    filter: none;
    transform: translate3d(0, 0.9rem, 0) scale(0.995);
    transition:
      opacity 520ms ease,
      transform 700ms cubic-bezier(0.2, 1, 0.2, 1);
  }

  .gallery-cluster,
  .gallery-slide[data-align="right"] .gallery-cluster {
    width: min(100%, 18rem);
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
    gap: 1rem;
    justify-items: center;
    align-items: start;
    margin-inline: auto;
  }

  .gallery-panel-detail,
  .gallery-slide[data-align="right"] .gallery-panel-detail,
  .gallery-slide[data-align="right"] .gallery-panel-feature {
    grid-column: auto;
    grid-row: auto;
  }

  .gallery-slide[data-align="left"],
  .gallery-slide[data-align="right"] {
    justify-items: center;
  }

  .gallery-panel-feature,
  .gallery-panel-detail {
    width: 100%;
    max-width: none;
    justify-self: center;
    margin-bottom: 0;
  }

  .gallery-slide[data-align="right"] .gallery-panel-detail {
    justify-self: center;
    align-self: auto;
  }

  .gallery-pagination {
    justify-content: center;
    overflow: visible;
    padding-bottom: 0.1rem;
  }

  .floating-music-player {
    right: 1rem;
    bottom: 1rem;
  }

  .floating-music-copy {
    width: min(10.5rem, calc(100vw - 5.5rem));
  }

  .floating-music-button {
    width: 3.15rem;
    height: 3.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .hero-film video,
  .ritual-image-frame,
  .floating-music-copy,
  .floating-music-button,
  .floating-music-player {
    transition: none;
    animation: none;
  }
}
