
/* =========================================
   LAST DEPARTURE
   Cinematic Metro 404 Page
   ========================================= */


/* 1. Global */

:root {
    --bg: #090e11;
    --dark: #0c1418;
    --surface: #172124;
    --text: #e3e6df;
    --muted: #929e99;
    --green: #a9bba4;
    --amber: #d5aa6d;
    --font: "Vazirmatn", Tahoma, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    overflow: hidden;
}

button,
a {
    font-family: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    border: none;
    cursor: pointer;
}


/* 2. Main Scene */

.scene {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(
        180deg,
        #131d20 0%,
        #10191c 40%,
        #0a1114 75%,
        #070b0d 100%
    );
}

.background {
    position: absolute;
    inset: 0;
    z-index: -5;
    background:
        radial-gradient(
            ellipse at 50% 38%,
            rgba(115, 137, 122, .13),
            transparent 52%
        ),
        linear-gradient(
            180deg,
            transparent 20%,
            rgba(0, 0, 0, .25) 65%,
            #050809 100%
        );
}

.ambient-light {
    position: absolute;
    width: 650px;
    height: 400px;
    top: -180px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(159, 174, 154, .07);
    filter: blur(100px);
    z-index: -3;
}


/* 3. Ceiling */

.ceiling {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 28%;
    display: flex;
    justify-content: center;
    gap: 15%;
    z-index: 0;
    pointer-events: none;
}

.ceiling-light {
    position: relative;
    top: 8%;
    width: 90px;
    height: 5px;
    border-radius: 50%;
    background: #d2c9a8;
    box-shadow:
        0 0 12px rgba(224, 211, 166, .6),
        0 0 40px rgba(224, 211, 166, .2);
    opacity: .5;
    animation: lightFlicker 5s infinite;
}

.light-two {
    top: 17%;
    width: 110px;
    animation-delay: 1.8s;
    opacity: .35;
}

.light-three {
    top: 10%;
    width: 75px;
    animation-delay: 3.1s;
}

.ceiling-light::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 250px;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(
        180deg,
        rgba(207, 198, 160, .09),
        transparent
    );
    filter: blur(25px);
}


/* 4. Station Architecture */

.station {
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
}

.station-wall {
    position: absolute;
    top: 0;
    width: 45%;
    height: 72%;
    opacity: .4;
}

.wall-left {
    left: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0 65px,
            rgba(255,255,255,.025) 66px 67px
        ),
        linear-gradient(90deg, #080e12, #1a2529);
    clip-path: polygon(0 0, 100% 18%, 100% 85%, 0 100%);
}

.wall-right {
    right: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0 65px,
            rgba(255,255,255,.025) 66px 67px
        ),
        linear-gradient(270deg, #080e12, #1a2529);
    clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 85%);
}

.station-columns {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-around;
    opacity: .25;
}

.station-columns span {
    width: 20px;
    height: 65%;
    background: linear-gradient(
        90deg,
        #080d10,
        #344047,
        #11191d
    );
    box-shadow: 0 0 25px rgba(0,0,0,.5);
}


/* 5. Departure Board */

.departure-board {
    position: absolute;
    top: 13%;
    left: 50%;
    transform: translateX(-50%);
    width: min(340px, 35vw);
    padding: 13px 18px;
    z-index: 2;
    background: rgba(8, 14, 17, .9);
    border: 1px solid rgba(180, 194, 176, .18);
    box-shadow: 0 12px 50px rgba(0,0,0,.35);
    animation: boardGlow 6s infinite;
}

.board-top,
.board-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 2px;
    color: #83918d;
}

.board-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 8px;
}

.board-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a4b99c;
    box-shadow: 0 0 8px #a4b99c;
}

