/* ============================================================
   Pin-Up BD — main stylesheet
   Tokens из design-tokens.md, значения один-в-один из Figma.
   ============================================================ */

/* ---- Fonts ---- */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/montserrat-400-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;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/montserrat-400-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: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/montserrat-500-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;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/montserrat-500-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: 'Montserrat';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/montserrat-600-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;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/montserrat-600-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: 'Montserrat';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../fonts/montserrat-800-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;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../fonts/montserrat-800-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;
}

/* ---- Tokens ---- */
:root {
    --c-bg:           #0e1018;
    --c-text:         #ffffff;
    --c-text-mute:    #acacac;
    --c-accent:       #c02026;
    --c-accent-dark:  #b52222;
    --c-cta-text:     #07304c;          /* CTA "Registration" — тёмно-синий текст на белом */
    --c-toggle-bg:    #20212f;
    --c-card-mixed:   #b52222;

    --c-strip-red:    #d3281c;          /* верхняя 3px полоса под header */
    --c-strip-green:  #036446;          /* нижняя 3px полоса под header */

    /* Header/footer фоновый зелёный градиент (точные значения из Figma) */
    --bg-green-grad:  linear-gradient(180deg, #057669 -17.9%, #000000 231.4%);

    --container-w:    1400px;
    --header-h:       86px;
    --header-strips:  6px;            /* 2 × 3px полосы под inner */
    --header-total-h: calc(var(--header-h) + var(--header-strips));
    --footer-h:       102px;
    --hero-h:         296px;
    --section-gap:    40px;

    --font-base: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    padding-top: var(--header-total-h);
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-base);
    font-size: 16px;
    line-height: 1.3;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }

/* ---- Layout container ---- */
.container {
    width: var(--container-w);
    max-width: 100%;
    margin-inline: auto;
}

/* ============================================================
   HEADER — зелёный градиент + полосы (флаг Бангладеш цвета)
   ============================================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    width: 100%;
    background: var(--bg-green-grad);
}
.site-header__inner {
    width: var(--container-w);
    max-width: 100%;
    margin-inline: auto;
    height: var(--header-h);
    padding-block: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}
.site-header__burger {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    background: transparent url('../img/icon-burger.svg') center / 24px 24px no-repeat;
    border: 0;
    cursor: pointer;
    flex-shrink: 0;
}
.site-header__burger[aria-expanded="true"] {
    background-image: url('../img/icon-close.svg');
}
.site-header__logo {
    display: inline-flex;
    align-items: center;
    width: 239px;
    height: 54px;
    flex-shrink: 0;
}
.site-header__logo img,
.site-header__logo svg { width: 100%; height: 100%; }

.site-header__nav {
    display: flex;
    align-items: center;
    gap: 36px;
}
.site-header__menu {
    display: flex;
    align-items: center;
    gap: 36px;
}
.site-header__menu a {
    font-weight: 500;
    font-size: 14px;
    line-height: 1.3;
    color: var(--c-text);
    padding-bottom: 4px;
    border-bottom: 1px solid transparent;
    transition: border-color .15s ease;
}
.site-header__menu a:hover,
.site-header__menu .current-menu-item > a,
.site-header__menu .current_page_item > a,
.site-header__menu .is-active > a {
    border-bottom-color: #fff;
}

.site-header__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 11px 24px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: var(--c-text);
    color: var(--c-cta-text);
    font-weight: 800;
    font-size: 16px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
    white-space: nowrap;
}
.site-header__cta:hover {
    background: transparent;
    color: var(--c-text);
    border-color: var(--c-text);
}

/* Полосы под header (флаг BD: красная + зелёная) */
.site-header__strip {
    width: 100%;
    height: 3px;
}
.site-header__strip--red   { background: var(--c-strip-red); }
.site-header__strip--green { background: var(--c-strip-green); }

/* Lang toggle: 2 флага в тёмном контейнере */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    width: 96px;
    height: 32px;
    border-radius: 4px;
    background: var(--c-toggle-bg);
    overflow: hidden;
    padding: 0;
}
.lang-toggle__item {
    flex: 1;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: background-color .15s ease;
}
.lang-toggle__item img {
    width: 40px;
    height: 24px;
    border-radius: 2px;
    display: block;
}
.lang-toggle__item.is-active {
    background: var(--c-accent);
    pointer-events: none;
    cursor: default;
}

