/* Figma 160:15 / 160:461. Scale the shared scene rather than independently
   resizing its overlapping artwork. The character rig retains its own motion. */
.opening {
    --opening-scale: 1;
    position: relative;
    height: calc(1525px * var(--opening-scale));
    overflow: clip;
    background: var(--yellow);
    isolation: isolate;
}
.opening-stage {
    position: relative;
    width: 1440px;
    height: 1525px;
    transform: scale(var(--opening-scale));
    transform-origin: top left;
}
.opening .hero,
.opening .hero-layout {
    position: static;
    width: 1440px;
    height: 796px;
    background: none;
    isolation: auto;
    transform: none;
    overflow: visible;
}
.opening .hero-background {
    inset: 3px 0 auto;
    width: 1440px;
    height: 1522px;
    /* Blend the pattern against white so the yellow overlay can fade to a
       pale white base, rather than leaving a yellow/cyan tint at the bottom. */
    background: #fff;
    isolation: isolate;
    z-index: 0;
}
.opening .hero-background::after {
    background: linear-gradient(to bottom, var(--yellow) 32.234%, transparent 79.243%);
}
.hero-union {
    position: absolute;
    left: -42px;
    top: 33.634px;
    width: 1438px;
    height: 1306.55px;
    pointer-events: none;
}
.opening .hero-logo {
    left: 136px;
    top: 69px;
    width: 1168px;
    height: 328px;
    aspect-ratio: auto;
    transform: none;
    z-index: 1;
}
.opening .hero-name {
    left: 1016px;
    top: 343px;
    right: auto;
    width: 233px;
    height: 478.263px;
    transform: none;
    z-index: 1;
}
.opening .hero-name img { width: 100%; height: 100%; }
.opening .hero-content {
    position: static;
    width: auto;
    margin: 0;
    padding: 0;
    text-align: left;
    z-index: auto;
}
.opening .event-date {
    position: absolute;
    left: 136px;
    top: 404px;
    width: 261px;
    color: var(--blue);
    z-index: 4;
}
.opening .event-date span { font-size: 84px; white-space: nowrap; }
.opening .event-date small { font-size: 54px; margin-top: -10px; white-space: nowrap; }
.opening .hero .venue {
    position: absolute;
    left: 136px;
    top: 532px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-width: none;
    margin: 0;
    font: 700 28px/1 var(--condensed);
    text-transform: uppercase;
    white-space: nowrap;
    color: #828282;
    z-index: 4;
}
.opening .hero .ticket-button {
    position: absolute;
    left: 136px;
    top: 648px;
    width: 254px;
    height: 71px;
    margin: 0;
    transform: none;
    z-index: 4;
}
:is(.opening .hero .ticket-button, .ticket-copy .ticket-button) {
    --hero-ticket-shadow-opacity: .25;
    --hero-ticket-brightness: 1;
    filter: drop-shadow(0 4px 4px rgb(0 0 0 / var(--hero-ticket-shadow-opacity))) drop-shadow(0 10px 18px rgb(0 0 0 / .3)) brightness(var(--hero-ticket-brightness));
}
:is(.opening .hero .ticket-button, .ticket-copy .ticket-button):hover {
    --hero-ticket-brightness: 1.1;
    filter: drop-shadow(0 4px 4px rgb(0 0 0 / var(--hero-ticket-shadow-opacity))) drop-shadow(0 10px 18px rgb(0 0 0 / .3)) brightness(var(--hero-ticket-brightness));
}
.opening .ticket-button span {
    top: 20px;
    left: 0;
    right: 0;
    width: auto;
    font-size: 40px;
}
.opening .hero-ticket-mobile { display: none; }
.opening .ticket-shine {
    width: 254px;
    height: 71px;
    mask: url('../images/hero-ticket-desktop.svg') 0 0 / 100% 100% no-repeat;
    -webkit-mask: url('../images/hero-ticket-desktop.svg') 0 0 / 100% 100% no-repeat;
}
.hero-character-position {
    position: absolute;
    left: -142px;
    top: -192px;
    width: 1971.88px;
    height: 2189.158px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}
.hero-character-crop {
    position: relative;
    flex: none;
    width: 1420.521px;
    height: 1798.99px;
    transform: rotate(21.05deg);
    overflow: hidden;
}
.opening .hero-mirai {
    left: 0;
    top: 0;
    right: auto;
    bottom: auto;
    width: 100.04%;
    height: 112.04%;
    transform: none;
}
.opening .about-piko {
    /* Piko's whole body matches Mirai's head (ear tips to chin), per the character guide;
       scaled to 80% around the feet so Piko still stands on Mirai's arm. */
    top: 283px;
    left: 590px;
    right: auto;
    bottom: auto;
    width: 273px;
    height: 357px;
    aspect-ratio: auto;
    opacity: 1;
    transform: none;
    overflow: visible;
    z-index: 3;
}
.opening .about-piko img,
.opening .about-piko-canvas { width: 103.75%; height: 100%; }
.opening .about-piko img { object-fit: fill; }
.opening .about {
    position: absolute;
    left: 97px;
    top: 796px;
    width: 1246px;
    height: 652px;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: rgb(15 62 193 / .9);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    z-index: 5;
}
.opening .about > .container {
    width: 100%;
    height: 100%;
    margin: 0;
}
.opening .about h2 {
    position: absolute;
    left: 130px;
    top: 54px;
    width: 986px;
    margin: 0;
    font: 400 56px/1.2 var(--heading);
    text-align: center;
}
.opening .about-intro {
    position: absolute;
    left: 210px;
    top: 139px;
    width: 826px;
    margin: 0;
    font-size: 18px;
    line-height: 28px;
    text-align: center;
}
.opening .about-grid {
    position: absolute;
    left: 126px;
    top: 204px;
    width: 1016px;
    margin: 0;
    grid-template-columns: repeat(5, 188px);
    grid-template-rows: repeat(2, 188px);
    gap: 18px 19px;
}
.opening .about-grid figure { margin: 0; grid-column: auto; }
.opening .about-grid figure:nth-child(9) { grid-area: 1 / 5; }
.opening .about-grid figure:nth-child(10) { grid-area: 2 / 5; }
.opening .about-grid picture { display: block; width: 100%; height: 100%; }
.opening-mobile-break,
.opening-mobile-space { display: none; }

