/* =====================================================================
   FCN — Sign-in and password-reset pages
   Standalone stylesheet: these pages do NOT load Bootstrap/MDB/jQuery,
   so nothing here can leak into (or be affected by) the rest of the app.
   Theme: California High-Speed Rail CP1, daybreak on site.
   ===================================================================== */

:root {
    --font-display: "Big Shoulders Display", "Impact", "Arial Narrow", sans-serif;
    --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
    --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;

    /* Sky, top to horizon */
    --sky-night: #06172d;
    --sky-deep: #0b2a4a;
    --sky-teal: #145c6b;
    --sky-aqua: #2a8f95;
    --dawn-gold: #f2b544;
    --dawn-peach: #ffc78a;
    --dawn-cream: #fff0cf;

    /* Accents */
    --gold: #f4a11d;
    --safety: #ff6a13;
    --amber-glow: #ffd68a;

    /* Structures */
    --concrete: #1b2434;
    --concrete-light: #2c3a4f;
    --ridge-far: #16375a;
    --ridge-near: #0f2740;
    --steel: #0a1421;
    --rail: #d5d9df;
    --tie: #22170f;

    /* Panel */
    --paper: #f8f3ea;
    --paper-deep: #efe6d6;
    --ink: #0f1828;
    --ink-soft: #4a5566;
    --ink-faint: #8a93a3;
    --line: #d9d0bf;
    --error: #b42318;
    --ok: #067647;

    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --ease-in: cubic-bezier(.7, 0, .84, 0);
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

.auth-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--sky-night);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* JV banner, full width across the top (as on the rest of the app) */
.topbar {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    animation: topbar-in .7s var(--ease-out) both;
}
.topbar-banner { display: block; max-width: 100%; height: auto; }
@keyframes topbar-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: none; }
}

.auth-stage {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(380px, 0.95fr);
}

/* =====================================================================
   SCENE: daybreak over the CP1 alignment
   ===================================================================== */
.scene {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
}

.scene-sky {
    position: absolute; inset: 0;
    background:
        radial-gradient(110% 60% at 24% 92%, rgba(255, 106, 19, .5) 0%, rgba(255, 106, 19, 0) 62%),
        linear-gradient(180deg,
            var(--sky-night) 0%,
            var(--sky-deep) 30%,
            var(--sky-teal) 55%,
            var(--sky-aqua) 70%,
            var(--dawn-gold) 84%,
            var(--dawn-peach) 94%,
            var(--dawn-cream) 100%);
    animation: sky-breathe 18s ease-in-out infinite alternate;
}
@keyframes sky-breathe {
    from { filter: saturate(1) brightness(1); }
    to   { filter: saturate(1.15) brightness(1.07); }
}

