:root {
    --bg: #000000;
    --bg-raised: #080808;
    --surface: #111111;
    --surface-soft: #181818;
    --text: #f1f1ed;
    --muted: #a3a39d;
    --line: #2b2b2b;
    --accent: #d8d8d1;
    --accent-dark: #000000;
    --success: #edede7;
    --error: #bdbdb8;
    --content: 1180px;
    --radius: 18px;
    --font-sans: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

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

html {
    color-scheme: dark;
    scroll-behavior: smooth;
    scroll-padding-top: 92px;
}

body {
    margin: 0;
    min-width: 240px;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(216, 216, 209, .018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(216, 216, 209, .018) 1px, transparent 1px);
    background-size: 52px 52px;
    content: "";
    pointer-events: none;
    mask-image: linear-gradient(to bottom, #000 0, transparent 68%);
}

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

button,
input,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

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

::selection {
    background: var(--accent);
    color: var(--accent-dark);
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
    padding: 10px 16px;
    background: var(--accent);
    color: var(--accent-dark);
    font-weight: 800;
    transform: translateY(-160%);
    transition: transform .2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.section-shell {
    width: min(calc(100% - 40px), var(--content));
    margin-inline: auto;
}

.section {
    padding-block: 118px;
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .15em;
    line-height: 1.4;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    line-height: 1.04;
    letter-spacing: -.045em;
}

h1 {
    margin-bottom: 30px;
    font-size: clamp(3.4rem, 8vw, 7rem);
    font-weight: 780;
    max-width: 10.5ch;
}

h1 span {
    display: block;
    color: var(--accent);
}

.hero-title__line {
    min-height: 1em;
}

.hero-title__line--primary {
    color: var(--text);
}

.hero-title__word {
    display: inline-block;
    color: inherit;
}

.hero-title__character {
    display: inline;
    color: inherit;
    visibility: hidden;
}

.hero-title__character.is-visible {
    visibility: visible;
}

h2 {
    margin-bottom: 0;
    font-size: clamp(2.3rem, 5vw, 4.5rem);
    max-width: 13ch;
}

h3 {
    font-size: 1.5rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid transparent;
    background: rgba(0, 0, 0, .78);
    backdrop-filter: blur(18px);
    transition: border-color .2s ease, background .2s ease;
}

.site-header.is-scrolled {
    border-color: var(--line);
    background: rgba(0, 0, 0, .95);
}

.header-inner {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    min-height: 76px;
    gap: 42px;
}

.brand {
    display: inline-flex;
    align-items: center;
    width: max-content;
    gap: 11px;
    font-size: .96rem;
    font-weight: 800;
    letter-spacing: -.02em;
    text-transform: uppercase;
}

.brand em {
    color: var(--muted);
    font-style: normal;
    font-weight: 500;
}

.brand__mark {
    display: block;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    background: #000;
    object-fit: contain;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.site-nav a,
.language-switcher button {
    color: var(--muted);
    font-size: .88rem;
    font-weight: 650;
    transition: color .2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
.language-switcher button:hover,
.language-switcher button[aria-pressed="true"] {
    color: var(--text);
}

.language-switcher {
    display: flex;
    gap: 7px;
    align-items: center;
    font-family: var(--font-mono);
}

.language-switcher button {
    padding: 3px 1px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.language-switcher span {
    color: var(--line);
}

.menu-toggle {
    display: none;
    padding: 8px;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.menu-toggle > span:not(.sr-only) {
    display: block;
    width: 25px;
    height: 2px;
    margin: 5px 0;
    background: currentColor;
    transition: transform .2s ease;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(330px, .82fr);
    align-items: center;
    min-height: calc(100vh - 76px);
    min-height: calc(100svh - 76px);
    gap: clamp(50px, 8vw, 118px);
    padding-block: 88px;
}

.hero__intro {
    max-width: 610px;
    margin-bottom: 36px;
    color: var(--muted);
    font-size: clamp(1.08rem, 1.8vw, 1.3rem);
    line-height: 1.62;
}

.hero__actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.hero__note {
    max-width: 205px;
    color: #737373;
    font-family: var(--font-mono);
    font-size: .69rem;
    letter-spacing: .08em;
    line-height: 1.5;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 13px 20px;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    font-size: .88rem;
    font-weight: 800;
    line-height: 1;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.button--primary {
    background: var(--accent);
    color: var(--accent-dark);
    box-shadow: 0 0 0 rgba(216, 216, 209, 0);
}

.button--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 34px rgba(216, 216, 209, .12);
}

.button:disabled,
.button[aria-busy="true"] {
    cursor: wait;
    opacity: .62;
    transform: none;
    box-shadow: none;
}

.signal {
    position: relative;
}

.signal__frame {
    position: relative;
    display: grid;
    aspect-ratio: .86;
    min-height: 480px;
    place-items: center;
    border: 1px solid var(--line);
    background:
        linear-gradient(90deg, transparent 49.8%, rgba(216, 216, 209, .07) 50%, transparent 50.2%),
        linear-gradient(transparent 49.8%, rgba(216, 216, 209, .07) 50%, transparent 50.2%),
        var(--bg-raised);
    overflow: hidden;
}

.signal__logo {
    position: relative;
    display: block;
    width: min(82%, 390px);
    height: auto;
    max-height: 75%;
    border: 1px solid #171717;
    object-fit: contain;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .42);
}

.signal__meta {
    position: absolute;
    right: 22px;
    bottom: 20px;
    left: 22px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.signal__live::before {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--accent);
    content: "";
    box-shadow: 0 0 10px rgba(216, 216, 209, .45);
}

.signal__corner {
    position: absolute;
    width: 46px;
    height: 46px;
    border-color: var(--accent);
    border-style: solid;
}

.signal__corner--one {
    top: 14px;
    left: 14px;
    border-width: 2px 0 0 2px;
}

.signal__corner--two {
    right: 14px;
    bottom: 14px;
    border-width: 0 2px 2px 0;
}

.section-heading {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 400px);
    align-items: end;
    gap: 60px;
    margin-bottom: 58px;
}

.section-heading > p {
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 1.04rem;
}

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

.game-card {
    border: 1px solid var(--line);
    background: var(--bg-raised);
    overflow: hidden;
    transition: border-color .25s ease, transform .25s ease;
}

.game-card:hover {
    border-color: #6b6b6b;
    transform: translateY(-6px);
}

.game-card--socks:hover {
    border-color: #747474;
}

.game-card--monster:hover {
    border-color: #747474;
}

.game-card__visual {
    position: relative;
    display: grid;
    height: 315px;
    place-items: center;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.game-card--socks .game-card__visual {
    background: #090909;
}

.game-card--monster .game-card__visual {
    background: #090909;
}

.game-card__visual > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.2, .7, .2, 1), filter .5s ease;
}

.game-card:hover .game-card__visual > img {
    transform: scale(1.025);
}

.game-card__index {
    position: absolute;
    top: 20px;
    left: 22px;
    z-index: 4;
    padding: 4px 8px;
    border: 1px solid rgba(241, 241, 237, .42);
    background: rgba(0, 0, 0, .72);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: .72rem;
}

.game-card__body {
    padding: 34px;
}

.game-card__body h3 {
    margin: 23px 0 16px;
    font-size: clamp(1.85rem, 3vw, 2.55rem);
}

.game-card__body > p {
    min-height: 82px;
    margin-bottom: 30px;
    color: var(--muted);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags span {
    padding: 5px 9px;
    border: 1px solid var(--line);
    color: #b8b8b8;
    font-family: var(--font-mono);
    font-size: .65rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid currentColor;
    color: var(--text);
    font-size: .86rem;
    font-weight: 800;
    transition: color .2s ease, gap .2s ease;
}

.text-link:hover {
    gap: 18px;
    color: var(--accent);
}

.about {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
    gap: clamp(70px, 11vw, 145px);
}

.about__lead {
    align-self: start;
    position: sticky;
    top: 125px;
}

.about__lead h2 {
    margin-bottom: 32px;
}

.about__lead > p:last-child {
    max-width: 530px;
    color: var(--muted);
    font-size: 1.08rem;
}

.values {
    margin: 0;
    padding: 0;
    list-style: none;
}

.values li {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 26px;
    padding: 35px 0;
    border-top: 1px solid var(--line);
}

.values li:last-child {
    border-bottom: 1px solid var(--line);
}

.values li > span {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: .7rem;
}

.values h3 {
    margin-bottom: 12px;
}

.values p {
    margin-bottom: 0;
    color: var(--muted);
}

.section--history {
    border-block: 1px solid var(--line);
    background: var(--bg-raised);
}

.history__intro {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 420px);
    column-gap: 60px;
    align-items: end;
    margin-bottom: 68px;
}

.history__intro .eyebrow {
    grid-column: 1 / -1;
}

.history__intro > p:last-child {
    margin-bottom: 0;
    color: var(--muted);
}

.timeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
    list-style: none;
}

.timeline li {
    position: relative;
    padding: 32px 26px 38px 0;
    border-right: 1px solid var(--line);
}

.timeline li:not(:first-child) {
    padding-left: 26px;
}

.timeline li:last-child {
    border-right: 0;
}

.timeline li::before {
    position: absolute;
    top: -5px;
    left: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    content: "";
}

.timeline li:not(:first-child)::before {
    left: 26px;
}

.timeline time {
    display: block;
    margin-bottom: 54px;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: .82rem;
}

.timeline h3 {
    margin-bottom: 13px;
    font-size: 1.25rem;
    letter-spacing: -.03em;
}

.timeline p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: .91rem;
}

.history__link {
    margin-top: 38px;
}

.contact {
    display: grid;
    grid-template-columns: minmax(280px, .72fr) minmax(500px, 1.28fr);
    gap: clamp(60px, 10vw, 135px);
}

.contact__intro h2 {
    margin-bottom: 30px;
}

.contact__intro > p:last-child {
    max-width: 440px;
    color: var(--muted);
}

.contact-form {
    position: relative;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.field {
    margin-bottom: 22px;
}

.field label {
    display: block;
    margin-bottom: 9px;
    color: #cfcfcb;
    font-size: .78rem;
    font-weight: 700;
}

.field input,
.field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--bg-raised);
    color: var(--text);
    transition: border-color .2s ease, background .2s ease;
}

.field input {
    height: 54px;
    padding: 0 16px;
}

.field textarea {
    min-height: 166px;
    padding: 14px 16px;
    resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #686868;
    opacity: 1;
}

.field input:hover,
.field textarea:hover {
    border-color: #424242;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--accent);
    outline: 0;
    background: #0d0d0d;
    box-shadow: 0 0 0 3px rgba(216, 216, 209, .12);
}

.form-footer {
    display: flex;
    align-items: center;
    gap: 24px;
}

.form-footer p {
    max-width: 310px;
    margin-bottom: 0;
    color: #737373;
    font-size: .76rem;
    line-height: 1.5;
}

.form-message {
    margin-bottom: 24px;
    padding: 15px 17px;
    border-left: 3px solid;
    background: var(--surface);
    font-size: .9rem;
}

.form-message:focus {
    outline: 0;
}

.form-message--error {
    border-color: var(--error);
    color: var(--error);
}

.form-message--success {
    border-color: var(--success);
    color: var(--success);
}

.form-message ul {
    margin: 0;
    padding-left: 20px;
}

.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Game detail page */
.game-page {
    overflow: clip;
}

.game-not-found {
    display: flex;
    min-height: calc(100vh - 76px);
    min-height: calc(100svh - 76px);
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    padding-block: 100px;
}

.game-not-found h1 {
    max-width: 10ch;
}

.game-not-found > p:not(.eyebrow) {
    max-width: 580px;
    margin-bottom: 32px;
    color: var(--muted);
    font-size: 1.08rem;
}

.game-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
    align-items: center;
    min-height: calc(100vh - 76px);
    min-height: calc(100svh - 76px);
    gap: clamp(55px, 8vw, 110px);
    padding-block: 82px;
}

