/* ==========================================
   LOST ROUTE - PERSIAN 404 PAGE
   RESPONSIVE REFINED VERSION
   ========================================== */

/* 1. Global */

:root {
    --background: #f7f6ef;
    --surface: #fffef9;
    --text: #29382f;
    --muted: #879187;

    --green: #7fae8b;
    --green-dark: #527d60;
    --coral: #e58d73;
    --coral-dark: #cf765f;

    --border: #e9e9df;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    min-height: 100svh;
    font-family: Tahoma, Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    overflow-x: hidden;
}

button,
a {
    font: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: 0;
}

/* 2. Page */

.page {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 7.5%;

    display: flex;
    flex-direction: column;

    background:
        radial-gradient(
            circle at 75% 48%,
            rgba(219, 231, 210, .38),
            transparent 34%
        ),
        var(--background);

    overflow: hidden;
}

/* 3. Header */

.site-header {
    min-height: 82px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid rgba(76, 105, 81, .09);

    position: relative;
    z-index: 5;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;

    color: #34483a;
    font-size: 16px;
    font-weight: 700;
}

.brand-mark {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    border-radius: 11px;
    color: white;
    background: var(--green);

    font-size: 17px;

    box-shadow: 0 5px 15px rgba(91, 137, 101, .2);
}

.header-caption {
    display: flex;
    align-items: center;
    gap: 9px;

    color: #899287;
    font-size: 11px;
}

.header-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;
    background: var(--green);

    box-shadow: 0 0 0 4px rgba(127, 174, 139, .13);
}

/* 4. Main Layout */

.main-section {
    flex: 1;
    min-height: 0;

    display: grid;
    grid-template-columns: .9fr 1.1fr;
    align-items: center;

    gap: 4%;
    padding: clamp(18px, 3vh, 30px) 0;
}

/* 5. Content */

.content {
    position: relative;
    z-index: 3;

    animation: contentEnter .9s ease both;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    padding: 8px 13px;
    margin-bottom: 17px;

    border: 1px solid #e9e7dc;
    border-radius: 30px;

    background: rgba(255, 255, 255, .55);
    color: #8d8c7d;

    font-size: 11px;
}

.eyebrow-icon {
    width: 17px;
    height: 17px;

    display: grid;
    place-items: center;

    border-radius: 50%;
    background: #f4dfd5;
    color: var(--coral-dark);

    font-weight: bold;
}

/* 6. Number */

.error-number {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;

    direction: ltr;
    width: fit-content;

    margin-bottom: 10px;

    font-size: clamp(95px, 10vw, 140px);
    font-weight: 900;

    line-height: .95;
    letter-spacing: -9px;

    color: #769d7d;

    text-shadow:
        0 4px 0 #e1e8d9,
        0 12px 25px rgba(92, 130, 97, .13);
}

.number-zero {
    color: var(--coral);
    display: inline-block;

    animation: zeroWiggle 5s ease-in-out infinite;
}

/* 7. Heading */

.content h1 {
    font-size: clamp(25px, 2.7vw, 35px);
    line-height: 1.65;

    font-weight: 800;
    color: #344338;

    margin-bottom: 10px;
}

.content h1 span {
    color: var(--green-dark);
}

.description {
    max-width: 430px;

    color: #899187;

    font-size: 12px;
    line-height: 2.2;

    margin-bottom: 22px;
}

/* 8. Buttons */

.buttons {
    display: flex;
    align-items: center;
    gap: 10px;

    flex-wrap: wrap;
}

