:root {
    --ink: #16222e;
    --steel: #243746;
    --line: #d9dee4;
    --paper: #f4f6f8;
    --white: #ffffff;
    --blue: #1d5fbf;
    --blue-dark: #174c9a;
    --muted: #5b6b7a;
    --danger-bg: #fdeceb;
    --danger-ink: #8f1d17;
    --danger-line: #f3bcb8;
    --dur: 7000ms;                       /* time each slide stays on screen */
    --gutter: clamp(24px, 6vw, 88px);    /* shared left/right margin */
    --panel-w: max(380px, 33.333vw);     /* sign-in page: one third of the screen */
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body {
    margin: 0;
    font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background: #1c2e3d;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

.site { position: relative; height: 100vh; height: 100dvh; overflow: hidden; }

/* ---------- Top bar over the slideshow ---------- */
.topbar {
    position: absolute; top: 0; left: 0; right: 0; z-index: 10;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 22px var(--gutter);
    color: #fff;
}
.brand {
    display: flex; align-items: center; gap: 12px;
    max-width: 320px;
    font-size: .95rem; font-weight: 600; line-height: 1.25;
}
.logo {
    flex: none;
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 8px;
    background: var(--blue);
    color: var(--white);
}
.brand-img { flex: none; height: 40px; width: auto; max-width: 180px; object-fit: contain; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.signin-btn {
    flex: none;
    height: 42px; padding: 0 24px;
    font: inherit; font-weight: 600;
    color: var(--ink);
    background: #fff;
    border: 0; border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,.25);
    cursor: pointer;
    transition: background .15s, opacity .3s ease;
}
.signin-btn:hover { background: #e9f0fa; }
.topbar button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,.6); }

/* ---------- Full-page slideshow with parallax ---------- */
.showcase {
    position: absolute; inset: 0;
    overflow: hidden;
    color: #fff;
    background: #1c2e3d;
    isolation: isolate;
    container-type: size;               /* lets slide content scale with the space it has left */
}
.stage { position: absolute; inset: 0; --mx: 0; --my: 0; }

.slide {
    position: absolute; inset: 0;
    z-index: 0;
    visibility: hidden;
    opacity: 0;
    --shift: 240px;                      /* waiting: layers sit off to the right */
    transition: opacity 1.1s ease, visibility 0s linear 1.2s;
}
.slide.active  { z-index: 2; visibility: visible; opacity: 1; --shift: 0px;
                 transition: opacity 1.1s ease, visibility 0s; }
.slide.leaving { z-index: 1; visibility: visible; opacity: 0; --shift: -240px; }
.slide.reset, .slide.reset .layer { transition: none !important; }

.s0 { background: radial-gradient(circle at 76% 30%, rgba(255,255,255,.10), transparent 46%), linear-gradient(135deg, #1c2e3d, #2a4256); }
.s1 { background: radial-gradient(circle at 76% 30%, rgba(255,255,255,.12), transparent 46%), linear-gradient(135deg, #0f2744, #1b4f86); }
.s2 { background: radial-gradient(circle at 76% 30%, rgba(255,255,255,.12), transparent 46%), linear-gradient(135deg, #11323b, #1d5a66); }
.s3 { background: radial-gradient(circle at 76% 30%, rgba(255,255,255,.12), transparent 46%), linear-gradient(135deg, #1f2650, #3a4f93); }
.s4 { background: radial-gradient(circle at 76% 30%, rgba(255,255,255,.10), transparent 46%), linear-gradient(135deg, #1c2e3d, #34505f); }

/* --d = how far a layer travels during a change (bigger = closer to the viewer) */
.layer {
    position: absolute; inset: 0;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(calc(var(--d) * var(--shift)), 0, 0);
    transition: transform 1.2s cubic-bezier(.22, .61, .36, 1), opacity .9s ease;
}
.slide.active .layer { opacity: 1; }
.slide.active .l-echo { transition-delay: .05s; }
.slide.active .l-art  { transition-delay: .14s; }
.slide.active .l-copy { transition-delay: .32s; }

.par {
    position: absolute; inset: 0;
    transform: translate3d(calc(var(--mx) * var(--p) * -1px), calc(var(--my) * var(--p) * -1px), 0);
    transition: transform .6s ease-out;
}

.kb {
    position: absolute; inset: -8%;
    background-image:
        linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
    background-size: 56px 56px;
    animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: scale(1) translate3d(0,0,0); } to { transform: scale(1.1) translate3d(-1.5%, -1%, 0); } }

.copy {
    position: absolute; left: var(--gutter); right: var(--gutter); bottom: 17%;
    max-width: min(600px, calc(50cqw - var(--gutter) - 28px));   /* stays inside the left half */
    transition: max-width .75s cubic-bezier(.22, .61, .36, 1);
}
.site.login-open .copy { max-width: 600px; }
.tag {
    display: inline-block;
    margin-bottom: 16px;
    padding: 3px 12px;
    font-size: .85rem; font-weight: 500;
    color: #dbe8f8;
    background: rgba(255,255,255,.12);
    border-radius: 999px;
}
.copy h2 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 3.6cqw, 3.9rem);
    line-height: 1.06;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.copy h2 + .facts, .copy h2 + .plist { margin-top: 24px; }
.meta { margin: 0 0 18px; font-size: 1.1rem; color: rgba(255,255,255,.74); }
.price { margin: 0; font-size: clamp(1.6rem, 2.4vw, 2.25rem); font-weight: 600; letter-spacing: -0.01em; }

.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.facts li { padding-left: 16px; border-left: 3px solid color-mix(in srgb, var(--blue) 55%, #fff); color: rgba(255,255,255,.9); font-size: 1.05rem; }

.plist { list-style: none; margin: 0; padding: 0; max-width: 460px; }
.plist li {
    display: flex; justify-content: space-between; gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,.16);
}
.plist li:first-child { border-top: 1px solid rgba(255,255,255,.16); }
.plist strong { display: block; font-weight: 500; }
.plist small { color: rgba(255,255,255,.62); font-size: .85rem; }
.plist .amt { font-weight: 600; white-space: nowrap; }


/* ---------- Product photo: framed right half; becomes the background when sign-in opens ---------- */
.photo {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: 50%;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
    box-shadow: -36px 0 70px rgba(0,0,0,.28);          /* the frame floats above the text half */
    transition: width .75s cubic-bezier(.22, .61, .36, 1), box-shadow .75s ease;
}
.site.login-open .photo { width: 100%; box-shadow: none; }
/* artwork frame is solid so the outlined name behind it doesn't show through */
.s0 { --base: #233747; } .s1 { --base: #173b65; } .s2 { --base: #174650; } .s3 { --base: #2b3a71; } .s4 { --base: #283f4e; }
.photo.is-placeholder, .photo.has-photo { background-color: var(--base); }
.photo .par { position: absolute; inset: 0; }
.pshift {                                               /* slide change: picture settles in from a slight zoom */
    position: absolute; inset: 0;
    transform: scale(1.16);
    transition: transform 1.8s cubic-bezier(.22, .61, .36, 1);
}
.slide.active .pshift, .slide.leaving .pshift { transform: scale(1); }

.ph-img {
    position: absolute; inset: 0; width: 100%; height: 100%; display: block;
    transform: scale(1.14);                             /* spare pixels so parallax never shows an edge */
    animation: photo-drift 20s ease-in-out infinite alternate;
}
@keyframes photo-drift { from { transform: scale(1.14) translate3d(0,0,0); } to { transform: scale(1.22) translate3d(-1.2%, -.8%, 0); } }

/* placeholder artwork */
.ph-spot {
    position: absolute; left: 50%; top: 46%;
    width: 92%; aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255,255,255,.2), transparent 62%);
    transition: left .75s cubic-bezier(.22, .61, .36, 1);
}
.site.login-open .ph-spot { left: 68%; }
.ph-stage { position: absolute; top: 11%; bottom: 10%; left: 6%; right: 6%; transition: left .75s cubic-bezier(.22, .61, .36, 1); }
.site.login-open .ph-stage { left: 40%; }
.ph-stage .par { inset: 0; }
.ph-tilt {
    position: absolute; inset: 0;
    transform: perspective(1100px) rotateY(calc(var(--mx) * -5deg)) rotateX(calc(var(--my) * 4deg));
    transition: transform .6s ease-out;
}
.ph-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; animation: bob 7s ease-in-out infinite alternate; }
/* depth inside the artwork: back moves one way, foreground the other */
.ph-art .d1, .ph-art .d2, .ph-art .d3 { transition: transform .6s ease-out; }
.ph-art .d1 { transform: translate(calc(var(--mx) * -8px),  calc(var(--my) * -6px)); }
.ph-art .d2 { transform: translate(calc(var(--mx) * -2px),  calc(var(--my) * -1px)); }
.ph-art .d3 { transform: translate(calc(var(--mx) * 14px),  calc(var(--my) * 10px)); }
.ph-art .scan { animation: scanx 6s ease-in-out infinite alternate; }
@keyframes scanx { from { transform: translateX(60px); } to { transform: translateX(450px); } }

/* Soft edge toward the text half, and a stronger overlay once the photo sits behind the text */
.shade { position: absolute; inset: 0; pointer-events: none; transition: opacity .75s ease; }
.shade-edge { background: linear-gradient(90deg, rgba(12,22,32,.38), transparent 32%), linear-gradient(0deg, rgba(12,22,32,.35), transparent 28%), linear-gradient(180deg, rgba(12,22,32,.35), transparent 20%); }
.shade-text {
    opacity: 0;                                          /* --shade-open: 0 removes the dark overlay behind the text, 1 is full */
    background: linear-gradient(180deg, rgba(10,20,30,.62) 0, rgba(10,20,30,.12) 22%, rgba(10,20,30,.28) 42%, rgba(10,20,30,.88) 100%),
                linear-gradient(90deg, rgba(10,20,30,.55), rgba(10,20,30,.1) 70%);
}
.photo.is-placeholder .shade-text { background: linear-gradient(90deg, rgba(9,18,28,.6) 0%, rgba(9,18,28,.25) 45%, transparent 75%); }
.site.login-open .shade-edge { opacity: 0; }
.site.login-open .shade-text { opacity: var(--shade-open, 1); }

.ph-note {
    position: absolute; right: 28px; bottom: 76px; z-index: 3;
    padding: 3px 12px;
    font-size: .72rem; color: rgba(255,255,255,.72);
    background: rgba(8,16,26,.35);
    border: 1px dashed rgba(255,255,255,.35); border-radius: 999px;
}


/* Progress bars double as the slide timer */
.hud {
    position: absolute; z-index: 5;
    left: var(--gutter); right: calc(50% + 28px); bottom: 26px;
    display: flex; align-items: center; gap: 14px;
    transition: right .75s cubic-bezier(.22, .61, .36, 1);
}
.site.login-open .hud { right: var(--gutter); }
.segs { flex: 1; display: flex; gap: 8px; max-width: 760px; }
.seg {
    flex: 1; height: 24px; padding: 0;
    display: flex; align-items: center;
    background: transparent; border: 0; cursor: pointer;
}
.seg b {
    position: relative; display: block; width: 100%; height: 3px;
    background: rgba(255,255,255,.25); border-radius: 2px; overflow: hidden;
}
.seg i { position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(0); }
.seg.done i { transform: scaleX(1); }
.seg[aria-current="true"] i { animation: fill var(--dur) linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }
.showcase.is-paused .seg[aria-current="true"] i { animation-play-state: paused; }

.pause {
    flex: none;
    width: 32px; height: 32px;
    display: grid; place-items: center;
    padding: 0;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 50%;
    cursor: pointer;
}
.pause:hover { background: rgba(255,255,255,.12); }
.showcase button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,.55); border-color: #fff; }

/* ---------- Sign-in page: slides in from the upper-right corner ---------- */
.scrim {
    position: absolute; inset: 0; z-index: 20;
    background: rgba(12, 22, 32, .5);
    opacity: 0; visibility: hidden;
    transition: opacity .5s ease, visibility 0s linear .5s;
}
.scrim.open { opacity: 1; visibility: visible; transition: opacity .5s ease, visibility 0s; }

.login-panel {
    position: absolute; top: 0; right: 0; bottom: 0; z-index: 30;
    width: var(--panel-w);
    display: flex; flex-direction: column;
    padding: 24px clamp(24px, 3.5vw, 52px);
    overflow-y: auto;
    background: var(--paper);
    box-shadow: -28px 28px 70px rgba(0,0,0,.35);
    transform: translate3d(100%, -100%, 0);      /* parked beyond the top-right corner */
    visibility: hidden;
    transition: transform .75s cubic-bezier(.22, .61, .36, 1), visibility 0s linear .75s;
}
.login-panel.open { transform: none; visibility: visible;
    transition: transform .75s cubic-bezier(.22, .61, .36, 1), visibility 0s; }

.panel-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.login-panel .brand { color: var(--ink); }
.close-panel {
    flex: none;
    width: 40px; height: 40px;
    display: grid; place-items: center;
    padding: 0;
    color: var(--steel);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
}
.close-panel:hover { border-color: #8a97a4; }

.login-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 0; }
.card {
    width: 100%;
    max-width: 400px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 36px 32px;
    box-shadow: 0 1px 2px rgba(22, 34, 46, .06);
}
.card h2 { margin: 0 0 4px; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; }
.sub { margin: 0 0 24px; color: var(--muted); font-size: .95rem; }
.foot { margin: 0; font-size: .8rem; color: var(--muted); }

.field { margin-bottom: 18px; }
label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: 6px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.label-row a { font-size: .85rem; color: var(--blue); text-decoration: none; }
.label-row a:hover { text-decoration: underline; }

input[type="text"], input[type="password"] {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    font: inherit;
    color: var(--ink);
    background: var(--white);
    border: 1px solid #b8c1ca;
    border-radius: 6px;
    transition: border-color .15s, box-shadow .15s;
}
input:hover { border-color: #8a97a4; }
.login-panel input:focus-visible, .login-panel button:focus-visible, .login-panel a:focus-visible {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(29, 95, 191, .25);
}

.pw { position: relative; }
.pw input { padding-right: 64px; }
.toggle {
    position: absolute; top: 50%; right: 6px;
    transform: translateY(-50%);
    height: 32px; padding: 0 10px;
    font: inherit; font-size: .85rem; font-weight: 500;
    color: var(--blue);
    background: transparent;
    border: 0; border-radius: 4px;
    cursor: pointer;
}
.toggle:hover { background: #eef3fb; }

.submit {
    width: 100%;
    height: 46px;
    margin-top: 6px;
    font: inherit; font-weight: 600;
    color: var(--white);
    background: var(--blue);
    border: 0; border-radius: 6px;
    cursor: pointer;
    transition: background .15s;
}
.submit:hover { background: var(--blue-dark); }

.alert {
    display: flex; justify-content: space-between; gap: 12px;
    margin-bottom: 20px;
    padding: 12px 14px;
    font-size: .9rem;
    color: var(--danger-ink);
    background: var(--danger-bg);
    border: 1px solid var(--danger-line);
    border-radius: 6px;
}
.alert .close {
    flex: none;
    width: 24px; height: 24px;
    padding: 0;
    font-size: 1.2rem; line-height: 1;
    color: inherit;
    background: transparent;
    border: 0; border-radius: 4px;
    cursor: pointer;
}

/* ---------- Desktop: the slideshow makes room for the sign-in page ---------- */
@media (min-width: 861px) {
    .showcase, .topbar { transition: right .75s cubic-bezier(.22, .61, .36, 1); }
    .site.login-open .showcase,
    .site.login-open .topbar { right: var(--panel-w); }
    .site.login-open .signin-btn { opacity: 0; pointer-events: none; }
    .scrim { display: none; }
    .login-panel { box-shadow: -12px 0 40px rgba(0,0,0,.18); }
}
.site.no-anim, .site.no-anim * { transition: none !important; }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
    .login-panel { width: 100%; box-shadow: none; padding: 20px; }
    .photo { top: 0; left: 0; right: 0; bottom: auto; width: 100%; height: 42%; box-shadow: none; }
    .shade-edge { background: linear-gradient(180deg, rgba(12,22,32,.5), transparent 35%), linear-gradient(0deg, rgba(12,22,32,.45), transparent 30%); }
    @media (max-width: 420px) {
    .card { padding: 28px 20px; border-radius: 6px; }
}

/* Reduced motion: crossfades only, no sliding, floating or mouse parallax */
@media (prefers-reduced-motion: reduce) {
    .slide, .slide.active, .slide.leaving { --shift: 0px !important; }
    .layer { transition: opacity .6s ease; }
    .kb, .ph-art, .ph-img, .ph-art .scan { animation: none; }
    .photo, .pshift, .shade { transition: none; }
    .pshift { transform: none; }
    .par { transform: none; transition: none; }
    .login-panel { transform: none; opacity: 0; transition: opacity .3s ease, visibility 0s linear .3s; }
    .login-panel.open { opacity: 1; transition: opacity .3s ease, visibility 0s; }
}
