@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Lora:wght@500;600;700&display=swap');

:root {
    --mbg-green: #075a2d;
    --mbg-wine: #8e1c2d;
    --mbg-paper: #f9f1e1;
    --mbg-line: #d0c4ae;
}

.mbg-shell {
    width: 87vw;
    margin-inline: auto;
}

.mbg-main h1,
.mbg-main h2,
.mbg-main h3 {
    font-family: Lora, Georgia, serif;
    color: var(--mbg-green);
}

.mbg-kicker {
    margin: 0 0 10px;
    color: var(--mbg-wine);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mbg-hero {
    min-height: clamp(340px, 34vw, 560px);
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    overflow: hidden;
    background: url('../images/about-us/about_us_bg.png') center / cover no-repeat;
}

.mbg-hero__copy {
    padding: clamp(36px, 5vw, 76px);
}

.mbg-hero h1 {
    margin: 0;
    font-size: clamp(48px, 5.4vw, 88px);
    line-height: .98;
}

.mbg-hero__copy > i {
    display: block;
    width: 64px;
    height: 3px;
    margin: 24px 0;
    background: var(--mbg-wine);
}

.mbg-hero__copy > p:last-child {
    max-width: 590px;
    font-size: clamp(15px, 1.25vw, 20px);
    line-height: 1.65;
}


.mbg-intro {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: clamp(36px, 7vw, 100px);
    align-items: center;
    padding-block: clamp(46px, 6vw, 86px);
    border-bottom: 1px solid var(--mbg-line);
}

.mbg-intro h2,
.mbg-contact h2,
.mbg-documents h2 {
    margin: 0;
    font-size: clamp(32px, 3vw, 48px);
}

.mbg-intro > p {
    font-size: clamp(16px, 1.2vw, 19px);
    line-height: 1.8;
}

.mbg-contact,
.mbg-documents {
    padding-block: clamp(46px, 6vw, 82px);
}

.mbg-contact > header,
.mbg-documents > header {
    margin-bottom: 30px;
    text-align: center;
}

.mbg-contact__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.mbg-contact__grid > a {
    min-height: 145px;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 28px;
    border: 1px solid var(--mbg-line);
    border-radius: 12px;
    background: rgba(255, 253, 248, .72);
    color: inherit;
    text-decoration: none;
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.mbg-contact__grid > a:hover,
.mbg-contact__grid > a:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(42, 55, 46, .12);
}

.mbg-contact__grid img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.mbg-contact__grid span {
    display: grid;
    gap: 7px;
}

.mbg-contact__grid b {
    color: var(--mbg-green);
    font: 700 22px Lora, serif;
}

.mbg-contact__grid em {
    font-style: normal;
    line-height: 1.55;
}

.mbg-documents {
    margin-bottom: 38px;
    background: rgba(232, 221, 201, .58);
}

.mbg-documents > header > p:last-child {
    margin-bottom: 0;
}

.mbg-document-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding-inline: clamp(20px, 3vw, 44px);
}

.mbg-document-grid article {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    padding: 28px;
    border: 1px solid var(--mbg-line);
    border-radius: 12px;
    background: #fffaf0;
}

.mbg-document__icon {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--mbg-wine);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.mbg-document-grid h3 {
    margin: 22px 0 10px;
    font-size: 21px;
}

.mbg-document-grid p {
    line-height: 1.6;
}

.mbg-document-grid a,
.mbg-document__pending {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    border-radius: 6px;
    font-weight: 800;
}

.mbg-document-grid a {
    background: var(--mbg-green);
    color: #fff;
    text-decoration: none;
}

.mbg-document__pending {
    border: 1px dashed #a89c87;
    color: #756b5d;
}

@media (max-width: 900px) {
    .mbg-shell { width: 92vw; }
    .mbg-hero { grid-template-columns: 1fr; }
    .mbg-hero > img { display: none; }
    .mbg-intro { grid-template-columns: 1fr; gap: 20px; }
    .mbg-document-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .mbg-shell { width: 94vw; }
    .mbg-hero { min-height: 490px; background-position: 67% center; }
    .mbg-hero__copy { padding: 34px 22px; align-self: start; }
    .mbg-hero h1 { font-size: 46px; }
    .mbg-hero__copy > p:last-child { max-width: 78%; }
    .mbg-contact__grid { grid-template-columns: 1fr; }
    .mbg-contact__grid > a { min-height: 125px; padding: 22px; }
    .mbg-document-grid { padding-inline: 14px; }
}

.mbg-contact__grid > a,
.mbg-contact__grid > a > span,
.mbg-contact__grid em {
    min-width: 0;
    overflow-wrap: anywhere;
}

.mbg-license-preview img,
.mbg-license-dialog figure img {
    object-fit: contain;
}