.game-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 62px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    transition: color .2s ease, gap .2s ease;
}

.game-breadcrumb:hover {
    gap: 15px;
    color: var(--text);
}

.game-detail-hero h1 {
    max-width: 11ch;
    margin-bottom: 26px;
    font-size: 60pt;
}

.game-detail-hero__intro {
    max-width: 620px;
    margin-bottom: 28px;
    color: var(--muted);
    font-size: clamp(1.05rem, 1.55vw, 1.22rem);
    line-height: 1.67;
}

.game-detail-hero__actions {
    margin-top: 34px;
}

.game-detail-hero__media {
    position: relative;
    border: 1px solid var(--line);
    background: var(--bg-raised);
    overflow: hidden;
}

.game-detail-hero__media::after {
    position: absolute;
    inset: 0;
    border: 10px solid rgba(0, 0, 0, .22);
    content: "";
    pointer-events: none;
}

.game-detail-hero__media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.game-detail-hero__id {
    position: absolute;
    right: 17px;
    bottom: 17px;
    z-index: 2;
    padding: 5px 9px;
    border: 1px solid rgba(241, 241, 237, .38);
    background: rgba(0, 0, 0, .78);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: .66rem;
    letter-spacing: .08em;
}

.game-information {
    padding-block: 118px;
    border-block: 1px solid var(--line);
    background: var(--bg-raised);
}