.btn {
    min-height: 47px;
    padding: 0 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;

    border-radius: 12px;
    cursor: pointer;

    font-size: 11px;
    font-weight: 700;

    transition:
        transform .3s ease,
        box-shadow .3s ease,
        background .3s ease;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn:focus-visible {
    outline: 2px solid var(--green-dark);
    outline-offset: 4px;
}

.btn-primary {
    color: #fff;
    background: var(--green-dark);

    box-shadow: 0 8px 20px rgba(82, 125, 96, .19);
}

.btn-primary:hover {
    background: #426d50;

    box-shadow: 0 12px 25px rgba(82, 125, 96, .27);
}

.btn-primary svg {
    width: 17px;
    height: 17px;

    fill: none;
    stroke: currentColor;

    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-secondary {
    color: #788276;
    background: rgba(255, 255, 255, .6);

    border: 1px solid #e8e9df;
}

.btn-secondary:hover {
    background: #fff;
}

/* 9. Help Text */

.help-text {
    display: flex;
    align-items: center;
    gap: 11px;

    margin-top: 27px;

    color: #a0a396;
    font-size: 10px;
}

.help-line {
    width: 25px;
    height: 1px;

    background: #c8d5c2;
}

/* 10. Map Area */

.map-area {
    position: relative;
    width: 100%;
    max-width: 540px;

    justify-self: center;

    animation: mapEnter 1.1s ease both;
}

.map-card {
    position: relative;
    width: 100%;

    padding: 12px;

    border: 1px solid #ecece3;
    border-radius: 21px;

    background: rgba(255, 255, 251, .88);

    box-shadow:
        0 25px 70px rgba(67, 91, 66, .09),
        0 5px 15px rgba(67, 91, 66, .035);

    transform: rotate(-1.5deg);

    transition:
        transform .5s ease,
        box-shadow .5s ease;
}

.map-card:hover {
    transform: rotate(0deg) translateY(-4px);

    box-shadow:
        0 30px 80px rgba(67, 91, 66, .13);
}

/* 11. Map Header */

.map-top,
.map-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.map-top {
    min-height: 36px;
    padding: 0 7px 9px;
}

.map-location {
    display: flex;
    align-items: center;
    gap: 8px;

    color: #687767;
    font-size: 11px;
    font-weight: 700;
}

.location-icon {
    color: var(--green-dark);
    font-size: 19px;
}

.map-status {
    padding: 6px 9px;

    border-radius: 20px;

    background: #fbefeb;
    color: #d1846d;

    font-size: 9px;
}

/* 12. Map Canvas */

.map-canvas {
    position: relative;
    width: 100%;

    aspect-ratio: 600 / 520;

    border-radius: 14px;
    overflow: hidden;

    background: #f0f2e8;
}

.map-grid {
    position: absolute;
    inset: 0;

    opacity: .35;

    background-image:
        linear-gradient(rgba(180, 193, 171, .18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(180, 193, 171, .18) 1px, transparent 1px);

    background-size: 32px 32px;
}

.map-art {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
}

/* 13. Route Animation */

.route-line {
    animation: routeFlow 12s linear infinite;
}

.map-pin {
    transform-origin: 455px 117px;

    animation: pinBounce 3s ease-in-out infinite;
}

/* 14. Map Tooltip */

.map-tooltip {
    position: absolute;
    top: 16%;
    left: 55%;

    display: flex;
    align-items: center;
    gap: 7px;

    padding: 8px 11px;

    background: #fffefb;

    border: 1px solid #f0e8df;
    border-radius: 9px;

    color: #a46d5e;
    font-size: 9px;

    box-shadow: 0 5px 18px rgba(83, 82, 64, .08);

    animation: tooltipFloat 4s ease-in-out infinite;
}

.tooltip-dot {
    width: 6px;
    height: 6px;

    background: var(--coral);
    border-radius: 50%;
}

/* 15. Compass */

.compass {
    position: absolute;
    bottom: 13px;
    right: 13px;

    width: 32px;
    height: 39px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;

    border-radius: 9px;

    background: rgba(255, 255, 255, .85);

    box-shadow: 0 3px 10px rgba(50, 70, 50, .08);

    color: #8b9585;
    font-size: 8px;
    font-weight: bold;
}

.compass svg {
    width: 16px;
    height: 16px;
}

/* 16. Map Bottom */

.map-bottom {
    min-height: 36px;
    padding: 9px 7px 0;

    justify-content: flex-start;
    gap: 8px;

    color: #9a9e90;
    font-size: 9px;
}

.map-bottom-icon {
    font-size: 17px;
    color: var(--green);
}

.loading-dots {
    display: inline-flex;
    align-items: center;
    gap: 3px;

    margin-right: auto;
}

.loading-dots i {
    width: 4px;
    height: 4px;

    border-radius: 50%;
    background: var(--green);

    animation: loadingDot 1s ease-in-out infinite;
}

.loading-dots i:nth-child(2) {
    animation-delay: .15s;
}

.loading-dots i:nth-child(3) {
    animation-delay: .3s;
}

/* 17. Floating Cards */

.floating-card {
    position: absolute;
    z-index: 3;

    display: flex;
    align-items: center;
    gap: 8px;

    padding: 10px 13px;

    border: 1px solid rgba(232, 232, 220, .9);
    border-radius: 12px;

    background: rgba(255, 255, 251, .95);

    box-shadow: 0 9px 25px rgba(70, 90, 65, .09);

    color: #788474;
    font-size: 10px;

    animation: floatingCard 5s ease-in-out infinite;
}

.card-one {
    top: 19%;
    right: -7%;
}

.mini-icon {
    color: var(--green-dark);
    font-size: 17px;
}

.card-two {
    bottom: 17%;
    left: -7%;

    animation-delay: -2s;
}

.mini-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;
    background: var(--coral);

    box-shadow: 0 0 0 4px rgba(229, 141, 115, .13);
}

/* 18. Footer */

.site-footer {
    min-height: 52px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    border-top: 1px solid rgba(76, 105, 81, .09);

    color: #a1a395;
    font-size: 10px;
}

.site-footer span:first-child {
    color: var(--green-dark);
    font-weight: bold;
}

.footer-separator {
    width: 1px;
    height: 12px;

    background: #d9ddd1;
}

/* 19. Animations */

@keyframes contentEnter {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mapEnter {
    from {
        opacity: 0;
        transform: translateY(25px) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes zeroWiggle {
    0%, 90%, 100% {
        transform: rotate(0);
    }

    93% {
        transform: rotate(-7deg);
    }

    96% {
        transform: rotate(6deg);
    }
}

@keyframes routeFlow {
    to {
        stroke-dashoffset: -190;
    }
}

@keyframes pinBounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}

@keyframes tooltipFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes floatingCard {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-9px);
    }
}

@keyframes loadingDot {
    0%, 80%, 100% {
        opacity: .3;
        transform: scale(.8);
    }

    40% {
        opacity: 1;
        transform: scale(1.25);
    }
}

/* 20. Tablet */

@media (max-width: 950px) {

    .page {
        padding: 0 5%;
    }

    .main-section {
        gap: 3%;
    }

    .error-number {
        font-size: clamp(85px, 11vw, 115px);
    }

    .content h1 {
        font-size: 26px;
    }

    .description {
        font-size: 11px;
    }

    .map-area {
        max-width: 460px;
    }

    .card-one {
        right: -4%;
    }

    .card-two {
        left: -4%;
    }

}

/* 21. Tablet Portrait */

@media (max-width: 820px) and (min-width: 681px) {

    .site-header {
        min-height: 72px;
    }

    .main-section {
        grid-template-columns: 1fr 1fr;
        gap: 3%;
        padding: 20px 0;
    }

    .map-area {
        max-width: 390px;
    }

    .map-card {
        padding: 10px;
    }

    .error-number {
        font-size: clamp(75px, 10vw, 100px);
    }

    .content h1 {
        font-size: 23px;
    }

    .description {
        font-size: 10px;
        line-height: 2.1;
    }

    .help-text {
        margin-top: 20px;
    }

    .btn {
        min-height: 43px;
        padding: 0 13px;
        font-size: 10px;
    }

}

/* 22. Mobile */

@media (max-width: 680px) {

    .page {
        padding: 0 6%;
    }

    .site-header {
        min-height: 65px;
    }

    .brand {
        font-size: 14px;
    }

    .brand-mark {
        width: 30px;
        height: 30px;
    }

    .header-caption {
        font-size: 9px;
    }

    .main-section {
        display: flex;
        flex-direction: column-reverse;

        justify-content: center;
        align-items: center;

        gap: 17px;
        padding: 14px 0;
    }

    .map-area {
        width: min(100%, 320px);
        max-width: 320px;
    }

    .map-card {
        padding: 9px;
        border-radius: 16px;
    }

    .map-top {
        min-height: 32px;
        padding-bottom: 7px;
    }

    .map-bottom {
        min-height: 30px;
        padding-top: 7px;
        font-size: 8px;
    }

    .map-tooltip {
        padding: 6px 8px;
        font-size: 8px;
    }

    .compass {
        bottom: 9px;
        right: 9px;

        width: 28px;
        height: 34px;
    }

    .floating-card {
        padding: 8px 10px;
        font-size: 8px;
    }

    .card-one {
        top: 16%;
        right: -3%;
    }

    .card-two {
        bottom: 13%;
        left: -3%;
    }

    .content {
        width: 100%;
        text-align: center;
    }

    .eyebrow {
        margin-bottom: 10px;
        padding: 7px 11px;
        font-size: 9px;
    }

    .error-number {
        justify-content: center;

        margin: 0 auto 7px;

        font-size: clamp(82px, 21vw, 110px);
        letter-spacing: -6px;
    }

    .content h1 {
        font-size: 21px;
        line-height: 1.65;

        margin-bottom: 7px;
    }

    .description {
        max-width: 420px;

        margin: 0 auto 13px;

        font-size: 10px;
        line-height: 2;
    }

    .buttons {
        justify-content: center;
        gap: 8px;
    }

    .btn {
        min-height: 42px;
        padding: 0 13px;
        font-size: 9px;
    }

    .help-text {
        justify-content: center;
        margin-top: 13px;
        font-size: 8px;
    }

    .help-line {
        width: 19px;
    }

    .site-footer {
        min-height: 44px;
        font-size: 8px;
        gap: 8px;
    }

}

/* 23. Small Mobile */

@media (max-width: 380px) {

    .page {
        padding: 0 5%;
    }

    .site-header {
        min-height: 58px;
    }

    .main-section {
        gap: 13px;
        padding: 10px 0;
    }

    .map-area {
        width: min(100%, 285px);
    }

    .map-card {
        padding: 8px;
    }

    .map-top {
        min-height: 29px;
    }

    .map-bottom {
        min-height: 27px;
        font-size: 7px;
    }

    .content h1 {
        font-size: 19px;
    }

    .description {
        font-size: 9px;
        line-height: 1.9;
    }

    .error-number {
        font-size: 82px;
    }

    .btn {
        min-height: 39px;
        padding: 0 10px;
        font-size: 8px;
    }

    .floating-card {
        padding: 7px 9px;
    }

    .site-footer {
        min-height: 40px;
        font-size: 7px;
    }

}

/* 24. Short Desktop Screens */

@media (max-height: 760px) and (min-width: 681px) {

    .site-header {
        min-height: 65px;
    }

    .main-section {
        padding: 12px 0;
    }

    .map-area {
        max-width: 410px;
    }

    .map-card {
        padding: 10px;
    }

    .error-number {
        font-size: 105px;
        margin-bottom: 7px;
    }

    .eyebrow {
        margin-bottom: 12px;
    }

    .content h1 {
        font-size: 27px;
        line-height: 1.55;
        margin-bottom: 7px;
    }

    .description {
        line-height: 2;
        margin-bottom: 16px;
    }

    .help-text {
        margin-top: 17px;
    }

    .site-footer {
        min-height: 44px;
    }

}

/* 25. Short Mobile Screens */

@media (max-height: 760px) and (max-width: 680px) {

    .site-header {
        min-height: 54px;
    }

    .main-section {
        gap: 9px;
        padding: 7px 0;
    }

    .map-area {
        width: min(100%, 250px);
    }

    .map-card {
        padding: 7px;
    }

    .map-top {
        min-height: 25px;
        padding-bottom: 5px;
    }

    .map-bottom {
        min-height: 23px;
        padding-top: 5px;
    }

    .error-number {
        font-size: 76px;
        margin-bottom: 5px;
    }

    .eyebrow {
        margin-bottom: 7px;
    }

    .content h1 {
        font-size: 18px;
        line-height: 1.5;
        margin-bottom: 5px;
    }

    .description {
        font-size: 9px;
        line-height: 1.75;
        margin-bottom: 9px;
    }

    .btn {
        min-height: 36px;
    }

    .help-text {
        margin-top: 8px;
    }

    .site-footer {
        min-height: 36px;
    }

}

/* 26. Reduced Motion */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

}