:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
    --ink: #17333e;
    --muted: #69808a;
    --salveo: #009ec5;
}

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

html {
    min-width: 320px;
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 12%, rgba(0, 174, 213, .13), transparent 27rem),
        radial-gradient(circle at 92% 84%, rgba(91, 190, 124, .12), transparent 30rem),
        #f3f8fa;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .38;
    background-image: radial-gradient(rgba(23, 51, 62, .13) .7px, transparent .7px);
    background-size: 18px 18px;
    mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

a {
    color: inherit;
}

.page-shell {
    width: min(1180px, calc(100% - 40px));
    min-height: 100vh;
    margin: 0 auto;
    padding: clamp(40px, 7vw, 82px) 0 28px;
    display: flex;
    flex-direction: column;
}

.settings-link {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 10;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: #607983;
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(23, 51, 62, .1);
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(38, 76, 89, .08);
    backdrop-filter: blur(12px);
    text-decoration: none;
    transition: color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.settings-link svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.55;
}

.settings-link:hover {
    color: var(--salveo);
    transform: rotate(18deg);
    box-shadow: 0 10px 28px rgba(0, 158, 197, .16);
}

.settings-link:focus-visible,
.game-card:focus-visible {
    outline: 3px solid rgba(0, 158, 197, .35);
    outline-offset: 4px;
}

.hero {
    max-width: 740px;
    margin: 0 auto clamp(34px, 5vw, 58px);
    text-align: center;
}

.brand {
    width: clamp(142px, 17vw, 196px);
    height: auto;
    margin-bottom: 22px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--salveo);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .17em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(2.65rem, 6vw, 5rem);
    font-weight: 800;
    letter-spacing: -.055em;
    line-height: .98;
}

.intro {
    max-width: 540px;
    margin: 20px auto 0;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.6;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 2.2vw, 26px);
}

.game-card {
    min-width: 0;
    min-height: 420px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    border: 1px solid rgba(23, 51, 62, .08);
    border-radius: 30px;
    box-shadow:
        0 18px 45px rgba(33, 74, 89, .1),
        inset 0 1px 0 rgba(255, 255, 255, .8);
    text-decoration: none;
    transform: translateY(0);
    transition: transform .3s ease, box-shadow .3s ease;
}

.game-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0;
    background: linear-gradient(145deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .68));
    transition: opacity .3s ease;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 26px 58px rgba(33, 74, 89, .17),
        inset 0 1px 0 rgba(255, 255, 255, .9);
}

.game-card:hover::after {
    opacity: 1;
}

.pediatrics {
    background: linear-gradient(145deg, #e9f7ff 0%, #cdebf8 100%);
}

.pharmacists {
    background: linear-gradient(145deg, #edf9ef 0%, #d3efd9 100%);
}

.mastermind {
    background: linear-gradient(145deg, #fff5dd 0%, #ffe3a8 100%);
}

.card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.game-type {
    padding: 7px 11px;
    color: rgba(23, 51, 62, .73);
    background: rgba(255, 255, 255, .58);
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.arrow {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: rgba(23, 51, 62, .78);
    background: rgba(255, 255, 255, .64);
    border-radius: 50%;
    font-size: 1.15rem;
    transition: transform .25s ease, background .25s ease;
}

.game-card:hover .arrow {
    background: #fff;
    transform: translate(3px, -3px);
}

.card-visual {
    min-height: 245px;
    flex: 1;
    display: grid;
    place-items: center;
    position: relative;
}

.card-visual > img {
    width: 76%;
    max-width: 235px;
    max-height: 225px;
    z-index: 1;
    object-fit: contain;
    filter: drop-shadow(0 20px 20px rgba(36, 79, 92, .14));
    transition: transform .35s ease;
}

.pharmacists .card-visual > img {
    width: 94%;
    max-width: 300px;
}

.game-card:hover .card-visual > img {
    transform: scale(1.045) rotate(-1.5deg);
}

.visual-orbit {
    width: 190px;
    height: 190px;
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .76);
    border-radius: 50%;
    box-shadow:
        0 0 0 22px rgba(255, 255, 255, .16),
        0 0 0 45px rgba(255, 255, 255, .1);
}

.card-copy {
    display: grid;
    gap: 7px;
}

.card-copy strong {
    font-size: clamp(1.75rem, 2.5vw, 2.25rem);
    letter-spacing: -.035em;
    line-height: 1;
}

.card-copy > span {
    color: rgba(23, 51, 62, .65);
    font-size: .92rem;
}

.mascot-group {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mascot-group > img {
    width: 42%;
    max-width: 142px;
    position: relative;
}

.mascot-group > img:nth-of-type(1) {
    z-index: 1;
    margin-right: -23%;
    transform: rotate(-10deg) translateY(12px);
}

.mascot-group > img:nth-of-type(2) {
    z-index: 3;
    transform: translateY(-5px);
}

.mascot-group > img:nth-of-type(3) {
    z-index: 2;
    margin-left: -23%;
    transform: rotate(10deg) translateY(12px);
}

.mastermind:hover .mascot-group > img:nth-of-type(1) {
    transform: rotate(-14deg) translate(-4px, 8px);
}

.mastermind:hover .mascot-group > img:nth-of-type(2) {
    transform: scale(1.06) translateY(-8px);
}

.mastermind:hover .mascot-group > img:nth-of-type(3) {
    transform: rotate(14deg) translate(4px, 8px);
}

footer {
    margin-top: auto;
    padding: 32px 0 0;
    color: #82949b;
    font-size: .78rem;
    letter-spacing: .08em;
    text-align: center;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .page-shell {
        width: min(760px, calc(100% - 32px));
    }

    .game-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mastermind {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .page-shell {
        width: min(430px, calc(100% - 24px));
        padding-top: 66px;
    }

    .settings-link {
        top: 14px;
        right: 14px;
    }

    .hero {
        margin-bottom: 30px;
    }

    .brand {
        width: 138px;
        margin-bottom: 16px;
    }

    .intro {
        margin-top: 14px;
    }

    .game-grid {
        grid-template-columns: 1fr;
    }

    .game-card,
    .mastermind {
        min-height: 390px;
        grid-column: auto;
        border-radius: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
