:root {
  color-scheme: light;
  --paper: #fff1f7;
  --rose: #ca648f;
  --phrase-width: min(82vw, 1120px);
  --phrase-duration: 1.9s;
  --first-delay: 250ms;
  --second-delay: 1.55s;
  --pass-easing: cubic-bezier(.08, .72, .92, .28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
}

body {
  overflow-x: hidden;
  color: #513b48;
  font-family: "Hiragino Mincho ProN", serif;
  -webkit-font-smoothing: antialiased;
}

.ambient {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: #fff1f7;
}

.ambient__pink, .ambient__lilac {
  position: absolute;
  inset: -22%;
  will-change: transform;
  filter: blur(56px);
}

.ambient__pink {
  background:
    radial-gradient(ellipse at 18% 19%, #f9d2e7 0%, transparent 37%),
    radial-gradient(ellipse at 90% 72%, #f8cfe5 0%, transparent 38%),
    radial-gradient(ellipse at 46% 94%, #fbd6e8 0%, transparent 40%);
  animation: pink-drift 23s ease-in-out infinite alternate;
}

.ambient__lilac {
  background:
    radial-gradient(ellipse at 15% 72%, #e1e7fb 0%, transparent 31%),
    radial-gradient(ellipse at 73% 16%, #e6e9fb 0%, transparent 31%),
    radial-gradient(ellipse at 93% 38%, #eed9f3 0%, transparent 32%);
  animation: lilac-drift 29s ease-in-out infinite alternate;
  opacity: .82;
}

.stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 24px;
  isolation: isolate;
  overflow: hidden;
  pointer-events: none;
}

.is-intro-complete .stage { display: none; }

.phrase {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
}

/* The thick assets are normalized to matching letter heights. */
.phrase--first { width: var(--phrase-width); }
.phrase--second { width: calc(var(--phrase-width) * 979 / 2030); }

.phrase__motion {
  opacity: 0;
  will-change: transform, opacity;
}

.phrase__image, .collection__word {
  display: block;
  width: 100%;
  height: auto;
  filter:
    drop-shadow(0 2px 1px #613449a6)
    drop-shadow(0 7px 14px #85436b40);
}

.is-ready .phrase--first .phrase__motion {
  animation:
    first-pass var(--phrase-duration) var(--pass-easing) var(--first-delay) both,
    phrase-fade var(--phrase-duration) linear var(--first-delay) both;
}

.is-ready .phrase--second .phrase__motion {
  animation:
    second-pass var(--phrase-duration) var(--pass-easing) var(--second-delay) both,
    phrase-fade var(--phrase-duration) linear var(--second-delay) both;
}

@keyframes first-pass {
  from { transform: translate3d(80vw, -75vh, 0) rotate(21deg); }
  to { transform: translate3d(-80vw, 75vh, 0) rotate(27deg); }
}

@keyframes second-pass {
  from { transform: translate3d(-80vw, -75vh, 0) rotate(23deg); }
  to { transform: translate3d(80vw, 75vh, 0) rotate(29deg); }
}

@keyframes phrase-fade {
  0%, 100% { opacity: 0; }
  12%, 78% { opacity: 1; }
}

@keyframes pink-drift {
  from { transform: translate3d(-3%, -2%, 0) rotate(-3deg) scale(1.02); }
  to { transform: translate3d(4%, 5%, 0) rotate(5deg) scale(1.12); }
}

@keyframes lilac-drift {
  from { transform: translate3d(2%, 3%, 0) rotate(3deg) scale(1.04); }
  to { transform: translate3d(-5%, -4%, 0) rotate(-6deg) scale(1.12); }
}

@media (max-width: 600px) {
  :root { --phrase-width: 86vw; }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --phrase-width: min(86vw, 900px, calc((100svh - 72px) * 2030 / 1073));
  }
  .ambient__pink, .ambient__lilac,
  .is-ready .phrase--first .phrase__motion,
  .is-ready .phrase--second .phrase__motion {
    animation: none;
    will-change: auto;
  }
  .stage {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
  }
  .phrase { position: static; transform: none; flex: none; }
  .phrase__motion { opacity: 1; transform: none; }
}

.collection {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  width: min(100%, 1080px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 56px 48px 32px;
  visibility: hidden;
}

.is-intro-complete .collection { visibility: visible; }

.collection__header { text-align: center; }
.collection__title {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 580px);
  margin: 0 auto;
  gap: 8px;
}
.collection__word--first { width: calc((100% - 8px) * 2030 / 3009); }
.collection__word--second { width: calc((100% - 8px) * 979 / 3009); }
.collection__artist {
  margin: 8px 0 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 13px;
  letter-spacing: .18em;
  color: #886879;
}

.video-gallery { min-width: 0; }
.video-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.video-tabs {
  display: flex;
  gap: 24px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.video-tabs::-webkit-scrollbar { display: none; }
.video-tab, .video-arrow {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.video-tab {
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  font-family: inherit;
  font-size: 15px;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
}
.video-tab[aria-pressed="true"] { border-color: #a13e6b; color: #a13e6b; }
.video-arrows { display: flex; flex-shrink: 0; gap: 8px; }
.video-arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #a13e6b30;
  border-radius: 50%;
  font-size: 20px;
  transition: background .2s;
}
.video-arrow:hover:not(:disabled) { background: #fff8; }
.video-arrow:disabled { opacity: .3; cursor: default; }

.video-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 10px;
}
.video-track::-webkit-scrollbar { display: none; }
.video-slide {
  flex: 0 0 94%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.video-track::after { content: ""; flex: 0 0 calc(6% - 24px); }
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 200px;
  overflow: hidden;
  border-radius: 10px;
  background: #432b37;
}
.video-poster, .video-frame iframe {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  border: 0;
}
.video-poster {
  padding: 0;
  cursor: pointer;
  background: none;
}
.video-poster[hidden] { display: none; }
.video-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-slide--short .video-poster img { object-fit: contain; }
.video-poster__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  transform: translate(-50%, -50%);
  border: 1px solid #ffffffb3;
  border-radius: 50%;
  background: #fffdf4;
  color: #a13e6b;
  box-shadow: 0 4px 20px #25111b33;
  transition: background .2s, scale .2s;
}
.video-poster__play svg { width: 28px; height: 28px; fill: currentColor; }
.video-poster:hover .video-poster__play { background: #fff; scale: 1.08; }
.video-caption { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 0 4px; }
.video-caption h2 { min-width: 0; margin: 0; font-size: 18px; font-weight: 500; line-height: 1.6; }
.video-caption h2 span { margin-left: 10px; font-size: 11px; color: #886879; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.video-caption a { font-family: "Hiragino Kaku Gothic ProN", sans-serif; font-size: 11px; white-space: nowrap; }
button:focus-visible, a:focus-visible, .video-track:focus-visible { outline: 2px solid #a13e6b; outline-offset: 4px; }
.reveal { opacity: 0; transform: translateY(16px); }
.is-intro-complete .reveal { animation: reveal .65s ease-out both; }
.is-intro-complete .video-controls { animation-delay: .10s; }
.is-intro-complete .video-track { animation-delay: .20s; }
@keyframes reveal { to { opacity: 1; transform: none; } }

@media (max-width: 600px) {
  .collection { padding: 40px 20px 24px; gap: 28px; }
  .video-tabs { gap: 18px; }
  .video-tab { font-size: 13px; }
  .video-arrows { display: none; }
  .video-track { gap: 14px; }
  .video-slide { flex-basis: 94%; }
  .video-track::after { flex-basis: calc(6% - 14px); }
  .video-caption { gap: 10px; }
  .video-caption h2 { font-size: 16px; }
  .video-caption h2 span { display: block; margin: 6px 0 0; }
  .video-poster__play { width: 60px; height: 60px; }
}
@media (max-width: 360px) {
  .video-tabs { gap: 12px; }
  .video-tab { font-size: 12px; }
  .video-slide { flex-basis: 100%; }
  .video-track::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .is-intro-complete .reveal { animation: none; opacity: 1; transform: none; }
  .video-tab, .video-arrow, .video-poster__play { transition: none; }
}
