/*
 * RedPixels Studio website - Apple-style layout, all black, white buttons and a
 * cool steel accent for labels, links and icons. Red, from the logo, is kept
 * only for the line under the nav.
 *
 * Red #EE1B24 is sampled from images/redpixels-icon-transparent.png.
 * Font: Inter (css/fonts.css).
 */

:root {
    color-scheme: dark;

    --button: #f5f5f7;
    --button-hover: #d2d2d7;
    --button-text: #000;
    --steel: #9fb3cf;
    --steel-light: #c5d3e6;
    --steel-icon: #b8c9df;
    --discord: #5865f2;
    --discord-hover: #4752c4;

    --link: #aec2dd;
    --ink: #f5f5f7;
    --ink-2: #a1a1a6;
    --ink-3: #86868b;
    --line: #424245;
    --line-soft: #2c2c2e;

    --bg: #000;
    --surface: #161617;
    --surface-2: #1d1d1f;
    --surface-3: #2c2c2e;

    --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --nav-h: 48px;
    --ease: cubic-bezier(.25, .1, .25, 1);
}

/* Base */

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    background: var(--bg);
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.47059;
    letter-spacing: -.022em;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

html.nav-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul { margin: 0; }
button { font: inherit; color: inherit; letter-spacing: inherit; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: rgba(159, 179, 207, .4); color: #fff; }
:focus-visible { outline: 2px solid var(--steel-light); outline-offset: 3px; }

.icon { width: 1em; height: 1em; flex: none; }

.skip-link {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 300;
    padding: 8px 14px;
    border-radius: 980px;
    background: var(--button);
    color: var(--button-text);
    font-size: 14px;
    transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.wrap { width: min(980px, calc(100% - 44px)); margin-inline: auto; }
.narrow { width: min(560px, calc(100% - 32px)); margin-inline: auto; }

@media (max-width: 734px) {
    .wrap { width: calc(100% - 32px); }
}

/* Game icons sit on black, so give their rounded square a faint edge. */
.app-icon { border-radius: 22.37%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }

/* Type */

.eyebrow {
    margin-bottom: 10px;
    color: var(--steel);
    font-size: 21px;
    line-height: 1.19;
    font-weight: 600;
    letter-spacing: .011em;
}

.headline {
    font-size: 56px;
    line-height: 1.07;
    font-weight: 600;
    letter-spacing: -.005em;
}

.intro {
    color: var(--ink-2);
    font-size: 21px;
    line-height: 1.381;
    letter-spacing: .011em;
}

@media (max-width: 1068px) {
    .headline { font-size: 48px; line-height: 1.08; }
}
@media (max-width: 734px) {
    .eyebrow { font-size: 17px; }
    .headline { font-size: 32px; line-height: 1.125; letter-spacing: .004em; }
    .intro { font-size: 19px; line-height: 1.42; letter-spacing: .012em; }
}

/* Buttons and links */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 22px;
    border: 1px solid transparent;
    border-radius: 980px;
    background: var(--button);
    color: var(--button-text);
    font-size: 17px;
    line-height: 1.18;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.button:hover { background: var(--button-hover); color: var(--button-text); text-decoration: none; }
.button .icon { font-size: 19px; }

.button-secondary { border-color: var(--line); background: transparent; color: var(--ink); }
.button-secondary:hover { border-color: var(--ink-2); background: var(--surface-2); color: var(--ink); }

.button-discord, .button-discord:hover { color: #fff; }
.button-discord { background: var(--discord); }
.button-discord:hover { background: var(--discord-hover); }

.button-sm { min-height: 0; padding: 7px 15px; font-size: 14px; letter-spacing: -.016em; }

.more {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--link);
}
.more .icon { font-size: .72em; margin-top: .08em; }

/* Global nav */

.gnav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    background: rgba(0, 0, 0, .8);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .gnav { background: rgba(0, 0, 0, .94); }
}
/* The red rule from the logo's "STUDIO" line, fading out at both ends. */
.gnav::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(238, 27, 36, .75) 30%, rgba(238, 27, 36, .75) 70%, transparent);
    pointer-events: none;
}