/* Sun, low on the left and rising */
.scene-sun {
    position: absolute;
    left: 24%; top: 66%;
    width: clamp(120px, 18vw, 240px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 42%, #fff8e6 0%, #ffd98a 38%, #ffab3c 66%, rgba(255, 106, 19, 0) 72%);
    filter: blur(1px);
    transform: translate(-50%, -50%);
    animation: sun-rise 40s ease-in-out infinite alternate;
    will-change: transform;
}
@keyframes sun-rise {
    from { transform: translate(-50%, -50%) translateY(2.5vh); }
    to   { transform: translate(-50%, -50%) translateY(-1.5vh); }
}

/* Last stars, fading as the sky lightens */
.scene-stars { position: absolute; inset: 0; }
.scene-stars i {
    position: absolute;
    left: var(--x); top: var(--y);
    width: 2px; height: 2px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px 1px rgba(255, 255, 255, .5);
    opacity: .15;
    animation: twinkle 3.6s ease-in-out infinite;
    animation-delay: var(--d);
}
@keyframes twinkle {
    0%, 100% { opacity: .1; transform: scale(.8); }
    50%      { opacity: .7; transform: scale(1.25); }
}

.scene-ridge {
    position: absolute; left: 0; width: 100%;
    display: block;
}
.scene-ridge--far  { bottom: 30%; height: 20%; fill: var(--ridge-far);  opacity: .9; }
.scene-ridge--near { bottom: 26%; height: 14%; fill: var(--ridge-near); }

/* Valley floor seen through the arches: touched by the first light */
.scene-ground {
    position: absolute; left: 0; right: 0; bottom: 0;
    height: 27%;
    background: linear-gradient(180deg,
        rgba(20, 92, 107, .75) 0%,
        #0e2038 28%,
        #14203a 100%);
}

/* Tower crane behind the viaduct, right side */
.scene-crane {
    position: absolute;
    right: 7%;
    bottom: 27%;
    width: clamp(90px, 12vw, 170px);
    height: auto;
    display: block;
    fill: var(--steel);
    stroke: var(--steel);
}
.crane-beacon {
    fill: #ff3b30;
    animation: beacon 1.6s ease-in-out infinite;
}
@keyframes beacon {
    0%, 100% { opacity: .25; }
    50%      { opacity: 1; }
}
.crane-hook {
    transform-origin: 158px 44px;
    animation: hook-sway 6s ease-in-out infinite alternate;
}
@keyframes hook-sway {
    from { transform: rotate(-1.2deg); }
    to   { transform: rotate(1.2deg); }
}

/* Work-light masts along the deck: static poles with a warm glow */
.scene-lights {
    position: absolute; left: 0; right: 0;
    bottom: 27%;
    height: 17%;
    /* Pole and glow sit in the middle of each 320px tile so the glow is
       never clipped by the tile edge. */
    background:
        repeating-linear-gradient(90deg,
            transparent 0 159px,
            rgba(8, 14, 26, .9) 159px 162px,
            transparent 162px 320px);
}
.scene-lights::before {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(56px 34px at 160px 0, rgba(255, 214, 138, .55), rgba(255, 214, 138, 0) 70%) 0 0 / 320px 100% repeat-x;
    animation: glow-pulse 4s ease-in-out infinite alternate;
}
@keyframes glow-pulse {
    from { opacity: .7; }
    to   { opacity: 1; }
}

/* Viaduct: arched concrete structure (nod to the Cedar Viaduct, Fresno) */
.scene-viaduct {
    position: absolute; left: 0; right: 0; bottom: 0;
    height: 27%;
}
.scene-viaduct svg { width: 100%; height: 100%; display: block; }

/* Surveyor's tripod at the foot of the viaduct, left */
.scene-tripod {
    position: absolute;
    left: 9%;
    bottom: 1.5%;
    width: clamp(34px, 4vw, 56px);
    height: auto;
    display: block;
    fill: none;
    stroke: rgba(255, 214, 138, .55);
    stroke-width: 2.2;
    stroke-linecap: round;
}
.scene-tripod .tripod-solid { fill: var(--steel); stroke: rgba(255, 214, 138, .55); }
.scene-tripod .tripod-flag { fill: var(--safety); stroke: none; }

/* Catenary masts: a repeating gradient we slide leftwards */
.scene-masts {
    position: absolute; left: 0; right: 0;
    bottom: 27%;
    height: 15%;
    background:
        repeating-linear-gradient(90deg,
            transparent 0 237px,
            rgba(10, 16, 30, .85) 237px 240px);
    animation: slide-masts 1.9s linear infinite;
}
.scene-masts::before {
    /* catenary wire */
    content: "";
    position: absolute; left: 0; right: 0; top: 14%;
    height: 1px;
    background: rgba(255, 255, 255, .28);
}
@keyframes slide-masts { to { background-position-x: -240px; } }

.scene-track {
    position: absolute; left: 0; right: 0;
    bottom: 27%;
    height: 22px;
    transform: translateY(2px);
}
.scene-ties {
    position: absolute; inset: 0;
    background: repeating-linear-gradient(90deg,
        var(--tie) 0 18px,
        transparent 18px 34px);
    animation: slide-ties .55s linear infinite;
}
@keyframes slide-ties { to { background-position-x: -34px; } }
.scene-rail {
    position: absolute; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(180deg, #fff 0%, var(--rail) 50%, #6f7681 100%);
}
.scene-rail--top    { top: 3px; }
.scene-rail--bottom { bottom: 3px; }

/* Train */
.scene-train {
    position: absolute;
    left: 6%;
    bottom: calc(27% + 20px);
    width: min(62%, 720px);
    transform: translateX(-140%);
    animation: train-arrive 1.6s var(--ease-out) .25s forwards;
    will-change: transform;
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .45));
}
@keyframes train-arrive { to { transform: translateX(0); } }

.train-body {
    width: 100%; height: auto; display: block;
    overflow: visible;
    animation: train-bob .9s ease-in-out 1.8s infinite alternate;
}
@keyframes train-bob {
    from { transform: translateY(0); }
    to   { transform: translateY(-1.5px); }
}
.train-beam {
    opacity: .55;
    transform-origin: 0 50%;
    animation: beam-flicker 2.4s ease-in-out infinite;
}
@keyframes beam-flicker {
    0%, 100% { opacity: .45; }
    50%      { opacity: .7; }
}

.train-streaks {
    position: absolute;
    right: 100%; top: 18%;
    width: 60%; height: 64%;
    pointer-events: none;
}
.train-streaks span {
    position: absolute;
    right: 0;
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .85) 100%);
    opacity: 0;
    animation: streak 1.1s ease-out infinite;
}
.train-streaks span:nth-child(1) { top: 8%;  animation-delay: 0s;   width: 70%; }
.train-streaks span:nth-child(2) { top: 30%; animation-delay: .25s; width: 100%; }
.train-streaks span:nth-child(3) { top: 50%; animation-delay: .5s;  width: 55%; }
.train-streaks span:nth-child(4) { top: 70%; animation-delay: .1s;  width: 85%; }
.train-streaks span:nth-child(5) { top: 92%; animation-delay: .4s;  width: 65%; }
@keyframes streak {
    0%   { opacity: 0;   transform: translateX(30%) scaleX(.4); }
    30%  { opacity: .9; }
    100% { opacity: 0;   transform: translateX(-40%) scaleX(1); }
}

