/* ==========================================================================
   Beynaa public website: shared components
   ========================================================================== */

/* --- Icons --------------------------------------------------------------- */

.icon {
    width: 1.5rem;
    height: 1.5rem;
    flex: none;
}

/* --- Header ---------------------------------------------------------------
   Fixed rather than sticky, so it can shrink on scroll without moving the
   page under it; <body> reserves its full height instead.                 */

body.landing {
    padding-top: var(--header-h);
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: var(--header-h);
    transition: min-height 0.35s var(--ease-out);
}

.site-header.is-scrolled,
.site-header.is-open {
    background: rgb(255 255 255 / 0.88);
    box-shadow: 0 1px 0 rgb(8 9 47 / 0.06);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
}

.is-tinted .site-header.is-scrolled,
.is-tinted .site-header.is-open {
    background: rgb(249 250 254 / 0.88);
}

.site-header.is-scrolled .site-header__inner {
    min-height: clamp(4rem, 3.5rem + 1.6vw, 5.25rem);
}

.site-logo {
    flex: none;
    border-radius: 0.5rem;
}

.site-logo img {
    width: clamp(8rem, 5.5rem + 10.6vw, 15.0625rem); /* 241 at 1440 */
    transition: width 0.35s var(--ease-out);
}

.site-header.is-scrolled .site-logo img {
    width: clamp(8rem, 6.8rem + 3.2vw, 10.5rem);
}

.site-nav__link {
    position: relative;
    display: inline-block;
    padding-block: 0.5rem;
    color: var(--c-ink);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.7;
    transition: color 0.2s;
}

.site-nav__link::after {
    content: "";
    position: absolute;
    inset: auto 0 0.3rem;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    scale: 0 1;
    transform-origin: left;
    transition: scale 0.3s var(--ease-out);
}

.site-nav__link:hover,
.site-nav__link.is-active {
    color: var(--c-brand);
}

.site-nav__link:hover::after {
    scale: 1 1;
}

.site-nav__link.is-active::after {
    display: none;
}

/*
 | Home: while the header floats over the full-screen film it is transparent
 | with light text and the light logo; past the film it returns to the white
 | bar above. landing.js toggles .is-over-hero. An open mobile menu always
 | uses the normal white styling.
 */
.site-logo .site-logo__light {
    display: none;
}

/* Without JS the header never learns where the film ends: keep it solid. */
.no-js .has-video-hero .site-header {
    background: var(--c-white);
}