/* ============================================================
   MAIN
   ============================================================ */
.site-main {
    padding-block: var(--section-gap) 80px;
}
.site-main > .container > * + * { margin-top: var(--section-gap); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    width: var(--container-w);
    max-width: 100%;
    border-radius: 10px;
    overflow: hidden;
}
.hero picture { display: block; }
.hero__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* ============================================================
   DOWNLOAD BUTTONS — App Store / Google Play
   Кнопка собирается HTML+CSS, картинки = только логотипы и стрелка.
   Размеры из Figma: 247×85, padding 24, gap 24, radius 20.
   Фон: GRADIENT 180° #c02026 → #5c090c
   ============================================================ */
.download-buttons {
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}
.dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    width: 247px;
    height: 85px;
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(180deg, #c02026 0%, #5c090c 100%);
    transition: transform .15s ease, box-shadow .2s ease, filter .15s ease;
    flex-shrink: 0;
}
.dl-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(192, 32, 38, .35);
    filter: brightness(1.05);
}
.dl-btn:active {
    transform: translateY(0);
    filter: brightness(.95);
}
.dl-btn__logo  { display: block; flex-shrink: 0; }
.dl-btn__logo--apple   { width: 30px; height: 37px; }
.dl-btn__logo--google  { width: 33px; height: 37px; }
.dl-btn__text  { display: block; flex-shrink: 0; }
.dl-btn__text--apple   { width: 79px; height: 17px; }
.dl-btn__text--google  { width: 96px; height: 19px; }
.dl-btn__arrow { display: block; width: 24px; height: 24px; flex-shrink: 0; margin-left: auto; }

/* ============================================================
   GUTENBERG CONTENT — BLOCKS
   ============================================================ */
.entry-content {
    display: flex;
    flex-direction: column;
    gap: var(--section-gap);
}

/* — Group block: bullet + h2 + параграфы — */
.entry-content .wp-block-heading + p {
    margin-top: 14px;
}
.entry-content p + p {
    margin-top: 4px;
}
.entry-content .wp-block-heading {
    font-weight: 500;
    font-size: 24px;
    line-height: 1.3;
    color: var(--c-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}
.entry-content .wp-block-heading::before {
    content: '';
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-accent);
}
.entry-content p {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.3;
    color: var(--c-text-mute);
    margin: 0;
}

