/* CIRCUIT sign-in — one continuous scene, scoped to the login page */
.login-body{background:#0d0907}
.jj-login-page{--jj-text:#f2eee7;--jj-muted:#c1b5a9;--jj-accent:#ff8200;--jj-atmosphere-position:center 65%;position:relative;isolation:isolate;color-scheme:dark;min-height:100svh;width:100%;margin:0;padding:clamp(20px,4vw,64px);display:grid;place-items:center;color:var(--jj-text);background:#0d0907;font-family:Jost,"Helvetica Neue",Arial,sans-serif;box-sizing:border-box}
.jj-login-page::before,.jj-login-page::after{content:"";position:absolute;inset:0;pointer-events:none}
.jj-login-page::before{z-index:-3;background:url('/brand/login-atmosphere-v1.jpg') var(--jj-atmosphere-position)/cover no-repeat}
.jj-login-page::after{z-index:-1;background:linear-gradient(90deg,#0c090725,transparent 44%,#0c09072e),linear-gradient(180deg,#09070618,transparent 70%,#08060545)}
.jj-login-page *{box-sizing:border-box}

.jj-login-reflection,
.jj-login-fog {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
  overflow: clip;
  mix-blend-mode: screen;
}

/* Follow the floor horizon as the backdrop crops to fit wider screens. */
.jj-login-reflection {
  --jj-floor-line: max(75%, calc(65% + 6.25vw));
  --jj-floor-mask: linear-gradient(transparent var(--jj-floor-line), #000 calc(var(--jj-floor-line) + 7%));
  -webkit-mask-image: var(--jj-floor-mask);
  mask-image: var(--jj-floor-mask);
}
@media (prefers-reduced-motion: no-preference) {
  .jj-login-reflection::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 23% 15% at 41% 89%, #f88b4b3d, transparent 96%),
      url('/brand/login-atmosphere-v1.jpg') var(--jj-atmosphere-position) / cover no-repeat;
    -webkit-mask-image: radial-gradient(ellipse 24% 20% at 41% 89%, #000 8%, #000c 43%, transparent 100%);
    mask-image: radial-gradient(ellipse 24% 20% at 41% 89%, #000 8%, #000c 43%, transparent 100%);
    animation: circuit-floor-sweep 11s linear -1.2s infinite;
  }
  /* Reuse the upper smoke texture while the floor stays anchored in the base image. */
  .jj-login-fog::before,
  .jj-login-fog::after {
    content: "";
    position: absolute;
    background: url('/brand/login-atmosphere-v1.jpg') left top / 195% 155% no-repeat;
    -webkit-mask-image: radial-gradient(ellipse 49% 48% at 50% 50%, #000 15%, #000c 48%, transparent 100%);
    mask-image: radial-gradient(ellipse 49% 48% at 50% 50%, #000 15%, #000c 48%, transparent 100%);
  }
  .jj-login-fog::before {
    inset: -7% 26% 25% -13%;
    animation: circuit-fog-rise 16s ease-in-out -4s infinite;
  }
  .jj-login-fog::after {
    inset: -9% -13% 32% 42%;
    background-position: right top;
    animation: circuit-fog-return 23s ease-in-out -9s infinite;
  }
  @media (max-width: 760px) {
    .jj-login-fog::before { inset: -7% 10% 53% -27%; }
    .jj-login-fog::after { inset: -6% -28% 49% 25%; }
  }
}
@keyframes circuit-floor-sweep {
  0% { transform: translate3d(-30%, 0, 0); opacity: 0; }
  12% { opacity: .39; }
  30% { opacity: .86; }
  47% { opacity: .63; }
  73%, 100% { transform: translate3d(40%, 0, 0); opacity: 0; }
}
@keyframes circuit-fog-rise {
  0%, 100% { transform: translate3d(-10%, 12%, 0) rotate(8deg) scale(.96); opacity: .42; }
  50% { transform: translate3d(17%, -10%, 0) rotate(-8deg) scale(1.1); opacity: .76; }
}
@keyframes circuit-fog-return {
  0%, 100% { transform: translate3d(12%, -11%, 0) rotate(-8deg) scale(1.02); opacity: .28; }
  50% { transform: translate3d(-14%, 13%, 0) rotate(9deg) scale(1.12); opacity: .65; }
}

.jj-login-shell{width:min(1240px,100%);min-width:0;display:grid;grid-template-columns:minmax(0,1.18fr) minmax(0,.82fr);align-items:center;gap:clamp(28px,5vw,72px)}
.jj-login-art{display:grid;min-width:0;justify-items:center;gap:clamp(12px,1.7vw,24px)}
.jj-login-art-image{position:relative;width:min(100%,clamp(260px,63dvh,520px));aspect-ratio:1}
.jj-login-name{width:clamp(240px,30vw,320px);max-width:100%;margin:0}
.jj-login-name img{display:block;width:100%;height:auto}
.jj-login-sign-in{display:grid;min-width:0;gap:12px}
.jj-login-brand{justify-self:center}
.jj-login-brand img{display:block;width:116px;max-width:100%;height:auto;filter:drop-shadow(0 2px 8px #0009)}
.jj-login-panel{min-width:0;padding:clamp(30px,3.7vw,48px);border:1px solid #b88b624d;border-radius:12px;background:#17110de8;background:linear-gradient(145deg,#241a14dc,#100d0be8);box-shadow:0 24px 70px #0006,inset 0 1px #f9c39812;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}
.jj-login-content{width:100%;max-width:360px;margin:auto}
.jj-login-heading{text-transform:none;margin:0;color:#f7f0e8;font-size:clamp(28px,3vw,34px);line-height:1.14;font-weight:500;letter-spacing:-.025em}
.jj-login-description{margin:14px 0 30px;color:var(--jj-muted);font-size:14px;line-height:1.6;font-weight:400}
.jj-login-form{display:grid;gap:12px;width:100%;margin:0}
.jj-login-page .jj-login-label{display:grid;gap:10px;color:#e0d3c5;font-size:12px;font-weight:500;line-height:1.4;letter-spacing:.025em}
.jj-login-page .jj-login-input{width:100%;min-width:0;height:54px;border:1px solid #a28b74;border-radius:5px;background:#0c0907c9;color:#fff4e8;padding:0 15px;font-family:inherit;font-size:16px;line-height:1.4;transition:border-color .2s,box-shadow .2s}
.jj-login-page .jj-login-input::placeholder{color:#b4a394;opacity:1}
.jj-login-page .jj-login-input:focus{outline:2px solid #ff9a35;outline-offset:3px;border-color:#ff9a35}
.jj-login-page .jj-login-submit{width:100%;min-height:54px;padding:13px 18px;border:1px solid #ff9a35;border-radius:5px;background:linear-gradient(135deg,#ff971f,#ef7215);color:#170c03;display:flex;align-items:center;justify-content:center;font-family:inherit;font-size:15px;font-weight:700;line-height:1.4;cursor:pointer;box-shadow:0 5px 24px #e36b1226,inset 0 1px #ffc07c80;transition:background .18s,transform .18s}
.jj-login-page .jj-login-submit:hover{background:linear-gradient(135deg,#ffac49,#ff8a29)}
.jj-login-page .jj-login-submit:active{transform:translateY(1px)}
.jj-login-page .jj-login-submit:disabled{background:#493529;color:#b5a496;border-color:#614733;cursor:wait;transform:none;box-shadow:none}
.jj-login-page :is(button,a):focus-visible{outline:2px solid #ffb565;outline-offset:4px}
.jj-login-error{color:#ffb58f;font-size:13px;line-height:1.5;margin:0 0 16px}
.jj-login-page .jj-login-error:empty{display:none}
.jj-login-page [hidden]{display:none!important}
@media(min-width:761px) and (max-width:1000px){
 .jj-login-shell{gap:24px;grid-template-columns:minmax(0,1fr) minmax(0,.9fr)}
 .jj-login-panel{padding:32px 26px}
}
@media(max-width:760px){
 .jj-login-page{display:block;--jj-atmosphere-position:48% center}
 .jj-login-reflection{--jj-floor-line:max(75%,calc(50% + 14.5vw))}
 .jj-login-page::after{background:linear-gradient(180deg,#0c090715,transparent 35%,#0c090755)}
 .jj-login-shell{grid-template-columns:minmax(0,1fr);gap:14px;width:100%;max-width:480px;margin:0 auto}
 .jj-login-art{gap:8px}
 .jj-login-art-image{width:min(100%,clamp(142px,32dvh,224px),55vw)}
 .jj-login-name{width:clamp(164px,50vw,215px)}
 .jj-login-panel{padding:24px;border-radius:10px}
 .jj-login-content{max-width:440px}
 .jj-login-heading{font-size:28px}
 .jj-login-description{margin:8px 0 20px}
}
@media(max-width:360px){
 .jj-login-shell{gap:12px}
 .jj-login-panel{padding:21px 20px}
}
@media(prefers-reduced-motion:reduce){.jj-login-page *,.jj-login-page *::before,.jj-login-page *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Let the login scene paint edge to edge while controls respect device insets. */
.jj-login-page{--jj-edge-space:clamp(20px,4vw,64px);--jj-bottom-space:var(--jj-edge-space);min-height:100dvh;padding-top:max(var(--jj-edge-space),env(safe-area-inset-top,0px));padding-right:max(var(--jj-edge-space),env(safe-area-inset-right,0px));padding-bottom:max(var(--jj-bottom-space),env(safe-area-inset-bottom,0px));padding-left:max(var(--jj-edge-space),env(safe-area-inset-left,0px))}
@media(max-width:760px){.jj-login-page{--jj-edge-space:20px;--jj-bottom-space:32px}}
@media(max-width:360px){.jj-login-page{--jj-edge-space:16px;--jj-bottom-space:28px}}
@media(orientation:landscape) and (min-width:568px) and (max-height:520px){
 .jj-login-page{--jj-edge-space:12px;--jj-bottom-space:12px;display:grid}
 .jj-login-shell{grid-template-columns:minmax(0,1fr) minmax(0,1.16fr);gap:20px;max-width:900px}
 .jj-login-art{gap:6px}
 .jj-login-name{width:clamp(150px,24vw,210px)}
 .jj-login-art-image{width:min(100%,clamp(128px,calc(100dvh - 86px),320px))}
 .jj-login-sign-in{gap:8px}
 .jj-login-panel{padding:16px 20px}
 .jj-login-heading{font-size:25px}
 .jj-login-description{margin:6px 0 14px}
 .jj-login-form{gap:8px}
 .jj-login-page .jj-login-input,.jj-login-page .jj-login-submit{min-height:48px;height:48px}
 .jj-login-brand img{width:98px}
}