@media (max-width: 620px) {
    .mbg-hero {
        min-height: 0;
        padding-top: 36.95%;
        background-position: center top;
        background-size: 100% auto;
        background-repeat: no-repeat;
        background-color: #f9f1e1;
    }

    .mbg-hero__copy {
        width: 100%;
        padding: 26px 22px 32px;
        box-sizing: border-box;
        background: rgba(249, 241, 225, .96);
    }

    .mbg-hero__copy > p:last-child { max-width: none; }
}


@media (max-width: 620px) {
    .mbg-hero {
        background-image:
            linear-gradient(90deg, rgba(249, 241, 225, .90), rgba(249, 241, 225, .62)),
            url('../images/about-us/about_us_bg.png');
    }

    .mbg-hero__copy > p:last-child {
        max-width: 84%;
        font-weight: 600;
    }
}


/* Keeps licensing available without making it a primary visual section. */
.mbg-documents {
    margin-bottom: 24px;
    padding-block: 24px;
    background: rgba(232, 221, 201, .40);
}

.mbg-documents > header {
    margin-bottom: 16px;
    padding-inline: 20px;
    text-align: left;
}

.mbg-documents > header .mbg-kicker {
    margin-bottom: 5px;
    font-size: 11px;
}

.mbg-documents h2 {
    font-size: clamp(23px, 2vw, 31px);
}

.mbg-documents > header > p:last-child {
    margin: 6px 0 0;
    font-size: 14px;
}

.mbg-document-grid {
    gap: 10px;
    padding-inline: 20px;
}

.mbg-document-grid article {
    min-height: 0;
    padding: 15px;
    border-radius: 8px;
}

.mbg-document-grid h3 {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 1.35;
}

.mbg-document-grid p {
    margin: 0 0 10px;
    font-size: 13px;
}

.mbg-document-grid a,
.mbg-document__pending {
    min-height: 34px;
    margin-top: 0;
    padding-inline: 10px;
    font-size: 12px;
}

@media (max-width: 900px) {
    .mbg-document-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .mbg-document-grid {
        grid-template-columns: 1fr;
        padding-inline: 14px;
    }
}

/* Final mobile hero composition: complete image first, readable copy second. */
@media (max-width: 620px) {
    .mbg-hero {
        min-height: 0;
        padding-top: 36.95%;
        background-position: center top;
        background-size: 100% auto;
        background-repeat: no-repeat;
        background-color: #f9f1e1;
    }

    .mbg-hero__copy {
        width: 100%;
        padding: 26px 22px 32px;
        box-sizing: border-box;
        background: rgba(249, 241, 225, .96);
    }

    .mbg-hero__copy > p:last-child { max-width: none; }
}


/* Displays licenses as quiet image previews rather than download cards. */
.mbg-documents {
    padding-block: 18px;
}

.mbg-documents > header {
    margin-bottom: 12px;
}

.mbg-document-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.mbg-license-preview {
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--mbg-line);
    border-radius: 7px;
    background: #fff;
    color: var(--mbg-green);
    cursor: zoom-in;
    text-align: left;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.mbg-license-preview:hover,
.mbg-license-preview:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(42, 55, 46, .13);
    outline: 2px solid rgba(7, 90, 45, .24);
    outline-offset: 2px;
}

.mbg-license-preview img {
    display: block;
    width: 100%;
    height: auto;
}

.mbg-license-pending {
    min-height: 130px !important;
    justify-content: center;
    padding: 16px !important;
}

.mbg-license-pending h3 {
    margin: 0 0 8px;
    font-size: 15px;
}

.mbg-license-pending span {
    color: #756b5d;
    font-size: 13px;
}

.mbg-license-dialog {
    width: min(1080px, calc(100vw - 34px));
    max-width: none;
    max-height: calc(100dvh - 34px);
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: 12px;
    background: #f6f0e3;
    box-shadow: 0 24px 80px rgba(20, 29, 24, .36);
}

.mbg-license-dialog::backdrop {
    background: rgba(20, 29, 24, .72);
    backdrop-filter: blur(3px);
}

.mbg-license-dialog figure {
    margin: 0;
    padding: 42px 24px 18px;
}

.mbg-license-dialog figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(30, 35, 31, .14);
}

.mbg-license-dialog figcaption {
    padding-top: 12px;
    color: var(--mbg-green);
    font: 700 16px Lora, serif;
    text-align: center;
}

.mbg-license-dialog__close {
    position: fixed;
    z-index: 2;
    top: max(24px, calc((100dvh - min(100dvh - 34px, 900px)) / 2 + 8px));
    right: max(24px, calc((100vw - min(100vw - 34px, 1080px)) / 2 + 8px));
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--mbg-green);
    font-size: 25px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}

@media (max-width: 620px) {
    .mbg-document-grid {
        grid-template-columns: 1fr;
    }

    .mbg-license-dialog figure {
        padding: 48px 10px 12px;
    }
}