.site-header.is-over-hero:not(.is-open):not(.is-scrolled) {
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.site-header.is-over-hero:not(.is-open):not(.is-scrolled) .site-logo__dark {
    display: none;
}

.site-header.is-over-hero:not(.is-open):not(.is-scrolled) .site-logo__light {
    display: block;
}

.site-header.is-over-hero:not(.is-open):not(.is-scrolled) .site-nav__link,
.site-header.is-over-hero:not(.is-open):not(.is-scrolled) .menu-toggle {
    color: rgb(255 255 255 / 0.9);
}

.site-header.is-over-hero:not(.is-open):not(.is-scrolled) .site-nav__link:hover {
    color: var(--c-white);
}

.site-header.is-over-hero:not(.is-open):not(.is-scrolled) .site-nav__link.is-active {
    color: #C9A74D;
}

.site-header.is-over-hero:not(.is-open):not(.is-scrolled) .site-menu__cta {
    background: var(--c-white);
    color: var(--c-ink);
}

.site-header.is-over-hero:not(.is-open):not(.is-scrolled) .site-menu__cta::before {
    display: none;
}

.site-header.is-over-hero:not(.is-open):not(.is-scrolled) .site-menu__cta:hover {
    box-shadow: 0 14px 32px -12px rgb(0 0 0 / 0.5);
}

/* Desktop: logo · centred links · CTA, as in the design. */
@media (min-width: 64em) {
    .menu-toggle {
        display: none;
    }

    .site-menu {
        display: flex;
        flex: 1;
        align-items: center;
        gap: 1.5rem;
    }

    .site-menu nav {
        flex: 1;
    }

    .site-nav {
        display: flex;
        justify-content: center;
        gap: clamp(1.75rem, -3rem + 6.2vw, 4.0625rem);
    }
}

/* Mobile and tablet: a toggle and a panel that drops below the bar. */
@media (max-width: 63.99em) {
    .menu-toggle {
        position: relative;
        display: grid;
        place-items: center;
        width: 3rem;
        height: 3rem;
        margin-left: auto;
        margin-right: -0.5rem;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: transparent;
        color: var(--c-ink);
        cursor: pointer;
    }

    .menu-toggle__bars,
    .menu-toggle__bars::before,
    .menu-toggle__bars::after {
        display: block;
        width: 1.375rem;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
        transition: translate 0.3s var(--ease-out), rotate 0.3s var(--ease-out), opacity 0.2s;
    }

    .menu-toggle__bars {
        position: relative;
    }

    .menu-toggle__bars::before,
    .menu-toggle__bars::after {
        content: "";
        position: absolute;
        left: 0;
    }

    .menu-toggle__bars::before {
        translate: 0 -7px;
    }

    .menu-toggle__bars::after {
        translate: 0 7px;
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle__bars {
        background: transparent;
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle__bars::before {
        translate: 0 0;
        rotate: 45deg;
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle__bars::after {
        translate: 0 0;
        rotate: -45deg;
    }

    .site-menu {
        position: absolute;
        inset: 100% 0 auto;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        max-height: calc(100dvh - 100%);
        padding: 0.5rem var(--gutter) 2rem;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--c-white);
        box-shadow: 0 24px 32px -24px rgb(8 9 47 / 0.25);
        visibility: hidden;
        opacity: 0;
        translate: 0 -0.75rem;
        transition: opacity 0.25s var(--ease-out), translate 0.3s var(--ease-out), visibility 0s linear 0.3s;
    }

    .is-tinted .site-menu {
        background: var(--c-surface-tint);
    }

    .site-header.is-open .site-menu {
        visibility: visible;
        opacity: 1;
        translate: 0 0;
        transition-delay: 0s;
    }

    .site-nav li + li {
        border-top: 1px solid var(--c-line-soft);
    }

    .site-nav__link {
        display: block;
        padding-block: 0.9rem;
        font-size: 1.25rem;
    }

    .site-nav__link::after {
        display: none;
    }

    .site-menu__cta {
        align-self: stretch;
    }

    /* Without JS the toggle cannot work, so show the links inline instead. */
    .no-js .menu-toggle {
        display: none;
    }

    .no-js .site-header__inner {
        flex-wrap: wrap;
        padding-block: 1rem;
    }

    .no-js .site-menu {
        position: static;
        width: 100%;
        padding: 0;
        box-shadow: none;
        visibility: visible;
        opacity: 1;
        translate: 0 0;
    }
}

/* Keeps the page from scrolling behind the open mobile menu. */
.landing.menu-open {
    overflow: hidden;
}

/* --- Buttons ------------------------------------------------------------- */

.btn {
    --btn-h: 3.375rem;
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-height: var(--btn-h);
    padding: 0 1.8rem;
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition:
        translate 0.25s var(--ease-out),
        box-shadow 0.25s var(--ease-out),
        background-color 0.2s,
        border-color 0.2s,
        color 0.2s;
}

.btn__icon {
    transition: translate 0.25s var(--ease-out);
}

.btn:hover .btn__icon--end {
    translate: 0.25rem 0;
}

.btn:active {
    translate: 0 1px;
}

.btn--primary {
    color: var(--c-white);
    background: var(--g-brand);
}

/* The hover gradient fades in on a layer: gradients cannot transition. */
.btn--primary::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    background: var(--g-brand-hover);
    opacity: 0;
    transition: opacity 0.25s;
}

.btn--primary:hover {
    translate: 0 -2px;
    box-shadow: var(--sh-float);
}

.btn--primary:hover::before {
    opacity: 1;
}

.btn--outline {
    color: var(--c-brand-deep);
    background: transparent;
    border-color: var(--c-line-brand);
}

.btn--outline:hover {
    border-color: var(--c-brand);
    background: var(--c-surface-cool);
}

/* Large CTA: label centred, arrow held against the right edge. */
.btn--lg {
    --btn-h: 3.75rem;
    display: inline-grid;
    grid-template-columns: 1fr auto 1fr;
    width: min(21rem, 100%);
    padding: 0 2rem;
    font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
    font-weight: 500;
}

.btn--lg .btn__label {
    grid-column: 2;
}

.btn--lg .btn__icon--end {
    grid-column: 3;
    justify-self: end;
}

.btn--sm {
    --btn-h: 2.875rem;
    padding: 0 1.9rem;
    font-size: 1rem;
    font-weight: 500;
}

/* --- Footer -------------------------------------------------------------- */

.site-footer {
    padding-block: clamp(2.5rem, 2rem + 1.5vw, 3.0625rem) 2.5rem;
    background: var(--c-white);
    font-size: 1.125rem;
}

.site-footer__top {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem 1.5rem;
    padding-bottom: clamp(2.5rem, 2rem + 1.5vw, 3.6875rem);
    border-bottom: 1px solid var(--c-line);
}

.site-footer__brand {
    grid-column: 1 / -1;
}

.site-footer__logo {
    display: inline-block;
    margin-bottom: 0.9rem;
}

.site-footer__logo img {
    width: 7.5625rem;
}

.site-footer__brand p {
    line-height: 1.55;
}

.site-footer__heading {
    margin-bottom: 1rem;
    color: var(--c-ink);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.4;
}

.site-footer__col ul {
    display: grid;
    gap: 0.75rem;
}

.site-footer__col a {
    display: inline-block;
    line-height: 1.55;
    transition: color 0.2s, translate 0.2s var(--ease-out);
}

.site-footer__col a:hover {
    color: var(--c-brand);
}

.site-footer__col ul:not(.site-footer__social) a:hover {
    translate: 2px 0;
}

.site-footer__social {
    display: flex !important;
    gap: 1.3rem;
}

.site-footer__social a {
    display: grid;
    place-items: center;
    color: var(--c-ink);
}

.site-footer__social .icon {
    width: 1.75rem;
    height: 1.75rem;
}

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem 2rem;
    padding-top: 2.3rem;
    font-size: 1rem;
}

.site-footer__bottom p {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.site-footer__heart {
    width: 1.125rem;
    height: 1.125rem;
    color: var(--c-ink);
}

@media (min-width: 48em) {
    .site-footer__top {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 64em) {
    .site-footer__top {
        grid-template-columns: 1.55fr 1.25fr 1.1fr 1.5fr auto;
    }

    .site-footer__brand {
        grid-column: auto;
    }
}

/* --- Pillars band -------------------------------------------------------- */

.pillars-section {
    padding-block: 0 clamp(3rem, 2rem + 3vw, 4.25rem);
}

.pillars {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 1rem;
    padding: clamp(1.75rem, 1rem + 2.5vw, 3.125rem) clamp(1rem, -1rem + 6vw, 5rem);
    background: var(--c-surface);
    text-align: center;
}

.pillars__item {
    color: var(--c-ink);
    font-size: var(--fs-title);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 0.25s;
}

.pillars__item:hover {
    color: var(--c-brand);
}

.pillars-section--three .pillars {
    grid-template-columns: 1fr;
}

@media (min-width: 40em) {
    .pillars,
    .pillars-section--three .pillars {
        display: flex;
        justify-content: space-around;
    }
}

/* --- Feature grid -------------------------------------------------------- */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
    gap: 2.25rem 0;
    padding: clamp(2rem, 1.2rem + 2.5vw, 3.0625rem) clamp(1rem, 0rem + 2.5vw, 2.5rem);
    border: 1px solid var(--c-line-cool);
    background: var(--c-surface-tint);
    text-align: center;
}

.feature-grid__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5625rem;
    padding-inline: clamp(0.5rem, 0.3rem + 0.8vw, 1.3rem);
}

.feature-grid__icon {
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 0.5rem;
    color: var(--c-ink);
    transition: translate 0.3s var(--ease-out), color 0.3s;
}

.feature-grid__item:hover .feature-grid__icon {
    translate: 0 -3px;
    color: var(--c-brand);
}

.feature-grid__title {
    color: var(--c-ink);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
}

.feature-grid__text {
    max-width: 15rem;
    color: var(--c-brand-deep);
    font-size: var(--fs-xs);
    font-weight: 400;
    line-height: 1.7;
}

@media (min-width: 64em) {
    .feature-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .feature-grid__item + .feature-grid__item {
        border-left: 1px solid var(--c-line-cool);
    }
}

/* --- CTA band ------------------------------------------------------------ */

.cta-section {
    padding-top: 0;
}

.cta-band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem 3rem;
    padding: clamp(1.75rem, 1rem + 2.8vw, 4.5rem) clamp(1.25rem, 0rem + 4vw, 3.75rem);
    border-radius: var(--r-md);
    background: var(--c-surface-cool);
}