.board-content {
    margin: 17px 0;
    padding: 13px 0;
    border-top: 1px solid rgba(255,255,255,.08);
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.board-label {
    display: block;
    margin-bottom: 8px;
    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 3px;
    color: #788782;
}

.board-destination {
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-size: clamp(18px, 2.5vw, 27px);
    letter-spacing: 3px;
    color: var(--amber);
    text-shadow: 0 0 15px rgba(213, 169, 106, .25);
    transition: opacity .25s ease;
}

.board-bottom {
    font-size: 8px;
}


/* =========================================
   6. METRO TRAIN SCENE
   ========================================= */

.metro-scene {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}


/* Train body positioning */

.train {
    position: absolute;
    width: min(1000px, 78vw);
    height: 155px;
    left: 50%;
    top: 46%;
    transform: translateX(-50%);
    animation: trainMovement 18s ease-in-out infinite alternate;
    filter: drop-shadow(0 15px 18px rgba(0,0,0,.55));
}


/* Roof */

.train-roof {
    position: absolute;
    top: 0;
    left: 1.5%;
    width: 97%;
    height: 19px;
    border-radius: 15px 15px 0 0;
    background: linear-gradient(
        180deg,
        #737b70,
        #3b4540 55%,
        #28312e
    );
    border: 1px solid rgba(205, 213, 190, .18);
    border-bottom: none;
}

.roof-detail {
    position: absolute;
    top: 4px;
    left: 25%;
    width: 18%;
    height: 5px;
    border-radius: 4px;
    background: rgba(10, 17, 17, .45);
}

.roof-detail:last-child {
    left: 62%;
}


/* Main train body */

.train-body {
    position: absolute;
    inset: 14px 0 17px;
    overflow: hidden;
    border-radius: 8px 8px 4px 4px;
    border: 1px solid rgba(195, 205, 190, .2);
    background: linear-gradient(
        180deg,
        #657067 0%,
        #3b4842 16%,
        #293632 72%,
        #192321 100%
    );
    box-shadow:
        inset 0 2px 7px rgba(255,255,255,.13),
        inset 0 -10px 20px rgba(0,0,0,.3);
}


/* Front section */

.train-front {
    position: absolute;
    right: 0;
    top: 0;
    width: 11%;
    height: 100%;
    border-left: 3px solid rgba(0,0,0,.35);
    border-radius: 0 8px 4px 0;
    background: linear-gradient(
        90deg,
        #303c38,
        #17211f
    );
}

.front-window {
    position: absolute;
    width: 72%;
    height: 46%;
    top: 12%;
    left: 14%;
    border-radius: 7px 7px 3px 3px;
    border: 3px solid #65716a;
    background: linear-gradient(
        135deg,
        #394a45,
        #111c1d 75%
    );
    box-shadow: inset 0 0 15px rgba(174, 187, 161, .12);
}

.front-light {
    position: absolute;
    bottom: 13%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e0c78e;
    box-shadow: 0 0 13px #d9bd7d;
}

.front-light-one {
    left: 22%;
}

.front-light-two {
    right: 22%;
}


/* Windows */

.train-window {
    position: absolute;
    top: 16%;
    width: 12%;
    height: 48%;
    overflow: hidden;
    border: 4px solid #53605a;
    border-radius: 5px;
    background: linear-gradient(
        135deg,
        rgba(155, 174, 148, .25),
        rgba(17, 30, 31, .95) 75%
    );
    box-shadow:
        inset 0 0 15px rgba(0,0,0,.8),
        0 0 10px rgba(180, 190, 160, .05);
}

.window-one {
    left: 7%;
}

.window-two {
    left: 35%;
}

.window-three {
    left: 63%;
}

.window-reflection {
    position: absolute;
    width: 35%;
    height: 150%;
    top: -20%;
    left: 15%;
    transform: rotate(25deg);
    background: rgba(208, 215, 190, .07);
}


/* Doors */

.train-door {
    position: absolute;
    top: 10%;
    width: 10%;
    height: 82%;
    display: flex;
    overflow: hidden;
    border: 3px solid #53605a;
    border-bottom: none;
    background: #263330;
}

.door-one {
    left: 22%;
}

.door-two {
    left: 50%;
}

.door-window {
    width: 50%;
    height: 61%;
    background: linear-gradient(
        135deg,
        #354640,
        #101b1b
    );
    border: 1px solid rgba(160, 177, 155, .16);
}

.door-seam {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background: #141d1b;
}


/* Train logo */

.train-logo {
    position: absolute;
    left: 77%;
    top: 71%;
    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 2px;
    color: rgba(210, 218, 200, .5);
}


/* Bottom of train */

.train-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(
        180deg,
        #222d29,
        #101716
    );
    border-top: 1px solid rgba(0,0,0,.4);
}