/* — Media-text block: текст и картинка, 24px gap (Figma) — */
/* Использует нативный CSS Grid wp:media-text — ползунок Media width в инспекторе работает */
.entry-content .wp-block-media-text {
    display: grid;
    align-items: center;
    gap: 24px;
    grid-template-columns: 50% auto;
}
.entry-content .wp-block-media-text.has-media-on-the-right {
    grid-template-columns: auto 50%;
}
.entry-content .wp-block-media-text__content {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.entry-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content {
    grid-column: 1;
}
.entry-content .wp-block-media-text__media {
    grid-column: 1;
    grid-row: 1;
    border-radius: 10px;
    overflow: hidden;
}
.entry-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media {
    grid-column: 2;
}
.entry-content .wp-block-media-text__media img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================================
   FOOTER — зелёный градиент с тёмным overlay
   ============================================================ */
.site-footer {
    background:
        linear-gradient(rgba(0,0,0,0.20), rgba(0,0,0,0.20)),
        var(--bg-green-grad);
    background-blend-mode: normal;
}
.site-footer__inner {
    width: var(--container-w);
    max-width: 100%;
    margin-inline: auto;
    height: var(--footer-h);
    padding-block: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.site-footer__logo {
    width: 239px;
    height: 54px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}
.site-footer__logo img,
.site-footer__logo svg { width: 100%; height: 100%; }

.site-footer__nav-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}
.site-footer__nav-label {
    font-weight: 600;
    font-size: 16px;
    line-height: 1.3;
    color: var(--c-text);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.site-footer__nav {
    display: flex;
}
.site-footer__menu {
    display: flex;
    align-items: center;
    gap: 24px;
}
.site-footer__menu a {
    font-weight: 500;
    font-size: 14px;
    line-height: 1.3;
    color: var(--c-text);
    padding-bottom: 4px;
    border-bottom: 1px solid transparent;
    transition: border-color .15s ease;
}
.site-footer__menu a:hover,
.site-footer__menu .current-menu-item > a,
.site-footer__menu .current_page_item > a,
.site-footer__menu .is-active > a {
    border-bottom-color: #fff;
}

/* ============================================================
   ADMIN BAR FIX
   ============================================================ */
.admin-bar .site-header { top: 32px; }
.admin-bar { padding-top: calc(var(--header-total-h) + 32px); }
@media (max-width: 782px) {
    .admin-bar .site-header { top: 46px; }
    .admin-bar { padding-top: calc(var(--header-total-h) + 46px); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ---- 1536 (1441–1536) — контейнер впритык, лёгкие сужения ---- */
@media (max-width: 1536px) {
    :root {
        --container-w: min(1400px, calc(100vw - 32px));
    }
}

/* ---- 1440 (1101–1440) ---- */
@media (max-width: 1440px) {
    :root {
        --container-w: min(1400px, calc(100vw - 32px));
        --hero-h: min(296px, calc(296px * 100vw / 1920));
    }
}

/* ---- 1150: бургер-меню ---- */
@media (max-width: 1150px) {
    .site-header__burger { display: inline-block; }

    .site-header__nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 50;
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
        padding: 16px 24px;
        background: #002013;          /* тёмно-зелёный из макета (Frame 126) */
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        visibility: hidden;
        transition: max-height .25s ease, opacity .2s ease, visibility 0s linear .25s;
    }
    .site-header__nav.is-open {
        max-height: calc(100vh - var(--header-h) - 6px);
        opacity: 1;
        visibility: visible;
        overflow: auto;
        transition: max-height .25s ease, opacity .2s ease, visibility 0s linear 0s;
    }
    .site-header__menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .site-header__menu a {
        padding: 0;
        font-weight: 500;
        font-size: 14px;
        line-height: 1.3;
    }
    /* Lang-toggle справа от первого пункта меню */
    .site-header__nav .lang-toggle {
        position: absolute;
        top: 16px;
        right: 24px;
    }
    .site-header__cta {
        order: 99;                    /* всегда последняя в колонке */
        align-self: stretch;
        height: 48px;
    }
}

/* ---- 1100 (769–1100) ---- */
@media (max-width: 1100px) {
    :root {
        --container-w: calc(100vw - 32px);
        --hero-h: 240px;
        --section-gap: 32px;
    }
    .entry-content .wp-block-heading { font-size: 22px; }

    .entry-content .wp-block-media-text { gap: 16px; }
}

/* ---- 768 (451–768) — переход в "tablet" ---- */
@media (max-width: 768px) {
    :root {
        --container-w: calc(100vw - 24px);
        --header-h: 64px;
        --footer-h: 88px;
        --hero-h: 200px;
        --section-gap: 28px;
    }

    .site-header__inner { gap: 12px; }
    .site-header__logo { width: 180px; height: 40px; }
    .lang-toggle { width: 80px; height: 28px; }
    .lang-toggle__item { font-size: 11px; }

    .dl-btn {
        width: 200px;
        height: 72px;
        padding: 18px 18px;
        gap: 16px;
        border-radius: 16px;
    }
    .dl-btn__logo--apple  { width: 26px; height: 32px; }
    .dl-btn__logo--google { width: 29px; height: 32px; }
    .dl-btn__text--apple  { width: 68px; height: 15px; }
    .dl-btn__text--google { width: 82px; height: 16px; }
    .dl-btn__arrow { width: 20px; height: 20px; }

    .entry-content .wp-block-heading { font-size: 20px; }

    .entry-content .wp-block-media-text,
    .entry-content .wp-block-media-text.has-media-on-the-right {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto;
        gap: 16px;
        align-items: stretch;
    }
    .entry-content .wp-block-media-text__content,
    .entry-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content {
        grid-column: 1;
        grid-row: 2;
    }
    .entry-content .wp-block-media-text__media,
    .entry-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        max-width: 100%;
        display: flex;
        justify-content: center;
    }
    .entry-content .wp-block-media-text__media img {
        width: auto;
        max-width: min(100%, 400px);
        height: auto;
    }

    .site-footer__inner {
        flex-direction: column;
        gap: 16px;
        height: auto;
        padding-block: 20px;
    }
    .site-footer__menu {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 16px 24px;
    }
}

/* ---- 450 (361–450) — мобилка ---- */
@media (max-width: 450px) {
    :root {
        --container-w: calc(100vw - 16px);
        --header-h: 56px;
        --hero-h: 180px;
        --section-gap: 24px;
    }

    .site-header__logo { width: 140px; height: 32px; }

    .entry-content .wp-block-heading { font-size: 18px; }
    .entry-content p { font-size: 14px; }
    .entry-content .wp-block-heading::before { width: 6px; height: 6px; }

    .download-buttons { gap: 12px; }
    .dl-btn {
        width: 180px;
        height: 64px;
        padding: 14px 16px;
        gap: 12px;
        border-radius: 14px;
    }
    .dl-btn__logo--apple  { width: 23px; height: 28px; }
    .dl-btn__logo--google { width: 25px; height: 28px; }
    .dl-btn__text--apple  { width: 60px; height: 13px; }
    .dl-btn__text--google { width: 73px; height: 14px; }
    .dl-btn__arrow { width: 18px; height: 18px; }

    .site-footer__menu { font-size: 13px; gap: 10px 18px; }
}

/* ---- ≤430: кнопки в столбик на всю ширину ---- */
@media (max-width: 430px) {
    .download-buttons { flex-direction: column; align-items: stretch; gap: 12px; }
    .dl-btn { width: 100%; max-width: none; margin-inline: 0; }
}

/* ---- 360 (max 360) — самый узкий ---- */
@media (max-width: 360px) {
    :root {
        --container-w: calc(100vw - 12px);
        --hero-h: 160px;
        --section-gap: 20px;
    }

    .site-header__inner { padding-inline: 6px; }
    .site-header__logo { width: 120px; }

    .entry-content .wp-block-heading { font-size: 16px; }
    .entry-content p { font-size: 13px; line-height: 1.4; }
}

/* ============================================================
   404 page
   ============================================================ */
.error-404-main {
    min-height: calc(100vh - var(--header-total-h) - var(--footer-h));
    display: flex;
    align-items: center;
}
.error-404 {
    text-align: center;
    padding-block: 80px;
    margin-inline: auto;
    max-width: 720px;
}
.error-404__code {
    font-weight: 800;
    font-size: 180px;
    line-height: 1;
    color: var(--c-accent);
    letter-spacing: -4px;
    text-shadow: 0 4px 24px rgba(192, 32, 38, .35);
    margin-bottom: 8px;
}
.error-404__title {
    font-weight: 600;
    font-size: 32px;
    line-height: 1.2;
    color: var(--c-text);
    margin: 0 0 16px;
}
.error-404__title::before { content: none; }
.error-404__subtitle {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.4;
    color: var(--c-text-mute);
    margin: 0 0 32px;
}
.error-404__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 28px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: var(--c-text);
    color: var(--c-cta-text);
    font-weight: 800;
    font-size: 16px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.error-404__cta:hover {
    background: transparent;
    color: var(--c-text);
    border-color: var(--c-text);
}

@media (max-width: 768px) {
    .error-404__code { font-size: 140px; letter-spacing: -3px; }
    .error-404__title { font-size: 26px; }
    .error-404 { padding-block: 60px; }
}
@media (max-width: 450px) {
    .error-404__code { font-size: 110px; letter-spacing: -2px; }
    .error-404__title { font-size: 22px; }
    .error-404__subtitle { font-size: 14px; }
    .error-404__cta { height: 44px; padding: 0 20px; font-size: 14px; }
    .error-404 { padding-block: 40px; }
}
