/* Ciel - entrance: a real desk on film, then a real page Ciel highlights, then the library. */
.intro { position: fixed; inset: 0; z-index: 40; overflow-y: auto; overflow-x: hidden; color: var(--ink); background: #f0e9d9;
  transition: opacity .7s var(--ease), transform .7s var(--ease); }
.intro { padding: 0; margin: 0; } /* the welcome page gives every section padding; the film needs none */
.intro.leaving { opacity: 0; transform: scale(1.03); pointer-events: none; }
.intro-track { height: 860vh; }
.intro-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }

/* the film fills the screen; scroll moves it forward and back */
.intro-stage { perspective: 1400px; background: radial-gradient(120% 100% at 60% 45%, #f2ecdf 0%, #ebe3d1 100%); }
/* the book film floats in the page: its edges melt into the background, and it leans toward the pointer */
.i-film { position: absolute; top: 0; left: 12vw; width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 50%; will-change: transform, opacity, filter;
  -webkit-mask-image: radial-gradient(ellipse 62% 70% at 50% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 62% 70% at 50% 50%, #000 62%, transparent 100%); }

/* the real page the camera arrives at */
.i-page { position: absolute; inset: 0; opacity: 0; will-change: transform, opacity; transform-origin: 58% 50%;
  background: radial-gradient(130% 120% at 60% 45%, #fbf8f1 0%, #f4eee2 70%, #ebe3d3 100%); }
.i-page::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .3 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
.i-sheet { position: absolute; left: 44vw; top: 50%; transform: translateY(-50%) rotate(-.6deg); width: min(600px, 46vw); box-sizing: border-box;
  padding: clamp(28px, 3.4vw, 52px) clamp(26px, 3.6vw, 58px) clamp(22px, 2.6vw, 40px);
  /* a real sheet of paper lying on the page, so the book text never reads as the website's own words */
  background: linear-gradient(180deg, #fdfbf6 0%, #f9f5ec 100%); border: 1px solid rgba(120,100,70,.08); border-radius: 2px;
  box-shadow: 0 1px 2px rgba(70,55,30,.06), 0 12px 24px -6px rgba(70,55,30,.12), 0 40px 80px -20px rgba(70,55,30,.22);
  font: 400 clamp(17px, 1.4vw, 21px)/1.6 "EB Garamond", Georgia, serif; color: #2a2723; text-align: justify; hyphens: auto; }
.i-sheet > p:last-of-type { margin-bottom: .3em; }
.i-sheet p { margin: 0 0 .9em; text-indent: 1.4em; }
.i-sheet .i-run { text-indent: 0; text-align: center; font-size: .62em; letter-spacing: .28em; text-transform: uppercase; color: #8d8577; margin-bottom: 2.2em; }
/* Ciel's highlight sweeps along the sentence, line after line */
.i-hl { background-image: linear-gradient(transparent 12%, rgba(240,178,72,.55) 12%, rgba(240,178,72,.55) 88%, transparent 88%);
  background-repeat: no-repeat; background-size: 0% 100%; }
.i-note { display: block; width: max-content; margin: -.2em 0 0 auto; font: 600 1.25em/1.1 "Caveat", cursive; color: var(--accent); transform: rotate(-3deg);
  clip-path: inset(0 100% 0 0); }
.i-note::before { content: "↖ "; }

/* soft light behind the words so captions read over the film */
.i-veil { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(240,233,217,.85) 0%, rgba(240,233,217,.6) 24%, rgba(240,233,217,0) 40%); }
.i-paper { position: absolute; inset: 0; background: #f6f3ee; opacity: 0; pointer-events: none; }

.intro-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 26px 40px; z-index: 5; }
.intro-brand { display: flex; align-items: center; gap: 12px; font: 600 26px/1 var(--serif); }
.intro-brand .mark { width: 34px; height: 34px; border-radius: 50%; border: 1px solid currentColor; display: grid; place-items: center; font: 500 19px/1 var(--serif); }
.intro-skip { font-size: 13px; letter-spacing: .04em; color: var(--soft); padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(27,27,31,.15); background: rgba(255,255,255,.5); transition: all .2s; }
.intro-skip:hover { color: var(--ink); border-color: var(--ink); }
.intro-acts { display: flex; gap: 8px; }
.intro-skip.solid { background: var(--ink); color: #fdfcf9; border-color: var(--ink); }
.intro-skip.solid:hover { background: var(--accent); border-color: var(--accent); color: #fdfcf9; }
.i-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; opacity: 0; pointer-events: none; }
.i-cta .i-more { border-color: transparent; background: transparent; color: var(--soft); }

.intro-caps { position: absolute; left: 7vw; top: 50%; transform: translateY(-50%); width: min(420px, 31vw); height: 280px; z-index: 4; }
.cap { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; pointer-events: none; }
/* each word rises into place from behind a fine line, and drifts up and away when its scene ends */
.cap .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .06em 0 .1em; margin: -.06em 0 -.1em; }
.cap .w i { display: inline-block; font-style: inherit; will-change: transform, opacity, filter; }
.cap .eyebrow, .cap p:not(.eyebrow) { will-change: opacity, transform, filter; }
.cap .eyebrow { color: var(--accent); margin-bottom: 16px; }
.cap h2 { font: 500 clamp(38px, 4.4vw, 62px)/1.03 var(--serif); letter-spacing: -.015em; margin: 0 0 18px; }
.cap p { font-size: 16px; line-height: 1.6; color: var(--soft); margin: 0; max-width: 360px; }

.intro-dots { position: absolute; right: 30px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; z-index: 5; }
.intro-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); opacity: .2; transition: opacity .3s, transform .3s; }
.intro-dots i.on { opacity: .8; transform: scale(1.4); }
.intro-hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--soft);
  display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 5; }
.intro-hint i { width: 1px; height: 34px; background: currentColor; animation: hint 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

@media screen and (max-width: 900px) {
  .intro-top { padding: 18px 20px; }
  .intro-caps { left: 22px; right: 22px; width: auto; top: auto; bottom: 14vh; transform: none; height: 220px; }
  .cap { justify-content: flex-end; }
  .cap h2 { font-size: 34px; }
  .cap p { font-size: 14.5px; }
  .i-veil { background: linear-gradient(0deg, rgba(240,233,217,.95) 0%, rgba(240,233,217,.8) 30%, rgba(240,233,217,0) 52%); }
  .i-film { left: -40%; width: 180%; top: 9vh; height: calc(180vw * 9 / 16); object-fit: cover;
    -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 100%); }
  .i-sheet { left: 18px; right: 18px; width: auto; top: 11vh; transform: rotate(-.6deg); padding: 24px 22px 18px; font-size: 16px; line-height: 1.55; text-align: left; }
  .intro-dots { display: none; }
  .intro-hint { bottom: 14px; white-space: nowrap; }
}
@media screen and (max-width: 900px) { .i-sheet p:nth-of-type(2) { display: none; } }
