/* Oxira default theme.
   Signature: every game is a tile in its own two colors; the studio mark is four of them.
   The home page gives the featured game a stage in its colors; everything around it stays studio-neutral,
   so any game, of any genre, fits. Sections are sheets that slide over each other with rounded corners. */
:root {
    --accent: #5a3fe0;            /* studio violet, theme setting */
    --ink: #1a1f3a;
    --mist: #f2f5fa;
    --surface: #ffffff;
    --bg: var(--mist);
    --fg: var(--ink);
    --muted: #525a74;
    --line: #d9deea;
    --link: var(--accent);
    --on-accent: #ffffff;
    --l2: #11a39a;
    --l3: #f2b134;
    --l4: #ef5a6f;
    --game-accent: var(--accent);  /* overridden per game by the theme-vars partial */
    --game-accent-2: var(--l2);
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-heading: "Bricolage Grotesque", system-ui, sans-serif;
    --radius: 1.25rem;
    --wrap: 72rem;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --step-0: 1.0625rem;
    --step-1: 1.3rem;
    --step-2: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem);
    --step-3: clamp(2.2rem, 1.6rem + 2.6vw, 3.4rem);
    --step-4: clamp(3rem, 1.8rem + 6vw, 6.75rem);
}
.theme-dark {
    --bg: #0e1330;
    --surface: #161c42;
    --mist: #121839;
    --fg: #e8ecf7;
    --muted: #a3abc6;
    --line: #2a3263;
    --link: color-mix(in srgb, var(--accent) 50%, #ffffff);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: var(--step-0)/1.6 var(--font-body); overflow-x: clip; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 750; line-height: 1.05; letter-spacing: -.025em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); letter-spacing: -.015em; line-height: 1.2; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: .2em; text-decoration-thickness: .08em; }
:focus-visible { outline: 3px solid var(--l3); outline-offset: 3px; border-radius: .3rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--surface); padding: .5rem 1rem; }

/* ---------- frame ---------- */
.wrap, main { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
main { padding-bottom: 4rem; }
.site-header {
    position: sticky; top: 0; z-index: 15;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
    box-shadow: 0 1px 0 color-mix(in srgb, var(--line) 70%, transparent);
}
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.75rem; padding-block: .9rem; }
.brand { font-family: var(--font-heading); font-weight: 800; font-size: 1.35rem; text-decoration: none; color: var(--fg); letter-spacing: -.03em; margin-right: auto; }
.brand::before { /* the mark: four tiles, one per game color, i.e. a shelf of games */
    content: ""; display: inline-block; width: .9em; height: .9em; margin-right: .45em; vertical-align: -.12em; border-radius: .22em;
    background: conic-gradient(from 90deg, var(--l2) 0 25%, var(--l3) 0 50%, var(--l4) 0 75%, var(--accent) 0);
}
.site-nav { display: flex; gap: .25rem 1.4rem; flex-wrap: wrap; }
.site-nav a {
    color: var(--fg); text-decoration: none; font-weight: 600; padding-block: .3rem;
    background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 3px no-repeat; transition: background-size .2s;
}
.site-nav a:hover { background-size: 100% 3px; }
.lang-switch { display: flex; gap: .2rem; }
.lang-switch a { padding: .3rem .6rem; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: .9rem; font-weight: 600; }
.lang-switch a[aria-current] { color: var(--fg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 40rem) {
    .site-header { position: static; }
    .site-nav { order: 3; width: 100%; }
}

.site-footer { position: relative; background: var(--ink); color: #c9cee3; font-size: .95rem; border-radius: var(--sheet) var(--sheet) 0 0; }
.site-footer .wrap { display: grid; gap: 2rem; padding-block: 3.5rem 2.5rem; }
.site-footer .brand { color: #fff; }
.footer-brand p { margin: .6rem 0 0; max-width: 24ch; }
.footer-nav { display: grid; gap: .55rem; align-content: start; }
.site-footer a { color: #fff; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.copyright { margin: 0; color: #9aa1bd; font-size: .9rem; }
@media (min-width: 46rem) {
    .site-footer .wrap { grid-template-columns: 2fr 1fr 1fr; }
    .copyright { grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .12); }
}

/* full-bleed sheets inside the centered main column; each one slides over the previous with rounded corners */
:root { --sheet: clamp(1.5rem, 4vw, 3rem); }
.showcase, .band { margin-inline: calc(50% - 50vw); padding-inline: max(var(--gutter), calc(50vw - var(--wrap) / 2 + var(--gutter))); }
.band { position: relative; padding-block: clamp(3rem, 6vw, 5rem); border-radius: var(--sheet) var(--sheet) 0 0; }
.band + .band { margin-top: calc(var(--sheet) * -1); padding-top: calc(clamp(3rem, 6vw, 5rem) + var(--sheet)); }
.band > h2 { margin-bottom: 1.75rem; }
.games { background: var(--surface); }
.news { background: var(--mist); box-shadow: 0 -1px 0 var(--line); }
.studio { background: var(--accent); color: var(--on-accent); }
main > .band:last-child { margin-bottom: calc(-4rem - var(--sheet)); padding-bottom: calc(clamp(3rem, 6vw, 5rem) + var(--sheet)); }

.lede { font-size: var(--step-1); line-height: 1.4; color: var(--muted); max-width: 30ch; }
.button, .store {
    display: inline-flex; align-items: center; min-height: 3rem; padding: .7rem 1.35rem; border-radius: 999px;
    background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 700;
}
.button:active, .store:active { transform: translateY(1px); }
.more { font-weight: 700; }
.empty { color: var(--muted); }

/* ---------- home: showcase ---------- */
/* the featured game gets a stage in its own colors; the page around it stays studio-neutral */
.showcase { display: grid; gap: 2.5rem 3rem; align-items: center; padding-block: clamp(2rem, 5vw, 3.5rem) calc(var(--sheet) + 3rem); }
.showcase-icon {
    display: block; width: 4.5rem; height: 4.5rem; border-radius: 22%; margin-bottom: 1.25rem;
    box-shadow: 0 10px 24px -10px rgba(26, 31, 58, .45), 0 0 0 1px var(--line);
}
.showcase h1 { font-size: var(--step-4); line-height: .92; letter-spacing: -.045em; max-width: 9ch; margin-bottom: .3em; }
.showcase .lede { color: var(--fg); }
.highlights { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.highlights li {
    display: inline-flex; align-items: center; gap: .55rem; padding: .4rem .85rem; border-radius: 999px;
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: .92rem; font-weight: 600;
}
.highlights li::before { content: ""; width: .6rem; height: .6rem; border-radius: .15rem; background: var(--game-accent); }
.showcase .more { color: var(--fg); }
.showcase .stores { margin: 1.75rem 0 1rem; }
.showcase .store { background: var(--ink); color: #fff; }
.theme-dark .showcase .store { background: #fff; color: var(--ink); }
.showcase-empty { padding-bottom: calc(var(--sheet) + 2rem); }

.stage {
    --c1: var(--game-accent); --c2: var(--game-accent-2);
    position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: end center;
    min-height: clamp(22rem, 52vw, 33rem); padding: 3rem 1rem 0; border-radius: var(--sheet);
    background: var(--c1);
}
.stage::before, .stage::after { /* two big tiles of the second color: the game's own pattern, not a stock shape */
    content: ""; position: absolute; z-index: -1; border-radius: 22%; background: var(--c2);
}
.stage::before { width: 62%; aspect-ratio: 1; right: -18%; top: -22%; transform: rotate(14deg); }
.stage::after { width: 34%; aspect-ratio: 1; left: -10%; bottom: 12%; transform: rotate(-12deg); opacity: .75; }
.phone {
    position: relative; width: clamp(11rem, 30vw, 16rem); aspect-ratio: 9 / 18.5; margin-bottom: -18%;
    padding: .55rem; border-radius: 2.4rem; background: var(--ink);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ink) 70%, #fff), 0 30px 60px -20px rgba(14, 19, 48, .6);
}
.phone::before { /* speaker slot */
    content: ""; position: absolute; z-index: 1; top: 1.05rem; left: 50%; width: 22%; height: .38rem;
    border-radius: 999px; background: var(--ink); transform: translateX(-50%);
}
.phone-screen { height: 100%; border-radius: 1.95rem; overflow: hidden; background: var(--c2); display: grid; place-items: center; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; }
.phone-screen .screen-icon { width: 46%; height: auto; aspect-ratio: 1; border-radius: 22%; box-shadow: 0 12px 28px -10px rgba(14, 19, 48, .5); }
.shot-back {
    position: absolute; bottom: -6%; width: clamp(8rem, 21vw, 11.5rem); height: auto; border-radius: 1.5rem;
    box-shadow: 0 18px 40px -12px rgba(14, 19, 48, .5);
}
.shot-left { left: 50%; transform: translateX(-118%) rotate(-10deg); }
.shot-right { right: 50%; transform: translateX(118%) rotate(9deg); }

.more-games h2 { font-family: var(--font-body); font-size: .95rem; font-weight: 700; letter-spacing: 0; color: var(--muted); margin-bottom: .75rem; }
.more-games ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.more-games a {
    display: flex; align-items: center; gap: .65rem; padding: .4rem 1rem .4rem .4rem; border-radius: 999px;
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--fg); text-decoration: none; font-weight: 700;
}
.more-games a:hover { box-shadow: inset 0 0 0 2px var(--c1, var(--accent)); }
.more-games img, .more-games .card-letter { width: 2.5rem; height: 2.5rem; border-radius: 28%; font-size: 1.2rem; }
.more-games .card-letter { background: var(--c1, var(--accent)); color: #fff; }
@media (min-width: 52rem) {
    .showcase { grid-template-columns: 1fr 1.1fr; }
    .more-games { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: no-preference) {
    /* the one orchestrated moment: the featured game's screens fan out of the phone once */
    .phone { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
    .shot-left { animation: fan-left .8s .15s cubic-bezier(.2, .8, .2, 1) both; }
    .shot-right { animation: fan-right .8s .15s cubic-bezier(.2, .8, .2, 1) both; }
    @keyframes rise { from { transform: translateY(2.5rem); } }
    @keyframes fan-left { from { transform: translateX(-50%) rotate(0); } }
    @keyframes fan-right { from { transform: translateX(50%) rotate(0); } }
}

/* tiles: the studio's own glyph (brand, principles, 404) */
.tiles { display: inline-grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem; width: 4.5rem; align-self: start; }
.tiles i { aspect-ratio: 1; border-radius: 26%; background: var(--l2); }
.tiles i:nth-child(2) { background: var(--l3); }
.tiles i:nth-child(3) { background: var(--l4); }
.tiles i:nth-child(4) { background: var(--accent); }
.tiles .missing { background: none; box-shadow: inset 0 0 0 3px var(--line); }

/* ---------- home: games ---------- */
.game-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.game-card {
    --c1: var(--accent); --c2: var(--l2);
    display: grid; height: 100%; text-decoration: none; color: var(--fg); border-radius: var(--radius); overflow: hidden;
    background: var(--bg); box-shadow: 0 0 0 1px var(--line); transition: transform .2s, box-shadow .2s;
}
.game-card:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line), 0 16px 32px -18px rgba(26, 31, 58, .45); }
.card-art {
    position: relative; overflow: hidden; display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--c1);
}
.card-art::before { content: ""; position: absolute; width: 58%; aspect-ratio: 1; right: -14%; top: -30%; border-radius: 22%; background: var(--c2); transform: rotate(14deg); }
.card-art img, .card-letter {
    position: relative; width: 6rem; height: 6rem; border-radius: 22%; box-shadow: 0 14px 28px -12px rgba(14, 19, 48, .55);
}
.card-letter { display: grid; place-items: center; background: var(--surface); color: var(--ink); font: 800 2.5rem/1 var(--font-heading); }
.card-body { display: grid; gap: .35rem; align-content: start; padding: 1.1rem 1.25rem 1.3rem; }
.game-card .name { font-family: var(--font-heading); font-weight: 750; font-size: var(--step-1); line-height: 1.15; letter-spacing: -.015em; }
.game-card .tagline { color: var(--muted); font-size: .95rem; line-height: 1.4; }
.card-stores { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.card-status { padding: .2rem .65rem; border-radius: 999px; font-size: .82rem; font-weight: 700; background: var(--ink); color: #fff; }
.card-status.soon { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); }
.theme-dark .card-status { background: #fff; color: var(--ink); }
@media (max-width: 34rem) {
    .game-grid { grid-template-columns: 1fr 1fr; gap: .85rem; }
    .card-art { aspect-ratio: 1; }
    .card-art img, .card-letter { width: 4.25rem; height: 4.25rem; }
    .card-body { padding: .85rem .9rem 1rem; }
    .game-card .name { font-size: 1.1rem; }
    .game-card .tagline { font-size: .88rem; }
}

/* ---------- home: news, studio ---------- */
.news-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 1.75rem; max-width: 46rem; }
.news-item { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start; }
.news-item > div { grid-column: 2; }
.news-item:not(:has(img)) > div { grid-column: 1 / -1; }
.news-thumb { width: 6.5rem; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .75rem; }
.news-item time { display: block; color: var(--muted); font-size: .9rem; margin-bottom: .2rem; }
.news-item h3 { margin: 0 0 .3rem; }
.news-item h3 a { color: var(--fg); text-decoration: none; }
.news-item h3 a:hover { text-decoration: underline; }
.news-item p { margin: 0; color: var(--muted); max-width: 60ch; }

.studio { display: grid; gap: 2.5rem 4rem; align-items: start; }
.studio h2 { color: var(--on-accent); }
.studio-text { font-size: var(--step-1); line-height: 1.5; max-width: 34ch; }
.studio a { color: var(--on-accent); }
.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; }
.principle { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1.1rem; }
.principle .mini { grid-row: span 2; width: 2.1rem; gap: .18rem; margin-top: .2rem; }
.principle .mini i { background: rgba(255, 255, 255, .28); }
.principle:nth-child(1) .mini i:nth-child(1), .principle:nth-child(2) .mini i:nth-child(-n+2), .principle:nth-child(3) .mini i:nth-child(-n+3) { background: #fff; }
.principle h3 { margin: 0; color: var(--on-accent); }
.principle p { margin: 0; color: rgba(255, 255, 255, .86); max-width: 36ch; }
@media (min-width: 52rem) {
    .studio { grid-template-columns: 1.1fr 1fr; }
    .principles { padding-top: .4rem; }
}

/* ---------- news pages ---------- */
.news-page { padding-top: 2rem; }
.news-page h1 { margin-bottom: 2rem; }
.pager { display: flex; justify-content: space-between; gap: 1rem; max-width: 46rem; font-weight: 700; }
.article { max-width: 42rem; padding-top: 2rem; }
.article-meta { color: var(--muted); font-size: .95rem; display: flex; gap: 1rem; }
.article-meta a { color: var(--muted); }
.article-cover { display: block; width: 100%; border-radius: var(--radius); margin: 0 0 2rem; }

/* ---------- game page ---------- */
.pour { display: flex; height: .75rem; margin: .5rem 0 2.25rem; border-radius: 999px; overflow: hidden; }
.pour i { flex: 2; background: var(--game-accent); }
.pour i + i { flex: 1; background: var(--game-accent-2); }
.game-banner { display: block; width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--radius); margin-bottom: 2rem; }
.game-body { display: grid; gap: 2.5rem; }
.game-title { display: flex; gap: 1.25rem; align-items: center; margin-bottom: 1.5rem; }
.game-title h1 { margin: 0; font-size: var(--step-3); letter-spacing: -.035em; }
.game-icon { width: clamp(5rem, 14vw, 7rem); border-radius: 22%; box-shadow: 0 0 0 1px var(--line); }
.tagline { color: var(--muted); font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem); line-height: 1.4; margin: .35rem 0 0; }
.stores { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2rem; }
.store { background: var(--game-accent); }
.store.soon { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 2px var(--line); }
.prose { max-width: 40rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: .3rem; }
.game-video { margin: 2rem 0; }
.yt-facade { position: relative; display: block; max-width: 40rem; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: #000; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.yt-play { position: absolute; left: 1rem; bottom: 1rem; display: inline-flex; align-items: center; gap: .5rem; background: #fff; color: var(--ink); padding: .5rem 1rem; border-radius: 999px; font-weight: 700; }
.yt-play::before { content: ""; border-left: .7em solid currentColor; border-top: .42em solid transparent; border-bottom: .42em solid transparent; }
.yt-frame { width: 100%; max-width: 40rem; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }
.shots { list-style: none; margin: 0; padding: 0 0 .75rem; display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.shots li { flex: 0 0 auto; scroll-snap-align: start; }
.shots img { height: min(30rem, 70vh); width: auto; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line); }
.game-links { margin-top: 2rem; font-size: .95rem; }
@media (max-width: 59.99rem) {
    /* small screens: screenshots right after the description, trailer and links after them */
    .game-body { gap: 0; }
    .game-main { display: contents; }
    .game-shots { order: 1; margin-bottom: 1rem; }
    .game-video, .game-links { order: 2; }
    .shots img { height: min(26rem, 60vh); }
}
@media (min-width: 60rem) {
    .layout-portrait-gallery .game-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: start; }
    .layout-portrait-gallery .game-shots { position: sticky; top: 1rem; }
    .layout-banner .shots img { height: 20rem; }
}

/* ---------- text pages ---------- */
.privacy, .page { max-width: 42rem; padding-top: 2rem; }
.privacy h1, .page h1 { font-size: var(--step-3); }
.prose h2 { font-size: var(--step-1); margin-top: 2em; }
.updated, .crumb { color: var(--muted); font-size: .95rem; }
.crumb a { color: var(--muted); }

/* ---------- 404 ---------- */
.error-page { padding: 3rem 0; }
.error-page .tiles { margin-bottom: 2rem; }

/* ---------- cookie consent (only rendered when an optional category is on) ---------- */
.consent-banner {
    position: fixed; inset: auto 1rem 1rem; z-index: 20; max-width: 34rem; margin-left: auto;
    background: var(--surface); color: var(--fg); padding: 1.1rem 1.25rem; border-radius: var(--radius);
    box-shadow: 0 0 0 1px var(--line), 0 12px 32px rgba(26, 31, 58, .18);
}
.consent-banner p { margin-bottom: .9rem; font-size: .95rem; }
.consent-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.consent-actions button { font: inherit; font-weight: 700; min-height: 2.75rem; padding: .5rem 1.1rem; border-radius: 999px; border: 0; background: var(--ink); color: #fff; cursor: pointer; }
.theme-dark .consent-actions button { background: #fff; color: var(--ink); }
.consent-actions button.quiet { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 2px var(--line); }
.consent-dialog { border: 0; border-radius: var(--radius); padding: 1.5rem; max-width: 28rem; background: var(--surface); color: var(--fg); }
.consent-dialog::backdrop { background: rgba(14, 19, 48, .55); }
.consent-dialog .check { display: flex; gap: .6rem; align-items: center; margin-bottom: .75rem; }
.consent-dialog h2 { font-size: var(--step-1); }
