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

:root {
    color-scheme: light;
    --paper: #f8f8f4;
    --ink: #161c30;
    --muted: #515971;
    --blue: #284bdc;
    --line: #dedfdc;
    --page-gutter: clamp(1rem, 4.2vw, 4.5rem);
    font-family: "Instrument Sans", "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--paper);
}

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

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

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

:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 4px;
}

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

.site-header {
    border-bottom: 1px solid var(--line);
}

.header-content,
.footer-content {
    display: flex;
    align-items: center;
}

.header-content {
    min-height: 4.625rem;
}

.brand {
    display: inline-flex;
    align-items: flex-end;
    gap: .25rem;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -.05em;
}

.brand img {
    display: block;
    width: 3rem;
    height: auto;
}

.landing {
    display: grid;
    align-items: center;
    justify-items: stretch;
    flex: 1;
    gap: 2rem;
    padding-block: clamp(2.25rem, 5vw, 4.5rem);
}

.intro {
    text-align: center;
}

h1 {
    margin: 0;
    font-size: clamp(2.65rem, 12vw, 5.75rem);
    line-height: .96;
    font-weight: 700;
    letter-spacing: -.065em;
}

h1 span:last-child {
    margin-inline-start: .07em;
    color: var(--blue);
}

.intro-copy {
    max-width: 29ch;
    margin: 1.25rem auto 0;
    color: var(--muted);
    font-size: clamp(1.04rem, 1.55vw, 1.28rem);
    line-height: 1.55;
}

.arrow {
    position: relative;
    display: block;
    width: .85rem;
    height: .85rem;
}

.arrow::before,
.arrow::after {
    position: absolute;
    content: "";
}

.arrow::before {
    top: 50%;
    right: 1px;
    left: 1px;
    border-top: 1.5px solid currentColor;
    transform: translateY(-50%);
}

.arrow::after {
    top: 50%;
    right: 1px;
    width: .42rem;
    height: .42rem;
    border: solid currentColor;
    border-width: 1.5px 1.5px 0 0;
    transform: translateY(-50%) rotate(45deg);
}

.arrow-out { transform: rotate(-45deg); }