.cta-band__intro {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 0.6rem + 1vw, 1.4375rem);
}

.cta-band__icon {
    width: clamp(4.25rem, 3.4rem + 2.6vw, 6.5625rem);
    flex: none;
    transition: rotate 0.4s var(--ease-out);
}

.cta-band:hover .cta-band__icon {
    rotate: -4deg;
}

.cta-band__title {
    color: var(--c-ink);
    font-size: var(--fs-cta);
    font-weight: 700;
    line-height: 1.24;
    letter-spacing: -0.05em;
}

.cta-band__text,
.cta-band__note {
    font-weight: 400;
}

.cta-band__action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

@media (max-width: 47.99em) {
    .cta-band__action {
        width: 100%;
    }

    .cta-band__action .btn {
        width: 100%;
    }
}

/* --- Soft halo -----------------------------------------------------------
   The blurred blue-rimmed circle rising from the bottom of the centred
   pages. --glow-top sets where its crown sits within the section.        */

.glow {
    position: relative;
    isolation: isolate;
    overflow: clip;
}

.glow::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: var(--glow-top, 58%);
    left: 50%;
    width: max(114%, 56rem);
    aspect-ratio: 1;
    translate: -50% 0;
    border-radius: 50%;
    background: radial-gradient(56% 66% at 50% 4%, var(--c-white) 0%, var(--c-glow) 100%);
    filter: blur(64px);
    opacity: 0.9;
    pointer-events: none;
}