.train-underbody {
    position: absolute;
    bottom: 6px;
    left: 12%;
    width: 76%;
    height: 13px;
    background: #101715;
    border-radius: 3px;
}


/* Wheels */

.train-wheels {
    position: absolute;
    bottom: 0;
    left: 9%;
    width: 82%;
    display: flex;
    justify-content: space-between;
}

.train-wheels span {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 3px solid #68736a;
    background: radial-gradient(
        circle,
        #101716 0 24%,
        #56605a 27% 42%,
        #171f1d 45% 100%
    );
    box-shadow: 0 5px 9px rgba(0,0,0,.7);
}


/* =========================================
   7. PLATFORM
   ========================================= */

.platform {
    position: absolute;
    width: 100%;
    height: 20%;
    bottom: 10%;
    background: linear-gradient(
        180deg,
        rgba(76, 87, 79, .15),
        rgba(28, 38, 35, .9) 25%,
        #111817 100%
    );
    border-top: 2px solid rgba(178, 186, 160, .12);
}

.platform-edge {
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(
        180deg,
        rgba(205, 190, 145, .5),
        rgba(125, 119, 92, .15)
    );
    box-shadow: 0 0 12px rgba(192, 174, 125, .12);
}

.platform-texture {
    position: absolute;
    inset: 20px 0 0;
    opacity: .12;
    background: repeating-linear-gradient(
        90deg,
        transparent 0 90px,
        rgba(220, 225, 210, .12) 91px 92px
    );
}


/* =========================================
   8. HORIZONTAL RAILWAY
   ========================================= */

.horizontal-railway {
    position: absolute;
    bottom: 2%;
    left: 0;
    width: 100%;
    height: 12%;
    background: linear-gradient(
        180deg,
        rgba(10, 16, 16, .5),
        rgba(5, 9, 10, .95)
    );
}


/* Vertical wooden sleepers */

.track-sleepers {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent 0 22px,
        #39413b 23px 34px,
        transparent 35px 58px
    );
    opacity: .75;
}


/* Two parallel metal rails */

.track-rail {
    position: absolute;
    left: 0;
    width: 100%;
    height: 5px;
    z-index: 2;
    background: linear-gradient(
        180deg,
        #c3c7b9,
        #747e76 45%,
        #303936
    );
    box-shadow:
        0 0 7px rgba(190, 202, 184, .25),
        0 3px 8px rgba(0,0,0,.8);
}

.rail-top {
    top: 23%;
}

.rail-bottom {
    top: 76%;
}


/* =========================================
   9. FOG
   ========================================= */

.fog {
    position: absolute;
    width: 80%;
    height: 160px;
    left: -10%;
    bottom: 14%;
    z-index: 1;
    border-radius: 50%;
    background: rgba(161, 174, 164, .055);
    filter: blur(45px);
    pointer-events: none;
}

.fog-one {
    animation: fogMove 24s ease-in-out infinite alternate;
}

.fog-two {
    width: 70%;
    left: 35%;
    bottom: 23%;
    opacity: .65;
    animation: fogMove 32s ease-in-out infinite alternate-reverse;
}

.fog-three {
    width: 100%;
    height: 100px;
    left: 0;
    bottom: 5%;
    opacity: .45;
    animation: fogMove 38s ease-in-out infinite alternate;
}


/* =========================================
   10. PARTICLES
   ========================================= */

.particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: rgba(206, 210, 184, .65);
    box-shadow: 0 0 6px rgba(206, 210, 184, .5);
    animation: particleFloat var(--duration) linear infinite;
}


/* =========================================
   11. CONTENT
   ========================================= */

.content {
    position: relative;
    z-index: 4;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 35px clamp(25px, 7vw, 110px) 28px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3px;
    color: #c1c9c2;
}

.brand-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(174, 192, 174, .35);
    color: var(--green);
    font-size: 10px;
    letter-spacing: 0;
}

