/* Betre Games: orange gamepad B on black */

:root {
    --bg: #101013;
    --bg-raised: #17171B;
    --surface: #1E1E23;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --text: #FAFAFA;
    --muted: #A3A3AB;
    --orange: #FF6F00;
    --orange-soft: #FF8A2B;
    --display: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
    --body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    --gutter: 20px;
    --radius: 20px;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font: 400 1.0625rem/1.65 var(--body);
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
}

img {
    display: block;
}

.wrap {
    width: 100%;
    max-width: 1120px;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

a {
    color: inherit;
}

a:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 3px;
    border-radius: 6px;
}

.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip {
    position: absolute;
    left: var(--gutter);
    top: -4rem;
    z-index: 30;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    background: var(--orange);
    color: #000;
    font-weight: 600;
}

.skip:focus {
    top: 0.75rem;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--display);
    color: var(--text);
}

/* Wordmark: the gamepad B followed by "etre", as in the logo */

.wordmark {
    display: inline-flex;
    align-items: baseline;
    font-family: var(--display);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text);
}

.wordmark .b-mark {
    align-self: baseline;
    width: auto;
    height: 0.72em;
    margin-right: 0.03em;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(16, 16, 19, 0.8);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.site-header .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 1.5rem;
    padding-block: 0.85rem;
}

.brand {
    display: inline-flex;
    align-items: baseline;
    gap: 0.45rem;
    margin-right: auto;
    padding-block: 0.3rem;
    text-decoration: none;
}

.brand .wordmark {
    font-size: 1.6rem;
}

.brand-sub {
    font: 600 0.72rem/1 var(--display);
    letter-spacing: 0.32em;
    color: var(--orange);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.5rem;
}

.site-nav a {
    padding: 0.55rem 0;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s;
}

.site-nav a:hover {
    color: var(--text);
}

/* On phones the section links sit on their own row under the brand */
@media (max-width: 759px) {
    .site-nav {
        order: 3;
        width: 100%;
    }
}

/* Hero: the cover artwork, a centred logo on a d-pad and button pattern */

.hero {
    position: relative;
    padding-block: clamp(4rem, 12vw, 8.5rem) clamp(4rem, 11vw, 8rem);
    overflow: hidden;
    text-align: center;
    background:
        radial-gradient(ellipse 55% 60% at 50% 48%, var(--bg) 35%, rgba(16, 16, 19, 0) 100%),
        url("/assets/pattern.svg") center top / 240px 240px repeat,
        var(--bg);
}

.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 120px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(16, 16, 19, 0), var(--bg));
}

.hero-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero h1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: clamp(2rem, 5vw, 3rem);
}

.hero h1 .wordmark {
    font-size: clamp(4.5rem, 17vw, 9.5rem);
    letter-spacing: -0.03em;
}

.hero-sub {
    margin-top: 0.35em;
    padding-left: 0.5em;
    font: 600 clamp(1.15rem, 3.6vw, 2rem)/1 var(--display);
    letter-spacing: 0.5em;
    color: var(--orange);
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.95rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font: 600 1rem/1 var(--body);
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary {
    background: var(--orange);
    color: #000;
}

.btn-primary:hover {
    background: var(--orange-soft);
}

.btn-secondary {
    border-color: var(--line-strong);
    background: rgba(16, 16, 19, 0.6);
    color: var(--text);
}

.btn-secondary:hover {
    border-color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

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

    .hero-copy {
        animation: none;
    }

    .btn,
    .site-nav a,
    .mail {
        transition: none;
    }
}

/* Sections: heading on the left, content on the right */

.section {
    padding-block: clamp(3.5rem, 8vw, 6rem);
    border-top: 1px solid var(--line);
}

.section > .wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 860px) {
    .section > .wrap {
        grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
        gap: 3rem;
    }
}

