@charset "UTF-8";

/* Cinderella exhibition: one chapter of the same book. Shares the homepage tokens and type;
   everything here is scoped to .exhibit. Photographs stay whole, unfiltered, with text outside. */

.exhibit {
  --x-night: #0a1320;
  --x-glass: #9fd4ff;
  --x-amber: #f0c58e;
  --x-ivory: #f6f1ea;
  --x-blush: #f4e4ea;
  background: var(--x-night);
  color: #e7eef7;
}

/* Shared pieces */
.x-photo { margin: 0; min-width: 0; }
.x-frame { position: relative; isolation: isolate; }
.x-frame > img:not(.x-glow) { position: relative; display: block; width: 100%; height: auto; }
.x-caption { margin-top: .8rem; font-size: .7rem; letter-spacing: .12em; line-height: 1.7; color: var(--k-ink-soft); }
.x-caption a { color: inherit; text-underline-offset: .3em; white-space: nowrap; }
.x-caption-light { color: rgba(231, 238, 247, .66); }
.x-no { font-family: var(--k-latin); font-style: italic; font-size: 1.1rem; letter-spacing: .08em; margin: 0 0 1rem; color: var(--x-glass); }
.x-no span { font-size: 1.5em; }
.x-head h2 { font-size: clamp(2.6rem, 5.6vw, 5.2rem); line-height: 1.22; letter-spacing: .08em; }
.x-note { margin: 1.8rem 0 0; font-family: var(--k-display); font-size: clamp(.95rem, 1.2vw, 1.08rem); line-height: 2.2; letter-spacing: .1em; opacity: .82; }

/* The photograph's own light, a short way past its edges. The sharp image sits above it. */
.x-glow { position: absolute; z-index: -1; top: -6%; left: -6%; width: 112%; height: 98%; max-width: none; object-fit: cover; object-position: top;
  filter: blur(48px) saturate(1.15); opacity: .5; pointer-events: none; } /* ends above the bottom edge: the caption keeps a clean ground */
.no-glow .x-glow { display: none; }