.topbar-label {
    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 3px;
    color: rgba(188, 197, 189, .45);
}


/* =========================================
   12. MESSAGE
   ========================================= */

.message {
    width: min(510px, 100%);
    margin-top: 40px;
    margin-bottom: 20px;
    margin-right: auto;
    text-align: right;
    animation: contentReveal 1.2s ease both;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--green);
    font-size: 12px;
    font-weight: 400;
}

.eyebrow-line {
    width: 25px;
    height: 1px;
    background: var(--green);
    opacity: .7;
}

.error-code {
    font-family: Arial, sans-serif;
    font-size: clamp(100px, 15vw, 165px);
    line-height: .95;
    font-weight: 800;
    letter-spacing: -9px;
    color: #dce1d9;
    text-shadow:
        0 0 30px rgba(190, 207, 184, .12),
        0 8px 35px rgba(0,0,0,.5);
}

.title {
    margin-top: 20px;
    font-size: clamp(20px, 3vw, 27px);
    font-weight: 600;
    color: #e4e6df;
}

.description {
    max-width: 460px;
    margin-top: 15px;
    font-size: 13px;
    line-height: 2.3;
    font-weight: 300;
    color: #9ca7a3;
}


/* =========================================
   13. BUTTONS
   ========================================= */

.actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 27px;
}

.btn {
    min-height: 46px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: 12px;
    border-radius: 2px;
    transition:
        background .3s ease,
        border-color .3s ease,
        transform .3s ease,
        color .3s ease;
}

.btn-primary {
    background: #a4b49e;
    color: #101813;
    font-weight: 600;
}

.btn-primary:hover {
    background: #c0cfb8;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(164, 180, 158, .15);
}

.btn-arrow {
    font-size: 17px;
    transition: transform .3s ease;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(-4px);
}

.btn-secondary {
    background: rgba(255,255,255,.025);
    border: 1px solid rgba(190, 201, 190, .2);
    color: #c3cbc3;
}

.btn-secondary:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(190, 201, 190, .45);
    transform: translateY(-3px);
}


/* =========================================
   14. FOOTER
   ========================================= */

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    color: rgba(178, 188, 179, .55);
    font-size: 10px;
}

.footer-mark {
    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 2px;
    color: rgba(178, 188, 179, .35);
}


/* =========================================
   15. VIGNETTE
   ========================================= */

.vignette {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    box-shadow:
        inset 0 0 150px rgba(0,0,0,.55),
        inset 0 -80px 100px rgba(0,0,0,.5);
}


/* =========================================
   16. ANIMATIONS
   ========================================= */

@keyframes lightFlicker {
    0%, 18%, 20%, 55%, 57%, 100% {
        opacity: .5;
    }

    19%, 56% {
        opacity: .12;
    }

    70% {
        opacity: .35;
    }
}

@keyframes boardGlow {
    0%, 90%, 100% {
        box-shadow: 0 12px 50px rgba(0,0,0,.35);
    }

    92% {
        box-shadow: 0 12px 50px rgba(213,169,106,.12);
    }
}

@keyframes fogMove {
    from {
        transform: translateX(-5%) translateY(0);
    }

    to {
        transform: translateX(18%) translateY(-15px);
    }
}

@keyframes particleFloat {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    15% {
        opacity: .7;
    }

    85% {
        opacity: .4;
    }

    to {
        transform: translateY(-130px);
        opacity: 0;
    }
}

@keyframes contentReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes trainMovement {
    from {
        transform: translateX(calc(-50% - 8px));
    }

    to {
        transform: translateX(calc(-50% + 8px));
    }
}


/* =========================================
   17. TABLET
   ========================================= */

@media (max-width: 900px) {

    .content {
        padding: 28px 35px 24px;
    }

    .message {
        width: min(460px, 65%);
    }

    .departure-board {
        top: 18%;
        width: 300px;
    }

    .train {
        width: 90vw;
        height: 135px;
        top: 49%;
    }

    .train-window {
        height: 45%;
    }

}


/* =========================================
   18. MOBILE
   ========================================= */

