/* ============================================================
   sg-login.css  —  Login page layout
   QNC Design System · Issue Tracker
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }
body {
    font-family: 'DM Sans', sans-serif;
    background: #F5F3EF;
    min-height: 100vh;
}

.lp-split {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Brand panel sits on the right; form panel on the left */
.lp-brand { order: 2; }
.lp-form-panel { order: 1; }

/* === Left brand panel (animated, decorative) ===
   Layer stack (back -> front):
     .lp-brand        base ink fill + cursor CSS vars (--lp-mx / --lp-my, 0..1)
     .lp-grid         animated geometric grid (pulse + shimmer)
     .lp-shapes       layered diagonal shapes (drift + parallax)
     .lp-sweep        diagonal light band raking across on a loop
     .lp-spotlight    orange glow tracking the cursor
     .lp-vignette     edge darkening for depth
*/
.lp-brand {
    --lp-mx: 0.5;
    --lp-my: 0.5;
    flex: 1;
    min-width: 0;
    margin: 20px 20px 20px 16px;
    border-radius: 20px;
    background:
        radial-gradient(120% 80% at 30% 0%, #29251F 0%, #1C1A18 55%, #141210 100%);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    /* establish the 3D viewing frustum — fixed origin avoids warping;
       cursor tilt is handled by rotateX/rotateY on .lp-shapes instead */
    perspective: 1100px;
    perspective-origin: 50% 50%;
}

/* --- Animated geometric grid (tilts back in 3D) --- */
.lp-grid {
    position: absolute;
    inset: -28%;
    background-image:
        linear-gradient(rgba(124,120,102,0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124,120,102,0.16) 1px, transparent 1px);
    background-size: 46px 46px;
    transform-style: preserve-3d;
    /* pushed back on Z and tilted toward the cursor */
    transform:
        translateZ(-160px)
        rotateX(calc((var(--lp-my) - 0.5) * -10deg))
        rotateY(calc((var(--lp-mx) - 0.5) * 14deg));
    transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    z-index: 0;
}
.lp-grid::before {
    /* travelling shimmer band that lights up grid intersections */
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(234,148,34,0.42) 1px, transparent 1px),
        linear-gradient(90deg, rgba(234,148,34,0.42) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: linear-gradient(125deg, transparent 38%, #000 50%, transparent 62%);
    mask-image: linear-gradient(125deg, transparent 38%, #000 50%, transparent 62%);
    -webkit-mask-size: 280% 280%;
    mask-size: 280% 280%;
    animation: lp-grid-shimmer 7s linear infinite;
    pointer-events: none;
}
@keyframes lp-grid-shimmer {
    0%   { -webkit-mask-position: 140% 140%; mask-position: 140% 140%; }
    100% { -webkit-mask-position: -40% -40%; mask-position: -40% -40%; }
}

/* --- Layered 3D glass cubes ---
   .lp-shapes is the 3D stage that banks toward the cursor. Each
   .lp-cube-wrap positions a cube; .lp-cube spins continuously and is
   built from six .lp-face panels translated out to half the cube size,
   so the depth is genuine 3D geometry (not faked with gradients). --- */
.lp-shapes {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    transform-style: preserve-3d;
    /* the whole stage banks toward the cursor */
    transform:
        rotateX(calc((var(--lp-my) - 0.5) * 16deg))
        rotateY(calc((var(--lp-mx) - 0.5) * -22deg));
    transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.lp-cube-wrap {
    position: absolute;
    transform-style: preserve-3d;
}
.lp-cube-wrap--main {
    --cube: 188px;
    --edge: 234, 148, 34;   /* orange */
    top: 51%;
    left: 37%;
    transform: translateZ(35px) rotateZ(-7deg);
}
.lp-cube-wrap--mini {
    --cube: 104px;
    --edge: 155, 187, 79;   /* lime */
    top: 9%;
    left: 61%;
    transform: translateZ(125px) rotateZ(19deg);
}
.lp-cube-wrap--accent {
    --cube: 132px;
    --edge: 124, 120, 102;  /* taupe */
    top: 71%;
    left: 17%;
    transform: translateZ(-65px) rotateZ(-4deg);
}
.lp-cube-wrap--b1 {
    --cube: 80px;
    --edge: 155, 187, 79;   /* lime */
    top: 84%;
    left: 73%;
    transform: translateZ(88px) rotateZ(27deg);
}
.lp-cube-wrap--b2 {
    --cube: 100px;
    --edge: 234, 148, 34;   /* orange */
    top: 29%;
    left: 5%;
    transform: translateZ(-108px) rotateZ(-16deg);
}
.lp-cube-wrap--b3 {
    --cube: 90px;
    --edge: 124, 120, 102;  /* taupe */
    top: 3%;
    left: 28%;
    transform: translateZ(165px) rotateZ(11deg);
}

.lp-cube {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--cube);
    height: var(--cube);
    margin: calc(var(--cube) / -2) 0 0 calc(var(--cube) / -2);
    transform-style: preserve-3d;
    animation: lp-spin 26s linear infinite;
}
.lp-cube-wrap--mini .lp-cube   { animation: lp-spin-rev 18s linear infinite; }
.lp-cube-wrap--accent .lp-cube { animation: lp-spin 34s linear infinite reverse; }
.lp-cube-wrap--b1 .lp-cube     { animation: lp-spin-rev 14s linear infinite; }
.lp-cube-wrap--b2 .lp-cube     { animation: lp-spin 22s linear infinite; }
.lp-cube-wrap--b3 .lp-cube     { animation: lp-spin-rev 30s linear infinite reverse; }

.lp-face {
    position: absolute;
    inset: 0;
    border: 1.5px solid rgba(var(--edge), 0.6);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(var(--edge), 0.16), rgba(var(--edge), 0.02));
    box-shadow:
        inset 0 0 28px rgba(var(--edge), 0.22),
        0 0 18px rgba(var(--edge), 0.12);
    backface-visibility: visible;
}
.lp-face--front  { transform: translateZ(calc(var(--cube) / 2)); }
.lp-face--back   { transform: rotateY(180deg) translateZ(calc(var(--cube) / 2)); }
.lp-face--right  { transform: rotateY(90deg) translateZ(calc(var(--cube) / 2)); }
.lp-face--left   { transform: rotateY(-90deg) translateZ(calc(var(--cube) / 2)); }
.lp-face--top    { transform: rotateX(90deg) translateZ(calc(var(--cube) / 2)); }
.lp-face--bottom { transform: rotateX(-90deg) translateZ(calc(var(--cube) / 2)); }

@keyframes lp-spin {
    0%   { transform: rotateX(-22deg) rotateY(0deg); }
    100% { transform: rotateX(-22deg) rotateY(360deg); }
}
@keyframes lp-spin-rev {
    0%   { transform: rotateX(28deg) rotateZ(0deg) rotateY(360deg); }
    100% { transform: rotateX(28deg) rotateZ(360deg) rotateY(0deg); }
}

/* --- 3D rotating leaves ---
   Two-sided leaf shapes that spin on their long axis so both faces are
   revealed; they share the same 3D stage as the cubes. Three variants
   mirror the three cubes (size / colour / position / speed). --- */
.lp-leaf-wrap {
    position: absolute;
    transform-style: preserve-3d;
}
.lp-leaf-wrap--main {
    --leaf: 150px;
    --edge: 155, 187, 79;   /* lime */
    top: 41%;
    left: 79%;
    transform: translateZ(205px) rotateZ(32deg);
}
.lp-leaf-wrap--mini {
    --leaf: 92px;
    --edge: 234, 148, 34;   /* orange */
    top: 75%;
    left: 54%;
    transform: translateZ(-22px) rotateZ(-24deg);
}
.lp-leaf-wrap--accent {
    --leaf: 118px;
    --edge: 124, 120, 102;  /* taupe */
    top: 17%;
    left: 48%;
    transform: translateZ(-88px) rotateZ(44deg);
}
.lp-leaf-wrap--b1 {
    --leaf: 100px;
    --edge: 234, 148, 34;   /* orange */
    top: 59%;
    left: -3%;
    transform: translateZ(58px) rotateZ(-37deg);
}
.lp-leaf-wrap--b2 {
    --leaf: 76px;
    --edge: 124, 120, 102;  /* taupe */
    top: 91%;
    left: 43%;
    transform: translateZ(-128px) rotateZ(13deg);
}
.lp-leaf-wrap--b3 {
    --leaf: 128px;
    --edge: 155, 187, 79;   /* lime */
    top: 2%;
    left: 81%;
    transform: translateZ(112px) rotateZ(-51deg);
}
.lp-leaf {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--leaf);
    height: calc(var(--leaf) * 1.5);
    margin: calc(var(--leaf) * -0.75) 0 0 calc(var(--leaf) / -2);
    transform-style: preserve-3d;
    animation: lp-leaf-spin 16s linear infinite;
}
.lp-leaf-wrap--mini .lp-leaf   { animation-duration: 11s; animation-direction: reverse; }
.lp-leaf-wrap--accent .lp-leaf { animation-duration: 21s; }
.lp-leaf-wrap--b1 .lp-leaf     { animation-duration: 13s; animation-direction: reverse; }
.lp-leaf-wrap--b2 .lp-leaf     { animation-duration: 25s; }
.lp-leaf-wrap--b3 .lp-leaf     { animation-duration: 19s; animation-direction: reverse; }
.lp-leaf-face {
    position: absolute;
    inset: 0;
    /* classic leaf silhouette: pointed at top and bottom */
    border-radius: 0 100% 0 100%;
    border: 1.5px solid rgba(var(--edge), 0.65);
    background:
        radial-gradient(120% 90% at 30% 20%, rgba(var(--edge), 0.30), rgba(var(--edge), 0.04));
    box-shadow:
        inset 0 0 30px rgba(var(--edge), 0.28),
        0 0 22px rgba(var(--edge), 0.16);
    backface-visibility: hidden;
}
.lp-leaf-face--front { transform: rotateY(0deg) translateZ(0.5px); }
.lp-leaf-face--back  { transform: rotateY(180deg) translateZ(0.5px); }
.lp-leaf-vein {
    position: absolute;
    top: 8%;
    bottom: 8%;
    left: 50%;
    width: 1.5px;
    transform: translateX(-50%);
    background: linear-gradient(
        to bottom,
        rgba(var(--edge), 0) 0%,
        rgba(var(--edge), 0.8) 18%,
        rgba(var(--edge), 0.8) 82%,
        rgba(var(--edge), 0) 100%);
}
@keyframes lp-leaf-spin {
    0%   { transform: rotateZ(-18deg) rotateY(0deg); }
    100% { transform: rotateZ(-18deg) rotateY(360deg); }
}

/* --- Diagonal light sweep --- */
.lp-sweep {
    position: absolute;
    inset: -40%;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(
        125deg,
        transparent 42%,
        rgba(255,255,255,0.10) 49%,
        rgba(255,255,255,0.18) 50%,
        rgba(255,255,255,0.10) 51%,
        transparent 58%);
    background-size: 280% 280%;
    mix-blend-mode: screen;
    animation: lp-sweep 9s ease-in-out infinite;
}
@keyframes lp-sweep {
    0%   { background-position: 130% 130%; }
    55%  { background-position: -30% -30%; }
    100% { background-position: -30% -30%; }
}

/* --- Cursor-tracking spotlight --- */
.lp-spotlight {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    mix-blend-mode: screen;
    background: radial-gradient(
        260px circle at calc(var(--lp-mx) * 100%) calc(var(--lp-my) * 100%),
        rgba(234,148,34,0.28) 0%,
        rgba(234,148,34,0.10) 35%,
        transparent 70%);
    transition: background 120ms linear;
}

/* --- Edge vignette --- */
.lp-vignette {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    background: radial-gradient(130% 120% at 50% 40%, transparent 55%, rgba(0,0,0,0.45) 100%);
}

/* Logo lockup — mirrors the main app sidebar branding
   (mark on the left; QNC text logo stacked above "Issue Tracker"). */
.lp-logo-lockup {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.lp-logo-mark {
    display: block;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.lp-logo-stack {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.lp-logo-text {
    display: block;
    height: 16px;
    width: auto;
}

.lp-logo-product {
    font-family: 'Figtree', sans-serif;
    font-size: 1.1875rem;
    font-weight: 700;
    line-height: 1.3;
    color: #7C7866;
}

/* === Left form panel (light, logo pinned top, form content centered) === */
.lp-form-panel {
    position: relative;
    flex: 0 0 36%;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 48px 48px;
    background: #F5F3EF;
}

.lp-form-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 400px;
}

.lp-form-header {
    position: absolute;
    top: 20px;
    left: 48px;
}

.lp-form-card {
    background: transparent;
    border-radius: 0;
    padding: 0;
    width: 100%;
    box-shadow: none;
}

.lp-form-intro {
    flex-shrink: 0;
}

.lp-form-heading {
    font-family: 'Figtree', sans-serif;
    font-size: 2.3rem;
    font-weight: 700;
    color: #1C1A18;
    margin: 0 0 20px;
    line-height: 1.2;
}

.lp-form-sub {
    font-size: 0.875rem;
    color: #6E6A63;
    margin: 0;
    font-family: 'DM Sans', sans-serif;
}

.lp-form-card .lp-perm-notice {
    margin-top: 16px;
    margin-bottom: 0;
}

.lp-perm-notice {
    background: #F7EEEE;
    border: 1px solid rgba(143,61,64,0.2);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.8125rem;
    color: #793336;
    margin-bottom: 20px;
    line-height: 1.5;
    font-family: 'DM Sans', sans-serif;
}

/* Form field overrides for login card */
.lp-form-card .wide-inputs input[type="text"],
.lp-form-card .wide-inputs input[type="password"] {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1.5px solid #E3DED7;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: 'DM Sans', sans-serif;
    color: #1C1A18;
    background: #FFFFFF;
    transition: border-color 150ms ease, box-shadow 150ms ease;
    outline: none;
    box-sizing: border-box;
    display: block;
}
.lp-form-card .wide-inputs input[type="text"]:focus,
.lp-form-card .wide-inputs input[type="password"]:focus {
    border-color: #EA9422;
    box-shadow: 0 0 0 3px rgba(234,148,34,0.15);
}
.lp-form-card label b {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #4A4840;
    font-family: 'DM Sans', sans-serif;
}
.lp-form-card .block.tightlines { margin-bottom: 16px; }
.lp-form-card .limited-width-form { max-width: none; }
.lp-form-card .widget-row {
    display: flex;
    justify-content: flex-start;
}
.lp-form-card .widget-row button {
    width: auto;
    height: 40px;
    padding: 0 24px;
    background: #EA9422;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    margin-top: 4px;
    transition: background 150ms ease;
}
.lp-form-card .widget-row button:hover { background: #D18619; }

@media (max-width: 720px) {
    .lp-brand { display: none; }
    .lp-form-panel {
        flex: 1;
        padding: 32px 24px 48px;
    }
    .lp-form-header {
        top: 32px;
        left: 24px;
    }
    .lp-form-inner {
        width: 100%;
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lp-grid,
    .lp-grid::before,
    .lp-cube,
    .lp-cube-wrap--mini .lp-cube,
    .lp-cube-wrap--accent .lp-cube,
    .lp-cube-wrap--b1 .lp-cube,
    .lp-cube-wrap--b2 .lp-cube,
    .lp-cube-wrap--b3 .lp-cube,
    .lp-leaf,
    .lp-sweep {
        animation: none !important;
    }
    .lp-grid,
    .lp-shapes {
        transition: none !important;
        transform: none !important;
    }
    .lp-spotlight { display: none; }
}
