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

:root {
    --background: #15163a;
    --surface: #1f2150;
    --surface-hover: #282a62;
    --deep: #0b0c24;

    --foreground: #f3f1ff;
    --muted: #c9c6e8;
    --subtle: #8e8bb8;

    /* Taken from the VB Color logo */
    --red: #ff0010;
    --blue: #0050c0;
    --green: #2caa30;
    --yellow: #f8c800;
    --cyan: #00b4e8;
    --purple: #8030f0;

    /* Additional colors in the spirit of the logo */
    --orange: #ff7a1a;
    --pink: #ff4fa3;
    --lime: #a8e02a;

    --display: Chewy, "Arial Rounded MT Bold", ui-rounded, sans-serif;

    font-family:
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--background);
    color: var(--foreground);
    line-height: 1.5;
    margin: 0;
    overflow-x: hidden;
}

a {
    color: var(--yellow);
}

a:hover {
    color: var(--foreground);
}

h1,
h2,
h3 {
    font-weight: 800;
    margin: 0;
}

.container {
    margin-inline: auto;
    text-align: center;
    width: min(1120px, calc(100% - 48px));
}

/* Top bar */

.top-bar {
    left: 0;
    padding: 16px 24px;
    position: absolute;
    top: 0;
    z-index: 10;
}

.back-link {
    align-items: center;
    color: var(--foreground);
    display: inline-flex;
    font-weight: 700;
    gap: 10px;
    min-height: 44px;
    text-decoration: none;
}

.back-link:hover {
    color: var(--yellow);
}

.back-link i {
    font-size: 1.25rem;
}

/* Hero */

.hero {
    padding: 180px 0 120px;
}