h2 {
    font-size: clamp(2rem, 4.5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

/* Games: one row per game, icon and text swap sides every row */

.section-games > .wrap {
    display: block;
}

.section-games h2 {
    margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.games {
    display: grid;
    gap: clamp(3rem, 8vw, 5.5rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.game {
    display: grid;
    gap: 1.5rem;
    justify-items: start;
}

.game:nth-child(even) {
    justify-items: end;
    text-align: right;
}

@media (min-width: 700px) {
    .game {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: clamp(2.5rem, 5vw, 4rem);
    }

    .game:nth-child(even) {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .game:nth-child(even) .game-icon {
        order: 2;
    }

    .game-body {
        width: 100%;
    }

    .game:nth-child(even) .game-body {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }
}

.game-icon {
    display: block;
    width: clamp(120px, 30vw, 220px);
    border-radius: 22.5%;
    overflow: hidden;
    transition: transform 0.2s;
}

.game-icon img {
    width: 100%;
    height: auto;
}

.game-icon:hover {
    transform: translateY(-4px);
}

.game-icon:focus-visible {
    border-radius: 22.5%;
}

.game h3 {
    margin-bottom: 0.6rem;
    font-size: clamp(1.75rem, 4.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.game-desc {
    max-width: 46ch;
    margin: 0 0 1rem;
    color: var(--muted);
}

.game-link {
    font-weight: 600;
    color: var(--orange);
    text-decoration: none;
}

.game-link::after {
    content: " \2192";
}

.game-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .game-icon {
        transition: none;
    }
}

/* About */

.about-intro {
    max-width: 40ch;
    margin: 0;
    font: 600 clamp(1.25rem, 3vw, 1.65rem)/1.4 var(--display);
    letter-spacing: -0.01em;
    color: var(--text);
}

.values {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 860px) {
    .values {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.25rem;
        margin-top: 1rem;
    }
}

.values li {
    padding: 1.75rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--bg-raised);
}

/* Each card gets a piece of the controller: d-pad, buttons, d-pad */
.values li::before {
    content: "";
    display: block;
    width: 30px;
    height: 30px;
    margin-bottom: 1.25rem;
    background: var(--orange);
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Crect x='10.5' y='1' width='9' height='28' rx='2.5'/%3E%3Crect x='1' y='10.5' width='28' height='9' rx='2.5'/%3E%3C/svg%3E");
}

.values li:nth-child(2)::before {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Ccircle cx='15' cy='5.5' r='4.5'/%3E%3Ccircle cx='5.5' cy='15' r='4.5'/%3E%3Ccircle cx='24.5' cy='15' r='4.5'/%3E%3Ccircle cx='15' cy='24.5' r='4.5'/%3E%3C/svg%3E");
}

.values h3 {
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.values p {
    margin: 0;
    font-size: 0.975rem;
    line-height: 1.6;
    color: var(--muted);
}

/* Contact */

.contact-card {
    padding: clamp(1.75rem, 5vw, 2.75rem);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-raised);
}

.contact-card p {
    max-width: 48ch;
    margin: 0 0 1rem;
    color: var(--muted);
}

.mail {
    display: inline-block;
    font: 700 clamp(1.4rem, 5.2vw, 2.5rem)/1.2 var(--display);
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
    text-decoration: underline;
    text-decoration-color: var(--orange);
    text-decoration-thickness: 3px;
    text-underline-offset: 8px;
    transition: color 0.15s;
}

.mail:hover {
    color: var(--orange);
}

/* Footer */

.site-footer {
    padding-block: 1.75rem 2.25rem;
    border-top: 1px solid var(--line);
    font-size: 0.9375rem;
    color: var(--muted);
}

.site-footer .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
}

.site-footer p {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
}

.site-footer p img {
    width: 18px;
    height: auto;
}

.site-footer a {
    color: var(--muted);
}

.site-footer a:hover {
    color: var(--orange);
}

/* Privacy policy */

.doc {
    padding-block: clamp(2.5rem, 7vw, 5rem) clamp(3rem, 8vw, 6rem);
}

.doc .wrap {
    max-width: 760px;
}

.doc h1 {
    margin-bottom: 0.5rem;
    font-size: clamp(2.4rem, 7vw, 3.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.doc-date {
    margin: 0 0 2.25rem;
    color: var(--muted);
}

.doc h2 {
    margin: 2.5rem 0 0.75rem;
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.doc p,
.doc li {
    max-width: 68ch;
    color: #D6D6DC;
}

.doc p {
    margin: 0 0 1rem;
}

.doc strong {
    color: var(--text);
}

.doc ul {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}

.doc li {
    margin-bottom: 0.4rem;
}

.doc li::marker {
    color: var(--orange);
}

.doc a {
    color: var(--text);
    text-decoration-color: var(--orange);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.doc a:hover {
    color: var(--orange);
}
