/* Sign-in page (public/index.html): resort and hotel photos that swipe by on the
   left, each with a Staygo key opening a door there; the sign-in card on the right.
   Phones and tablets: the photos become a band on top and the card sits over its edge.
   Selectors carry #root so they win over the general sign-in rules in staygo.css. */

html body #root .sg { grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); }

/* ---- The stage ---- */
#root .sgx-stage {
    position: relative; overflow: hidden; isolation: isolate;
    margin: 14px 0 14px 14px; border-radius: 32px;
    min-height: calc(100dvh - 28px);
    display: flex; flex-direction: column; justify-content: space-between;
    padding: clamp(26px, 3.2vw, 44px);
    color: #fff; background: #0d0b12;
    touch-action: pan-y; user-select: none; -webkit-user-select: none;
    box-shadow: 0 30px 70px -40px rgba(10, 6, 30, 0.55);
}
#root .sgx-stage:focus-visible { outline: 3px solid #E3176F; outline-offset: 3px; }

#root .sgx-photos { position: absolute; inset: 0; z-index: -2; }
#root .sgx-photo {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transform: scale(1.06);
    transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1), transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-user-drag: none; pointer-events: none;
}
/* The photo on show drifts closer, slowly (Ken Burns). */
#root .sgx-photo.is-on { opacity: 1; transform: scale(1); animation: sgxDrift 5s cubic-bezier(0.25, 0.1, 0.25, 1) both; }
@keyframes sgxDrift { from { transform: scale(1.02); } to { transform: scale(1.1); } }

#root .sgx-shade {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        linear-gradient(180deg, rgba(8, 6, 14, 0.42) 0%, rgba(8, 6, 14, 0) 24%),
        linear-gradient(0deg, rgba(8, 6, 14, 0.86) 0%, rgba(8, 6, 14, 0.5) 30%, rgba(8, 6, 14, 0) 58%);
}

/* ---- Wordmark on the photo ---- */
#root .sgx-brand { font: 700 24px/1 var(--ios-font, var(--font-display)); letter-spacing: -0.01em; }
#root .sgx-brand :is(.webkeys-wordmark, .nexis-word) { color: #fff !important; font: inherit !important; letter-spacing: inherit !important; text-transform: none !important; }
#root .sgx-brand .nexis-go { color: #FF4D9A !important; }

/* ---- The key on the photo ---- */
#root .sgx-key {
    position: absolute; top: clamp(84px, 14vh, 140px); right: clamp(22px, 3.2vw, 44px);
    display: grid; grid-template-columns: auto auto; column-gap: 18px; row-gap: 4px; align-items: center;
    min-width: 214px; padding: 16px 18px 16px 20px; border-radius: 22px;
    background: rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    pointer-events: none;
}
#root .sgx-key-door { grid-column: 1; font: 600 17px/1.2 var(--ios-font, var(--font-display)); letter-spacing: -0.01em; white-space: nowrap; }
#root .sgx-key-time { grid-column: 1; font: 500 13px/1.3 var(--ios-font, var(--font-body)); color: rgba(255, 255, 255, 0.78); white-space: nowrap; }
#root .sgx-key-open {
    grid-column: 2; grid-row: 1 / span 2; justify-self: end;
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px 8px 11px; border-radius: 999px;
    font: 600 14px/1 var(--ios-font, var(--font-body)); color: #fff; background: #E3176F;
    box-shadow: 0 8px 20px -8px rgba(227, 23, 111, 0.8);
}
#root .sgx-key-open i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: sgxPulse 2s ease-out infinite; }
@keyframes sgxPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); } 70%, 100% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); } }

/* ---- Headline and controls ---- */
#root .sgx-copy { max-width: 560px; }
#root .sgx-kind {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
    font: 600 14px/1 var(--ios-font, var(--font-body)); color: rgba(255, 255, 255, 0.92);
}
#root .sgx-kind::before { content: ''; width: 18px; height: 2px; border-radius: 2px; background: #FF4D9A; }
#root .sgx-headline {
    font: 700 clamp(40px, 4.6vw, 68px)/1.02 var(--ios-font, var(--font-display)) !important;
    letter-spacing: -0.035em !important; color: #fff !important; text-transform: none !important;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25);
}
#root .sgx-headline span { display: block; color: rgba(255, 255, 255, 0.62) !important; }
#root .sgx-lead { margin-top: 16px; max-width: 440px; font: 400 17px/1.5 var(--ios-font, var(--font-body)); color: rgba(255, 255, 255, 0.84); }


/* ---- Form side: labels in sentence case ---- */
html body #root .sg-field label { text-transform: none !important; letter-spacing: 0 !important; font-size: 13px !important; }

/* ---- Tablet and phone: the photos are a band on top, the card overlaps it ---- */
@media (max-width: 900px) {
    html body #root .sg { grid-template-columns: 1fr; }
    #root .sgx-stage { margin: 0; border-radius: 0 0 30px 30px; min-height: 0; height: clamp(380px, 56svh, 520px); padding: 20px 20px 54px; }
    #root .sgx-brand { font-size: 21px; }
    #root .sgx-key { top: 66px; bottom: auto; right: 16px; min-width: 0; padding: 11px 12px 11px 14px; column-gap: 12px; border-radius: 18px; }
    #root .sgx-key-door { font-size: 14.5px; }
    #root .sgx-key-time { font-size: 11.5px; }
    #root .sgx-key-open { padding: 6px 11px 6px 9px; font-size: 12.5px; }
    #root .sgx-kind { margin-bottom: 10px; font-size: 13px; }
    #root .sgx-headline { font-size: clamp(30px, 8.4vw, 40px) !important; }
    #root .sgx-lead { display: none; }
    html body #root .sg-side { padding-top: 0; margin-top: -34px; z-index: 1; }
}
@media (max-width: 330px) {
    #root .sgx-key { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    #root .sgx-photo { transition: opacity 0.6s linear; transform: none !important; }
    #root .sgx-photo.is-on { animation: none; }
    #root .sgx-key-open i { animation: none; }
}