.hero-inner {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.logo {
    display: block;
    margin-inline: auto;
    filter: drop-shadow(10px 10px 2px rgb(0 0 0 / 0.35));
    height: auto;
    width: min(760px, 100%);
}

.tagline {
    color: var(--muted);
    filter: drop-shadow(3px 3px 2px rgb(0 0 0 / 0.35));
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    margin: 0;
    max-width: 660px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    padding-top: 20px;
}

.button {
    align-items: center;
    border: 2px solid var(--foreground);
    border-radius: 12px;
    color: var(--foreground);
    display: inline-flex;
    font-weight: 700;
    font-size: 1.05rem;
    gap: 10px;
    min-height: 56px;
    padding: 0 26px;
    text-decoration: none;
    transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.button:hover,
.button:focus-visible {
    background: var(--foreground);
    color: var(--background);
    transform: rotate(-1deg);
}

.button.primary {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--background);
}

.button.primary:hover,
.button.primary:focus-visible {
    background: var(--foreground);
    border-color: var(--foreground);
}

/* Sections */

section {
    padding: 50px 0;
}

.section-header {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.section-header h2 {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(2.4rem, 5vw, 3.5rem);
    line-height: 1.05;
    padding: 0 0.15em;
    text-transform: uppercase;
}

.section-header h2 a {
    color: inherit;
    text-decoration: none;
}

.section-header h2 a:hover,
.section-header h2 a:focus-visible {
    color: var(--yellow);
}

.section-header p {
    color: var(--muted);
    font-size: 1.1rem;
    margin: 0;
    max-width: 640px;
}

/* Gallery */

.gallery-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-item {
    aspect-ratio: 384 / 224;
    background: var(--deep);
    border: 6px solid var(--frame);
    border-radius: 20px;
    cursor: zoom-in;
    overflow: hidden;
    padding: 0;
    transform: rotate(var(--tilt));
    transition: transform 150ms ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
    box-shadow: 10px 10px 2px rgb(0 0 0 / 0.35);
    outline: none;
    transform: rotate(0) scale(1.07);
}

.gallery-item img {
    display: block;
    height: 100%;
    /* image-rendering: pixelated; */
    object-fit: cover;
    width: 100%;
}

.gallery-item:nth-child(6n+1) {
    --frame: var(--red);
    --tilt: -1.5deg;
}

.gallery-item:nth-child(6n+2) {
    --frame: var(--blue);
    --tilt: 1deg;
}

.gallery-item:nth-child(6n+3) {
    --frame: var(--green);
    --tilt: -0.5deg;
}

.gallery-item:nth-child(6n+4) {
    --frame: var(--yellow);
    --tilt: 1.5deg;
}

.gallery-item:nth-child(6n+5) {
    --frame: var(--cyan);
    --tilt: -1deg;
}

.gallery-item:nth-child(6n+6) {
    --frame: var(--purple);
    --tilt: 0.8deg;
}

.gallery-dialog {
    background: transparent;
    border: 0;
    color: var(--foreground);
    margin: auto;
    max-height: 100vh;
    max-width: 100vw;
    padding: 72px 80px 32px;
    width: 100%;
}

.gallery-dialog::backdrop {
    background: rgb(11 12 36 / 0.92);
    backdrop-filter: blur(8px);
}

.gallery-dialog figure {
    margin: 0 auto;
    max-width: 1400px;
}

.gallery-dialog img {
    border: 6px solid var(--foreground);
    border-radius: 20px;
    display: block;
    image-rendering: pixelated;
    max-height: calc(100vh - 150px);
    object-fit: contain;
    width: 100%;
}

.gallery-dialog figcaption {
    align-items: baseline;
    display: flex;
    gap: 12px;
    justify-content: center;
    padding-top: 14px;
}

/* Bouncy headline letters, see wobble() */

.wobble-letter {
    display: inline-block;
    transform: translateY(var(--shift)) rotate(var(--tilt));
}

.wobble-letter.is-vowel {
    font-size: 0.8em;
}

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

.gallery-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.gallery-counter {
    color: var(--subtle);
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
}

.gallery-control {
    align-items: center;
    background: var(--surface);
    border: 2px solid var(--foreground);
    border-radius: 50%;
    color: var(--foreground);
    cursor: pointer;
    display: flex;
    font-size: 1.5rem;
    height: 48px;
    justify-content: center;
    position: fixed;
    transition: background 150ms ease, color 150ms ease;
    width: 48px;
}

.gallery-control:hover,
.gallery-control:focus-visible {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--background);
    outline: none;
}

.gallery-close {
    right: 24px;
    top: 20px;
}

.gallery-previous,
.gallery-next {
    top: 50%;
    transform: translateY(-50%);
}

.gallery-previous {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

/* Features */

.feature-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature {
    align-items: center;
    background: var(--surface);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px;
    transition: background 150ms ease;
}

.feature:hover {
    background: var(--surface-hover);
}

.feature i {
    align-items: center;
    background: var(--chip);
    border-radius: 14px;
    color: var(--chip-ink, var(--foreground));
    display: flex;
    font-size: 1.75rem;
    height: 56px;
    justify-content: center;
    width: 56px;
}

.feature:nth-child(9n+1) i {
    --chip: var(--red);
}

.feature:nth-child(9n+2) i {
    --chip: var(--blue);
}

.feature:nth-child(9n+3) i {
    --chip: var(--green);
    --chip-ink: var(--background);
}

.feature:nth-child(9n+4) i {
    --chip: var(--yellow);
    --chip-ink: var(--background);
}

.feature:nth-child(9n+5) i {
    --chip: var(--cyan);
    --chip-ink: var(--background);
}

.feature:nth-child(9n+6) i {
    --chip: var(--purple);
}

.feature:nth-child(9n+7) i {
    --chip: var(--orange);
    --chip-ink: var(--background);
}

.feature:nth-child(9n+8) i {
    --chip: var(--pink);
    --chip-ink: var(--background);
}

.feature:nth-child(9n+9) i {
    --chip: var(--lime);
    --chip-ink: var(--background);
}

.feature h3 {
    font-size: 1.5rem;
    line-height: 1.15;
}

.feature p {
    color: var(--muted);
    font-size: 1.02rem;
    margin: 0;
}

/* Supported by */

.supporter {
    align-items: center;
    background: var(--surface);
    border-radius: 20px;
    color: var(--foreground);
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 28px;
    text-decoration: none;
    transition: background 150ms ease, transform 150ms ease;
}

.supporter:hover,
.supporter:focus-visible {
    background: var(--surface-hover);
    color: var(--foreground);
    box-shadow: 10px 10px 2px rgb(0 0 0 / 0.35);
    outline: none;
    transform: rotate(-1deg);
}

.supporter img {
    display: block;
    height: auto;
    width: 200px;
}

.supporter p {
    color: var(--muted);
    font-size: 1.02rem;
    margin: 0;
}

.supporter-link {
    align-items: center;
    color: var(--yellow);
    display: inline-flex;
    font-weight: 700;
    gap: 8px;
    margin-top: auto;
}

.supporter-placeholder {
    background: var(--deep);
    border-radius: 20px;
    min-height: 220px;
}

/* Specification call-out */

.spec {
    align-items: center;
    background: var(--surface);
    border-radius: 28px;
    color: var(--foreground);
    display: flex;
    gap: 40px;
    justify-content: space-between;
    padding: 56px;
    text-align: left;
}

.spec h3 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.1;
}

.spec p {
    color: var(--muted);
    font-size: 1.1rem;
    margin: 12px 0 0;
    max-width: 560px;
}

.spec .button {
    flex-shrink: 0;
}

.spec + .spec {
    margin-top: 20px;
}

/* Footer */

footer {
    padding: 50px 0;
}

.stripe {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    height: 12px;
    margin-bottom: 28px;
}

.stripe span:nth-child(1) {
    background: var(--red);
}

.stripe span:nth-child(2) {
    background: var(--blue);
}

.stripe span:nth-child(3) {
    background: var(--green);
}

.stripe span:nth-child(4) {
    background: var(--yellow);
}

.stripe span:nth-child(5) {
    background: var(--cyan);
}

.stripe span:nth-child(6) {
    background: var(--purple);
}

.footer-inner {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.95rem;
    flex-direction: column;
    gap: 12px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    justify-content: center;
}

@media (max-width: 900px) {
    .supporter-placeholder:last-child {
        display: none;
    }


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

    .spec {
        align-items: flex-start;
        flex-direction: column;
        padding: 40px 32px;
    }

    .gallery-dialog {
        padding: 72px 16px 24px;
    }

    .gallery-previous,
    .gallery-next {
        bottom: 20px;
        top: auto;
        transform: none;
    }
}

@media (max-width: 560px) {
    .supporter-placeholder {
        display: none;
    }

    .container {
        width: calc(100% - 32px);
    }

    .hero {
        padding: 80px 0;
    }

    .feature-grid,
    .gallery-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .actions,
    .spec-actions {
        align-self: stretch;
        flex-direction: column;
    }

    .button {
        justify-content: center;
    }

    .spec {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .gallery-item,
    .button {
        transition: none;
    }
}