@font-face {
  font-family: Manrope;
  src: url('/assets/manrope-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --page: #101311;
  --surface: #181d19;
  --line: #394039;
  --ink: #f3f6eb;
  --quiet: #b7c2b6;
  --lime: #d3fb80;
  --width: 1264px;
  scroll-padding-top: 6rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--page); color: var(--ink); font: 1rem/1.6 Manrope, system-ui, sans-serif; }
img { display: block; max-width: 100%; }
p, h1, h2, h3, ul, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
.wrap { width: min(var(--width), calc(100% - 5rem)); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 20;
  top: .65rem;
  left: .65rem;
  padding: .6rem 1rem;
  background: var(--lime);
  color: #141a0c;
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

.site-header { position: sticky; z-index: 5; top: 0; border-bottom: 1px solid #ffffff14; background: #101311f2; backdrop-filter: blur(18px); }
.header-inner { min-height: 73px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .75rem 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; justify-self: start; white-space: nowrap; font-size: 1.02rem; font-weight: 800; letter-spacing: -.035em; }
.brand img { border: 1px solid #ffffff26; border-radius: 10px; object-fit: cover; }
.brand b { font-weight: 700; color: var(--quiet); }
.site-nav { display: flex; align-items: center; gap: clamp(1.05rem, 3vw, 2.4rem); }
.site-nav a, .contact-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .92rem; font-weight: 750; color: var(--quiet); }
.site-nav a:hover, .footer-links a:hover { color: var(--lime); }
.contact-link { justify-self: end; padding-inline: .9rem; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.contact-link:hover { border-color: var(--lime); color: var(--lime); }

.hero { padding-block: 1.75rem 0; }
.hero-panel {
  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(470px, 42vw, 566px);
  border: 1px solid #465947;
  border-radius: 22px;
  background: #161e19;
  isolation: isolate;
  overflow: hidden;
}
.hero-panel::after {
  content: '';
  position: absolute;
  inset: auto 5.3% 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #dbff9187, transparent);
}
.hero-art { position: absolute; z-index: -2; inset: 0 0 0 auto; width: 74%; height: 100%; max-width: none; object-fit: cover; object-position: 57% 51%; }
.hero-panel::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #121b15 10%, #121b15 26%, #121b15f5 34%, #121b155e 56%, #121b1500 75%);
}
.hero-content { max-width: 57%; padding: 3.5rem 0 3.75rem clamp(2.4rem, 5.5vw, 5.35rem); }
.label { font-size: .82rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.hero-label { display: flex; align-items: center; gap: .65rem; color: var(--lime); margin-bottom: 1.15rem; }
.hero-label::before { content: ''; width: 19px; height: 2px; background: currentColor; }
.hero h1 { font-size: clamp(4.05rem, 7.3vw, 7.1rem); font-weight: 800; line-height: .96; letter-spacing: -.08em; }
.hero h1 span { color: var(--lime); }
.hero-description { max-width: 34ch; font-size: 1.1rem; color: #e0e9dd; margin-block: 1.25rem 1.7rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.snow-toggle { gap: .44rem; }
.snow-toggle[aria-pressed='true'] span { color: #b8f5ff; }
.snow-layer { position: fixed; z-index: 3; inset: 0; pointer-events: none; overflow: hidden; }
.snowflake {
  position: absolute;
  left: var(--flake-x);
  top: -1.6rem;
  color: #eefaff;
  font-size: var(--flake-size);
  line-height: 1;
  opacity: var(--flake-alpha);
  text-shadow: 0 0 4px #cef1ff7f;
  animation: snowfall var(--flake-duration) var(--flake-delay) linear infinite;
}
@keyframes snowfall {
  to { transform: translate3d(var(--flake-drift), calc(100dvh + 3rem), 0) rotate(110deg); }
}
.primary-button, .secondary-button, .store-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: .65rem .95rem;
  font-size: .92rem;
  font-weight: 800;
  line-height: 1.25;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.primary-button { background: var(--lime); color: #17200c; border-color: var(--lime); padding-inline: 1.2rem; }
.primary-button:hover { background: #e9ffb5; border-color: #e9ffb5; }
.secondary-button { color: var(--ink); background: #222b23; }
.secondary-button:hover { border-color: var(--lime); }

.library { padding-block: clamp(3rem, 6vw, 5.4rem); }
.library-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.25rem; }
.section-label { color: var(--lime); margin-bottom: .35rem; }
.library h2, .studio-panel h2 { font-size: clamp(2.2rem, 4.8vw, 4rem); line-height: 1.05; letter-spacing: -.068em; font-weight: 800; }
.filter-list { display: flex; flex-wrap: wrap; gap: .3rem; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #1b221c; }
.filter { border: 0; border-radius: 6px; min-height: 44px; padding: .48rem .85rem; background: transparent; color: var(--quiet); font-size: .89rem; font-weight: 800; }
.filter:hover { color: var(--ink); }
.filter[aria-pressed='true'] { background: var(--lime); color: #17200c; }
.filter-status { margin-top: .9rem; color: var(--quiet); font-size: .9rem; }
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.6rem); margin-top: 1.3rem; }
.game-card { position: relative; display: flex; min-width: 0; flex-direction: column; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.game-card:target { outline: 2px solid var(--lime); outline-offset: 4px; }
.game-card:focus-within, .game-card:hover { border-color: #73816d; }
.anchor-alias { position: absolute; top: 0; left: 0; }
.game-cover { position: relative; isolation: isolate; overflow: hidden; display: block; aspect-ratio: 1.8; border-radius: 14px 14px 0 0; background: #202b21; }
.game-cover::after { content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none; background: linear-gradient(180deg, #10151145, transparent 40%, #1015119f); }
.game-cover img { width: 100%; height: 100%; object-fit: cover; object-position: var(--image-position, center); position: absolute; z-index: -2; transition: transform .24s ease; }
#pocion-express { --image-position: 50% 27%; }
#brain-pulpyball { --image-position: 50% 17%; }
.game-cover:hover img, .game-cover:focus-visible img { transform: scale(1.065); }
.game-platform, .cover-action { position: absolute; display: inline-flex; align-items: center; border: 1px solid #f5fae84f; background: #141b16ef; border-radius: 6px; font-weight: 800; font-size: .85rem; }
.game-platform { top: .75rem; left: .75rem; padding: .25rem .55rem; }
.development-label { color: #221e09; background: #f9e5a5; border-color: #f9e5a5; }
.cover-action { right: .75rem; bottom: .75rem; min-height: 44px; padding: .4rem .65rem; }
.cover-action::before { content: '+'; margin-right: .38rem; font-weight: 750; color: var(--lime); }
.game-cover:hover .cover-action { color: #17200c; background: var(--lime); border-color: var(--lime); }
.game-cover:hover .cover-action::before { color: inherit; }
.game-body { flex: 1; display: flex; flex-direction: column; align-items: stretch; padding: clamp(1rem, 2vw, 1.35rem); }
.game-heading { display: flex; align-items: center; gap: .72rem; }
.game-icon, .dialog-icon { object-fit: cover; border-radius: 11px; outline: 1px solid #ffffff40; flex-shrink: 0; }
.game-heading h3 { font-size: clamp(1.24rem, 2vw, 1.75rem); line-height: 1.13; letter-spacing: -.045em; }
.game-genre { color: var(--quiet); font-size: .85rem; font-weight: 700; margin-bottom: .15rem; }
.game-teaser { color: var(--quiet); margin-block: .85rem 1rem; font-size: .97rem; }
.game-stores, .dialog-links { display: flex; flex-wrap: wrap; gap: .55rem; }
.game-stores { margin-top: auto; }
.store-link { background: #252e25; color: var(--ink); flex: 1 1 6rem; min-width: 0; }
.store-link:hover { background: var(--lime); border-color: var(--lime); color: #17200c; }
.game-details { border-top: 1px solid var(--line); margin-top: .85rem; padding-top: .7rem; }
.game-details summary { font-weight: 750; cursor: pointer; }
.game-description { margin-top: .7rem; }
.game-features, .fallback-screens { padding-left: 1.1rem; margin-block: .8rem; }
.fallback-screens a { text-decoration: underline; text-underline-offset: .2em; }
.has-game-dialog .game-details { display: none; }

.studio-panel { border-block: 1px solid #354936; background: radial-gradient(ellipse at 79% 100%, #2d422d, transparent 65%), #1a251b; }
.studio-inner { display: grid; grid-template-columns: .8fr 1.15fr auto; align-items: center; gap: 1.5rem 2rem; padding-block: clamp(2.2rem, 5vw, 4.1rem); }
.studio-inner > p { max-width: 51ch; color: #dce5d8; }
.studio-inner .secondary-button { justify-self: start; border-color: #71836a; }
.site-footer { color: var(--quiet); }
.footer-inner { min-height: 83px; display: flex; align-items: center; justify-content: space-between; gap: .5rem 1.3rem; flex-wrap: wrap; font-size: .9rem; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem 1.25rem; }
.footer-links a { display: inline-flex; min-height: 44px; align-items: center; }

html:has(.game-dialog[open]) { overflow: hidden; }
.game-dialog { width: min(1050px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); color: var(--ink); background: #181e19; padding: 0; overflow: hidden; border: 1px solid #62715e; border-radius: 16px; }
.game-dialog::backdrop { background: #0a0d0aeb; backdrop-filter: blur(6px); }
.dialog-shell { max-height: calc(100dvh - 2rem - 2px); overflow: auto; overscroll-behavior: contain; }
.dialog-header { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; gap: .65rem; padding: 1rem 1.35rem; border-bottom: 1px solid var(--line); background: #181e19; }
.dialog-heading { display: flex; align-items: center; gap: .7rem; }
.dialog-meta { color: var(--quiet); font-size: .85rem; font-weight: 700; }
.dialog-heading h2 { font-size: clamp(1.25rem, 4vw, 1.95rem); line-height: 1.13; letter-spacing: -.04em; }
.dialog-content { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.5rem; padding: 1.35rem; }
.screenshot-display { border-radius: 10px; overflow: hidden; background: #0d110e; border: 1px solid #344035; }
.screenshot-selected { width: auto; height: auto; max-height: min(48dvh, 30rem); margin-inline: auto; object-fit: contain; }
.screenshot-caption { color: var(--quiet); padding: .65rem .85rem; text-align: center; font-size: .88rem; border-top: 1px solid #2c382e; }
.screenshot-thumbs { display: flex; justify-content: center; align-items: center; gap: .6rem; margin-top: .76rem; }
.screenshot-thumb { width: 98px; height: 62px; display: grid; place-items: center; background: #101411; padding: 4px; border-radius: 8px; border: 1px solid #546351; }
.screenshot-thumb[aria-pressed='true'], .screenshot-thumb:hover { border-color: var(--lime); }
.screenshot-thumb img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.dialog-info h3 { font-size: 1.35rem; margin-bottom: .5rem; letter-spacing: -.025em; }
.dialog-description { color: var(--quiet); }
.dialog-features { color: var(--ink); padding-left: 1.1rem; margin-block: 1rem; }
.dialog-features li { margin-bottom: .28rem; }
.dialog-features li::marker { color: var(--lime); }
.dialog-links { align-items: center; }
.dialog-links:empty { display: none; }
.text-link { display: inline-flex; min-height: 44px; align-items: center; color: var(--lime); font-size: .9rem; font-weight: 800; text-decoration: underline; text-underline-offset: .22em; padding-inline: .25rem; }
.text-link:hover { color: #fff; }
.share-button { border: 0; background: transparent; margin-top: .64rem; }
.share-status { color: var(--quiet); font-size: .87rem; }
.share-url { display: block; width: 100%; background: #101511; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: .5rem; margin-top: .4rem; }

@media (max-width: 1040px) {
  .wrap { width: calc(100% - 3.5rem); }
  .hero h1 { font-size: clamp(3.55rem, 8vw, 5.8rem); }
  .hero-panel { min-height: 440px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-inner { grid-template-columns: 1fr 1.25fr; }
  .studio-inner > a { grid-column: 2; }
}
@media (max-width: 720px) {
  :root { scroll-padding-top: 7rem; }
  .wrap { width: calc(100% - 2rem); }
  .header-inner { grid-template-columns: 1fr auto; min-height: 0; gap: 0; padding-block: .4rem .1rem; }
  .brand img { width: 34px; height: 34px; }
  .contact-link { grid-column: 2; grid-row: 1; min-height: 40px; }
  .site-nav { grid-row: 2; grid-column: 1/-1; gap: 1.5rem; }
  .site-nav a { font-size: .875rem; }
  .hero { padding-top: .85rem; }
  .hero-panel { min-height: 0; display: flex; flex-direction: column; align-items: stretch; border-radius: 15px; }
  .hero-art { position: static; width: 100%; height: auto; aspect-ratio: 1.58; object-position: 54% 46%; order: 2; }
  .hero-panel::before { background: none; }
  .hero-content { width: 100%; max-width: 100%; padding: 1.6rem 1.2rem 1.45rem; }
  .hero-label { margin-bottom: .65rem; }
  .hero h1 { font-size: clamp(3rem, 11vw, 5rem); }
  .hero-description { margin-block: .85rem 1.1rem; font-size: 1rem; }
  .library-heading { align-items: flex-start; flex-direction: column; gap: .95rem; }
  .studio-inner { grid-template-columns: 1fr; gap: .85rem; }
  .studio-inner > a { grid-column: auto; }
  .dialog-content { grid-template-columns: 1fr; gap: 1rem; padding: .9rem; }
  .dialog-header { padding: .75rem .9rem; }
  .screenshot-selected { max-height: min(41dvh, 24rem); }
  .footer-inner { padding-block: .7rem; }
}
@media (max-width: 510px) {
  .game-grid { grid-template-columns: 1fr; }
  .filter-list { width: 100%; }
  .filter { flex: 1; white-space: nowrap; padding-inline: .5rem; font-size: .84rem; }
  .dialog-icon { width: 38px; height: 38px; }
  .dialog-meta { font-size: .79rem; }
  .close-button { padding-inline: .6rem; }
  .snowflake:nth-child(2n) { display: none; }
}
@media (max-width: 350px) {
  .wrap { width: calc(100% - 1.5rem); }
  .site-nav { gap: 1rem; }
  .filter { padding-inline: .3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .game-cover img { transition: none; }
}