.game-information__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, .65fr);
    align-items: start;
    gap: clamp(70px, 11vw, 145px);
}

.game-about h2 {
    max-width: 12ch;
    margin-bottom: 34px;
}

.game-about__content {
    max-width: 730px;
    margin-bottom: 0;
    color: #b8b8b3;
    font-size: 1.08rem;
    line-height: 1.82;
}

.game-about__content > :first-child {
    margin-top: 0;
}

.game-about__content > :last-child {
    margin-bottom: 0;
}

.game-about__content p,
.game-about__content ul,
.game-about__content ol,
.game-about__content blockquote,
.game-about__content table {
    margin: 0 0 22px;
}

.game-about__content h2,
.game-about__content h3,
.game-about__content h4,
.game-about__content h5,
.game-about__content h6 {
    max-width: 20ch;
    margin: 38px 0 16px;
    color: var(--text);
    font-size: clamp(1.35rem, 2.6vw, 2rem);
    letter-spacing: -.025em;
    line-height: 1.18;
}

.game-about__content ul,
.game-about__content ol {
    padding-left: 1.35rem;
}

.game-about__content li + li {
    margin-top: 8px;
}

.game-about__content blockquote {
    padding: 4px 0 4px 20px;
    border-left: 2px solid var(--accent);
    color: var(--text);
}