/* Prologue */
.x-prologue { position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: clamp(2rem, 5vw, 6rem); padding: 7rem 3.5rem 4rem; overflow: hidden;
  background: radial-gradient(ellipse at 70% 40%, #17304d 0%, var(--x-night) 58%); }
.x-prologue-copy { justify-self: end; max-width: 34rem; }
.x-kicker { margin: 0 0 1.4rem; font-family: var(--k-latin); font-style: italic; font-size: 1.15rem; letter-spacing: .06em; color: var(--x-glass); }
.x-kicker a { color: inherit; text-underline-offset: .3em; }
.x-prologue h1 { display: flex; flex-direction: column; gap: .3rem; }
.x-title-ja { font-size: clamp(2.8rem, 5.2vw, 5.6rem); font-weight: 800; letter-spacing: .1em; line-height: 1.1; white-space: nowrap; }
.x-title-en { font-family: var(--k-latin); font-style: italic; font-weight: 300; font-size: clamp(1.6rem, 3vw, 2.8rem); letter-spacing: .04em; opacity: .8; }
.x-series { margin: 1.6rem 0 0; font-size: .82rem; letter-spacing: .2em; opacity: .75; }
.x-series span { font-family: var(--k-latin); font-style: italic; font-size: 1.15em; }
.x-lead { margin: 2.4rem 0 0; font-family: var(--k-display); font-size: clamp(1rem, 1.25vw, 1.15rem); line-height: 2.2; letter-spacing: .1em; }
.x-index { list-style: none; margin: 2.8rem 0 0; padding: 0; border-top: 1px solid rgba(159, 212, 255, .22); }
.x-index a { display: flex; align-items: baseline; gap: 1.2rem; padding: .85rem 0; border-bottom: 1px solid rgba(159, 212, 255, .22); color: inherit; text-decoration: none; font-family: var(--k-display); font-size: .95rem; letter-spacing: .14em; transition: padding .3s, color .3s; }
.x-index a:hover { padding-left: .7rem; color: var(--x-glass); }
.x-index span { width: 2rem; font-family: var(--k-latin); font-style: italic; color: var(--x-glass); }
.x-open { width: min(100%, calc((100svh - 13rem) * .667)); justify-self: start; }

/* Chapters */
.x-chapter { position: relative; padding: clamp(6rem, 11vw, 10rem) 0; overflow: hidden; }
.x-head { margin-bottom: clamp(3rem, 6vw, 5rem); }

/* I: the glass dress, from a dark hall into daylight and back. */
.x-glass { background: linear-gradient(180deg, var(--x-night) 0%, #0f1d30 100%); }
.x-glass-layout { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.5rem; align-items: start; }
.x-glass-a { grid-column: 1 / 7; grid-row: 1 / 3; position: relative; z-index: 1; }
.x-daylight { grid-column: 7 / 13; grid-row: 1 / 3; align-self: stretch; margin: 6rem -3.5rem -3rem 1rem; background: linear-gradient(160deg, #fbfaf7, #e9edf3); }
.x-glass-b { grid-column: 8 / 12; grid-row: 1 / 3; margin-top: 10rem; position: relative; z-index: 1; }
.x-glass-b .x-caption { color: #5a6270; }
.x-glass-b img { box-shadow: 0 24px 60px rgba(16, 26, 44, .2); }
.x-glass-c { grid-column: 2 / 11; grid-row: 3; margin-top: clamp(4rem, 8vw, 8rem); }

/* Turn: the same kind of light, two costumes. Cool on the left, warm on the right. */
.x-turn { padding: clamp(5rem, 9vw, 8rem) 0; background: linear-gradient(90deg, #0f1d30 0%, #16131a 50%, #1d140c 100%); }
.x-turn-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 4fr); gap: 2.5rem; align-items: center; }
.x-turn-line { margin: 0; text-align: center; font-family: var(--k-display); font-size: clamp(1.1rem, 1.7vw, 1.5rem); line-height: 2.1; letter-spacing: .16em; }
.x-turn-line::before, .x-turn-line::after { content: ""; display: block; width: 1px; height: 4.5rem; margin: 1.4rem auto; background: linear-gradient(transparent, currentColor, transparent); opacity: .5; }
.x-turn-b { margin-top: 7rem; }

/* II: candlelight. */
.x-candle { background: radial-gradient(ellipse at 50% 18%, #3a2614 0%, #1d140c 45%, #120c08 100%); color: #f6ecdf; }
.x-candle .x-no { color: var(--x-amber); }
.x-candle .x-caption-light { color: rgba(246, 236, 223, .66); }
.x-candle .x-head { text-align: center; }
.x-monument { width: min(100%, calc((100svh - 6rem) * .661), 640px); margin-inline: auto; }
.x-candle-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.5rem; align-items: start; margin-top: clamp(5rem, 9vw, 9rem); }
.x-candle-a { grid-column: 1 / 6; }
.x-candle-b { grid-column: 8 / 12; margin-top: 12rem; }
.x-candle-c { width: min(100%, 980px); margin: clamp(5rem, 9vw, 8rem) 0 0 auto; }

/* III: a pause in blue alone. */
.x-blue { padding: clamp(6rem, 10vw, 9rem) 0 clamp(6rem, 11vw, 10rem); overflow: hidden; background: radial-gradient(ellipse at 50% 60%, #0b3554 0%, #061a2b 55%, #040e18 100%); text-align: center; }
.x-blue-head { margin-bottom: clamp(3rem, 6vw, 5rem); }
.x-blue-head h2 { font-size: clamp(2rem, 4.4vw, 4rem); letter-spacing: .14em; }
.x-blue-photo { width: min(100% - 7rem, 1200px, calc((100svh - 8rem) * 1.5)); margin-inline: auto; text-align: left; }

/* IV: the maid costume, in a light room. */
.x-maid { background: linear-gradient(180deg, var(--x-ivory) 0%, var(--x-blush) 100%); color: var(--k-ink); }
.x-maid .x-no { color: var(--k-rose); }
.x-maid .x-note { color: var(--k-ink-soft); opacity: 1; }
.x-maid a { color: var(--k-liliel-deep); }
.x-maid .x-caption a { color: inherit; }
.x-maid::before { content: "Cinderella"; position: absolute; right: -1rem; top: 2.5rem; font-family: var(--k-latin); font-style: italic; font-size: clamp(6rem, 16vw, 16rem); line-height: 1; color: rgba(168, 50, 90, .07); pointer-events: none; }
.x-maid-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.5rem; align-items: start; }
.x-maid-a { grid-column: 1 / 7; grid-row: 1 / 3; }
.x-maid-a img { box-shadow: 28px 28px 0 rgba(168, 50, 90, .1); }
.x-maid-b { grid-column: 8 / 12; grid-row: 1; margin-top: 4rem; }
.x-maid-c { grid-column: 9 / 13; grid-row: 2; margin-top: 3rem; }

/* Epilogue: the three-strip photograph closes the room, then the exits. */
.x-epilogue { padding: clamp(5rem, 9vw, 8rem) 0 clamp(5rem, 9vw, 8rem); background: linear-gradient(180deg, var(--x-blush) 0%, #f1e6ea 100%); color: var(--k-ink); }
.x-finale { padding: clamp(5rem, 9vw, 8rem) 0 clamp(5rem, 8vw, 7rem); background: radial-gradient(ellipse at 50% 0%, #1b2a40 0%, var(--x-night) 70%); text-align: center; }
.x-finale-en { margin: 0 0 2.4rem; font-family: var(--k-latin); font-style: italic; font-weight: 300; font-size: clamp(2.6rem, 7vw, 6rem); line-height: 1; opacity: .22; }
.x-strip { margin: 0; }
.x-strip .x-strip-panels { grid-auto-columns: auto; box-shadow: 0 40px 100px rgba(28, 24, 32, .18); }
.x-strip .x-caption { margin-top: .9rem; }
.x-exits { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 1.2rem; }
.x-exits a { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; text-align: left; min-width: min(100%, 19rem); padding: 1.3rem 2rem; border: 1px solid rgba(244, 239, 231, .35); color: #f4efe7; text-decoration: none; font-family: var(--k-display); font-size: 1rem; letter-spacing: .12em; transition: background .35s, color .35s, box-shadow .35s; }
.x-exits small { font-family: var(--k-latin); font-style: italic; font-size: 1.05rem; letter-spacing: .04em; color: var(--x-glass); }
.x-exits span span { display: inline-block; transition: transform .3s; }
.x-exits a:hover { background: #f4efe7; color: #0b0a0f; box-shadow: 0 0 60px rgba(159, 212, 255, .25); }
.x-exits a:hover small { color: var(--k-rose); }
.x-exits a:hover span span { transform: translateX(6px); }

/* Motion: an entrance for the opening photograph, then each photo lifts in like a pane of glass
   as it is reached. Only for scripting with motion allowed; the still page is complete. */
@media (prefers-reduced-motion: no-preference) {
  .x-open .x-frame > img:not(.x-glow) { animation: x-lift 1.7s cubic-bezier(.2, .7, .2, 1) .1s both; }
  .x-open .x-glow { animation: x-glow-in 2.6s ease .5s both; }
  .x-open .x-caption { animation: k-fade 1.4s 1.2s ease both; }
  .x-prologue-copy > * { animation: x-rise-text 1.4s cubic-bezier(.2, .7, .2, 1) both; }
  .x-prologue-copy > :nth-child(2) { animation-delay: .35s; }
  .x-prologue-copy > :nth-child(3) { animation-delay: .55s; }
  .x-prologue-copy > :nth-child(4) { animation-delay: .7s; }
  .x-prologue-copy > :nth-child(5) { animation-delay: .9s; }
  .js .x-photo[data-reveal] .x-frame > img:not(.x-glow) { clip-path: inset(14% 0 0 0); transition: clip-path 1.5s cubic-bezier(.2, .7, .2, 1); }
  .js .x-photo[data-reveal].is-visible .x-frame > img:not(.x-glow) { clip-path: inset(0); }
  .js .x-photo[data-reveal] .x-glow { opacity: 0; transition: opacity 2.4s ease .6s; }
  .js .x-photo[data-reveal].is-visible .x-glow { opacity: .5; }
  .js [data-reveal-delay] { transition-delay: .22s; }
  .js [data-reveal-delay] .x-frame > img:not(.x-glow) { transition-delay: .22s; }
  .js .x-strip[data-reveal] .x-strip-panels img { opacity: 0; transform: translateY(24px); transition: opacity 1.2s ease, transform 1.4s cubic-bezier(.2, .7, .2, 1); }
  .js .x-strip[data-reveal].is-visible .x-strip-panels img { opacity: 1; transform: none; }
  .js .x-strip[data-reveal].is-visible .x-strip-panels img:nth-child(2) { transition-delay: .15s; }
  .js .x-strip[data-reveal].is-visible .x-strip-panels img:nth-child(3) { transition-delay: .3s; }
}
@keyframes x-lift { from { opacity: 0; transform: translateY(32px) scale(.985); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes x-glow-in { from { opacity: 0; } to { opacity: .5; } }
@keyframes x-rise-text { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Tablet */
@media (max-width: 1080px) {
  .x-prologue { padding: 7rem 2rem 4rem; gap: 2.5rem; }
  .x-glass-a { grid-column: 1 / 8; }
  .x-daylight { grid-column: 7 / 13; margin-right: -2rem; }
  .x-glass-b { grid-column: 8 / 13; }
  .x-glass-c { grid-column: 1 / 13; }
  .x-turn-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .x-turn-line { grid-column: 1 / -1; grid-row: 2; }
  .x-turn-line::before { display: none; }
  .x-candle-a { grid-column: 1 / 7; }
  .x-candle-b { grid-column: 7 / 13; margin-top: 8rem; }
  .x-blue-photo { width: min(100% - 4rem, 1200px); }
  .x-maid-a { grid-column: 1 / 8; }
  .x-maid-b { grid-column: 8 / 13; }
  .x-maid-c { grid-column: 8 / 13; }
}

/* Phone */
@media (max-width: 700px) {
  .x-prologue { display: flex; flex-direction: column; min-height: auto; padding: 8rem 1rem 3.5rem; gap: 0; }
  /* Title, then the photograph, then the lead and the chapter list. */
  .x-prologue-copy { display: contents; }
  .x-kicker, .x-prologue h1, .x-series { order: 1; }
  .x-open { order: 2; }
  .x-lead, .x-index { order: 3; }
  .x-title-ja { font-size: 3.1rem; }
  .x-lead { margin-top: 1.8rem; font-size: .95rem; line-height: 2.05; }
  .x-lead br:nth-of-type(2) { display: none; }
  .x-index { margin-top: 2rem; }
  .x-index a { padding: .75rem 0; }
  .x-open { width: 100%; margin-top: 2rem; }
  .x-glow { display: none; } /* too little margin on a phone to show it; not worth the blur while scrolling */
  .x-chapter { padding: 5rem 0; }
  .x-head h2 { font-size: 2.4rem; }
  .x-note { font-size: .92rem; line-height: 2.05; }
  .x-glass-layout, .x-candle-layout, .x-maid-layout { display: flex; flex-direction: column; gap: 2.4rem; }
  .x-daylight { display: none; }
  .x-glass-b { width: 84%; align-self: flex-end; margin-top: 0; padding: 1rem; background: linear-gradient(160deg, #fbfaf7, #e9edf3); }
  .x-glass-c { margin-top: 1rem; }
  .x-turn { padding: 4rem 0; }
  .x-turn-layout { display: flex; flex-direction: column; gap: 2rem; }
  .x-turn-a { width: 86%; }
  .x-turn-b { width: 86%; align-self: flex-end; margin-top: 0; }
  .x-turn-line { order: 1; }
  .x-turn-b { order: 2; }
  .x-turn-line::after { height: 2.5rem; margin: 1rem auto 0; }
  .x-monument { width: 100%; }
  .x-candle-layout { margin-top: 3rem; }
  .x-candle-a { width: 86%; }
  .x-candle-b { width: 78%; align-self: flex-end; margin-top: 0; }
  .x-candle-c { margin-top: 3rem; }
  .x-blue { padding: 4.5rem 0 5rem; }
  .x-blue-head h2 { font-size: 1.9rem; }
  .x-blue-photo { width: calc(100% - 2rem); }
  .x-maid::before { font-size: 5.5rem; top: 1.5rem; }
  .x-maid-a { width: 100%; }
  .x-maid-a img { box-shadow: 12px 12px 0 rgba(168, 50, 90, .1); }
  .x-maid-b { width: 82%; align-self: flex-end; margin-top: 0; }
  .x-maid-c { width: 78%; margin-top: 0; justify-self: auto; }
  .x-epilogue { padding: 4rem 0 4.5rem; }
  .x-finale { padding: 4rem 0 4.5rem; }
  .x-strip .x-strip-panels { box-shadow: none; }
  .x-exits { flex-direction: column; }
  .x-exits a { min-width: 0; padding: 1.1rem 1.4rem; }
}

@media (pointer: coarse) {
  :is(.x-caption a, .x-kicker a) { position: relative; }
  .x-caption a::after, .x-kicker a::after { content: ""; position: absolute; inset: -.8rem -.25rem; }
}
