@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('fonts/IBM-Plex-Sans-Arabic-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('fonts/IBM-Plex-Sans-Arabic-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('fonts/IBM-Plex-Sans-Arabic-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}

:root {
    --brand: #00a0df;
    --brand-deep: #03425b;
    --brand-darkest: #002b3c;
    --ink: #333;
    --ink-soft: #667;
    --surface: #fff;
    --page: #f4f8fb;
    --line: #dde7ee;
    --radius: 14px;
    --shadow: 0 1px 2px rgb(3 66 91 / 8%), 0 6px 18px rgb(3 66 91 / 8%);
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--page);
    background-image: linear-gradient(180deg, #e8f4fa 0, var(--page) 340px);
    color: var(--ink);
    font-family:
        'IBM Plex Sans Arabic',
        system-ui,
        -apple-system,
        'Segoe UI',
        sans-serif;
    font-size: 16px;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 18px 48px;
}

.page {
    width: 100%;
    max-width: 520px;
}

.masthead {
    text-align: center;
    margin-bottom: 26px;
}

.masthead__logo {
    width: 201px;
    max-width: 70%;
    height: auto;
    display: block;
    margin: 0 auto 14px;
}

.masthead__name {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--brand-deep);
    letter-spacing: -0.01em;
}

.masthead__tagline {
    margin: 4px 0 0;
    font-size: 15px;
    font-weight: 400;
    color: var(--ink-soft);
}

.links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.links__group-title {
    margin: 22px 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    letter-spacing: 0.04em;
}

.link {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 13px 16px;
    text-decoration: none;
    color: var(--ink);
    box-shadow: var(--shadow);
    transition:
        transform 0.14s ease,
        border-color 0.14s ease,
        box-shadow 0.14s ease;
}

.link:hover,
.link:focus-visible {
    transform: translateY(-2px);
    border-color: var(--brand);
    box-shadow:
        0 2px 4px rgb(0 160 223 / 14%),
        0 10px 24px rgb(0 160 223 / 16%);
}

.link:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
}

.link__icon {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    color: var(--brand-deep);
}

.link__icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentcolor;
}

.link__label {
    flex: 1 1 auto;
    font-size: 16px;
    font-weight: 500;
}

.link__chevron {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    color: var(--line);
    transform: scaleX(-1);
}

.link:hover .link__chevron,
.link:focus-visible .link__chevron {
    color: var(--brand);
}

.link__chevron svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentcolor;
}

.link--primary {
    background: var(--brand-deep);
    border-color: var(--brand-deep);
    color: #fff;
}

.link--primary .link__icon,
.link--primary .link__chevron {
    color: rgb(255 255 255 / 70%);
}

.link--primary:hover,
.link--primary:focus-visible {
    background: var(--brand-darkest);
    border-color: var(--brand-darkest);
}

.footer {
    margin-top: 32px;
    text-align: center;
    font-size: 13px;
    color: var(--ink-soft);
}

.footer a {
    color: var(--brand-deep);
    text-decoration: none;
    /* An email address inside Arabic prose reorders unless isolated. */
    unicode-bidi: isolate;
    direction: ltr;
    display: inline-block;
}

.footer a:hover {
    text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #e6edf3;
        --ink-soft: #9fb0bf;
        --surface: #142029;
        --page: #0d161d;
        --line: #24323d;
        --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 6px 18px rgb(0 0 0 / 30%);
    }

    body {
        background-image: linear-gradient(180deg, #13242f 0, var(--page) 340px);
    }

    .masthead__logo {
        /* The logo's ink is dark navy on transparency; brighten it so it stays
           legible on the dark surface. */
        filter: brightness(0) invert(0.85) sepia(0.35) saturate(4) hue-rotate(160deg);
    }

    .masthead__name {
        color: #7fd4f5;
    }

    .link__icon {
        color: #7fd4f5;
    }

    .link--primary {
        background: var(--brand);
        border-color: var(--brand);
        color: #06232f;
    }

    .link--primary .link__icon,
    .link--primary .link__chevron {
        color: rgb(6 35 47 / 70%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .link {
        transition: none;
    }

    .link:hover,
    .link:focus-visible {
        transform: none;
    }
}