.game-about__content a {
    border-bottom: 1px solid currentColor;
    color: var(--text);
}

.game-about__content img,
.game-about__content .bb_img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-block: 26px;
}

.game-about__content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.game-about__content th,
.game-about__content td {
    padding: 10px 12px;
    border: 1px solid var(--line);
    text-align: left;
}

.game-facts {
    border-top: 1px solid var(--line);
}

.game-facts h2 {
    margin: 0;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.15rem;
    letter-spacing: -.02em;
}

.game-facts dl {
    margin: 0;
}

.game-facts dl > div {
    display: grid;
    grid-template-columns: minmax(110px, .8fr) 1fr;
    gap: 22px;
    padding: 17px 0;
    border-bottom: 1px solid var(--line);
}

.game-facts dt,
.game-facts dd {
    margin: 0;
    font-size: .83rem;
    line-height: 1.5;
}

.game-facts dt {
    color: var(--muted);
}

.game-facts dd {
    color: var(--text);
    text-align: right;
}

.game-gallery {
    padding-block: 118px;
}

.game-gallery__header {
    margin-bottom: 52px;
}

.game-gallery__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.game-gallery__thumb {
    position: relative;
    padding: 0;
    border: 1px solid var(--line);
    background: var(--bg-raised);
    cursor: zoom-in;
    overflow: hidden;
}

.game-gallery__thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform .45s cubic-bezier(.2, .7, .2, 1), opacity .3s ease;
}

.game-gallery__thumb:hover img {
    opacity: .84;
    transform: scale(1.025);
}

body.modal-open {
    overflow: hidden;
}

.screenshot-modal[hidden] {
    display: none;
}

.screenshot-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    place-items: center;
    padding: 30px;
}

.screenshot-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .92);
    backdrop-filter: blur(10px);
}

.screenshot-modal__dialog {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 54px;
    align-items: center;
    width: min(1180px, 100%);
    max-height: calc(100vh - 60px);
    border: 1px solid var(--line);
    background: #050505;
}

.screenshot-modal__stage {
    display: grid;
    min-height: 180px;
    place-items: center;
}

.screenshot-modal__image {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 90px);
    object-fit: contain;
}

.screenshot-modal__close,
.screenshot-modal__nav {
    z-index: 2;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--line);
    background: #0b0b0b;
    color: var(--text);
    cursor: pointer;
    font-size: 1.15rem;
    transition: background .2s ease, color .2s ease;
}

.screenshot-modal__close:hover,
.screenshot-modal__nav:hover {
    background: var(--accent);
    color: var(--accent-dark);
}