.gnav-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 100%;
    width: min(1024px, calc(100% - 44px));
    margin-inline: auto;
}

.gnav-brand {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -.01em;
}
.gnav-brand:hover { color: #fff; text-decoration: none; }
.gnav-brand img { width: 28px; height: 28px; }

.gnav-links { display: flex; align-items: center; padding: 0; list-style: none; }
.gnav-links a {
    display: block;
    padding: 0 14px;
    color: rgba(255, 255, 255, .8);
    font-size: 14px;
    line-height: var(--nav-h);
    letter-spacing: -.016em;
    transition: color .2s var(--ease);
}
.gnav-links a:hover { color: #fff; text-decoration: none; }

.gnav-actions { justify-self: end; display: flex; align-items: center; gap: 6px; }

.gnav-toggle {
    display: none;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: none;
    color: rgba(255, 255, 255, .85);
    font-size: 22px;
    cursor: pointer;
}
.gnav-toggle .icon-close { display: none; }
.gnav.is-open .gnav-toggle .icon-menu { display: none; }
.gnav.is-open .gnav-toggle .icon-close { display: block; }

@media (max-width: 833px) {
    .gnav-bar { grid-template-columns: 1fr auto; width: calc(100% - 32px); }
    .gnav-toggle { display: grid; }

    /* A backdrop-filter makes the header the containing block for fixed
       children, which would trap the menu panel inside the 48px bar. */
    .gnav.is-open { background: #000; -webkit-backdrop-filter: none; backdrop-filter: none; }

    .gnav-links {
        position: fixed;
        inset: var(--nav-h) 0 0 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px 32px 48px;
        background: #000;
        overflow-y: auto;
    }
    .gnav.is-open .gnav-links { display: flex; animation: menu-in .35s var(--ease); }
    .gnav-links a {
        padding: 8px 0;
        color: #e8e8ed;
        font-size: 28px;
        font-weight: 600;
        line-height: 1.14;
        letter-spacing: .007em;
    }
}
@media (max-width: 380px) {
    .gnav-brand span { display: none; }
}

@keyframes menu-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
}

/* Sections */

.section { padding: 120px 0; }
.section-head { max-width: 800px; margin: 0 auto 64px; text-align: center; }
.section-head .intro { margin-top: 18px; }

@media (max-width: 734px) {
    .section { padding: 72px 0; }
    .section-head { margin-bottom: 40px; }
}

/* Hero */

.hero { padding: 120px 0 40px; text-align: center; }
.hero-logo img { width: min(640px, 100%); margin: 0 auto; }
.hero-title {
    margin-top: 56px;
    font-size: 64px;
    line-height: 1.06;
    font-weight: 700;
    letter-spacing: -.015em;
}
.hero .intro { max-width: 640px; margin: 24px auto 0; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 36px; }

@media (max-width: 1068px) {
    .hero-title { font-size: 56px; }
}
@media (max-width: 734px) {
    .hero { padding-top: 72px; }
    .hero-title { margin-top: 40px; font-size: 40px; line-height: 1.1; }
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-actions .button { width: min(280px, 100%); }
}

/* Games */

.game {
    display: grid;
    grid-template-columns: 240px 1fr;
    align-items: center;
    gap: 56px;
    padding: 56px;
    border-radius: 28px;
    background: var(--surface);
}
.game-icon { width: 240px; height: 240px; }
.game-name { font-size: 48px; line-height: 1.08; font-weight: 600; }
.game-tagline { margin-top: 6px; color: var(--steel-light); font-size: 21px; font-weight: 600; letter-spacing: .011em; }
.game-text { margin-top: 16px; color: var(--ink-2); }

/* Merg's store numbers: combined rating and downloads (views.js mergStats) */
.rating { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; margin-top: 14px; color: var(--ink-2); font-size: 15px; }
.rating strong { color: var(--ink); font-weight: 600; }
.rating-score { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rating-stars { width: 90px; height: 18px; flex: none; }
.rating-empty { fill: var(--surface-3); }
.rating-full { fill: var(--ink); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding: 0; list-style: none; }
.tags li {
    padding: 4px 12px;
    border-radius: 980px;
    background: var(--surface-3);
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -.01em;
}

/* Store badges in the official look: black, grey edge, brand logos. */
.badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: 190px;
    height: 54px;
    padding: 0 20px 0 15px;
    border: 1px solid #a6a6a6;
    border-radius: 12px;
    background: #000;
    color: #fff;
    white-space: nowrap;
    transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.badge:hover { background: var(--surface-2); border-color: #d2d2d7; color: #fff; text-decoration: none; }
.badge .icon { font-size: 26px; }
.badge-text { display: flex; flex-direction: column; line-height: 1.08; }
.badge-text small { font-size: 10px; letter-spacing: .02em; }
.badge-text strong { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }

@media (max-width: 833px) {
    .game { grid-template-columns: 1fr; gap: 32px; padding: 40px 32px; text-align: center; }
    .game-icon { width: 160px; height: 160px; margin: 0 auto; }
    .tags, .badges, .rating { justify-content: center; }
}
@media (max-width: 734px) {
    .game { padding: 32px 20px 36px; border-radius: 24px; }
    .game-name { font-size: 40px; }
    .game-tagline { font-size: 19px; }
    .badges { flex-direction: column; align-items: center; }
    .badge { width: min(260px, 100%); }
}

/* Project cards (under Merg) and service cards */

.projects,
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 0; list-style: none; }
.services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.projects { margin-top: 24px; }
.project,
.service { display: flex; flex-direction: column; padding: 40px; border-radius: 24px; background: var(--surface); }
.service { padding: 32px; }
.tile {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 24px;
    border-radius: 14px;
    background: rgba(159, 179, 207, .14);
    color: var(--steel-icon);
    font-size: 26px;
}
.project-kind { margin-bottom: 4px; color: var(--steel); font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.project h3,
.service h3 { font-size: 24px; line-height: 1.17; font-weight: 600; letter-spacing: .009em; }
.project h3 ~ p,
.service p { margin-top: 10px; color: var(--ink-2); }
/* Short feature list inside a service card (Hosting) */
.service-list { display: grid; gap: 6px; margin-top: 16px; padding: 0; list-style: none; color: var(--ink-2); font-size: 15px; line-height: 1.4; }
.service-list li { display: flex; gap: 10px; }
.service-list li::before { content: ""; width: 5px; height: 5px; flex: none; margin-top: .55em; border-radius: 50%; background: var(--steel); }

/* Links and results sit at the bottom, so they line up across a row. */
.project .more { margin-top: auto; padding-top: 20px; }

/* Client projects: full-width cards */
.client-projects { display: grid; gap: 24px; padding: 0; list-style: none; }
.client-projects .project h3 ~ p { max-width: 68ch; }

.bot-groups {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--line-soft);
}
.bot-groups h4 { margin: 0 0 10px; color: var(--steel); font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.bot-groups ul { display: grid; gap: 8px; padding: 0; list-style: none; color: var(--ink-2); font-size: 15px; line-height: 1.4; }

/* Text on the left, before and after on the right */
.project-split { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px 64px; }

/* Before and after, on the client project */
.project-result { display: flex; gap: 32px; margin: auto 0 0; padding-top: 24px; }
.project-result dt { color: var(--ink-3); font-size: 13px; font-weight: 600; letter-spacing: -.01em; }
.project-result dd { margin: 2px 0 0; color: var(--ink); font-size: 28px; line-height: 1.1; font-weight: 600; }
.project-result div + div dd { color: var(--steel-light); }

/* How we work with clients, under the services */
.facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 48px;
    padding: 32px 0 0;
    border-top: 1px solid var(--line-soft);
    color: var(--ink-2);
    font-size: 15px;
    list-style: none;
}
.facts strong { display: block; margin-bottom: 4px; color: var(--ink); font-weight: 600; }

/* Technologies, under the services */
.tech { margin-top: 64px; }
.tech-title { margin-bottom: 24px; font-size: 24px; line-height: 1.17; font-weight: 600; letter-spacing: .009em; text-align: center; }
.tech-groups { margin: 0; overflow: hidden; border-radius: 24px; background: var(--surface); }
.tech-group { display: grid; grid-template-columns: 200px minmax(0, 1fr); align-items: baseline; gap: 16px; padding: 20px 32px; }
.tech-group + .tech-group { border-top: 1px solid var(--line-soft); }
.tech-group dt { color: var(--ink); font-size: 15px; font-weight: 600; }
.tech-group dd { margin: 0; }
.tech-group .tags { margin-top: 0; }

/* Each technology in its brand colour (--c, an "r, g, b" triplet): a light
   tint, a thin edge and a dot. Colours from Simple Icons where listed; Java,
   C#, AWS and VS Code use their well-known colours; black brands use white.
   Items without a class (SQL, deinServerHost.de) use the steel accent. */
.tech-tags li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(var(--c, 159, 179, 207), .14);
    box-shadow: inset 0 0 0 1px rgba(var(--c, 159, 179, 207), .4);
    color: var(--ink);
}
.tech-tags li::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: rgb(var(--c, 159, 179, 207)); }
.tech-tags .t-kotlin::before { background: linear-gradient(135deg, #7f52ff, #c711e1 55%, #e44857); }

.t-kotlin { --c: 127, 82, 255; }
.t-swift { --c: 240, 81, 56; }
.t-java { --c: 231, 111, 0; }
.t-javascript { --c: 247, 223, 30; }
.t-typescript { --c: 49, 120, 198; }
.t-python { --c: 55, 118, 171; }
.t-csharp { --c: 81, 43, 212; }
.t-cpp { --c: 0, 89, 156; }
.t-html { --c: 227, 79, 38; }
.t-compose { --c: 66, 133, 244; }
.t-ktor { --c: 8, 124, 250; }
.t-node { --c: 95, 160, 78; }
.t-postgres { --c: 65, 105, 225; }
.t-supabase { --c: 63, 207, 142; }
.t-stripe { --c: 99, 91, 255; }
.t-discord { --c: 88, 101, 242; }
.t-cloudflare { --c: 243, 128, 32; }
.t-aws { --c: 255, 153, 0; }
.t-hetzner { --c: 213, 12, 45; }
.t-firebase { --c: 221, 44, 0; }
.t-gemini { --c: 142, 117, 178; }
.t-claude { --c: 217, 119, 87; }
.t-androidstudio { --c: 61, 220, 132; }
.t-xcode { --c: 20, 126, 251; }
.t-vscode { --c: 0, 122, 204; }
.t-git { --c: 240, 60, 46; }
.t-googleplay { --c: 0, 214, 111; }
.t-appstore { --c: 13, 150, 246; }
.t-white { --c: 245, 245, 247; }

@media (max-width: 1068px) {
    .services,
    .facts,
    .bot-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 734px) {
    .client-projects { gap: 16px; }
    .bot-groups { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .project-split { grid-template-columns: minmax(0, 1fr); }
    .project-split .project-result { padding-top: 0; }
}

@media (max-width: 734px) {
    .projects,
    .services { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .projects { margin-top: 16px; }
    .project,
    .service { padding: 28px 24px; border-radius: 20px; }
    .project h3,
    .service h3 { font-size: 21px; }
    .facts { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 36px; padding-top: 28px; }
    .tech { margin-top: 48px; }
    .tech-title { font-size: 21px; }
    .tech-groups { border-radius: 20px; }
    .tech-group { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 20px; }
}

/* Contact */

.contact {
    position: relative;
    padding: 88px 40px;
    border-radius: 28px;
    background: var(--surface);
    text-align: center;
}
.contact .intro { max-width: 560px; margin: 18px auto 0; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 36px; }
.contact-email { margin-top: 20px; font-size: 14px; }
.contact-note { margin-top: 6px; color: var(--ink-3); font-size: 14px; }

/* The pixel trail from the logo's R, above the contact headline. */
.pixels {
    display: grid;
    grid-template-columns: repeat(3, 10px);
    grid-template-rows: repeat(3, 10px);
    gap: 3px;
    width: max-content;
    margin: 0 auto 28px;
}
.pixels i { background: var(--steel); }
.pixels i:nth-child(1) { grid-area: 1 / 1; }
.pixels i:nth-child(2) { grid-area: 2 / 1; opacity: .7; }
.pixels i:nth-child(3) { grid-area: 2 / 2; }
.pixels i:nth-child(4) { grid-area: 3 / 2; opacity: .7; }
.pixels i:nth-child(5) { grid-area: 3 / 3; }

@media (max-width: 734px) {
    .contact { padding: 56px 20px; border-radius: 24px; }
    .contact-actions { flex-direction: column; align-items: center; }
    .contact-actions .button { width: min(280px, 100%); }
}

/* Footer */

.footer {
    padding: 28px 0 36px;
    border-top: 1px solid var(--line-soft);
    color: var(--ink-3);
    font-size: 12px;
    line-height: 1.33;
    letter-spacing: -.01em;
}
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.footer-brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; font-weight: 600; }
.footer-brand:hover { text-decoration: none; }
.footer-brand img { width: 20px; height: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; list-style: none; }
.footer-links a { color: var(--ink-2); }
.footer-links a:hover { color: var(--ink); }
.footer-copy { flex-basis: 100%; }

/* Page header and documents (Impressum, Privacy Policy) */

.page-head { padding: 88px 0 48px; text-align: center; }
.page-head .intro { margin-top: 12px; }

.doc { max-width: 692px; margin: 0 auto; padding-bottom: 120px; line-height: 1.53; }
.doc h2 { margin: 44px 0 12px; font-size: 24px; line-height: 1.17; font-weight: 600; letter-spacing: .009em; }
.doc p { margin-bottom: 16px; color: var(--ink-2); }
.doc-date { font-weight: 600; }

@media (max-width: 734px) {
    .page-head { padding: 56px 0 32px; }
    .doc { padding-bottom: 80px; }
    .doc h2 { margin-top: 36px; font-size: 21px; }
}

/* 404 */

.result { padding: 140px 0 160px; text-align: center; }
.result .intro { margin: 16px 0 28px; }

/* Merg app-link pages and the old Merg legal address */

.launch,
.moved {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 48px 24px;
    text-align: center;
}
.launch-icon { width: 128px; height: 128px; margin-bottom: 32px; }
.launch h1,
.moved h1 { font-size: 40px; line-height: 1.1; font-weight: 600; }
.launch p,
.moved p { max-width: 420px; margin: 12px auto 32px; color: var(--ink-2); font-size: 19px; line-height: 1.42; }
.launch-actions { display: flex; flex-direction: column; align-items: center; gap: 18px; }

.spinner {
    width: 28px;
    height: 28px;
    margin-bottom: 32px;
    border: 2.5px solid rgba(255, 255, 255, .15);
    border-top-color: var(--steel);
    border-radius: 50%;
    animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.moved-icon { width: 96px; height: 96px; margin: 0 auto 28px; }
.link-list { overflow: hidden; margin-bottom: 28px; padding: 0; border-radius: 18px; background: var(--surface); list-style: none; text-align: left; }
.link-list li + li { border-top: 1px solid var(--line-soft); }
.link-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; color: var(--ink); }
.link-list a:hover { background: var(--surface-2); text-decoration: none; }
.link-list .icon { color: var(--ink-3); font-size: 13px; }

@media (max-width: 734px) {
    .launch h1,
    .moved h1 { font-size: 32px; }
}

/* Motion preferences */

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