/* On submit the train departs to the right */
.auth-stage.is-departing .scene-train {
    animation: train-depart .85s var(--ease-in) forwards;
}
@keyframes train-depart { to { transform: translateX(180%); } }
.auth-stage.is-departing .scene-ties  { animation-duration: .18s; }
.auth-stage.is-departing .scene-masts { animation-duration: .6s; }

.scene-grain {
    position: absolute; inset: 0;
    pointer-events: none;
    opacity: .12;
    mix-blend-mode: soft-light;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Scene copy */
.scene-copy {
    position: absolute;
    left: clamp(28px, 5vw, 72px);
    top: clamp(28px, 6vh, 72px);
    max-width: 640px;
    z-index: 2;
}
.scene-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(3.4rem, 8.6vw, 8.2rem);
    line-height: .86;
    letter-spacing: .01em;
    text-transform: uppercase;
    text-shadow: 0 6px 30px rgba(0, 0, 0, .35);
}
.scene-title span { display: block; }
.scene-title--accent {
    color: transparent;
    -webkit-text-stroke: 2px var(--amber-glow);
}
.scene-route {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(6, 23, 45, .38);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    font-family: var(--font-mono);
    font-size: .8rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.route-stop { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.route-stop b {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 3px rgba(244, 161, 29, .25);
}
.route-tag {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--safety);
    color: #fff;
    font-weight: 500;
}
.route-line {
    width: 34px; height: 2px;
    background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 10px);
    animation: route-flow .8s linear infinite;
}
@keyframes route-flow { to { background-position-x: -10px; } }

/* =====================================================================
   PANEL
   ===================================================================== */
.panel {
    position: relative;
    background:
        linear-gradient(135deg, rgba(244, 161, 29, .08), transparent 42%),
        var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 5vh, 64px) clamp(24px, 4vw, 64px);
}
.panel::before {
    /* faint engineering grid */
    content: "";
    position: absolute; inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(15, 24, 40, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 24, 40, .045) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
}
.panel::after {
    /* gold spine on the seam */
    content: "";
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--gold), var(--safety));
}

.panel-inner {
    position: relative;
    width: 100%;
    max-width: 420px;
}

.panel-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    margin: 0 0 10px;
    font-family: var(--font-mono);
    font-size: .74rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.panel-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--gold);
    animation: dot-pulse 2s ease-in-out infinite;
}
@keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(244, 161, 29, .5); }
    60%      { box-shadow: 0 0 0 7px rgba(244, 161, 29, 0); }
}
.panel-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(3rem, 5vw, 4.2rem);
    line-height: .9;
    letter-spacing: .01em;
    text-transform: uppercase;
}
.panel-sub {
    margin: 12px 0 0;
    color: var(--ink-soft);
    font-size: .98rem;
}