.screenshot-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
}

.screenshot-modal__nav {
    justify-self: center;
}

/* History page */
.history-page {
    overflow: clip;
}

.history-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr);
    align-items: center;
    min-height: calc(100vh - 76px);
    min-height: calc(100svh - 76px);
    gap: clamp(60px, 10vw, 140px);
    padding-block: 92px;
}

.history-hero h1 {
    max-width: 9ch;
}

.history-hero__intro {
    max-width: 660px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: clamp(1.08rem, 1.8vw, 1.3rem);
    line-height: 1.68;
}

.history-hero__visual {
    position: relative;
    display: grid;
    aspect-ratio: .88;
    place-items: center;
    border: 1px solid var(--line);
    background:
        linear-gradient(rgba(216, 216, 209, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(216, 216, 209, .025) 1px, transparent 1px),
        var(--bg-raised);
    background-size: 34px 34px;
    overflow: hidden;
}

.history-hero__visual::before,
.history-hero__visual::after {
    position: absolute;
    width: 40px;
    height: 40px;
    border-color: var(--accent);
    border-style: solid;
    content: "";
}

.history-hero__visual::before {
    top: 15px;
    left: 15px;
    border-width: 1px 0 0 1px;
}

.history-hero__visual::after {
    right: 15px;
    bottom: 15px;
    border-width: 0 1px 1px 0;
}

.history-hero__visual img {
    display: block;
    width: min(74%, 335px);
    height: auto;
    border: 1px solid #171717;
}

.history-hero__year {
    position: absolute;
    bottom: 23px;
    left: 22px;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: .7rem;
    letter-spacing: .1em;
}

.history-hero__year--end {
    right: 22px;
    left: auto;
}

.history-hero__line {
    position: absolute;
    right: 74px;
    bottom: 29px;
    left: 74px;
    height: 1px;
    background: var(--line);
}

.history-chronology {
    padding-block: 118px;
    border-block: 1px solid var(--line);
    background: var(--bg-raised);
}

.history-chronology__header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 40px;
    margin-bottom: 72px;
}

.history-chronology__header .eyebrow {
    grid-column: 1 / -1;
    margin-bottom: -16px;
}

.history-reading-layout {
    display: grid;
    grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
    align-items: start;
    gap: clamp(55px, 9vw, 125px);
}

.history-page-timeline {
    position: sticky;
    top: 118px;
}

.history-page-timeline ol {
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
    list-style: none;
}

.history-page-timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}

.history-page-timeline li::before {
    position: absolute;
    top: 25px;
    left: -4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    content: "";
    transform: translateX(-100%);
}

.history-page-timeline strong {
    color: var(--text);
    font-family: var(--font-mono);
    font-size: .7rem;
    font-weight: 700;
    line-height: 1.55;
}

.history-page-timeline span {
    color: var(--muted);
    font-size: .83rem;
    line-height: 1.55;
}

.history-story {
    border-top: 1px solid var(--line);
}

.history-story__chapter {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 25px;
    padding: 0 0 68px;
    margin-bottom: 68px;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 110px;
}

.history-story__chapter:first-child {
    padding-top: 38px;
}

.history-story__number {
    padding-top: 8px;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: .7rem;
    letter-spacing: .08em;
}

.history-story__chapter h2 {
    max-width: 15ch;
    margin-bottom: 28px;
    font-size: clamp(2rem, 4vw, 3.55rem);
}

.history-story__chapter p {
    max-width: 720px;
    margin-bottom: 20px;
    color: #b8b8b3;
    font-size: 1.03rem;
    line-height: 1.78;
}

.history-story__chapter p:last-child {
    margin-bottom: 0;
}

.history-outro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, .65fr);
    align-items: end;
    gap: 35px 70px;
    padding-block: 120px;
}

.history-outro .eyebrow {
    grid-column: 1 / -1;
    margin-bottom: -10px;
}

.history-outro h2 {
    max-width: 11ch;
}

.history-outro > p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    font-size: 1.06rem;
}

.history-outro .button {
    grid-column: 2;
    justify-self: start;
}

.site-footer {
    padding: 70px 0 26px;
    border-top: 1px solid var(--line);
    background: #070707;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 60px;
    padding-bottom: 62px;
}

.brand--footer {
    margin-bottom: 20px;
}

