/* ==========================================================================
   GPM Shanghai 2027 — homepage (modern redesign, Phase 8)
   Loaded only on the homepage (standalone layout). Pairs with assets/js/home.js
   (GSAP + ScrollTrigger + Lenis). Brand tokens (--gpm-navy/--gpm-gold/...) come
   from default.css :root, loaded before this file. China-safe: all self-hosted.
   ========================================================================== */

/* ---- Scroll-reveal base state --------------------------------------------
   Only hidden when JS has confirmed motion is on (html.gpm-motion). Without JS,
   or under prefers-reduced-motion, content renders normally (no stuck-hidden). */
html.gpm-motion .gpm-reveal { opacity: 0; will-change: transform, opacity; }

@media (prefers-reduced-motion: reduce) {
    html.gpm-motion .gpm-reveal { opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   HERO — full-viewport Shanghai video
   ========================================================================== */
.gpm-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--gpm-navy, #0B2254);
}
.gpm-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    /* slight scale so the parallax drift never reveals an edge */
    transform: scale(1.08);
    will-change: transform;
}
.gpm-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(11, 34, 84, 0.25) 0%, rgba(11, 34, 84, 0.55) 55%, rgba(11, 34, 84, 0.82) 100%),
        linear-gradient(180deg, rgba(11, 34, 84, 0.45) 0%, rgba(11, 34, 84, 0.30) 45%, rgba(11, 34, 84, 0.75) 100%);
}
.gpm-hero-inner { position: relative; z-index: 2; padding: 150px 0 90px; width: 100%; }
.gpm-hero-logo { width: 500px; max-width: 78%; height: auto; margin-bottom: 36px; }
.gpm-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--gpm-gold-bright, #E3B75E);
}
.gpm-hero-title {
    font-size: clamp(2.6rem, 6.5vw, 5.5rem);
    line-height: 1.03;
    margin: 0 0 20px;
    letter-spacing: -0.01em;
}
/* word-level reveal (wrapped by home.js) */
.gpm-hero-title .gpm-word { display: inline-block; overflow: hidden; vertical-align: top; }
.gpm-hero-title .gpm-word > span { display: inline-block; }
.gpm-hero-tagline {
    font-size: clamp(1.05rem, 1vw, 1.35rem);
    font-weight: 300;
    max-width: 740px;
    margin-bottom: 44px;
    line-height: 1.6;
}
.gpm-facts {
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    padding: 24px 0;
    margin: 0 0 42px;
}
.gpm-fact-label {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    opacity: 0.75;
    margin-bottom: 5px;
}
.gpm-fact-value { display: block; font-size: 1.2rem; font-weight: 600; }
.gpm-hero-cta .btn { border-radius: 2px; }

/* scroll cue */
.gpm-scrollcue {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}
.gpm-scrollcue .gpm-scrollcue-line {
    width: 1px;
    height: 46px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
    animation: gpm-cue 1.8s ease-in-out infinite;
    transform-origin: top;
}
@keyframes gpm-cue {
    0% { transform: scaleY(0); opacity: 0; }
    40% { opacity: 1; }
    100% { transform: scaleY(1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .gpm-hero-video { transform: none; }
    .gpm-scrollcue .gpm-scrollcue-line { animation: none; }
}

/* ==========================================================================
   ABOUT SHANGHAI — parallax band (GSAP-driven; Stellar not used on homepage)
   ========================================================================== */
.gpm-about-section { position: relative; overflow: hidden; }
.gpm-about-section .hero-wrap {
    position: relative;
    height: 88vh;
    min-height: 560px;
    background-size: cover;
    background-position: center center;
}
.gpm-about-section .hero-wrap .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(11, 34, 84, 0.78) 0%, rgba(11, 34, 84, 0.45) 55%, rgba(11, 34, 84, 0.15) 100%);
    opacity: 1;
}
.gpm-about-section .container { position: relative; z-index: 2; }
.gpm-section-eyebrow {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--gpm-gold-bright, #E3B75E);
}

/* ==========================================================================
   CINEMATIC VIDEO BAND — "Shanghai in motion" divider (the compressed accent)
   ========================================================================== */