.panel-message {
    display: flex; align-items: center; gap: 10px;
    margin: 22px 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: .92rem;
    font-weight: 500;
    animation: message-in .5s var(--ease-out) both, message-shake .5s .1s both;
}
.panel-message--error { background: #fff1f0; color: var(--error); border: 1px solid #fecdca; }
.panel-message--ok    { background: #ecfdf3; color: var(--ok);    border: 1px solid #abefc6; animation-name: message-in; }
@keyframes message-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes message-shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-3px); }
    40%, 60% { transform: translateX(3px); }
}

.auth-form { margin-top: 26px; }

/* Floating-label field */
.field {
    position: relative;
    margin-bottom: 22px;
}
.field input {
    width: 100%;
    padding: 24px 44px 10px 0;
    border: 0;
    border-bottom: 1.5px solid var(--line);
    border-radius: 0;
    background: transparent;
    font: inherit;
    font-size: 1.05rem;
    color: var(--ink);
    outline: none;
    transition: border-color .2s ease;
}
.field input:-webkit-autofill,
.field input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--paper) inset;
    -webkit-text-fill-color: var(--ink);
    transition: background-color 9999s ease-in-out 0s;
}
.field label {
    position: absolute; left: 0; top: 22px;
    font-size: 1rem;
    color: var(--ink-faint);
    pointer-events: none;
    transform-origin: 0 0;
    transition: transform .22s var(--ease-out), color .2s ease;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
    transform: translateY(-20px) scale(.74);
    color: var(--ink-soft);
}
.field input:focus + label { color: var(--gold); }
.field-bar {
    position: absolute; left: 0; right: 0; bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--safety));
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform .35s var(--ease-out);
}
.field input:focus ~ .field-bar { transform: scaleX(1); }

.field-eye {
    position: absolute; right: 0; top: 16px;
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 8px;
    background: transparent;
    color: var(--ink-faint);
    cursor: pointer;
    transition: color .15s ease, background .15s ease;
}
.field-eye:hover { color: var(--ink); background: rgba(15, 24, 40, .06); }
.field-eye:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.field-eye .eye-slash { opacity: 0; transition: opacity .15s ease; }
.field-eye[aria-pressed="true"] .eye-slash { opacity: 1; }

/* Departure button */
.btn-depart {
    position: relative;
    display: inline-flex; align-items: center; justify-content: space-between;
    width: 100%;
    margin-top: 6px;
    padding: 16px 20px;
    border: 0; border-radius: 12px;
    background: var(--sky-deep);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .02em;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    transition: transform .15s ease, box-shadow .2s ease;
    box-shadow: 0 10px 24px -12px rgba(11, 42, 74, .7);
}
.btn-depart__label, .btn-depart__arrow { position: relative; z-index: 1; }
.btn-depart__arrow {
    display: inline-flex;
    transition: transform .25s var(--ease-out);
}
.btn-depart__track {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, var(--gold), var(--safety));
    transform: translateX(-101%);
    transition: transform .45s var(--ease-out);
    z-index: 0;
}
.btn-depart:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -12px rgba(244, 161, 29, .6); }
.btn-depart:hover .btn-depart__track,
.btn-depart:focus-visible .btn-depart__track { transform: translateX(0); }
.btn-depart:hover .btn-depart__arrow { transform: translateX(6px); }
.btn-depart:hover .btn-depart__label,
.btn-depart:hover .btn-depart__arrow { color: var(--sky-night); }
.btn-depart:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn-depart:active { transform: translateY(0) scale(.99); }
.btn-depart[disabled] { cursor: progress; }
.auth-stage.is-departing .btn-depart__track { transform: translateX(0); }
.auth-stage.is-departing .btn-depart__arrow { animation: arrow-go .7s var(--ease-in) forwards; }
@keyframes arrow-go { to { transform: translateX(60px); opacity: 0; } }
a.btn-depart { text-decoration: none; }

.panel-links {
    margin: 22px 0 0;
    font-size: .92rem;
}
.panel-links a {
    position: relative;
    color: var(--ink-soft);
    text-decoration: none;
    font-weight: 500;
}
.panel-links a::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: -3px;
    height: 1.5px;
    background: var(--gold);
    transform: scaleX(.35);
    transform-origin: 0 50%;
    transition: transform .3s var(--ease-out);
}
.panel-links a:hover { color: var(--ink); }
.panel-links a:hover::after { transform: scaleX(1); }
.panel-links__sep { margin: 0 10px; color: var(--ink-faint); }

