/* opening.css: the stained-glass garden doors (station 0) */
/* ================= the stained-glass garden doors ================= */
.intro{position:fixed;inset:0;z-index:60;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(6px,1.6vh,18px);overflow:hidden;padding:calc(max(12px, env(safe-area-inset-top,0px)) + var(--dj-banner,0px)) max(8px, env(safe-area-inset-right,0px)) max(12px, env(safe-area-inset-bottom,0px)) max(8px, env(safe-area-inset-left,0px));background:radial-gradient(ellipse at 50% 46%, #FFFEFB 0%, #F8F5EE 52%, #E9EEF5 100%)}
.intro .lead{font-family:var(--script);font-size:clamp(34px,9vw,58px);line-height:1.3;color:var(--navy);text-align:center;padding:0 .2em}
/* "tap the seal to open" only once the seal itself can be seen (index.html adds .dj-seal-in when its picture
   has loaded; opening.js holds it back with .seal-wait while the seal rises into place) */
.intro .hint{font-family:var(--caps);letter-spacing:.2em;font-size:15px;font-weight:600;color:var(--navy);text-align:center;opacity:0}
.dj-seal-in .intro:not(.seal-wait) .hint{opacity:1;animation:hintIn .8s ease-out both, breathe 2.6s ease-in-out .8s infinite}
@keyframes hintIn{from{opacity:0}}
@keyframes breathe{50%{opacity:.72}}
.intro.opening .hint,.intro.opening .skip,.intro.opening .plain{animation:none;opacity:0;transition:opacity .3s;pointer-events:none}
/* The scene is one 1024x1536 painting space. Measured from art/phase2 (prepare_doors.py):
   the doorway opening is x 24.02%-75.58%, y 15.30%-87.63%; the door pair is 109.6% of the
   opening's width; the handles sit at y 55.6%. */
/* sized to leave room for the heading, the hint and the one choice under the doors (the link to the plain
   page), which grow on bigger screens */
.gate{position:relative;flex:none;width:min(calc(100vw - 16px), calc((100svh - var(--dj-banner,0px) - clamp(176px, 12vw + 128px, 232px)) * 1024 / 1536), 560px);aspect-ratio:1024/1536}
.g-view{position:absolute;inset:0;-webkit-mask:url(/img/doors/opening-mask.png) center/100% 100% no-repeat;mask:url(/img/doors/opening-mask.png) center/100% 100% no-repeat}
.g-box{position:absolute;left:24.02%;top:15.3%;width:51.56%;height:72.33%}
.g-garden{overflow:hidden}
.g-garden img{position:absolute;top:0;left:50%;height:100%;width:auto;max-width:none;transform:translateX(-50%)}
/* warm light glowing through the glass from behind */
.g-glow{background:radial-gradient(ellipse 70% 48% at 50% 56%, #FFF7DE 0%, #F8F2E2 38%, #E7EEF7 100%)}
/* a slow breath of sunlight behind the glass while the doors wait (opacity only, cheap on phones) */
.g-glow::after{content:"";position:absolute;inset:0;background:radial-gradient(ellipse 62% 40% at 50% 50%, #FFFDF2 0%, rgba(255,240,196,.85) 34%, rgba(255,247,222,0) 78%);opacity:.15;animation:glassBreath 5.6s ease-in-out infinite}
@keyframes glassBreath{50%{opacity:.95}}
.g-pair{position:absolute;left:-4.8%;width:109.6%;top:0;height:100%;perspective:1500px}
.g-door{position:absolute;top:0;height:100%;will-change:transform}
.g-door img{width:100%;height:100%}
.g-left{left:0;width:49.87%;transform-origin:0 50%}
.g-right{right:0;width:50.13%;transform-origin:100% 50%}
/* a gentle shimmer moving across the panes (masked to the glass itself) */
.g-door::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(104deg, transparent 38%, rgba(255,255,255,.9) 50%, transparent 62%) no-repeat;background-size:320% 100%;background-position:130% 0;
  -webkit-mask:var(--door) center/100% 100% no-repeat;mask:var(--door) center/100% 100% no-repeat;animation:paneShimmer 7s ease-in-out 1.5s infinite}
.g-right::after{animation-delay:1.8s}
@keyframes paneShimmer{0%{background-position:130% 0}30%,100%{background-position:-30% 0}}
.g-surround{position:absolute;inset:0;pointer-events:none}
.g-surround img{width:100%;height:100%}
.g-ribbon{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
/* sunlight and coloured light pouring out when the doors open */
.g-flood{position:fixed;inset:0;pointer-events:none;opacity:0;z-index:2}
.intro.opening .g-door::after{animation:none}
/* short, wide screens (a phone turned sideways, a small laptop window): words beside the doors */
@media (max-height:560px) and (orientation:landscape){
  .intro{flex-direction:row;flex-wrap:wrap;align-content:center;column-gap:clamp(16px,4vw,48px);row-gap:4px}
  .gate{width:calc((100svh - var(--dj-banner,0px) - 64px) * 1024 / 1536);order:2;margin-bottom:30px}
  .intro .lead{order:1;flex:0 1 28vw;font-size:clamp(28px,5.2vw,46px)}
  .intro .hint{order:3;flex:0 1 27vw;font-size:13px;letter-spacing:.14em}
  /* the link to the plain page sits in the middle of the bottom edge */
  .intro .skip{order:4;position:absolute;bottom:max(4px, env(safe-area-inset-bottom,0px));left:0;right:50%;padding:4px;min-height:44px}
  .intro .plain{order:5;position:absolute;bottom:max(4px, env(safe-area-inset-bottom,0px));left:50%;right:auto;transform:translateX(-50%);margin:0;padding:4px 18px;min-height:44px;max-width:calc(100vw - 28px);white-space:nowrap}
}
.seal{position:absolute;left:50%;top:55.6%;width:max(19%, 64px);aspect-ratio:1;z-index:6;border:0;background:none;padding:0;transform:translate(-50%,-50%);cursor:pointer}
.seal svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
/* the seal as a plain picture, until opening.js draws it in two halves (same place and shadow as art.js) */
.seal .seal-still{position:absolute;left:1%;top:1%;width:98%;height:98%;max-width:none;filter:drop-shadow(0 1.5px 2px rgba(54,64,86,.24));pointer-events:none}
/* tapped before the doors were ready: the seal stays pressed until they open (index.html) */
.dj-seal-tapped .seal{transform:translate(-50%,-50%) scale(.92)}
.dj-seal-tapped .intro .hint{opacity:.45;animation:none}
/* a clear double ring for keyboard users: white then navy, so it shows on blue wax and blue glass alike */
.seal:focus-visible{outline:none}
.seal:focus-visible::after{content:"";position:absolute;inset:-9px;border-radius:50%;box-shadow:0 0 0 3px #fff, 0 0 0 6px var(--navy);pointer-events:none}
.skip{background:none;border:0;color:var(--ink-soft);font-family:var(--caps);letter-spacing:.15em;font-size:13px;text-decoration:underline;text-underline-offset:4px;padding:10px;cursor:pointer;min-height:44px}
/* the third choice: the whole invitation on one plain page (details.html), for guests who would rather read than
   walk. A quiet ivory pill, so it is clearly a choice of its own and never mistaken for part of the doors. */
.intro .plain{display:flex;align-items:center;justify-content:center;flex:none;min-height:44px;max-width:calc(100vw - 24px);padding:6px 18px;border-radius:999px;
  margin-top:calc(-1 * clamp(6px,1.6vh,18px) + 2px);
  font-family:var(--caps);letter-spacing:.1em;font-size:14px;font-weight:600;line-height:1.25;text-align:center;text-wrap:balance;text-decoration:none;color:var(--navy);
  background:rgba(252,249,242,.94);box-shadow:inset 0 0 0 1px var(--cornflower), 0 6px 14px -10px rgba(27,42,74,.5)}
@media (hover:hover){.intro .plain:hover{background:#fff;box-shadow:inset 0 0 0 1.5px var(--navy), 0 6px 14px -10px rgba(27,42,74,.5)}}
.intro .plain:focus-visible{outline:3px solid var(--navy);outline-offset:2px}

/* ================= the opening (opening.js) ================= */
/* light spilling round the doors and faint coloured pools from the glass on the step, breathing with the glass */
.gate::before{content:"";position:absolute;left:8%;right:8%;top:10%;bottom:4%;z-index:-1;pointer-events:none;border-radius:50% 50% 40% 40%;
  background:radial-gradient(ellipse 50% 46% at 50% 52%, rgba(255,246,214,.9) 0%, rgba(255,246,222,.4) 52%, rgba(255,250,240,0) 100%);opacity:.35;animation:glassBreath 5.6s ease-in-out infinite}
.gate::after{content:"";position:absolute;left:14%;right:14%;top:84%;height:9%;pointer-events:none;z-index:4;
  background:radial-gradient(ellipse 30% 46% at 34% 50%, rgba(140,172,222,.32) 0%, rgba(140,172,222,0) 100%),radial-gradient(ellipse 30% 46% at 66% 52%, rgba(185,166,226,.3) 0%, rgba(185,166,226,0) 100%),
  radial-gradient(ellipse 22% 40% at 50% 46%, rgba(236,206,140,.28) 0%, rgba(236,206,140,0) 100%);opacity:.3;animation:glassBreath 5.6s ease-in-out -.6s infinite}
.intro.opening .gate::before,.intro.opening .gate::after{animation:none;opacity:0;transition:opacity .6s}
/* the seal's soft halo, a ring of light that swells and fades to invite a tap */
.seal .o-halo{position:absolute;inset:4%;border-radius:50%;pointer-events:none;opacity:0;
  box-shadow:0 0 0 2px rgba(255,255,255,.75), 0 0 16px 5px rgba(191,214,238,.75), inset 0 0 10px 2px rgba(255,255,255,.5);animation:sealHalo 3s ease-out 2.4s infinite}
@keyframes sealHalo{0%{transform:scale(.9);opacity:0}22%{opacity:.85}100%{transform:scale(1.5);opacity:0}}
.intro.opening .o-halo{animation:none}
/* the doors' film (opening.js loadVid): covers the screen, under the light and the final wash */
.o-vid{position:fixed;inset:0;width:100%;height:100%;object-fit:cover;z-index:2;opacity:0;pointer-events:none;background:#FFFCF2}
/* light, petals and the final wash, above the doors */
.o-fx{position:fixed;inset:0;z-index:3;pointer-events:none;overflow:hidden}
.o-shaft,.o-pool,.o-sun{position:absolute;will-change:transform,opacity}
.o-pool{border-radius:50%}
.o-petals{position:absolute;inset:0;width:100%;height:100%}
.o-sun{border-radius:50%;background:radial-gradient(circle, #FFFFFF 0%, #FFFCF0 24%, rgba(255,246,222,.75) 46%, rgba(255,246,222,0) 70%)}
.o-wash{position:absolute;inset:0;opacity:0;background:radial-gradient(ellipse at 50% 50%, #FFFFFF 0%, #FFFCF2 46%, #FBF6EA 100%)}
/* through the doorway: the doors are gone, only the light is left, fading to show the garden behind */
.intro.through{background:none;pointer-events:none}
.intro.through > :not(.o-fx){visibility:hidden}
@media (prefers-reduced-motion: reduce){
  .g-glow::after,.gate::before,.gate::after,.seal .o-halo{animation:none}
}

/* build gw10 */
