/* Periscope login — "Variant C3" design.
   Self-contained: this page does not load bootstrap or common_template.css. */

@font-face {
    font-family: 'Inter Tight';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/inter-tight-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Inter Tight';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/inter-tight-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --navy: #3a4766;
    --navy-d: #2c3753;
    --navy-dd: #232c43;
    --navy-l: #5a6c95;
    --sage: #81b29a;
    --cream: #f4f1de;
    --sand: #f2cc8f;
    --terra: #e07a5f;
    --ink: #1f2433;
}

* {
    box-sizing: border-box;
    margin: 0;
}

html {
    height: 100%;
}

body {
    min-height: 100%;
    font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ink);
    background: #fff;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--navy);
    text-decoration: none;
}

a:hover {
    color: var(--navy-d);
}

/* Conditional blocks (error banners, field errors) ship hidden and are revealed by
   JS. !important because component rules below set display explicitly, which would
   otherwise beat the UA stylesheet's [hidden] { display: none }. */
[hidden] {
    display: none !important;
}

/* ===== stage ===== */
.scene {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    overflow: hidden;
}

.dots {
    position: absolute;
    inset: -40px;
    pointer-events: none;
    background-image: radial-gradient(circle, #e4e5e8 1.4px, transparent 1.7px);
    background-size: 36px 36px;
    -webkit-mask-image: radial-gradient(120% 90% at 50% 42%, #000 40%, transparent 100%);
    mask-image: radial-gradient(120% 90% at 50% 42%, #000 40%, transparent 100%);
}

/* ===== floating sheet ===== */
.sheet {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: min(1200px, 100%);
    min-height: min(700px, calc(100dvh - 160px));
    border-radius: 26px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 60px 120px rgba(58, 71, 102, .30), 0 10px 28px rgba(58, 71, 102, .10), 0 0 0 1px rgba(58, 71, 102, .06);
    animation: rise .9s .1s ease both;
}

/* left panel — hero */
.panel {
    position: relative;
    overflow: hidden;
    background: #fff;
}

.panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, #e9eaed 1.3px, transparent 1.6px);
    background-size: 32px 32px;
    -webkit-mask-image: radial-gradient(90% 85% at 45% 45%, #000 30%, transparent 100%);
    mask-image: radial-gradient(90% 85% at 45% 45%, #000 30%, transparent 100%);
}

.lockup {
    position: absolute;
    left: 38px;
    top: 36px;
    z-index: 5;
    animation: rise .7s .3s ease both;
}

.lockup img {
    height: 50px;
    display: block;
}

/* Centred to sit under the centred hero, so the two read as one block. */
.strap {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    bottom: 30px;
    z-index: 5;
    font-size: 11.5px;
    letter-spacing: .24em;
    color: var(--navy-l);
    animation: rise .7s .5s ease both;
}

.strap b {
    font-weight: 400;
    padding: 0 7px;
    color: var(--sage);
}

/* Centred on the panel so the pin sits where the panel's diagonals cross and on the
   same vertical as the LOCATE | ANALYSE | GROW strap.
   --pin-axis-offset: the artwork is not symmetric — the teardrop's axis is ~10% left
   of the image's own centre because the hex overlay spills to the right. Centring the
   image box would therefore leave the *pin* left of centre, so shift it right by that
   much. The value is a % of the image's own width, so it holds at any size.
   Sized off panel height (not fixed px) so the feathered edges stay inside the panel. */
.pin-holder {
    --pin-axis-offset: 10%;
    position: absolute;
    left: 50%;
    top: 50%;
    height: 83.3%;
    z-index: 1;
    aspect-ratio: 702 / 706;
    /* Once shifted by --pin-axis-offset the image reaches 0.5 + 0.5 + 0.1 = 1.1 half-widths
       past panel centre, so it only fits while width <= panel/1.2. Any wider and the right
       edge is clipped by the divider past the mask's feather — a hard vertical cut. */
    max-width: 83.3%;
    animation: pinin 1s .25s ease both;
    transform: translate(calc(-50% + var(--pin-axis-offset)), -50%);
}

.pin-holder img {
    width: 100%;
    height: 100%;
    display: block;
    /* Guard: if max-width clamps the box, letterbox rather than distort the map. */
    object-fit: contain;
    /* No drop-shadow: the artwork is a rectangular map tile, so a shadow draws a
       rectangle around it on the white panel. The edges instead fade out over a wide
       band (percentages, so it scales) — the map dissolves into the panel rather than
       ending on a visible border. */
    /* Fade stops short of the pin, which occupies 11.5-67.7% across and 10.3-73.7%
       down the artwork — any wider and the teardrop itself starts dissolving. */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%), linear-gradient(0deg, transparent 0, #000 9%, #000 91%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%), linear-gradient(0deg, transparent 0, #000 9%, #000 91%, transparent 100%);
    mask-composite: intersect;
}

/* right panel — form */
.formside {
    position: relative;
    display: flex;
    align-items: center;
    background: linear-gradient(165deg, #46557e 0%, var(--navy) 42%, var(--navy-dd) 100%);
}

.formbox {
    width: 100%;
    padding: 40px 84px 40px 44px;
}

.formbox h1 {
    font-size: 27px;
    font-weight: 600;
    letter-spacing: -.01em;
    color: #fff;
    margin: 0 0 30px;
    animation: rise .6s .5s ease both;
}

.formbox h1 sup {
    font-size: 20px;
    font-weight: 500;
    opacity: 1;
    margin-left: 4px;
    vertical-align: top;
    line-height: 1.1;
    position: relative;
    top: 1px;
}

/* Supporting copy under a heading. The negative top margin is the design's
   h1-to-message spacing, so it only applies in that position — otherwise stacked
   messages (and messages after an error banner) collide. */
.msg {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(244, 241, 222, .75);
    margin: 0 0 20px;
    text-wrap: pretty;
    animation: rise .6s .45s ease both;
}

.formbox h1 + .msg {
    margin-top: -16px;
    margin-bottom: 28px;
}

.msg b {
    color: var(--cream);
    font-weight: 600;
}

form {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

/* form-level error */
.formerror {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(224, 122, 95, .16);
    border: 1px solid rgba(224, 122, 95, .55);
    color: #ffd9cf;
    font-size: 13.5px;
    line-height: 1.45;
    animation: rise .4s ease both;
}

/* Inside <form> the flex `gap` spaces this; sitting directly in .formbox (the
   expired-link page puts it above the form) it has to space itself. */
.formbox > .formerror {
    margin-bottom: 26px;
}

.formerror::before {
    content: "!";
    flex: 0 0 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--terra);
    color: #2a1a15;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

/* underline fields */
.ufld {
    position: relative;
    animation: rise .6s .7s ease both;
}

.ufld + .ufld {
    animation-delay: .78s;
}

/* --fld-pad keeps the label, the value and any error message on one left edge.
   The value needs the inset most: browser autofill paints a filled box behind it,
   and with no padding the text sits hard against that box's edge. */
.ufld {
    --fld-pad: 10px;
}

.ufld label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    color: rgba(244, 241, 222, .65);
    margin-bottom: 2px;
    padding-left: var(--fld-pad);
    transition: color .2s;
}

.ufld:focus-within label {
    color: var(--sage);
}

.ufld input {
    width: 100%;
    height: 40px;
    border: 0;
    border-bottom: 1.5px solid rgba(255, 255, 255, .28);
    padding: 0 36px 0 var(--fld-pad);
    font: inherit;
    font-size: 15px;
    color: #fff;
    outline: none;
    /* The focus underline is the input's own background, not a .ufld::after — the
       field error message also lives in .ufld and would push a ::after below it. */
    background: transparent linear-gradient(90deg, var(--sage), var(--sand), var(--terra)) left bottom / 0 2px no-repeat;
    transition: background-size .35s ease;
}

.ufld input::placeholder {
    color: rgba(244, 241, 222, .38);
}

/* keep the dark field look when the browser autofills */
.ufld input:-webkit-autofill,
.ufld input:-webkit-autofill:hover,
.ufld input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
    transition: background-color 100000s ease 0s, background-size .35s ease;
}

.ufld:focus-within input {
    background-size: 100% 2px;
}

.ufld input:focus-visible {
    outline: none;
}

.fielderror {
    display: block;
    margin-top: 6px;
    padding-left: var(--fld-pad);
    font-size: 12.5px;
    font-weight: 500;
    color: #ffb4a0;
}

/* Edge paints its own reveal button inside a focused password field that has
   content, so it lands right next to ours and the field shows two eyes. Once
   our toggle swaps the input to type="text" Edge offers a clear "x" in the same
   spot instead, so both pseudo-elements have to go. Scoped to .ufld rather than
   input[type=password] so the rule still applies in the revealed state. */
.ufld input::-ms-reveal {
    display: none;
}

.ufld input::-ms-clear {
    display: none;
}

.eye {
    position: absolute;
    right: 0;
    bottom: 4px;
    width: 32px;
    height: 32px;
    border: 0;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.eye:hover {
    background: rgba(255, 255, 255, .12);
}

.eye:focus-visible {
    outline: 2px solid var(--sage);
    outline-offset: 2px;
}

.eye i {
    width: 18px;
    height: 18px;
    display: block;
    background: rgba(244, 241, 222, .75);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 8s2.3-4 6.5-4 6.5 4 6.5 4-2.3 4-6.5 4S1.5 8 1.5 8z'/%3E%3Ccircle cx='8' cy='8' r='2'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 8s2.3-4 6.5-4 6.5 4 6.5 4-2.3 4-6.5 4S1.5 8 1.5 8z'/%3E%3Ccircle cx='8' cy='8' r='2'/%3E%3C/svg%3E") center/contain no-repeat;
}

.eye[aria-pressed="true"] i {
    background: var(--sage);
}

.rowlinks {
    display: flex;
    justify-content: flex-end;
    margin-top: -14px;
    animation: rise .6s .82s ease both;
}

.rowlinks a {
    font-size: 13px;
    font-weight: 500;
    color: var(--sand);
}

.rowlinks a:hover {
    color: #f6dcae;
    text-decoration: underline;
}

.btn {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 12px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(150deg, #93c3aa, var(--sage) 45%, #699e85);
    color: #1d2739;
    transition: transform .15s, box-shadow .2s;
    animation: rise .6s .9s ease both;
}

/* The tenant-scoped Login button and the "Return to password reset" link are
   anchors carrying .btn, and the base `a:hover` rule (0,1,1) outranks `.btn`
   (0,1,0), so their label would shift colour on hover while real <button>
   .btn labels stayed put. Pin it here, where the specificity wins. */
.btn:hover {
    color: #1d2739;
    box-shadow: 0 12px 26px rgba(18, 26, 42, .45);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0) scale(.985);
}

.btn:focus-visible {
    outline: 2px solid var(--sand);
    outline-offset: 3px;
}

.btn::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -70%;
    width: 50%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: skewX(-20deg);
    transition: left .5s ease;
}

.btn:hover::after {
    left: 120%;
}

/* filter, not opacity: the `rise` entrance animation animates opacity with
   fill:both, which would override a plain `opacity` declaration here. */
.btn:disabled {
    filter: opacity(.42);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn:disabled::after { display: none; }

.btn.ghost {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, .32);
    color: var(--cream);
}

.btn.ghost:hover {
    border-color: rgba(255, 255, 255, .6);
    background: rgba(255, 255, 255, .07);
    box-shadow: none;
}

.btnrow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    animation: rise .6s .78s ease both;
}

.btnrow .btn { animation: none; }

/* Secondary row: resend link, alternate action */
.aux {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: -8px;
    animation: rise .6s .68s ease both;
}

.aux a {
    font-size: 13px;
    font-weight: 500;
    color: var(--sand);
}

.aux a:hover {
    color: #f6dcae;
    text-decoration: underline;
}

.aux .alt { color: rgba(244, 241, 222, .6); }
.aux .alt:hover { color: var(--cream); }

/* A real <button> that reads as a link (resend code stays a button so it can
   carry the countdown disabled state and never submits the form). */
.aux .linkbtn {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--sand);
    cursor: pointer;
}

.aux .linkbtn:hover:not(:disabled) {
    color: #f6dcae;
    text-decoration: underline;
}

.aux .linkbtn:disabled {
    color: rgba(244, 241, 222, .38);
    cursor: default;
}

/* One-time-code boxes */
.otp {
    display: flex;
    gap: 10px;
    animation: rise .6s .55s ease both;
}

.otp input {
    width: 46px;
    height: 56px;
    text-align: center;
    font: inherit;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    caret-color: var(--sage);
    background: rgba(255, 255, 255, .06);
    border: 1.5px solid rgba(255, 255, 255, .28);
    border-radius: 12px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.otp input:focus {
    border-color: var(--sage);
    box-shadow: 0 0 0 3px rgba(129, 178, 154, .22);
}

/* Checkbox */
.chk {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(244, 241, 222, .75);
    cursor: pointer;
    user-select: none;
    animation: rise .6s .62s ease both;
}

.chk input {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(255, 255, 255, .35);
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
    display: grid;
    place-items: center;
    margin: 0;
    flex: none;
    transition: background .15s, border-color .15s;
}

.chk input:checked {
    background: var(--sage);
    border-color: var(--sage);
}

.chk input:checked::after {
    content: "";
    width: 9px;
    height: 5px;
    border-left: 2px solid #1d2739;
    border-bottom: 2px solid #1d2739;
    transform: rotate(-45deg) translate(.5px, -.5px);
}

.chk input:focus-visible {
    outline: 2px solid var(--sage);
    outline-offset: 2px;
}

/* Password-strength checklist */
.rules {
    list-style: none;
    padding: 0;
    margin: -6px 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px 18px;
    animation: rise .6s .75s ease both;
}

.rules li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(244, 241, 222, .5);
    transition: color .2s;
}

.rules li i {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .3);
    display: grid;
    place-items: center;
    flex: none;
    transition: background .2s, border-color .2s;
}

.rules li.ok { color: rgba(244, 241, 222, .92); }

.rules li.ok i {
    background: var(--sage);
    border-color: var(--sage);
}

.rules li.ok i::after {
    content: "";
    width: 6px;
    height: 3.5px;
    border-left: 1.5px solid #1d2739;
    border-bottom: 1.5px solid #1d2739;
    transform: rotate(-45deg) translateY(-.5px);
}

/* Technical detail line (request id, status) */
.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11.5px;
    letter-spacing: .03em;
    color: rgba(244, 241, 222, .45);
    animation: rise .6s .95s ease both;
    overflow-wrap: anywhere;
}