.footer-grid > div:first-child > p {
    max-width: 340px;
    margin-bottom: 0;
    color: var(--muted);
}

.footer-socials {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
}

.footer-socials p {
    margin-bottom: 6px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: .7rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.footer-socials a {
    display: inline-flex;
    gap: 8px;
    font-size: .9rem;
    transition: color .2s ease;
}

.footer-socials a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    color: #727272;
    font-family: var(--font-mono);
    font-size: .67rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.has-motion .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}

.has-motion .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1050px) {
    .header-inner {
        gap: 25px;
    }

    .site-nav {
        gap: 20px;
    }

    .hero {
        grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
        gap: 50px;
    }

    .signal__frame {
        min-height: 420px;
    }

    .about {
        gap: 70px;
    }

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

    .timeline li:nth-child(2) {
        border-right: 0;
    }

    .timeline li:nth-child(n+3) {
        border-top: 1px solid var(--line);
    }

    .contact {
        grid-template-columns: minmax(250px, .65fr) minmax(430px, 1.35fr);
        gap: 55px;
    }

    .game-detail-hero {
        grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr);
        gap: 50px;
    }

    .game-information__grid {
        gap: 70px;
    }

    .history-hero {
        gap: 55px;
    }

    .history-reading-layout {
        grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
        gap: 55px;
    }

    .history-page-timeline li {
        grid-template-columns: 78px 1fr;
    }
}

