/* English pages use Space Grotesk for body text and display headings; Arabic keeps IBM Plex Sans Arabic and Alexandria.
   Keyed on the lang attribute of .sv, which the page script updates when the visitor switches language in place. */
.sv[lang="en"],
.sv[lang="en"] .disp {
    /* Arabic glyphs on English pages (the language toggle) fall back to the Arabic typeface. */
    font-family: 'Space Grotesk', 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
}

/* Large headings that wrap: tight lines suit the English display face, Arabic needs more room between lines. */
.sv .heading-loose {
    line-height: 1.1;
}

.sv[dir="rtl"] .heading-loose {
    line-height: 1.5;
}

/* Mobile navigation: a hamburger replaces the header links at 860px and below, opening a full-screen menu. */
.sv .menu-btn {
    display: none;
    flex: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(246, 241, 242, .35);
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    transition: background .25s, border-color .25s;
}

.sv .menu-btn:hover {
    background: rgba(246, 241, 242, .1);
    border-color: rgba(246, 241, 242, .7);
}

.sv .menu-btn span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: #F6F1F2;
}

.sv .menu-btn span:nth-child(2) {
    width: 12px;
    margin-inline-start: 6px;
    background: #C9A24B;
}

.sv .mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    padding: 20px clamp(20px, 5vw, 72px) calc(28px + env(safe-area-inset-bottom));
    overflow-y: auto;
    background: #2A0C15 radial-gradient(ellipse 90% 60% at 50% 0%, #4B1522 0%, rgba(42, 12, 21, 0) 75%);
    color: #F6F1F2;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .35s cubic-bezier(.2, .8, .2, 1), transform .45s cubic-bezier(.2, .8, .2, 1), visibility 0s .45s;
}

.sv .mobile-menu.open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .35s cubic-bezier(.2, .8, .2, 1), transform .45s cubic-bezier(.2, .8, .2, 1), visibility 0s;
}

.sv .mm-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sv .mm-close {
    position: relative;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(246, 241, 242, .35);
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
}

.sv .mm-close span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: #F6F1F2;
}

.sv .mm-close span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

.sv .mm-close span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.sv .mm-links {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 32px 0;
}

.sv .mm-link {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(232, 180, 190, .18);
    color: #F6F1F2;
    font-weight: 700;
    font-size: clamp(30px, 9vw, 52px);
    line-height: 1.25;
    text-decoration: none;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .4s, transform .5s cubic-bezier(.2, .8, .2, 1), color .25s;
}

.sv .mm-link:hover,
.sv .mm-link.is-active {
    color: #C9A24B;
}

.sv .mobile-menu.open .mm-link {
    opacity: 1;
    transform: none;
}

.sv .mobile-menu.open .mm-link:nth-child(2) { transition-delay: .05s; }
.sv .mobile-menu.open .mm-link:nth-child(3) { transition-delay: .1s; }
.sv .mobile-menu.open .mm-link:nth-child(4) { transition-delay: .15s; }
.sv .mobile-menu.open .mm-link:nth-child(5) { transition-delay: .2s; }

.sv .mm-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.sv .mm-foot .cta {
    flex: 1 1 auto;
}

html.menu-open,
html.menu-open body {
    overflow: hidden;
}

@media (max-width: 860px) {
    .sv .menu-btn {
        display: inline-flex;
    }
}

/* On phones the language toggle lives in the menu, leaving the header to the logo and the hamburger. */
@media (max-width: 520px) {
    .sv nav .lang-btn,
    .sv .bar .lang-btn {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sv .mobile-menu,
    .sv .mobile-menu.open,
    .sv .mm-link {
        transition: none;
        transform: none;
    }
}