.shop-panel {
    position: relative;
    display: grid;
    align-content: center;
    gap: 1.05rem;
    isolation: isolate;
    max-width: 48rem;
    width: 100%;
    margin-inline: auto;
    padding: 1rem;
    border: 1px solid #dbe1f4;
    border-radius: 1.6rem;
    background:
        radial-gradient(ellipse at 50% 46%, #f9faff 3%, transparent 67%),
        linear-gradient(145deg, #f0f3ff, #e2e8fe);
    scroll-margin-block: 1rem;
}

.shop-panel::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: inherit;
    background-image:
        linear-gradient(to right, #8397ea24 1px, transparent 1px),
        linear-gradient(to bottom, #8397ea24 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: center;
    mask-image: radial-gradient(ellipse, #000 15%, transparent 85%);
    content: "";
}

.wheel {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 10rem;
    overflow: hidden;
    mask-image: linear-gradient(transparent, #000 12% 88%, transparent);
    pointer-events: none;
}

.orbital-grid {
    position: absolute;
    display: grid;
    place-items: center;
    width: min(93%, 24rem);
    aspect-ratio: 1;
}

.orbit {
    position: absolute;
    width: var(--diameter);
    aspect-ratio: 1;
    border: 1px solid #9faef0;
    border-radius: 50%;
}

.orbit-outer { --diameter: 95%; }
.orbit-middle { --diameter: 77%; border-style: dashed; }
.orbit-inner { --diameter: 59%; }

.axis {
    position: absolute;
    width: 114%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #a7b7f1 25% 75%, transparent);
}

.axis-vertical { transform: rotate(90deg); }
.axis-diagonal { transform: rotate(40deg); }
.axis-diagonal-reverse { transform: rotate(-40deg); }

.orbit-point {
    position: absolute;
    width: .56rem;
    aspect-ratio: 1;
    border: 2px solid #8498ed;
    border-radius: 50%;
    background: #f7f9ff;
    translate: -50% -50%;
}

.orbit-point-north { top: 2.5%; left: 50%; }
.orbit-point-south { top: 97.5%; left: 50%; }
.orbit-point-west { top: 50%; left: 2.5%; }
.orbit-point-east { top: 50%; left: 97.5%; }

.hub {
    position: relative;
    display: grid;
    place-items: center;
    width: 7.8rem;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid #1d3fcb;
    border-radius: 50%;
    background: radial-gradient(circle at 36% 22%, #5b7aff, #294ee5 53%, #1b36ae 100%);
    box-shadow: 0 14px 40px #203fc34f, inset 0 0 0 4px #f0f3ff1a;
}

.hub img {
    position: relative;
    width: 57%;
    height: auto;
    filter: invert(1);
}

.meridian,
.parallel {
    position: absolute;
    border: 1px solid #b9c9ff4d;
    border-radius: 50%;
}

.meridian {
    inset: -1px 22%;
}

.parallel {
    inset: 23% -7% 33%;
}

.parallel-lower {
    inset: 33% -7% 23%;
}

.shops {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.shop-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .55rem;
    width: 100%;
    min-height: 4.5rem;
    padding: .6rem;
    border: 1px solid #dbe2f7;
    border-radius: .95rem;
    background: #fff;
    box-shadow: 0 5px 18px #2a407717, 0 1px 2px #2a40770d;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.shop-link:hover,
.shop-link:focus-visible {
    transform: translateY(-3px);
    border-color: #8ca0f1;
    box-shadow: 0 10px 25px #2a40772e;
}

.flag {
    display: block;
    width: 1.65rem;
    aspect-ratio: 1.4;
    border-radius: .2rem;
    box-shadow: inset 0 0 0 1px #161c3029;
}

.flag[data-flag="nl"] {
    background: linear-gradient(#ae1c28 33.33%, #fff 33.33% 66.67%, #21468b 66.67%);
}

.flag[data-flag="be"] {
    background: linear-gradient(90deg, #1b1b1b 33.33%, #ffdb35 33.33% 66.67%, #ef3340 66.67%);
}

.flag[data-flag="fr"] {
    background: linear-gradient(90deg, #192884 33.33%, #fff 33.33% 66.67%, #ed2939 66.67%);
}

.flag[data-flag="de"] {
    background: linear-gradient(#1b1b1b 33.33%, #db151c 33.33% 66.67%, #ffce00 66.67%);
}

.flag[data-flag="es"] {
    background: linear-gradient(#aa151b 25%, #f1bf00 25% 75%, #aa151b 75%);
}

.flag[data-flag="it"] {
    background: linear-gradient(90deg, #009246 33.33%, #fff 33.33% 66.67%, #ce2b37 66.67%);
}

.flag[data-flag="se"] {
    background:
        linear-gradient(90deg, transparent 31.25%, #fecc02 31.25% 43.75%, transparent 43.75%),
        linear-gradient(#006aa7 40%, #fecc02 40% 60%, #006aa7 60%);
}

.shop-name {
    display: grid;
    gap: .18rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.shop-name strong {
    font-size: .84rem;
    line-height: 1.15;
    letter-spacing: -.025em;
}

.shop-name > span {
    font-size: .72rem;
    color: var(--muted);
}

.shop-arrow {
    display: none;
    place-items: center;
    width: 1.4rem;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #edf1ff;
    color: #2544bc;
    transition: background-color 160ms ease, color 160ms ease;
}

.shop-arrow .arrow {
    scale: .8;
}

.shop-link:is(:hover, :focus-visible) .shop-arrow {
    background: var(--blue);
    color: #fff;
}

.footer-content {
    min-height: 4rem;
    border-top: 1px solid var(--line);
    font-size: .77rem;
    font-weight: 600;
    color: var(--muted);
}

@media (min-width: 22.5rem) {
    .shops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 34rem) {
    .shop-panel { padding: 1.5rem; }
    .shops { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
    .shop-link {
        grid-template-columns: auto minmax(0, 1fr) auto;
        padding: .7rem .8rem;
    }
    .flag { width: 1.9rem; }
    .shop-name strong { font-size: .95rem; }
    .shop-name > span { font-size: .78rem; }
    .shop-arrow { display: grid; }
}

@media (min-width: 64rem) {
    .landing {
        grid-template-columns: minmax(0, .76fr) minmax(0, 1.24fr);
        gap: clamp(2rem, 4.5vw, 4.5rem);
        padding-block: clamp(2.75rem, 4vw, 4rem);
    }

    .intro { text-align: left; }
    h1 {
        font-size: clamp(4.5rem, 8.2vw, 8.4rem);
        letter-spacing: -.082em;
    }
    h1 span { display: block; }
    h1 span:last-child { margin-inline-start: 0; }
    .intro-copy { margin: 1.75rem 0 0; }

    .shop-panel:not(:has(li:nth-child(8))) {
        --shop-tile-width: clamp(11.375rem, 15.2vw, 14.5rem);
        aspect-ratio: 1.26;
        min-height: 29rem;
        padding: 0;
    }

    .shop-panel:not(:has(li:nth-child(8))) .wheel {
        position: absolute;
        inset: 0;
        mask-image: none;
    }

    .shop-panel:not(:has(li:nth-child(8))) .orbital-grid {
        width: min(72%, 28.5rem);
    }

    .shop-panel:not(:has(li:nth-child(8))) .hub {
        width: clamp(9.25rem, 14vw, 13.5rem);
    }

    .shop-panel:not(:has(li:nth-child(8))) .shops {
        position: absolute;
        inset: 0;
        display: block;
    }

    .shop-panel:not(:has(li:nth-child(8))) li {
        position: absolute;
        top: var(--y);
        left: var(--x);
        width: var(--shop-tile-width);
        translate: -50% -50%;
    }

    .shop-panel li:nth-child(1) { --x: 24%; --y: 25%; }
    .shop-panel li:nth-child(2) { --x: 76%; --y: 25%; }
    .shop-panel li:nth-child(3) { --x: 24%; --y: 75%; }
    .shop-panel li:nth-child(4) { --x: 76%; --y: 75%; }
    .shop-panel li:nth-child(5) { --x: 50%; --y: 10.5%; }
    .shop-panel li:nth-child(6) { --x: 50%; --y: 89.5%; }
    .shop-panel:has(li:nth-child(5)) li:nth-child(-n+2) { --y: 28%; }
    .shop-panel:has(li:nth-child(5)) li:nth-child(n+3):nth-child(-n+4) { --y: 72%; }

    .shop-panel:has(li:nth-child(7)):not(:has(li:nth-child(8))) {
        --shop-tile-width: clamp(10.75rem, 13.5vw, 12.5rem);
        min-height: 30rem;

        li:nth-child(1) { --x: 24%; --y: 27%; }
        li:nth-child(2) { --x: 76%; --y: 27%; }
        li:nth-child(3) { --x: 18.5%; --y: 60%; }
        li:nth-child(4) { --x: 81.5%; --y: 60%; }
        li:nth-child(5) { --x: 50%; --y: 12%; }
        li:nth-child(6) { --x: 32%; --y: 86%; }
        li:nth-child(7) { --x: 68%; --y: 86%; }

        .shop-link { min-height: 4.25rem; padding: .55rem; gap: .42rem; }
        .flag { width: 1.65rem; }
        .shop-name strong { font-size: .92rem; }
        .shop-arrow { width: 1.25rem; }
    }

    .shop-link {
        gap: .5rem;
        min-height: 4.65rem;
        padding: .65rem;
    }
}

@media (min-width: 78rem) {
    .shop-link {
        min-height: 5.05rem;
        padding: .85rem;
    }

    .flag { width: 2.2rem; }
    .shop-name strong { font-size: 1rem; }
    .shop-name > span { font-size: .82rem; }
    .shop-arrow { width: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
    }
}
