@font-face {
    font-family: 'Lora';
    src: url('/frontend/fonts/lora-latin.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
    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;
}
@font-face {
    font-family: 'Lora';
    src: url('/frontend/fonts/lora-cyrillic.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Merriweather';
    src: url('/frontend/fonts/merriweather-variable.woff2') format('woff2');
    font-weight: 300 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('/frontend/fonts/poppins-v15-latin-regular.woff2') format('woff2'),
         url('/frontend/fonts/poppins-v15-latin-regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('/frontend/fonts/poppins-v15-latin-500.woff2') format('woff2'),
         url('/frontend/fonts/poppins-v15-latin-500.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --ff-base: 'Lora', 'Times New Roman', Times, Georgia, serif;
    --ff-ui: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --ff-heading: 'Merriweather', Georgia, 'Times New Roman', serif;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--ff-base);
    color: #222;
    background: #fafafa;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === Background compass rose === */

.bg-compass {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.04;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bg-compass svg {
    width: 120vmin;
    height: 120vmin;
}

/* === Top bar === */

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #111;
    color: #fff;
    height: 56px;
    font-family: var(--ff-ui);
}

.top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-bar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 1.125rem;
    letter-spacing: 0.03em;
    color: #fff;
}

.top-bar-logo svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.top-bar-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    position: relative;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.75);
    transition: color 0.2s;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: #fff;
    transform: scaleX(0);
    transition: transform 0.25s;
}

.nav-link:hover {
    color: #fff;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.nav-link--login {
    padding: 6px 18px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    transition: background 0.2s, border-color 0.2s;
}

.nav-link--login::after {
    display: none;
}

.nav-link--login:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
}

.top-bar-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.top-bar-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

.top-bar-burger.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.top-bar-burger.active span:nth-child(2) {
    opacity: 0;
}
.top-bar-burger.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* === Hero === */

.hero {
    position: relative;
    z-index: 1;
    padding: 140px 24px 72px;
    text-align: center;
}

.hero::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: #111;
    border-radius: 2px;
    margin: 28px auto 0;
    opacity: 0.15;
}

.hero-title {
    font-weight: 500;
    font-size: 2.75rem;
    line-height: 1.15;
    color: #111;
    max-width: 760px;
    margin: 0 auto;
    letter-spacing: -0.01em;
}

/* === Maps grid === */

.maps-section {
    position: relative;
    z-index: 1;
    padding: 0 24px 64px;
}

.maps-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.map-card {
    flex: 0 0 calc((100% - 48px) / 3);
    max-width: 380px;
    min-width: 280px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 2px 12px rgba(0,0,0,0.04);
    transition: transform 0.35s cubic-bezier(.22,1,.36,1), box-shadow 0.35s;
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.map-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0,0,0,0.10), 0 16px 48px rgba(0,0,0,0.06);
}

.map-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #e8e8e8;
}

.map-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(.22,1,.36,1);
}

.map-card:hover .map-card-img img {
    transform: scale(1.08);
}

.map-card-img--placeholder {
    background: linear-gradient(135deg, #e0e0e0, #c8c8c8);
}

.map-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, rgba(0,0,0,0.75) 100%);
    pointer-events: none;
}

.map-card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px 14px;
    font-weight: 500;
    font-size: 1.125rem;
    line-height: 1.3;
    color: #fff;
    margin: 0;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.map-card-body {
    padding: 14px 20px 18px;
}

.map-card-desc {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.maps-empty {
    font-size: 1rem;
    color: #888;
    text-align: center;
    padding: 40px 0;
}

/* === Card scroll animation === */

.map-card {
    opacity: 0;
    transform: translateY(30px);
}

.map-card--visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.22,1,.36,1), box-shadow 0.35s, translate 0.35s;
}

/* === About section === */

.about-section {
    position: relative;
    z-index: 1;
    padding: 120px 24px 64px;
}

.about-content {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.about-content h1 {
    font-family: var(--ff-base);
    font-weight: 500;
    font-size: 2.5rem;
    line-height: 1.2;
    color: #111;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.about-content h2 {
    font-family: var(--ff-ui);
    font-weight: 500;
    font-size: 1.1rem;
    color: #111;
    margin-bottom: 8px;
    margin-top: 32px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.about-content p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 12px;
}

.about-content ul {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    display: inline-block;
    text-align: left;
}

.about-content li {
    padding: 4px 0 4px 20px;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.7;
    position: relative;
}

.about-content li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #111;
    opacity: 0.15;
}

.about-content hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 24px auto;
    max-width: 60px;
}

/* === Footer === */

.site-footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
    background: #111;
    color: rgba(255,255,255,0.6);
    padding: 32px 24px;
    font-size: 0.85rem;
    font-family: var(--ff-ui);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-copyright p {
    margin: 0;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-sep {
    color: rgba(255,255,255,0.3);
}

/* === Responsive === */

@media (max-width: 1023px) {
    .hero {
        padding: 120px 24px 56px;
    }

    .hero-title {
        font-size: 2.125rem;
    }

    .hero::after {
        margin-top: 22px;
    }

    .map-card {
        flex: 0 0 calc((100% - 24px) / 2);
    }
}

@media (max-width: 767px) {
    .top-bar-nav {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: #111;
        flex-direction: column;
        padding: 16px 24px 24px;
        gap: 12px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .top-bar-nav.open {
        display: flex;
    }

    .top-bar-burger {
        display: flex;
    }

    .hero {
        padding: 100px 16px 40px;
    }

    .hero-title {
        font-size: 1.625rem;
    }

    .hero::after {
        margin-top: 18px;
    }

    .maps-section {
        padding: 0 16px 48px;
    }

    .map-card {
        flex: 0 0 100%;
        max-width: 400px;
    }

    .about-section {
        padding: 32px 16px 48px;
    }

    .about-content h2 {
        font-size: 1.25rem;
    }

    .site-footer {
        padding: 24px 16px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}