/* --- Forms --------------------------------------------------------------- */

.field {
    display: grid;
    gap: 0.5rem;
}

.field__label {
    color: #000;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
}

.field__optional {
    color: var(--c-muted);
}

.field__control {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 3rem;
    border: 1px solid var(--c-field);
    border-radius: var(--r-field);
    background: var(--c-white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field__control:hover {
    border-color: var(--c-body);
}

.field__control:focus-within {
    border-color: var(--c-brand);
    box-shadow: 0 0 0 4px rgb(16 8 192 / 0.1);
}

.field__input {
    flex: 1;
    min-width: 0;
    height: 3rem;
    padding: 0 3.25rem 0 1.5rem;
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: var(--c-ink);
    font-size: 0.9375rem;
    font-weight: 400;
    -webkit-appearance: none;
    appearance: none;
}

.landing .field__input:focus-visible,
.landing .phone-code__select:focus-visible {
    outline: none;
}

.field__input::placeholder {
    color: var(--c-muted);
    opacity: 1;
}

select.field__input {
    cursor: pointer;
}

/* The "Select your country" placeholder reads as a placeholder. */
select.field__input:invalid {
    color: var(--c-muted);
}

select.field__input option {
    color: var(--c-ink);
}

.field__icon {
    position: absolute;
    right: 1.5rem;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--c-ink);
    pointer-events: none;
}

.field__control--select:focus-within .field__icon {
    rotate: 180deg;
}

.field__icon {
    transition: rotate 0.25s var(--ease-out);
}

.field__error {
    color: var(--c-error);
    font-size: var(--fs-xs);
    font-weight: 500;
    line-height: 1.4;
}

.has-error .field__control {
    border-color: var(--c-error);
}

/* Mobile number: calling-code picker joined to the number input. */
.phone-code {
    position: relative;
    display: flex;
    align-items: center;
    flex: none;
    align-self: stretch;
    border-right: 1px solid var(--c-field);
}

.phone-code__select {
    height: 100%;
    width: 6.9rem;
    padding: 0 1.9rem 0 1.25rem;
    border: 0;
    border-radius: var(--r-field) 0 0 var(--r-field);
    background: transparent;
    color: var(--c-muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.phone-code__chevron {
    position: absolute;
    right: 0.6rem;
    width: 0.95rem;
    height: 0.95rem;
    color: var(--c-muted);
    pointer-events: none;
}

.field__control--phone .field__input {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Checkbox */
.check {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.check__input {
    display: grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    border: 1px solid var(--c-field);
    border-radius: 3px;
    background: var(--c-white);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: background-color 0.2s, border-color 0.2s;
}

.check__input::after {
    content: "";
    width: 0.625rem;
    height: 0.35rem;
    border: 2px solid var(--c-white);
    border-top: 0;
    border-right: 0;
    rotate: -45deg;
    translate: 0 -1px;
    scale: 0;
    transition: scale 0.2s var(--ease-out);
}

.check__input:checked {
    border-color: var(--c-brand);
    background: var(--c-brand);
}

.check__input:checked::after {
    scale: 1;
}

.check__label {
    color: var(--c-muted);
    font-size: 1rem;
    line-height: 1.5;
    cursor: pointer;
}

.check .field__error {
    grid-column: 1 / -1;
}

.has-error .check__input {
    border-color: var(--c-error);
}

/* --- Video dialog -------------------------------------------------------- */

.video-dialog {
    width: min(100% - 2rem, 60rem);
    padding: 0;
    border: 0;
    border-radius: var(--r-lg);
    background: #000;
    overflow: hidden;
}

.video-dialog::backdrop {
    background: rgb(8 9 47 / 0.72);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.video-dialog video {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.video-dialog__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / 0.92);
    color: var(--c-ink);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

/* --- Prose (text pages) -------------------------------------------------- */

.prose {
    max-width: 46rem;
    font-weight: 400;
    line-height: 1.75;
}

.prose > * + * {
    margin-top: 1.1em;
}

.prose h2 {
    margin-top: 2.2em;
    color: var(--c-ink);
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
    font-weight: 700;
    line-height: 1.3;
}

.prose h3,
.prose h4 {
    margin-top: 1.8em;
    color: var(--c-ink);
    font-size: 1.125rem;
    font-weight: 700;
}

.prose :where(ul, ol) {
    padding-left: 1.25rem;
}

.prose li + li {
    margin-top: 0.5em;
}

.prose strong,
.prose b {
    color: var(--c-ink);
    font-weight: 700;
}

.prose a {
    color: var(--c-brand);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.prose a:hover {
    text-decoration-thickness: 2px;
}

.prose blockquote {
    padding-left: 1.25rem;
    border-left: 3px solid var(--c-line-brand);
}

/* --- Contact cards ------------------------------------------------------- */

.prose .contact-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
    gap: 1rem;
    padding: 0;
}

.prose .contact-list li + li {
    margin-top: 0;
}

.prose .contact-card {
    display: grid;
    gap: 0.25rem;
    height: 100%;
    padding: 1.5rem;
    border: 1px solid var(--c-line-cool);
    border-radius: var(--r-md);
    background: var(--c-surface-tint);
    color: var(--c-body);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.25s, translate 0.25s var(--ease-out);
}

.prose .contact-card:hover {
    border-color: var(--c-line-brand);
    box-shadow: var(--sh-card);
    translate: 0 -2px;
}

.contact-card__icon {
    margin-bottom: 0.5rem;
    color: var(--c-brand);
}

.contact-card__label {
    color: var(--c-ink);
    font-weight: 700;
}

.contact-card__value {
    overflow-wrap: anywhere;
}
