/* ============================================================
   "SHIFTY PIX" — lenticular tilt-photo facet
   Built on the color/font variables defined in style.css.
   ============================================================ */

.sp-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    max-width: 760px;
    margin: 0 auto;
    padding: 50px 24px 20px;
}

.sp-intro h1 {
    margin-bottom: 12px;
}

.sp-intro p {
    font-size: 18px;
    line-height: 1.6;
    max-width: 580px;
    opacity: 0.85;
}

/* ---- Scroll-snap sections, one per photo sequence ---- */

/* Scroll-snap was tried (twice) and pulled — see PROJECT-SPEC.md for
   why. Sections now just flow naturally, sized around their photo
   rather than forced to fill the viewport. */

.sp-sections {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sp-section {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    touch-action: pan-y;
    padding: 16px 20px;
}

.sp-photo-frame {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    /* aspect-ratio is set inline per sequence, matching that sequence's
       real photo dimensions — see shifty-pix.php */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    background: #111;
}

.sp-photo-stage {
    position: absolute;
    inset: 0;
    cursor: ew-resize;
}

.sp-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Every photo after the first (the base layer) has its visibility
   driven entirely by an inline mask (see shifty-pix.js), which
   handles both the classic 2-photo pair case and longer sweeps. */
.sp-photo:not(:first-child) {
    -webkit-mask-repeat: repeat;
    mask-repeat: repeat;
}

@media (max-width: 600px) {
    .sp-photo-frame { max-width: 92vw; }
}

/* ---- iOS motion-permission prompt card ---- */

.sp-permission-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sp-permission-overlay.visible {
    display: flex;
}

.sp-permission-card {
    background: var(--color-background);
    border-radius: 10px;
    padding: 30px;
    max-width: 380px;
    text-align: center;
}

.sp-permission-card h2 {
    font-size: 26px;
    margin-bottom: 10px;
}

.sp-permission-card p {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.85;
    margin-bottom: 22px;
}

.sp-permission-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sp-permission-actions button {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 16px;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
}

.sp-btn-primary {
    background: var(--color-primary);
    color: var(--color-background);
    border: 1px solid var(--color-primary);
}

.sp-btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid rgba(55, 57, 58, 0.4);
}

@media (max-width: 600px) {
    .sp-intro { min-height: 50vh; padding: 40px 20px; }
}
