/* Entry page: the whole screen is the cover of 绯栖's sketchbook. Letterpress title, an edge grid of
   small type, a counter that binds the 33 drawings, an elastic band, and her peeking round the edge.
   Opening swings the cover away on its spiral and the gallery underneath is already there. */
.feiqi-intro{display:none}
html.has-intro,html.has-intro body{overflow:hidden}
html.has-intro .feiqi-intro{position:fixed;inset:0;z-index:200;display:block;perspective:2400px;perspective-origin:0 50%;color:#4d2f33;--lx:0;--ly:1}

/* The cover sheet and its two faces. */
.intro-sheet{position:absolute;inset:0;transform-origin:left center;transform-style:preserve-3d;transition:transform 1.25s cubic-bezier(.62,.02,.24,1);cursor:pointer}
.intro-face,.intro-back{position:absolute;inset:0;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden}
.intro-face{
 background:
  radial-gradient(90% 70% at 22% 12%,rgba(255,240,236,.42),rgba(255,240,236,0) 60%),
  radial-gradient(70% 60% at 100% 100%,rgba(96,40,48,.22),rgba(96,40,48,0) 70%),
  #d4a4a1;
}
.intro-face:before{content:'';position:absolute;inset:0;pointer-events:none;opacity:.6;mix-blend-mode:multiply;
 background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.62' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .36 0 0 0 0 .36 0 0 0 .6 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
/* Shade that deepens as the cover turns away from the light. */
.intro-face:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,rgba(60,24,30,0),rgba(60,24,30,.55));opacity:0;transition:opacity 1.1s ease}
.intro-back{transform:rotateY(180deg);display:grid;place-content:center;gap:12px;text-align:center;background:repeating-linear-gradient(180deg,transparent 0 31px,rgba(170,140,130,.16) 31px 32px),#fbf5ec}
.intro-back p{margin:0;font:400 clamp(20px,2.6vw,34px)/1.8 'Songti SC','Noto Serif SC',serif;letter-spacing:4px;color:#5d4a44}
.intro-back .intro-sign{font-size:14px;letter-spacing:4px;color:#8e4755}

/* Spiral binding down the left edge. */
.intro-rings{position:absolute;z-index:3;left:0;top:0;bottom:0;width:clamp(36px,4.2vw,58px);pointer-events:none;transition:opacity .5s ease;
 background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='58' height='46'%3E%3Cdefs%3E%3ClinearGradient id='m' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23f4efe9'/%3E%3Cstop offset='.45' stop-color='%239d938d'/%3E%3Cstop offset='1' stop-color='%23605650'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='41' cy='23' r='4.2' fill='%233a2226' fill-opacity='.55'/%3E%3Cpath d='M41 19.5 C 28 12, 8 13, 4 23 C 8 33, 28 33, 41 26.5' fill='none' stroke='url(%23m)' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") 0 10px/100% auto repeat-y,
  linear-gradient(90deg,rgba(60,30,34,.22),rgba(60,30,34,0));
}

/* Edge grid of small type, after the studios that keep the frame quiet and the centre empty. */
.intro-meta{position:absolute;z-index:2;top:clamp(20px,4vh,40px);left:clamp(64px,8vw,130px);right:calc(100% - 79%);display:grid;grid-template-columns:repeat(4,1fr);gap:22px;margin:0;padding:0;list-style:none}
.intro-meta li{padding-top:10px;border-top:1px solid rgba(77,47,51,.38);font:11px/1.7 'Helvetica Neue',Arial,sans-serif;letter-spacing:1.2px;color:#4d2f33}
.intro-meta b{display:block;font-weight:400;font-size:10px;letter-spacing:2px;color:rgba(77,47,51,.62)}

/* Letterpress title: pressed into the card; the light across it follows the pointer. */
.intro-title{position:absolute;z-index:1;left:clamp(76px,11vw,190px);top:15vh;margin:0;display:flex;flex-direction:row;gap:2.4vh;align-items:flex-start;font-weight:400;font-family:'Songti SC','Noto Serif SC','Source Han Serif SC',serif;color:#c69592;
 text-shadow:calc(var(--lx) * -1px) calc(var(--ly) * -1px) 0 rgba(84,34,42,.32),calc(var(--lx) * 1px) calc(var(--ly) * 1px) 0 rgba(255,236,232,.55),0 0 1px rgba(84,34,42,.15)}
.intro-title>span{writing-mode:vertical-rl;white-space:nowrap}
.intro-title .t-main{order:2;font-size:min(31vh,21vw);line-height:1;letter-spacing:-.02em}
.intro-title .t-sub{order:1;align-self:flex-end;font-size:min(4.6vh,3.6vw);letter-spacing:.7em;margin-bottom:1vh;color:#b98785}
.intro-title .t-en{order:3;margin-top:1vh;font:italic 400 clamp(14px,1.5vw,20px)/1 Georgia,'Times New Roman',serif;letter-spacing:3px;color:rgba(77,47,51,.7);text-shadow:none}

/* Counter: the drawings being bound into the book. */
.intro-count{position:absolute;z-index:2;left:clamp(64px,8vw,130px);bottom:4vh;margin:0;display:flex;align-items:flex-end;gap:18px}
.intro-num{font:300 min(25vh,19vw)/.8 Didot,'Bodoni 72','Bodoni Moda','Times New Roman',serif;letter-spacing:-.04em;color:#fbf1ea;font-variant-numeric:lining-nums tabular-nums}
.intro-num-label{padding-bottom:1.2vh;font-size:13px;line-height:1.8;letter-spacing:2px;color:#4d2f33}

/* Elastic band. */
.intro-band{position:absolute;z-index:3;top:-2%;bottom:-2%;left:82%;width:clamp(14px,1.5vw,22px);pointer-events:none;
 background:linear-gradient(90deg,#5e1f2c 0%,#8a3446 30%,#b45a6b 46%,#8a3446 62%,#5e1f2c 100%);
 box-shadow:-6px 0 14px -6px rgba(60,20,28,.55),6px 0 14px -6px rgba(60,20,28,.4);transition:transform .5s cubic-bezier(.5,-.4,.3,1.4),opacity .4s ease}
.intro-sheet:hover .intro-band{transform:translateX(5px) scaleX(1.08)}

/* She holds the edge of the screen and looks in. */
.intro-peek{position:absolute;z-index:1;right:5vw;bottom:6vh;width:min(31vw,440px);height:auto;pointer-events:none;user-select:none;transform:rotate(-5deg);filter:drop-shadow(0 1px 0 rgba(120,70,70,.25)) drop-shadow(-6px 12px 18px rgba(60,24,30,.3));transition:transform .55s cubic-bezier(.5,-.3,.4,1),opacity .4s ease}
.intro-bubble{position:absolute;z-index:4;right:calc(5vw + min(31vw,440px) * .62);bottom:calc(6vh + min(31vw,440px) * .9);margin:0;padding:9px 14px;font-size:13px;line-height:1.6;white-space:nowrap;color:#5d4a44;background:#fffaf2;border-radius:16px 16px 3px 16px;box-shadow:0 10px 24px -8px rgba(60,24,30,.35);opacity:0;transform:translateY(6px) rotate(2deg);transition:opacity .25s,transform .25s;pointer-events:none}
.intro-bubble.is-shown{opacity:1;transform:rotate(2deg)}

/* The way in: a seal with its name turning around it. */
.intro-open{position:absolute;z-index:4;left:44%;bottom:12vh;width:clamp(108px,10vw,140px);aspect-ratio:1;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:#fbf1ea;color:#7d2f3d;cursor:pointer;
 box-shadow:inset 0 0 0 1px rgba(125,47,61,.25),0 18px 34px -14px rgba(60,24,30,.55);transition:transform .35s cubic-bezier(.3,1.5,.5,1)}
.intro-open svg{position:absolute;inset:6%;width:88%;height:88%;animation:intro-turn 22s linear infinite}
.intro-open text{font:600 9.5px 'Helvetica Neue',Arial,sans-serif;letter-spacing:2.4px;fill:#7d2f3d}
.intro-open>span{position:relative;display:grid;place-items:center;width:46%;aspect-ratio:1;border:1.5px solid #9d3f4c;border-radius:6px;font:400 clamp(22px,2.2vw,30px)/1 'Songti SC','Noto Serif SC',serif;color:#9d3f4c;transform:rotate(-6deg)}
.intro-open:hover,.intro-open:focus-visible{transform:scale(1.06)}
.intro-open:hover svg{animation-duration:9s}
.intro-open:focus-visible{outline:2px solid #fbf1ea;outline-offset:5px}
@keyframes intro-turn{to{transform:rotate(360deg)}}
.intro-hint{position:absolute;z-index:4;left:calc(44% + clamp(108px,10vw,140px) / 2);bottom:5vh;transform:translateX(-50%);margin:0;font-size:13px;letter-spacing:3px;white-space:nowrap;color:#4d2f33}


.intro-skip{position:absolute;z-index:5;top:clamp(14px,3.4vh,34px);right:clamp(16px,2.6vw,40px);min-height:44px;padding:8px 4px;border:0;background:none;font:12px/1.4 'Helvetica Neue',Arial,sans-serif;letter-spacing:2px;color:#4d2f33;cursor:pointer;text-decoration:underline;text-decoration-color:rgba(77,47,51,.4);text-underline-offset:6px}
.intro-skip:hover{color:#7d2f3d}
.intro-skip:focus-visible{outline:2px solid #4d2f33;outline-offset:3px}

/* Opening: band snaps, she slips away, the cover swings open on its spiral. */
.feiqi-intro.is-unbanding .intro-band{transform:translateX(70px) rotate(7deg);opacity:0}
.feiqi-intro.is-unbanding .intro-peek{transform:rotate(-2deg) translateY(-14px) scale(1.04)}
.feiqi-intro.is-unbanding .intro-open,.feiqi-intro.is-unbanding .intro-hint{opacity:0;transition:opacity .3s}
.feiqi-intro.is-opening .intro-sheet{transform:rotateY(-108deg)}
.feiqi-intro.is-opening .intro-face:after{opacity:1}
.feiqi-intro.is-opening .intro-rings{opacity:0;transition-delay:.6s}
.feiqi-intro.is-leaving{opacity:0;transition:opacity .35s ease}

@media(max-width:700px){
 .intro-meta{top:68px;left:48px;right:22%;grid-template-columns:repeat(2,1fr);gap:12px 14px}
 .intro-meta li{font-size:10px;letter-spacing:.8px;padding-top:7px}
 .intro-title{left:46px;top:max(25vh,210px);gap:10px}
 .intro-title .t-main{font-size:min(17vh,34vw)}
 .intro-title .t-sub{font-size:15px;letter-spacing:.6em}
 .intro-title .t-en{display:none}
 .intro-count{left:48px;bottom:3.5vh;flex-direction:column;align-items:flex-start;gap:4px}
 .intro-num{font-size:min(11vh,24vw)}
 .intro-num-label{padding:0;font-size:11px;line-height:1.6;letter-spacing:1px}
 .intro-num-label br{display:none}
 .intro-band{left:84%}
 .intro-peek{width:min(52vw,230px);right:3vw;bottom:5vh}
 .intro-bubble{right:calc(3vw + min(52vw,230px) * .48);bottom:calc(5vh + min(52vw,230px) * .92);font-size:12px}
 .intro-open{left:auto;right:calc(16% + 14px);bottom:auto;top:max(26vh,220px);width:98px}
 .intro-hint{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .intro-skip{top:12px;left:46px;right:auto;font-size:11px;letter-spacing:1px}
}
@media(max-height:560px) and (min-width:701px){.intro-num{font-size:20vh}.intro-open{bottom:6vh}}
@media(prefers-reduced-motion:reduce){.intro-open svg{animation:none}.intro-sheet,.intro-band,.intro-peek{transition:none}}
html.feiqi-still .intro-open svg{animation:none}
@media(forced-colors:active){.intro-face{background:Canvas}.intro-title,.intro-meta li,.intro-num,.intro-num-label{color:CanvasText;text-shadow:none}.intro-open{border:2px solid ButtonText}}