@media (max-width: 600px) {

    body {
        overflow: auto;
    }

    .scene {
        min-height: 100vh;
        min-height: 100svh;
    }

    .content {
        min-height: 100vh;
        min-height: 100svh;
        padding: 22px 20px 20px;
    }

    .brand {
        font-size: 9px;
        letter-spacing: 2px;
        gap: 8px;
    }

    .brand-icon {
        width: 29px;
        height: 29px;
    }

    .topbar-label {
        font-size: 7px;
        letter-spacing: 1.5px;
    }

    .departure-board {
        top: 14%;
        width: min(270px, 75vw);
        padding: 11px 13px;
    }

    .board-destination {
        font-size: 20px;
    }

    .train {
        width: 115vw;
        height: 105px;
        top: 49%;
    }

    .train-wheels span {
        width: 19px;
        height: 19px;
    }

    .train-logo {
        font-size: 6px;
    }

    .train-window {
        border-width: 2px;
    }

    .train-door {
        border-width: 2px;
    }

    .platform {
        height: 17%;
        bottom: 10%;
    }

    .horizontal-railway {
        height: 10%;
    }

    .message {
        width: 100%;
        margin-top: 40px;
        margin-bottom: 30px;
        text-align: center;
    }

    .eyebrow {
        justify-content: center;
    }

    .error-code {
        font-size: clamp(105px, 28vw, 145px);
        letter-spacing: -7px;
    }

    .title {
        font-size: 21px;
        line-height: 1.8;
    }

    .description {
        max-width: 390px;
        margin-right: auto;
        margin-left: auto;
        font-size: 12px;
        line-height: 2.2;
    }

    .actions {
        justify-content: center;
        gap: 9px;
    }

    .btn {
        min-height: 43px;
        padding: 0 13px;
        font-size: 11px;
    }

    .footer {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 8px;
        font-size: 9px;
    }

    .station-columns span:nth-child(even) {
        display: none;
    }

}


/* =========================================
   19. SMALL MOBILE
   ========================================= */

@media (max-width: 380px) {

    .content {
        padding-right: 15px;
        padding-left: 15px;
    }

    .topbar-label {
        display: none;
    }

    .departure-board {
        top: 13%;
    }

    .message {
        margin-top: 30px;
    }

    .title {
        font-size: 19px;
    }

    .description {
        font-size: 11px;
    }

    .actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

}


/* =========================================
   20. REDUCED MOTION
   ========================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }

}

/* =========================================
   RAILWAY POSITION FIX
   ========================================= */

/* Train stays above the railway */
.train {
    z-index: 3;
}

/* Move railway directly under the train */
.horizontal-railway {
    position: absolute;
    left: 50%;
    bottom: 27%;
    transform: translateX(-50%);
    width: min(1000px, 78vw);
    height: 8%;
    z-index: 2;
    background: transparent;
    overflow: hidden;
}

/* Horizontal sleepers underneath the train */
.track-sleepers {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent 0 18px,
        #39413b 19px 32px,
        transparent 33px 55px
    );
    opacity: .8;
}

/* Two straight horizontal rails */
.track-rail {
    position: absolute;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(
        180deg,
        #c3c7b9,
        #747e76 50%,
        #303936
    );
    box-shadow:
        0 0 5px rgba(190, 202, 184, .2),
        0 2px 5px rgba(0,0,0,.7);
}

.rail-top {
    top: 20%;
}

.rail-bottom {
    top: 75%;
}

/* Keep platform behind the train and railway */
.platform {
    z-index: 1;
}

/* Mobile adjustment */
@media (max-width: 600px) {

    .horizontal-railway {
        width: 115vw;
        bottom: 29%;
        height: 7%;
    }

}

/* Full Width Railway */

.horizontal-railway {
    left: 0 !important;
    transform: none !important;
    width: 100% !important;
}

/* Full width sleepers and rails */

.track-sleepers,
.track-rail {
    width: 100% !important;
}

/* Mobile */
@media (max-width: 600px) {
    .horizontal-railway {
        width: 100% !important;
    }
}

/* =========================================
   MOBILE RESPONSIVE - FINAL REFINEMENT
   LAST DEPARTURE
   ========================================= */