.gpm-motion-band {
    position: relative;
    height: 62vh;
    min-height: 420px;
    overflow: hidden;
    background: var(--gpm-navy, #0B2254);
    display: flex;
    align-items: center;
}
.gpm-motion-band video,
.gpm-motion-band .gpm-band-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.gpm-motion-band .gpm-band-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(11, 34, 84, 0.55), rgba(11, 34, 84, 0.35));
}
.gpm-motion-band .container { position: relative; z-index: 2; }
.gpm-motion-band .gpm-band-kicker {
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 13px;
    font-weight: 600;
    color: var(--gpm-gold-bright, #E3B75E);
}
.gpm-motion-band h2 { font-size: clamp(1.8rem, 4vw, 3rem); }

/* ==========================================================================
   SKYLINE BAND (faint SVG behind hotel + nothing else now)
   ========================================================================== */
.gpm-skyline-band {
    position: relative;
    background: #fff url('../../imgs/site/layout/shanghai-skyline.svg') no-repeat bottom center;
    background-size: 100% auto;
}
@media (min-width: 1700px) {
    .gpm-skyline-band { background-size: 1700px auto; }
}

/* ==========================================================================
   HOST HOTEL teaser
   ========================================================================== */
.gpm-hotel { overflow: hidden; }
.gpm-hotel-img {
    position: relative;
    min-height: 460px;
    background-size: cover;
    background-position: center center;
}
.gpm-hotel-text { background: #f7f8fa; display: flex; align-items: center; }

/* ==========================================================================
   SIGNIFICANT OTHERS ACTIVITIES — modern horizontal scroller
   ========================================================================== */
.gpm-tours {
    position: relative;
    background: var(--gpm-navy, #0B2254);
    color: #fff;
    overflow: hidden;
    padding: 90px 0 100px;
}
.gpm-tours-head { padding: 0 var(--gpm-gutter, 24px); }
.gpm-tours .gpm-section-eyebrow { color: var(--gpm-gold-bright, #E3B75E); }
.gpm-tours-head h2 { color: #fff; }
.gpm-tours-head p { color: rgba(255, 255, 255, 0.72); max-width: 640px; }

/* the horizontal strip — native scroll-snap + drag (home.js) */
.gpm-tours-scroller {
    margin-top: 44px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
}
.gpm-tours-scroller::-webkit-scrollbar { display: none; }
.gpm-tours-scroller.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.gpm-tours-track {
    display: flex;
    gap: 22px;
    padding: 0 max(24px, calc((100vw - 1140px) / 2)) 10px;
    width: max-content;
}
.gpm-tour-card {
    position: relative;
    flex: 0 0 auto;
    width: 340px;
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    scroll-snap-align: start;
    background: #0a1c45 center/cover no-repeat;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    isolation: isolate;
}
.gpm-tour-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(10, 20, 50, 0) 35%, rgba(8, 17, 44, 0.85) 100%);
}
.gpm-tour-media { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center; transition: transform 1.1s cubic-bezier(.16,1,.3,1); }
.gpm-tour-card:hover .gpm-tour-media { transform: scale(1.06); }
.gpm-tour-meta {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 2;
    padding: 26px 24px;
    transition: transform .6s cubic-bezier(.16,1,.3,1);
}
.gpm-tour-day {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gpm-gold-bright, #E3B75E);
    margin-bottom: 8px;
}
.gpm-tour-title { font-size: 1.3rem; color: #fff; margin: 0; line-height: 1.2; }
.gpm-tour-duration { font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); margin-top: 6px; }

/* slide-up detail panel on hover/focus/active */
.gpm-tour-detail {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 3;
    padding: 26px 24px;
    background: linear-gradient(180deg, rgba(11, 34, 84, 0.92), rgba(8, 20, 54, 0.97));
    transform: translateY(101%);
    opacity: 0;
    visibility: hidden;
    transition: transform .55s cubic-bezier(.16,1,.3,1), opacity .4s ease, visibility 0s linear .55s;
}
.gpm-tour-detail .gpm-tour-day { color: var(--gpm-gold-bright, #E3B75E); }
.gpm-tour-detail-title { font-size: 1.2rem; color: #fff; margin: 2px 0 10px; }
.gpm-tour-detail p { font-size: 0.9rem; color: rgba(255, 255, 255, 0.82); margin: 0 0 10px; line-height: 1.5; }
.gpm-tour-detail .gpm-tour-includes { font-size: 0.78rem; color: rgba(255, 255, 255, 0.6); }
.gpm-tour-card:hover .gpm-tour-detail,
.gpm-tour-card:focus-within .gpm-tour-detail,
.gpm-tour-card.is-active .gpm-tour-detail {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform .55s cubic-bezier(.16,1,.3,1), opacity .4s ease;
}
.gpm-tour-card:hover .gpm-tour-meta,
.gpm-tour-card.is-active .gpm-tour-meta { transform: translateY(12px); opacity: 0; }

/* progress indicator under the strip */
.gpm-tours-progress {
    position: relative;
    height: 3px;
    margin: 26px max(24px, calc((100vw - 1140px) / 2)) 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    overflow: hidden;
}
.gpm-tours-progress span {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 20%;
    background: var(--gpm-gold, #B8894A);
    border-radius: 3px;
}
.gpm-tours-hint {
    margin-top: 14px;
    padding: 0 max(24px, calc((100vw - 1140px) / 2));
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   AGENDA overview day cards (navy band)
   ========================================================================== */
.gpm-day-card {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid var(--gpm-gold, #B8894A);
    border-radius: 4px;
    padding: 24px 18px;
    color: rgba(255, 255, 255, 0.85);
    transition: transform .4s cubic-bezier(.16,1,.3,1), border-color .4s ease, background .4s ease;
}
.gpm-day-card:hover { transform: translateY(-6px); border-top-color: var(--gpm-gold-bright, #E3B75E); background: rgba(255, 255, 255, 0.04); }
.gpm-day-num { font-size: 2.5rem; font-weight: 700; color: #fff; line-height: 1; }
.gpm-day-dow { display: inline-block; margin-left: 8px; font-size: 13px; letter-spacing: 0.1em; color: var(--gpm-gold-bright, #E3B75E); }

/* buttons micro-interaction */
.btn-primary, .btn-outline-white { transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease; }
.btn-primary:hover, .btn-outline-white:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
    .btn-primary:hover, .btn-outline-white:hover, .gpm-day-card:hover { transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991.98px) {
    .gpm-hero-inner { padding: 130px 0 70px; }
    .gpm-about-section .hero-wrap { height: auto; min-height: 0; padding: 110px 0; }
    .gpm-tour-card { width: 300px; height: 460px; }
}
@media (max-width: 767.98px) {
    .gpm-hero-inner { padding: 120px 0 64px; }
    .gpm-fact-value { font-size: 1rem; }
    .gpm-hotel-img { min-height: 280px; }
    .gpm-motion-band { height: 50vh; min-height: 320px; }
    .gpm-tours { padding: 70px 0 80px; }
    .gpm-tour-card { width: 82vw; max-width: 320px; height: 440px; }
    .gpm-scrollcue { display: none; }
}