/* Piko follows the existing entrance; its independent inner float and blink
   continue unchanged after moving from the photo grid into the hero. */
html[data-intro="loading"] .opening .about-piko,
html[data-intro="revealing"] .opening .about-piko { opacity: 0; translate: 0 70px; }
html[data-intro="entering"] .opening .about-piko {
    animation: character-arrive 1100ms cubic-bezier(.16,.8,.23,1) 720ms both;
}

@media (max-width:600px) {
    .opening { height: calc(1644px * var(--opening-scale)); }
    .opening-stage { width: 393px; height: 1644px; }
    .opening .hero,
    .opening .hero-layout { width: 393px; height: 509px; }
    .opening .hero-background {
        display: block;
        inset: 0;
        width: 393px;
        height: 1644px;
    }
    .opening .hero-background::after {
        /* Match the desktop fade's position relative to the shorter hero;
           the taller mobile photo panel continues over the pale pattern. */
        background: linear-gradient(to bottom, var(--yellow) 313px, transparent 772px);
    }
    .opening .hero-union {
        display: block;
        left: -11.463px;
        top: 9.179px;
        transform: scale(.272916667);
        transform-origin: top left;
    }
    .opening .hero-logo { left: 18px; top: 37px; width: 357px; height: 100px; }
    .hero-character-position {
        left: -520.79px;
        top: -146.39px;
        width: 1220.818px;
        height: 1420.099px;
    }
    .hero-character-crop { width: 842.45px; height: 1194.89px; transform: rotate(21.43deg); }
    .opening .hero-mirai { width: 100%; height: 100%; }
    .opening .hero-name { left: 27px; top: 496px; width: 184.769px; height: 379.263px; z-index: 3; }
    .opening .about-piko { left: 9px; top: 73px; width: 186px; height: 240px; }
    .opening .event-date { left: 34px; top: 396px; width: auto; }
    .opening .event-date span { font-size: 32px; }
    .opening .event-date small { font-size: 20px; margin-top: -3px; }
    .opening .hero .venue { left: 34px; top: 449px; font-size: 16px; line-height: 1; }
    .opening .hero .ticket-button { left: 164px; top: 426px; width: 195px; height: 60px; --hero-ticket-shadow-opacity: .4; }
    .opening .ticket-button span { top: 18px; left: 8px; font-size: 34px; }
    .opening .hero-ticket-desktop { display: none; }
    .opening .hero-ticket-mobile { display: block; }
    .opening .ticket-shine {
        width: 195px;
        height: 60px;
        mask-image: url('../images/hero-ticket-mobile.svg');
        -webkit-mask-image: url('../images/hero-ticket-mobile.svg');
    }
    /* Title, intro and grid flow so a longer title or intro (English, edited
       copy) pushes the photos down instead of overlapping them. The box keeps
       its height, so the extra photo row below is cropped a little more. */
    .opening .about { left: 18px; top: 509px; width: 357px; height: 1076px; background: var(--blue); backdrop-filter: none; -webkit-backdrop-filter: none; }
    .opening .about > .container { height: auto; padding-top: 44px; }
    .opening .about h2 { position: relative; left: 22px; top: 0; width: 287px; font-size: 36px; text-align: left; }
    .opening-mobile-break { display: block; }
    .opening-mobile-space { display: inline; }
    .opening .about-intro { position: relative; left: 23px; top: 0; width: 309px; margin-top: 13px; font-size: 16px; line-height: 24px; text-align: left; }
    .opening .about-grid {
        position: relative;
        left: 21.496px;
        top: 0;
        margin-top: 13px;
        width: 309.008px;
        grid-template-columns: repeat(2, 147.068px);
        grid-template-rows: repeat(5, 147.068px);
        gap: 12.932px 14.872px;
    }
    .opening .about-grid figure:nth-child(n) { grid-area: auto; }
    .opening .about-grid figure:nth-child(n+7) { position: relative; top: 9px; }
    .opening .about-grid figure:nth-child(n+9) { top: 18px; }
    .opening .about-grid figure:nth-child(8) img { width: 188px; height: 188px; max-width: none; }
}
@media (prefers-reduced-motion:no-preference) {
    html[data-intro="ready"] :is(.opening .hero .ticket-button, .ticket-copy .ticket-button),
    html:not([data-intro]) :is(.opening .hero .ticket-button, .ticket-copy .ticket-button) {
        animation: hero-ticket-float 3s ease-in-out infinite;
    }
}
@keyframes hero-ticket-float {
    0%, 100% {
        translate: 0 0;
        filter: drop-shadow(0 4px 4px rgb(0 0 0 / var(--hero-ticket-shadow-opacity))) drop-shadow(0 10px 18px rgb(0 0 0 / .3)) brightness(var(--hero-ticket-brightness));
    }
    50% {
        translate: 0 -3px;
        filter: drop-shadow(0 4px 4px rgb(0 0 0 / var(--hero-ticket-shadow-opacity))) drop-shadow(0 10px 18px rgb(0 0 0 / .3)) brightness(var(--hero-ticket-brightness));
    }
}
@media (prefers-reduced-motion:reduce) {
    html[data-intro] .opening .about-piko { opacity: 1; translate: none; animation: none; }
}