/* Notes, field errors and help (password reset pages) */
.panel-note {
    display: flex; gap: 12px; align-items: flex-start;
    margin-top: 26px;
    padding: 16px 18px;
    border-radius: 12px;
    background: rgba(11, 42, 74, .05);
    border: 1px solid rgba(11, 42, 74, .1);
    color: var(--ink-soft);
    font-size: .95rem;
    line-height: 1.55;
}
.panel-note svg { flex: 0 0 auto; margin-top: 2px; color: var(--sky-teal); }
.panel-note p { margin: 0; }
.panel-note--warn { background: #fff8eb; border-color: #fde3b1; }
.panel-note--warn svg { color: #b45309; }
.panel-note + .reveal { margin-top: 24px; }

.field--error input { border-bottom-color: var(--error); }
.field--error label { color: var(--error); }
.field-error {
    margin: 8px 0 0;
    font-size: .84rem;
    color: var(--error);
}
.field-help {
    margin: -6px 0 22px;
    padding: 12px 14px 12px 16px;
    border-left: 3px solid var(--gold);
    background: rgba(244, 161, 29, .07);
    border-radius: 0 10px 10px 0;
    font-size: .84rem;
    line-height: 1.55;
    color: var(--ink-soft);
}
.field-help ul { margin: 0; padding-left: 18px; }
.field-help li + li { margin-top: 3px; }

/* Working state: shown from the moment the form posts until the
   next page arrives (covers the server round-trip and the list load). */
.panel-loading {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 14px;
    background: rgba(248, 243, 234, .92);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0; visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
    z-index: 5;
    text-align: center;
}
.auth-stage.is-loading .panel-loading { opacity: 1; visibility: visible; }
.panel-loading__spinner {
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 4px solid rgba(11, 42, 74, .12);
    border-top-color: var(--gold);
    animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.panel-loading__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.9rem;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--sky-deep);
}
.panel-loading__sub { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.panel-loading__track {
    width: 160px; height: 3px; border-radius: 999px;
    background: rgba(11, 42, 74, .1);
    overflow: hidden;
}
.panel-loading__track span {
    display: block; width: 40%; height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--safety));
    animation: track-slide 1.2s ease-in-out infinite;
}
@keyframes track-slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* =====================================================================
   Staggered reveal
   ===================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: reveal .8s var(--ease-out) forwards;
    animation-delay: calc(.12s + var(--i, 0) * .08s);
}
@keyframes reveal { to { opacity: 1; transform: none; } }

/* =====================================================================
   Responsive
   ===================================================================== */
/* Phones, and tablets held in portrait (an iPad is 768-1024px wide there):
   stack the scene above the form instead of a very tall two-column split. */
@media (max-width: 960px), (max-width: 1100px) and (orientation: portrait) {
    .auth-stage { grid-template-columns: 1fr; }
    .scene { min-height: 52vh; min-height: 52dvh; }
    .scene-copy { top: 22px; left: 20px; right: 20px; max-width: none; }
    .scene-title { font-size: clamp(2.6rem, 11vw, 4.4rem); }
    .scene-route { display: none; }
    .scene-sun { left: 26%; top: 60%; }
    .scene-train { width: min(70%, 520px); left: 4%; }
    .scene-masts { height: 12%; }
    .scene-lights { height: 14%; }
    .scene-crane { right: 4%; width: clamp(70px, 14vw, 120px); }
    .panel::after { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 4px;
        background: linear-gradient(90deg, var(--gold), var(--safety)); }
    .panel { padding: 32px 22px calc(36px + env(safe-area-inset-bottom, 0px)); }
    .panel-title { font-size: clamp(2.6rem, 10vw, 3.6rem); }
}

@media (max-width: 480px) {
    .scene { min-height: 48vh; min-height: 48dvh; }
    .scene-title { font-size: clamp(2.4rem, 12vw, 3.4rem); }
    .scene-tripod { left: 5%; }
    .field input { font-size: 16px; } /* prevents iOS zoom-on-focus */
    .btn-depart { padding: 15px 18px; }
}

/* Short landscape phones: keep the form reachable, trim the scene */
@media (max-width: 1100px) and (max-height: 480px) {
    .scene { min-height: 260px; }
}

/* =====================================================================
   Reduced motion: keep everything visible, drop the theatrics
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001s !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001s !important;
    }
    .scene-train { transform: none; }
    .reveal { opacity: 1; transform: none; }
    .auth-stage.is-departing .scene-train { transform: none; }
}