.card-foot {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .15);
    font-size: 13px;
    color: rgba(244, 241, 222, .65);
    text-align: center;
    animation: rise .6s 1s ease both;
}

.card-foot a {
    color: var(--sand);
    font-weight: 600;
}

.card-foot a:hover {
    color: #f6dcae;
    text-decoration: underline;
}

.ripple {
    position: absolute;
    z-index: 9;
    pointer-events: none;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    animation: rip .9s ease-out both;
}

/* ===== page chrome ===== */
.base-foot {
    position: relative;
    z-index: 8;
    flex: 0 0 auto;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 10px 48px;
    background: rgba(255, 255, 255, .85);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-top: 1px solid #e4e5e8;
    animation: riseBar .8s .6s ease both;
}

.base-foot .fine {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 11.5px;
    color: #9aa0a8;
}

.base-foot .fine a {
    color: #9aa0a8;
}

.base-foot .fine a:hover {
    color: var(--navy);
}

.base-foot .fine a.site {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--navy);
}

.base-foot .fine a.site:hover {
    color: var(--navy-dd);
    text-decoration: underline;
}

.base-foot .fine .dot {
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #c9ccd2;
    flex: none;
}

/* browser support notice — className is set by login.js */
.browser-warning {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 10px 20px;
    background: var(--sand);
    color: #3a2f16;
    border-bottom: 1px solid #e0b871;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

.browser-warning a {
    color: #2c3753;
    font-weight: 600;
    text-decoration: underline;
}

/* These use the independent `translate` property, not `transform`. An animation with
   fill:both permanently overrides the animated property, so animating `transform`
   here would clobber the centring and parallax transforms on .sheet/.pin-holder/.strap. */
@keyframes rise {
    from { opacity: 0; translate: 0 16px; }
    to { opacity: 1; translate: 0 0; }
}

@keyframes riseBar {
    from { opacity: 0; translate: 0 16px; }
    to { opacity: 1; translate: 0 0; }
}

@keyframes pinin {
    from { opacity: 0; translate: 0 14px; }
    to { opacity: 1; translate: 0 0; }
}

@keyframes rip {
    from { transform: scale(.2); opacity: .6; }
    to { transform: scale(2.6); opacity: 0; }
}

/* ===== responsive ===== */
@media (max-width: 1100px) {
    .formbox { padding: 40px 48px 40px 36px; }
    .pin-holder { top: 128px; }
}

@media (max-width: 900px) {
    .scene { padding: 24px 16px; }
    .sheet { grid-template-columns: 1fr; min-height: 0; border-radius: 20px; }
    .panel { display: none; }
    .formside { min-height: 520px; }
    .formbox { padding: 72px 32px 40px; }
    /* match the narrower formbox padding, and leave the form room below */
    /* Six 46px boxes + gaps overflow a 375px screen once padding is taken off. */
    .otp { gap: 6px; }
    .otp input { width: 100%; min-width: 0; height: 52px; font-size: 20px; }
    .rules { grid-template-columns: 1fr; }
    .aux { flex-direction: column; align-items: flex-start; gap: 8px; }
    .btnrow { grid-template-columns: 1fr; }
    .base-foot { flex-direction: column; gap: 6px; padding: 14px 20px; }
    .base-foot .fine { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: .01s !important;
        animation-iteration-count: 1 !important;
        transition: none !important;
    }

    /* Zero the parallax inputs rather than clearing transform — the hero and strap
       rely on transform for their centring. (The JS also never sets these here.) */
    :root { --px: 0 !important; --py: 0 !important; }
}