@media (max-width: 600px) {

    /* Main layout */
    .content {
        min-height: 100vh;
        min-height: 100svh;
        padding: 20px 16px 18px;
    }

    /* Header */
    .brand {
        font-size: 9px;
        letter-spacing: 1.8px;
        gap: 7px;
    }

    .brand-icon {
        width: 27px;
        height: 27px;
    }

    .topbar-label {
        font-size: 7px;
        letter-spacing: 1px;
    }

    /* Departure board */
    .departure-board {
        top: 14%;
        width: min(250px, 72vw);
        padding: 10px 12px;
    }

    .board-top,
    .board-bottom {
        font-size: 7px;
        letter-spacing: 1.3px;
    }

    .board-content {
        margin: 12px 0;
        padding: 10px 0;
    }

    .board-label {
        font-size: 8px;
        margin-bottom: 6px;
    }

    .board-destination {
        font-size: 17px;
        letter-spacing: 1px;
    }

    /* Train */
    .train {
        width: 92vw;
        max-width: 520px;
        height: 86px;
        top: 53%;
    }

    .train-roof {
        height: 14px;
    }

    .train-body {
        inset: 11px 0 13px;
    }

    .train-wheels span {
        width: 16px;
        height: 16px;
        border-width: 2px;
    }

    .train-window {
        border-width: 2px;
        height: 43%;
    }

    .train-door {
        border-width: 2px;
    }

    .train-logo {
        font-size: 6px;
        letter-spacing: 1px;
    }

    /* Platform and railway */
    .platform {
        height: 16%;
        bottom: 9%;
    }

    .horizontal-railway {
        left: 0 !important;
        width: 100% !important;
        bottom: 25%;
        height: 7%;
        transform: none !important;
    }

    .track-sleepers,
    .track-rail {
        width: 100% !important;
    }

    .track-rail {
        height: 3px;
    }

    /* Main message */
    .message {
        width: 100%;
        margin: 0;
        text-align: center;
    }

    .eyebrow {
        justify-content: center;
        font-size: 10px;
        margin-bottom: 5px;
    }

    .eyebrow-line {
        width: 18px;
    }

    .error-code {
        font-size: clamp(76px, 22vw, 100px);
        line-height: .9;
        letter-spacing: -5px;
    }

    .title {
        margin-top: 12px;
        font-size: clamp(17px, 4.5vw, 20px);
        line-height: 1.7;
    }

    .description {
        max-width: 340px;
        margin: 9px auto 0;
        padding: 0 4px;
        font-size: 11px;
        line-height: 2;
    }

    /* Buttons */
    .actions {
        justify-content: center;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 17px;
    }

    .btn {
        width: auto;
        min-height: 40px;
        padding: 0 12px;
        gap: 8px;
        font-size: 10px;
    }

    .btn-arrow {
        font-size: 15px;
    }

    /* Footer */
    .footer {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 7px;
        font-size: 8px;
    }

    .footer-mark {
        font-size: 8px;
        letter-spacing: 1.5px;
    }

    /* Background details */
    .station-columns span:nth-child(even) {
        display: none;
    }
}


/* =========================================
   EXTRA SMALL PHONES
   ========================================= */

@media (max-width: 380px) {

    .content {
        padding-right: 13px;
        padding-left: 13px;
    }

    .departure-board {
        width: 68vw;
        padding: 9px 10px;
    }

    .brand {
        font-size: 8px;
        letter-spacing: 1.3px;
    }

    .error-code {
        font-size: 76px;
        letter-spacing: -4px;
    }

    .title {
        font-size: 17px;
    }

    .description {
        font-size: 10px;
        line-height: 1.9;
    }

    .actions {
        gap: 7px;
    }

    .btn {
        min-height: 38px;
        padding: 0 10px;
        font-size: 9px;
    }
}


/* Short mobile screens */
@media (max-width: 600px) and (max-height: 700px) {

    .departure-board {
        top: 12%;
    }

    .train {
        top: 54%;
    }

    .message {
        margin-top: 5px;
        margin-bottom: 5px;
    }

    .title {
        margin-top: 8px;
    }

    .description {
        margin-top: 6px;
    }

    .actions {
        margin-top: 12px;
    }

}
