@font-face {
    font-family: "Instrument Sans";
    src: url("../fonts/instrument-sans-latin.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Service Icons";
    src: url("../fonts/material-symbols-services.woff2") format("woff2");
    font-weight: 300;
    font-style: normal;
    font-display: block;
}

:root {
    color-scheme: light;
    --ink: #112a3d;
    --muted: #516574;
    --paper: #f7f9fa;
    --line: #dee6eb;
    --gold: #e4bf78;
    --font: "Instrument Sans", system-ui, sans-serif;
    --ease: cubic-bezier(.22, 1, .36, 1);
}

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

body {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    color: var(--ink);
    font: 400 1rem/1.5 var(--font);
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible {
    outline: 2px solid #0e557d;
    outline-offset: 4px;
}

.visually-hidden:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.portal-skip {
    position: absolute;
    z-index: 2;
    top: .75rem;
    left: 1rem;
    padding: .65rem 1rem;
    border-radius: .25rem;
    background: #fff;
    font-weight: 700;
}

.portal-wrap {
    width: min(100% - clamp(2rem, 7vw, 7rem), 90rem);
    margin-inline: auto;
}

.portal-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.portal-header-inner {
    min-height: 4.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.portal-brand {
    display: inline-flex;
    align-items: center;
    gap: .85rem;
    border-radius: .25rem;
}

.portal-brand .brand-icon {
    flex: 0 0 2.85rem;
    width: 2.85rem;
    height: 2.85rem;
    display: grid;
    place-items: center;
    padding: .1rem;
}

.portal-brand img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.portal-wordmark {
    display: grid;
    gap: .26rem;
    line-height: 1.08;
}

.portal-wordmark strong {
    font: 700 clamp(1.15rem, 1.65vw, 1.4rem)/1 var(--font);
    letter-spacing: -.033em;
    word-spacing: .055em;
}

.portal-wordmark small {
    color: var(--muted);
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .01em;
}

.portal-contact {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    padding: .55rem 1rem;
    border: 1px solid var(--ink);
    border-radius: .45rem;
    background: var(--ink);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: color .22s ease, background-color .22s ease, border-color .22s ease;
}

.portal-contact:hover {
    border-color: #234a61;
    background: #234a61;
}

.portal-contact .portal-arrow {
    color: var(--gold);
}

.portal-arrow {
    width: .63rem;
    height: .63rem;
    display: inline-block;
    position: relative;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
}

.portal-arrow::after {
    content: "";
    position: absolute;
    top: -.5px;
    right: 0;
    width: 1.5px;
    height: .85rem;
    background: currentColor;
    transform-origin: top center;
    transform: rotate(45deg);
}

.portal-main {
    flex: 1;
}

.portal-main:focus {
    outline: none;
}

.portal-banner {
    padding-block: .375rem;
    background: #fff;
}

.portal-services {
    --divider: clamp(.25rem, .4vw, .46rem);
    display: grid;
    gap: var(--divider);
    margin: 0;
    padding: 0;
    list-style: none;
}

.portal-service {
    min-width: 0;
    pointer-events: none;
}

.portal-service--realty {
    --panel-dark: #0c2335;
    --panel-light: #163d56;
    --photo-position: 50% 49%;
    --enter-delay: 0s;
}

.portal-service--immigration {
    --panel-dark: #132d28;
    --panel-light: #26463a;
    --photo-position: 50% 48%;
    --enter-delay: .06s;
}

.portal-service--education {
    --panel-dark: #0e2d35;
    --panel-light: #17464b;
    --photo-position: 49% 48%;
    --enter-delay: .12s;
}

.portal-card {
    display: grid;
    grid-template-rows: auto minmax(5.8rem, auto);
    color: #fff;
    pointer-events: auto;
}

.portal-media {
    position: relative;
    min-width: 0;
    min-height: 10rem;
    aspect-ratio: 8 / 5;
    overflow: hidden;
    background: var(--panel-dark);
}

.portal-media img,
.portal-media::after {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.portal-media img {
    display: block;
    object-fit: cover;
    object-position: var(--photo-position);
    transition: transform .7s var(--ease);
}

.portal-media::after {
    content: "";
    background: linear-gradient(225deg, rgb(7 26 39 / 26%), transparent 48%);
    pointer-events: none;
}

.portal-link-arrow {
    position: absolute;
    z-index: 1;
    top: clamp(.9rem, 2.15vw, 2.1rem);
    right: clamp(1.1rem, 2.55vw, 2.45rem);
    width: clamp(2.55rem, 3.1vw, 3.05rem);
    height: clamp(2.55rem, 3.1vw, 3.05rem);
    display: grid;
    place-items: center;
    border: 1px solid rgb(255 255 255 / 64%);
    border-radius: 50%;
    background: rgb(15 36 49 / 68%);
    backdrop-filter: blur(7px);
    color: #fff;
    transition: color .24s ease, background-color .24s ease, border-color .24s ease, box-shadow .24s ease;
}

.portal-link-arrow .portal-arrow {
    transition: transform .3s var(--ease);
}

.portal-label {
    min-width: 0;
    display: grid;
    align-items: center;
    padding: 1rem clamp(1.1rem, 3.15vw, 2.6rem);
    border-top: 1px solid var(--gold);
    background: linear-gradient(105deg, var(--panel-dark), var(--panel-light));
}

.portal-label-content {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: clamp(.72rem, 1.2vw, 1.15rem);
}

.portal-service-icon {
    width: clamp(2.55rem, 3.35vw, 3.2rem);
    height: clamp(2.55rem, 3.35vw, 3.2rem);
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgb(228 191 120 / 38%);
    border-radius: .64rem;
    background: rgb(9 24 32 / 20%);
    color: var(--gold);
    font: 300 clamp(1.48rem, 1.9vw, 1.8rem)/1 "Service Icons", sans-serif;
    font-feature-settings: "liga";
    font-variant-ligatures: common-ligatures;
    white-space: nowrap;
}

.portal-label h2 {
    margin: 0;
    font: 650 clamp(1.42rem, 2.15vw, 2.28rem)/1.12 var(--font);
    letter-spacing: -.029em;
    word-spacing: .055em;
    text-wrap: balance;
}

.portal-label p {
    margin: .38rem 0 0;
    color: #dce6e8;
    font-size: clamp(.8rem, .97vw, .94rem);
    font-weight: 500;
    line-height: 1.35;
}

.portal-card:focus-visible {
    outline: none;
}

.portal-card:focus-visible .portal-link-arrow {
    border-color: #f8f2e7;
    background: #f8f2e7;
    color: var(--ink);
    box-shadow: 0 0 0 3px #fff;
}

.portal-card:focus-visible h2 {
    text-decoration: underline;
    text-decoration-thickness: .055em;
    text-underline-offset: .16em;
}

.portal-footer {
    border-top: 1px solid var(--line);
    background: var(--paper);
}

.portal-footer-inner {
    min-height: 3.55rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .3rem 1rem;
    padding-block: .65rem;
    color: var(--muted);
    font-size: .8rem;
}

.portal-footer nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: clamp(.9rem, 2vw, 1.7rem);
}

.portal-footer a {
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
    border-radius: .15rem;
}

.portal-footer a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: .2em;
}

@media (min-width: 56rem) {
    .portal-services {
        --slant: clamp(2rem, 4.55vw, 6.5rem);
        --half-slant: calc(var(--slant) / 2);
        --banner-height: clamp(23rem, max(34vw, min(100vh - 9.1rem, 38vw)), 41rem);
        --label-height: clamp(6.65rem, 9vw, 9rem);
        --label-gutter: clamp(1.05rem, 2.5vw, 2.65rem);
        grid-template-columns: minmax(0, 1.07fr) minmax(0, 1fr) minmax(0, 1.07fr);
    }

    .portal-card {
        min-height: var(--banner-height);
        grid-template-rows: minmax(0, 1fr) minmax(var(--label-height), auto);
    }

    .portal-media {
        min-height: 0;
        aspect-ratio: auto;
    }

    .portal-label {
        padding-inline: var(--label-gutter);
    }

    /* Extend each link through the centre of its cut so the gutter stays the same width. */
    .portal-service--realty .portal-card {
        width: calc(100% + var(--half-slant));
        clip-path: polygon(0 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
    }

    .portal-service--immigration .portal-card {
        width: calc(100% + var(--slant));
        margin-inline-start: calc(-1 * var(--half-slant));
        clip-path: polygon(var(--slant) 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
    }

    .portal-service--education .portal-card {
        width: calc(100% + var(--half-slant));
        margin-inline-start: calc(-1 * var(--half-slant));
        clip-path: polygon(var(--slant) 0, 100% 0, 100% 100%, 0 100%);
    }

    .portal-service:not(:first-child) .portal-label {
        padding-inline-start: calc(var(--label-gutter) + var(--half-slant));
    }

    .portal-service:not(:last-child) .portal-label {
        padding-inline-end: calc(var(--label-gutter) + var(--slant));
    }

    .portal-service:not(:last-child) .portal-link-arrow {
        right: calc(clamp(1.1rem, 2.55vw, 2.45rem) + var(--half-slant) / 2);
    }
}

@media (min-width: 38rem) and (max-width: 55.99rem) {
    .portal-card {
        min-height: 13rem;
        grid-template: 1fr / minmax(0, 1.12fr) minmax(0, 1fr);
    }

    .portal-media {
        aspect-ratio: auto;
    }

    .portal-label {
        border-top: 0;
        border-left: 1px solid var(--gold);
    }
}

@media (max-width: 37.99rem) {
    .portal-header-inner {
        min-height: 4.1rem;
        gap: .55rem;
    }

    .portal-brand {
        gap: .52rem;
    }

    .portal-brand .brand-icon {
        width: 2.35rem;
        height: 2.35rem;
        flex-basis: 2.35rem;
    }

    .portal-contact {
        gap: .55rem;
        padding-inline: .7rem;
        font-size: .77rem;
    }
}

@media (hover: hover) {
    .portal-card:hover img {
        transform: scale(1.038);
    }

    .portal-card:hover .portal-link-arrow {
        border-color: #f8f2e7;
        background: #f8f2e7;
        color: var(--ink);
    }

    .portal-card:hover .portal-link-arrow .portal-arrow {
        transform: translate(1px, -1px);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .portal-media img {
        animation: portal-photo-in .72s var(--ease) var(--enter-delay) backwards;
    }

    .portal-label-content {
        animation: portal-label-in .58s var(--ease) var(--enter-delay) backwards;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portal-contact,
    .portal-media img,
    .portal-link-arrow,
    .portal-link-arrow .portal-arrow {
        transition: none;
    }

    .portal-card:hover img,
    .portal-card:hover .portal-link-arrow .portal-arrow {
        transform: none;
    }
}

@keyframes portal-photo-in {
    from {
        opacity: .76;
        transform: scale(1.025);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes portal-label-in {
    from {
        opacity: .7;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