@media (max-width: 899px) {
    .section {
        padding-block: 92px;
    }

    .header-inner {
        grid-template-columns: 1fr auto auto;
    }

    .menu-toggle {
        display: block;
        grid-column: 2;
        grid-row: 1;
    }

    .menu-toggle[aria-expanded="true"] > span:not(.sr-only):nth-of-type(2) {
        transform: translateY(3.5px) rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] > span:not(.sr-only):nth-of-type(3) {
        transform: translateY(-3.5px) rotate(-45deg);
    }

    .language-switcher {
        grid-column: 3;
        grid-row: 1;
    }

    .site-nav {
        position: absolute;
        top: 76px;
        right: 0;
        left: 0;
        display: none;
        padding: 28px max(20px, calc((100vw - var(--content)) / 2));
        border-bottom: 1px solid var(--line);
        background: rgba(0, 0, 0, .98);
    }

    .site-nav.is-open {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .site-nav a {
        width: 100%;
        padding: 7px 0;
        color: var(--text);
        font-size: 1.05rem;
    }

    .hero {
        grid-template-columns: 1fr;
        min-height: 0;
        padding-block: 90px;
    }

    .hero__copy {
        max-width: 750px;
    }

    .signal {
        width: min(100%, 570px);
        margin-left: auto;
    }

    .signal__frame {
        aspect-ratio: 1.35;
        min-height: 0;
    }

    .section-heading,
    .history__intro {
        grid-template-columns: 1fr;
        gap: 25px;
    }

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

    .game-card {
        display: block;
    }

    .game-card__visual {
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 9;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .game-card__body > p {
        min-height: 0;
    }

    .about,
    .contact {
        grid-template-columns: 1fr;
    }

    .about__lead {
        position: static;
    }

    .contact__intro {
        max-width: 600px;
    }

    .game-detail-hero {
        grid-template-columns: 1fr;
        min-height: 0;
        padding-block: 78px 90px;
    }

    .game-detail-hero__copy {
        max-width: 760px;
    }

    .game-breadcrumb {
        margin-bottom: 42px;
    }

    .game-detail-hero__media {
        width: min(100%, 760px);
        margin-left: auto;
    }

    .game-information {
        padding-block: 92px;
    }

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

    .game-facts {
        width: min(100%, 620px);
    }

    .game-gallery {
        padding-block: 92px;
    }

    .history-hero {
        grid-template-columns: 1fr;
        min-height: 0;
        padding-block: 90px;
    }

    .history-hero__copy {
        max-width: 760px;
    }

    .history-hero__visual {
        width: min(100%, 570px);
        aspect-ratio: 1.35;
        margin-left: auto;
    }

    .history-hero__visual img {
        width: min(50%, 285px);
    }

    .history-chronology {
        padding-block: 92px;
    }

    .history-chronology__header {
        margin-bottom: 52px;
    }

    .history-reading-layout {
        grid-template-columns: 1fr;
    }

    .history-page-timeline {
        position: static;
    }

    .history-page-timeline ol {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 28px;
    }

    .history-story__chapter h2 {
        max-width: 18ch;
    }
}

@media (max-width: 640px) {
    .section-shell {
        width: min(calc(100% - 30px), var(--content));
    }

    .section {
        padding-block: 76px;
    }

    .header-inner {
        min-height: 68px;
        gap: 12px;
    }

    .brand > span:last-child {
        display: none;
    }

    .brand__mark {
        width: 38px;
        height: 38px;
    }

    .site-nav {
        top: 68px;
        padding-inline: 15px;
    }

    .language-switcher button,
    .language-switcher span {
        font-size: .78rem;
    }

    .hero {
        gap: 55px;
        padding-block: 70px 75px;
    }

    h1 {
        font-size: clamp(3.1rem, 15vw, 4.6rem);
    }

    h2 {
        font-size: clamp(2.25rem, 11vw, 3.2rem);
    }

    .hero__actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .signal__frame {
        aspect-ratio: 1;
    }

    .signal__logo {
        width: min(78%, 310px);
    }

    .signal__meta {
        right: 15px;
        bottom: 15px;
        left: 15px;
        font-size: .58rem;
    }

    .section-heading {
        margin-bottom: 40px;
    }

    .game-card {
        display: block;
    }

    .game-card__visual {
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 9;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .game-card__body {
        padding: 27px 23px 30px;
    }

    .timeline {
        grid-template-columns: 1fr;
        border-top: 0;
    }

    .timeline li,
    .timeline li:not(:first-child) {
        display: grid;
        grid-template-columns: 66px 1fr;
        gap: 18px;
        padding: 27px 0;
        border-top: 1px solid var(--line);
        border-right: 0;
    }

    .timeline li:nth-child(n+3) {
        border-top: 1px solid var(--line);
    }

    .timeline li::before,
    .timeline li:not(:first-child)::before {
        top: -5px;
        left: 0;
    }

    .timeline time {
        margin-bottom: 0;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-footer .button {
        width: 100%;
    }

    .game-not-found {
        min-height: calc(100svh - 68px);
        padding-block: 76px;
    }

    .game-detail-hero {
        gap: 48px;
        padding-block: 62px 76px;
    }

    .game-detail-hero h1 {
        font-size: clamp(2.8rem, 14vw, 4.3rem);
    }

    .game-detail-hero__actions .button {
        width: 100%;
    }

    .game-information,
    .game-gallery {
        padding-block: 76px;
    }

    .game-about__content {
        font-size: 1rem;
    }

    .game-facts dl > div {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .game-facts dd {
        text-align: left;
    }

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

    .screenshot-modal {
        padding: 12px;
    }

    .screenshot-modal__dialog {
        grid-template-columns: 46px minmax(0, 1fr) 46px;
        max-height: calc(100vh - 24px);
    }

    .screenshot-modal__nav {
        width: 38px;
        height: 42px;
    }

    .screenshot-modal__close {
        top: 8px;
        right: 8px;
    }

    .history-hero {
        gap: 48px;
        padding-block: 70px 76px;
    }

    .history-hero__visual {
        aspect-ratio: 1;
    }

    .history-hero__visual img {
        width: min(70%, 270px);
    }

    .history-chronology {
        padding-block: 76px;
    }

    .history-chronology__header {
        grid-template-columns: 1fr;
        margin-bottom: 42px;
    }

    .history-page-timeline ol {
        grid-template-columns: 1fr;
    }

    .history-page-timeline li {
        grid-template-columns: 82px 1fr;
    }

    .history-story__chapter {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 14px;
        padding-bottom: 48px;
        margin-bottom: 48px;
    }

    .history-story__chapter:first-child {
        padding-top: 30px;
    }

    .history-story__chapter h2 {
        margin-bottom: 22px;
        font-size: clamp(1.8rem, 9vw, 2.65rem);
    }

    .history-story__chapter p {
        font-size: 1rem;
    }

    .history-outro {
        grid-template-columns: 1fr;
        padding-block: 76px;
    }

    .history-outro .button {
        grid-column: 1;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .brand--footer > span:last-child {
        display: inline;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }

}

@media (forced-colors: active) {
    .brand__mark,
    .button--primary,
    .signal__logo,
    .timeline li::before {
        border: 1px solid ButtonText;
    }
}
