/* ==========================================================================
   Beynaa public website: foundations
   Fonts, design tokens (from the Figma file), reset, type scale, layout
   primitives and the scroll-reveal system. Scoped to body.landing so none of
   it can reach the admin panel, which never loads this file anyway.
   ========================================================================== */

@font-face {
    font-family: "Satoshi";
    src: url("../fonts/satoshi-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Satoshi";
    src: url("../fonts/satoshi-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Satoshi";
    src: url("../fonts/satoshi-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Abhaya Libre";
    src: url("../fonts/abhaya-libre-500-latin.woff2") format("woff2");
    font-weight: 500;
    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: "Abhaya Libre";
    src: url("../fonts/abhaya-libre-500-latin-ext.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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 {
    /* colour */
    --c-ink: #08092F;
    --c-body: #2A3A54;
    --c-brand: #1008C0;
    --c-brand-deep: #0B069C;
    --c-gold: #B08036;
    --c-muted: #898989;
    --c-field: #A3A3A3;
    --c-line: #E4E4E4;
    --c-line-soft: #EEEEEE;
    --c-line-cool: #E5E9F9;
    --c-line-brand: #BEC8EB;
    --c-white: #FFFFFF;
    --c-surface: #F8F9FC;
    --c-surface-tint: #F9FAFE;
    --c-surface-cool: #F2F5FE;
    --c-surface-halo: #F5F8FE;
    --c-surface-grey: #FBFBFD;
    --c-glow: #D8E2FD;
    --c-error: #C62828;

    --g-brand: linear-gradient(90deg, #0B06A1 0%, #070570 100%);
    --g-brand-hover: linear-gradient(90deg, #1008C0 0%, #0B06A1 100%);

    /* type */
    --f-display: "Abhaya Libre", "Iowan Old Style", Georgia, serif;
    --f-sans: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --fs-display-xl: clamp(3.25rem, 1.9rem + 5.6vw, 7.25rem);   /* 116 */
    --fs-display-lg: clamp(3rem, 1.85rem + 4.8vw, 6.25rem);     /* 100 */
    --fs-display: clamp(2.625rem, 1.75rem + 3.6vw, 5rem);       /* 80 */
    --fs-display-md: clamp(2.5rem, 1.9rem + 2.6vw, 4rem);       /* 64, text pages */
    --fs-heading: clamp(2rem, 1.45rem + 2.3vw, 3.25rem);        /* 52 */
    --fs-tagline: clamp(1.375rem, 1.05rem + 1.4vw, 2.375rem);   /* 38 */
    --fs-lead: clamp(1.125rem, 0.97rem + 0.7vw, 1.625rem);      /* 26 */
    --fs-title: clamp(1.25rem, 1.05rem + 0.8vw, 1.625rem);      /* 26 */
    --fs-cta: clamp(1.5rem, 1.25rem + 1vw, 2.125rem);           /* 34 */
    --fs-body: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);         /* 18 */
    --fs-sm: 1rem;                                              /* 16 */
    --fs-xs: 0.875rem;                                          /* 14 */

    /* layout */
    --container: 77.5rem;                                       /* 1240 */
    --gutter: clamp(1rem, 0.2rem + 3.8vw, 3.5rem);
    --section: clamp(4rem, 2.5rem + 6vw, 8rem);
    --header-h: clamp(4.5rem, 2.9rem + 6.76vw, 9rem);            /* 144 */

    /* shape & depth */
    --r-pill: 999px;
    --r-lg: 1.25rem;
    --r-md: 1.0625rem;
    --r-img: 1.875rem;
    --r-field: 0.625rem;
    --sh-card: 0 4px 30px rgb(16 8 192 / 0.09);
    --sh-float: 0 18px 40px -12px rgb(11 6 161 / 0.35);

    /* motion */
    --ease-out: cubic-bezier(0.22, 0.7, 0.2, 1);
    --dur: 0.6s;
}

/* --- Reset -------------------------------------------------------------- */

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: var(--header-h);
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body.landing {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--c-white);
    color: var(--c-body);
    font-family: var(--f-sans);
    font-size: var(--fs-body);
    font-weight: 500;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

body.landing.is-tinted {
    background: var(--c-surface-tint);
}

.landing main {
    flex: 1;
}

.landing :where(h1, h2, h3, h4, p, figure, blockquote, ul, ol) {
    margin: 0;
}

.landing :where(ul[role="list"], ol[role="list"]) {
    list-style: none;
    padding: 0;
}

.landing img,
.landing svg,
.landing video {
    display: block;
    max-width: 100%;
}

.landing img {
    height: auto;
}

/* Zero specificity, so any component class (e.g. .btn--primary) wins. */
:where(.landing a) {
    color: inherit;
    text-decoration: none;
}

.landing :where(button, input, select, textarea) {
    font: inherit;
    color: inherit;
}

.landing :where(a, button, input, select, textarea, summary):focus-visible {
    outline: 3px solid rgb(16 8 192 / 0.4);
    outline-offset: 3px;
}

.landing ::selection {
    background: rgb(16 8 192 / 0.14);
}

/* --- Accessibility helpers --------------------------------------------- */

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 100;
    padding: 0.75rem 1.25rem;
    border-radius: var(--r-pill);
    background: var(--c-ink);
    color: var(--c-white);
    font-weight: 700;
    translate: 0 -200%;
    transition: translate 0.2s var(--ease-out);
}

.skip-link:focus {
    translate: 0 0;
}

/* --- Layout primitives -------------------------------------------------- */

.container {
    width: min(100% - 2 * var(--gutter), var(--container));
    margin-inline: auto;
}

.container--narrow {
    --container: 50.25rem; /* 804, the design's centred text blocks */
}

.section {
    padding-block: var(--section);
}

/* Two columns that stack below tablet width. */
.split {
    display: grid;
    gap: clamp(2.5rem, 1rem + 5vw, 5rem);
    align-items: center;
}

@media (min-width: 64em) {
    .split {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    }
}

/* --- Type ---------------------------------------------------------------- */

.display {
    color: var(--c-ink);
    font-family: var(--f-display);
    font-size: var(--fs-display);
    font-weight: 500;
    line-height: 1.075;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.display--xl {
    font-size: var(--fs-display-xl);
    line-height: 0.97;
}

.display--lg {
    font-size: var(--fs-display-lg);
    line-height: 0.99;
}

.display--md {
    font-size: var(--fs-display-md);
}

.display .line {
    display: block;
}

.accent {
    color: var(--c-gold);
}

/* The coloured full stop after a headline (blue in the design). */
.dot {
    color: var(--c-brand);
}

.heading {
    color: var(--c-ink);
    font-size: var(--fs-heading);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.heading .line {
    display: block;
}

.heading--center,
.body-text--center {
    text-align: center;
    margin-inline: auto;
}

.eyebrow {
    color: var(--c-brand);
    font-size: var(--fs-body);
    font-weight: 700;
    line-height: 1.9;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.eyebrow--lg {
    font-size: clamp(1.125rem, 0.95rem + 0.6vw, 1.5rem);
}

.eyebrow--center {
    text-align: center;
}

.eyebrow--spaced {
    color: var(--c-brand-deep);
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.78em; /* 14px tracking at 18px */
}

.lead {
    color: var(--c-body);
    font-size: var(--fs-lead);
    font-weight: 500;
    line-height: 1.65;
    text-wrap: pretty;
}

/* A line break kept from the design that only makes sense on wide screens. */
@media (max-width: 39.99em) {
    .br-wide {
        display: none;
    }
}

.body-text {
    font-size: var(--fs-body);
    font-weight: 400;
    line-height: 1.67;
    text-wrap: pretty;
}

/* --- Scroll reveal ------------------------------------------------------
   Only once JS has marked the page (.js) and only without reduced motion,
   so content is never hidden when the script cannot run.                 */

@media (prefers-reduced-motion: no-preference) {
    .js [data-reveal] {
        opacity: 0;
        translate: 0 1.5rem;
        transition:
            opacity var(--dur) var(--ease-out) var(--d, 0ms),
            translate var(--dur) var(--ease-out) var(--d, 0ms);
    }

    .js [data-reveal].is-visible {
        opacity: 1;
        translate: 0 0;
    }
}
