@font-face { font-family: Onest; src: url("onest-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: Onest; src: url("onest-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: Onest; src: url("onest-800.woff") format("woff"); font-weight: 800; font-display: swap; }

:root {
  --ink: #fff3e4;
  --ink-subtle: #e0bfd0;
  --night: #160f20;
  --deep: #0d0b17;
  --pool: #14d8d3;
  --peach: #ffbf71;
  --hot: #ff679c;
  --violet: #e58fff;
  --line: #fff0eb36;
  --display: Onest, Arial, sans-serif;
  --text: Onest, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(.22,1,.36,1);
  --scene-size: clamp(700px, 91svh, 1000px);
  font-family: var(--text);
  color: var(--ink);
  background: var(--deep);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 0;
  background: radial-gradient(ellipse 78% 31% at -7% 46%, #3d12394d, transparent),
    radial-gradient(ellipse 61% 33% at 108% 40%, #15404a4d, transparent),
    var(--deep);
}
body:has(.viewer[open]) { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--pool); outline-offset: 5px; }
[hidden] { display: none !important; }

.shell { width: min(calc(100% - clamp(36px, 8vw, 120px)), 1460px); margin-inline: auto; }
.crumbs {
  position: absolute;
  z-index: 2;
  top: 101px;
  left: max(clamp(18px, 4vw, 60px), calc((100% - 1460px) / 2));
  right: max(clamp(18px, 4vw, 60px), calc((100% - 1460px) / 2));
  color: var(--ink-subtle);
}

.page-header {
  position: absolute;
  z-index: 4;
  inset: 0 0 auto;
  background: linear-gradient(180deg, #100717b8 0%, transparent 100%);
}
.nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 88px; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { width: max-content; display: inline-flex; align-items: center; }
.brand img { width: 147px; height: auto; }
.nav nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 42px); }
.nav nav a { text-decoration: none; font-weight: 650; font-size: 14px; line-height: 1.2; padding-block: 12px; }
.nav nav a:hover, .text-link:hover { text-decoration: underline; text-underline-offset: 6px; }
.header-app { justify-self: end; }

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 0 20px;
  line-height: 1.18;
  font-weight: 760;
  font-size: 15px;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  transition: transform .22s var(--ease-out), background-color .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.button:active { transform: scale(.98); }
.button-outline { background: #160f2452; border-color: #fff0e476; min-height: 45px; padding-inline: 15px; }
.button-outline:hover { background: #fff3e42e; border-color: var(--ink); }
.button-primary {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #240b20;
  background: linear-gradient(115deg, #ffd2a8 0%, #ffabc7 54%, #e3b6ff 100%);
  box-shadow: 0 9px 30px #ff6f9b39, inset 0 1px #ffffff70;
}
.button-primary::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 150%;
  height: 100%;
  opacity: .56;
  background: linear-gradient(110deg, transparent 33%, #fff9 48%, transparent 61%);
  transform: translateX(-105%);
  pointer-events: none;
}
.hero-actions .button-primary::after { animation: cta-shimmer 6.4s 1.2s ease-in-out infinite; }
@keyframes cta-shimmer {
  0%, 58% { transform: translateX(-105%); }
  75%, 100% { transform: translateX(90%); }
}
.button-primary:hover { box-shadow: 0 12px 38px #ff79b269, inset 0 1px #ffffff99; transform: translateY(-2px); }
.button-primary:active { transform: scale(.98); }
.link-arrow { font-size: 19px; font-weight: 550; line-height: 1; transition: transform .2s var(--ease-out); }
.button:hover .link-arrow { transform: translateY(2px); }
.viewer-app:hover .link-arrow { transform: translate(2px, -2px); }

.hero {
  min-height: var(--scene-size);
  display: grid;
  position: relative;
  isolation: isolate;
  background: #321229;
}
.hero-scene { position: absolute; z-index: -1; inset: 0; overflow: hidden; pointer-events: none; }
.hero-art, .hero-scrim { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art { object-fit: cover; object-position: 62% 52%; animation: scenery 26s ease-in-out infinite alternate; }
.hero-scrim {
  background:
    linear-gradient(90deg, #150c21f0 0%, #170c2293 31%, #160a201c 58%, transparent 76%),
    linear-gradient(0deg, #160f20 0%, #160f20b5 10%, transparent 34%);
}
.palm {
  position: absolute;
  display: block;
  width: clamp(200px, 38vw, 575px);
  height: clamp(160px, 37vw, 520px);
  background: url("palm.webp") top left / contain no-repeat;
  transform-origin: 2% 2%;
  transform: rotate(1deg);
  animation: palm-wind 10s ease-in-out infinite;
}
.palm-left { top: -3%; left: -10%; opacity: .74; }
.palm-right { top: -4%; right: -10%; opacity: .94; scale: -1 1; animation-delay: -5.4s; }
.horizon-light {
  position: absolute;
  inset: auto -6% 1.5%;
  height: clamp(80px, 11vw, 190px);
  opacity: .55;
  background: radial-gradient(ellipse at 73% 55%, #ff426dd4 0%, #d3378e6e 29%, transparent 66%),
    radial-gradient(ellipse at 96% 62%, #0ed7d870 0%, transparent 28%);
  mix-blend-mode: screen;
  animation: horizon-shimmer 7s ease-in-out infinite;
  transform-origin: 70% 75%;
}
.hero-layout { display: flex; flex-direction: column; justify-content: flex-end; position: relative; padding-top: 132px; }
.hero-copy { margin-bottom: clamp(54px, 8vh, 106px); max-width: min(100%, 980px); }
.hero-lockup { display: flex; align-items: center; gap: clamp(12px, 2.05vw, 30px); }
.game-logo {
  flex: none;
  width: clamp(110px, 13vw, 188px);
  height: auto;
  filter: drop-shadow(0 8px 20px #120616be) drop-shadow(0 0 16px #de5bac56);
}
.hero-copy h1 { margin: 0; font-family: var(--display); }
.hero-prefix { display: block; margin-bottom: 18px; color: #ffd1b4; font: 630 clamp(16px, 1.65vw, 25px)/1.15 var(--text); }
.hero-name {
  font-size: clamp(78px, 9.15vw, 138px);
  line-height: .91;
  letter-spacing: -.064em;
  font-weight: 800;
  white-space: nowrap;
}
.hero-copy > p { margin: 30px 0 0; font-size: clamp(17px, 1.65vw, 24px); line-height: 1.43; max-width: 24ch; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 25px; margin-top: 28px; }
.text-link { display: inline-flex; align-items: center; gap: 9px; padding-block: 12px; font-weight: 660; font-size: 15px; text-decoration: none; }
.text-link span { font-size: 17px; }
.hero-index { display: flex; justify-content: space-between; gap: 22px; min-height: 72px; align-items: center; border-top: 1px solid var(--line); color: var(--ink); font-size: 14px; font-weight: 610; }
.hero-index > div { display: flex; gap: 26px; }
.hero-index span + span { position: relative; }
.hero-index span + span::before { position: absolute; content: ""; width: 4px; height: 4px; border-radius: 999px; background: var(--hot); top: 50%; left: -14px; transform: translateY(-50%); }

@keyframes scenery {
  from { transform: scale(1); }
  to { transform: scale(1.035) translateY(-.35%); }
}
@keyframes palm-wind {
  0%, 100% { transform: rotate(1deg); }
  31% { transform: rotate(-2.8deg) translateX(-.5%); }
  68% { transform: rotate(3.2deg) translateX(.8%); }
}
@keyframes horizon-shimmer {
  0%, 100% { transform: translateX(-3%) scaleX(.93); opacity: .31; }
  45% { transform: translateX(3%) scaleX(1.04); opacity: .77; }
  73% { transform: translateX(.8%) scaleX(.98); opacity: .54; }
}

.collection {
  padding-block: clamp(64px, 9vw, 138px) clamp(70px, 10vw, 145px);
  scroll-margin-top: 12px;
}
.collection-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 32px; }
.collection h2, .outro h2 { margin: 0; font: 800 clamp(47px, 6.3vw, 99px)/.94 var(--display); letter-spacing: -.072em; }
.collection-head p { color: var(--ink-subtle); margin: 18px 0 0; font-size: clamp(16px, 1.45vw, 21px); line-height: 1.45; }
.selector {
  flex-shrink: 0;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #e7bac635;
  border-radius: 999px;
  background: #201521c9;
}
.selector button {
  padding: 10px 21px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink-subtle);
  background: transparent;
  cursor: pointer;
  font-weight: 690;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.selector button:hover { color: var(--ink); background-color: #f0bdde12; }
.selector button[aria-selected="true"] {
  color: var(--ink);
  border-color: #f2a3de5e;
  background: linear-gradient(120deg, #7d3455, #503665);
  box-shadow: inset 0 1px #fff4, 0 3px 14px #e56baf35;
}
.collection-content { scroll-margin-top: 135px; }
.preset-group-title {
  margin: 0 0 clamp(13px, 1.6vw, 23px);
  font: 770 clamp(24px, 3vw, 40px)/1.08 var(--display);
  letter-spacing: -.046em;
}
.authored-title { margin-top: clamp(32px, 5vw, 70px); }
.preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.55vw, 24px); }
.preset { min-width: 0; margin: 0; }
.preset-button {
  display: grid;
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 0;
  text-align: left;
  color: var(--ink);
  border: 1px solid #f5c0cb37;
  border-radius: clamp(16px, 2vw, 30px);
  background: var(--night);
  cursor: pointer;
  isolation: isolate;
  transition: transform .38s var(--ease-out), border-color .25s ease, box-shadow .38s ease;
}
.preset-button:hover, .preset-button:focus-visible {
  transform: translateY(-3px);
  border-color: #e58fff94;
  box-shadow: 0 12px 32px #9a447647, 0 0 18px #d67faf2b;
}
.preset-button picture, .preset-button > span { grid-area: 1 / 1; }
.preset-cover { overflow: hidden; display: block; aspect-ratio: 6 / 5; background: #30192b; }
.preset-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .55s var(--ease-out); }
.preset-button:hover img { transform: scale(1.055); }
.preset-caption { z-index: 1; align-self: end; padding: 54px clamp(16px, 2vw, 28px) clamp(16px, 2vw, 24px); display: grid; min-height: 104px; align-content: end; gap: 7px; background: linear-gradient(0deg, #100817 0%, #11091ba3 56%, transparent); }
.preset-title { font-size: clamp(17px, 1.75vw, 27px); font-weight: 850; letter-spacing: -.047em; line-height: 1.04; }
.preset-frame-copy { display: flex; align-items: center; gap: 9px; color: #f9e0df; font-size: 12px; font-weight: 630; line-height: 1.12; }
.preset-arrow { display: inline-block; font-size: 15px; transition: transform .2s var(--ease-out); }
.preset-button:hover .preset-arrow { transform: translate(3px, -2px); }
.preset-button:active { scale: .99; }

.preset-grid.game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.game-grid .preset-cover { aspect-ratio: 16 / 9; }
.game-grid .preset-cover img { object-position: center; }
.game-grid .preset-caption { background: linear-gradient(0deg, #100817f2, #10081793 56%, transparent); }

.outro {
  position: relative;
  isolation: isolate;
  background: #251128;
  padding-block: clamp(56px, 8vw, 135px);
  scroll-margin-top: 12px;
}
.outro::before { position: absolute; z-index: -1; inset: 0; content: ""; opacity: .24; background: url("hero.webp") 65% 92% / cover; }
.outro::after { position: absolute; z-index: -1; inset: 0; content: ""; background: linear-gradient(90deg, #1a101bf0 13%, #200e23bc 54%, #221428f0 100%); }
.outro-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: end; }
.outro-copy { grid-column: 1 / 7; }
.outro-actions { margin-top: clamp(25px, 3.8vw, 48px); }
.outro-actions p { margin: 12px 0 0; color: var(--ink-subtle); font-size: 14px; }
.steps { grid-column: 8 / -1; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { border-top: 1px solid var(--line); padding: 16px 0 16px 39px; position: relative; counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; top: 16px; left: 0; color: var(--peach); font-size: 15px; font-weight: 800; }
.steps strong { display: block; font-size: clamp(17px, 1.6vw, 23px); }
.steps p { color: var(--ink-subtle); font-size: 15px; margin: 4px 0 0; line-height: 1.45; }
.site-footer { background: var(--deep); }
.footer-inner { min-height: 100px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-block: 16px; }
.footer-inner .brand img { width: 132px; height: auto; }
.credits { display: flex; align-items: center; gap: 11px; }
.credits p { margin: 0; color: var(--ink-subtle); font-size: 12px; line-height: 1.35; }
.credits a { text-underline-offset: 3px; }

.viewer {
  width: min(544px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: 0;
  border: 1px solid #fff2ed3a;
  border-radius: clamp(20px, 2.6vw, 34px);
  background: radial-gradient(ellipse at 5% 0%, #3e203b, transparent 69%), var(--night);
  box-shadow: 0 30px 120px #07040fc9, 0 0 50px #f368b327;
  color: var(--ink);
  overflow: auto;
}
.viewer[data-game] { width: min(850px, calc(100% - 24px)); }
.viewer::backdrop { background: #0c0715d9; backdrop-filter: blur(8px); }
.viewer[open] { animation: viewer-enter .24s var(--ease-out) both; }
@keyframes viewer-enter {
  from { transform: translateY(9px) scale(.99); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.viewer-card { display: grid; gap: 13px; padding: 17px; }
.viewer-header { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.viewer-header h2 { margin: 0; font: 800 clamp(23px, 4.3vw, 32px)/1.05 var(--display); letter-spacing: -.045em; }
.viewer-header p { margin: 5px 0 0; color: var(--ink-subtle); font-size: 14px; line-height: 1.35; }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; flex: 0 0 42px; border: 1px solid #fff3e44a; border-radius: 50%; color: var(--ink); background: #140d22db; font-size: 29px; line-height: 1; cursor: pointer; }
.icon-button:hover { background: #442242; }
.viewer-stage { position: relative; background: #120c1a; overflow: hidden; touch-action: pan-y; border-radius: 18px; }
.viewer-stage > img { width: 100%; height: min(60dvh, 570px); object-fit: contain; user-select: none; }
.viewer[data-game] .viewer-stage > img { height: auto; max-height: 59dvh; aspect-ratio: 16 / 9; }
.viewer-source { margin: 0; color: var(--ink-subtle); font-size: 13px; line-height: 1.35; }
.viewer-controls { position: absolute; inset: auto 10px 10px; display: flex; justify-content: space-between; align-items: end; gap: 10px; }
.frame-count { color: var(--ink); background: #110a1bdd; border-radius: 999px; padding: 6px 10px; font: 680 13px/1.25 var(--text); font-variant-numeric: tabular-nums; }
.viewer-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.thumbnails { display: flex; gap: 6px; }
.thumb { padding: 0; width: 44px; height: 48px; overflow: hidden; background: transparent; border: 2px solid #ffeed938; border-radius: 10px; cursor: pointer; }
.viewer[data-game] .thumb { width: 55px; height: 34px; }
.thumb[aria-current="true"] { border-color: var(--violet); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.viewer-app { min-height: 45px; padding-inline: 15px; gap: 8px; }
.viewer-app[aria-disabled="true"] { opacity: .48; pointer-events: none; }

@media (max-width: 830px) {
  :root { --scene-size: clamp(640px, 90svh, 800px); }
  .hero-name { font-size: clamp(64px, 12vw, 108px); }
  .hero-scrim { background: linear-gradient(90deg, #150c21ee 0%, #160d225e 59%, transparent 100%), linear-gradient(0deg, #160f20 0%, #160f209e 16%, transparent 42%); }
  .collection-head { align-items: flex-start; flex-direction: column; }
  .preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preset-title { font-size: clamp(17px, 3vw, 25px); }
  .outro-copy { grid-column: 1 / 7; }
  .steps { grid-column: 7 / -1; }
}

@media (max-width: 550px) {
  :root { --scene-size: clamp(640px, 100svh, 825px); }
  .nav { grid-template-columns: minmax(0, 1fr) auto; min-height: 65px; gap: 10px; }
  .nav nav { display: none; }
  .crumbs { top: 76px; }
  .brand img { width: 111px; }
  .header-app { font-size: 13px; min-height: 40px; padding-inline: 12px; gap: 8px; }
  .hero-art { height: clamp(490px, 72svh, 655px); object-position: 84% 43%; mask-image: linear-gradient(#000 0% 69%, transparent 100%); }
  .hero-scrim { background: linear-gradient(90deg, #160b219c, transparent 82%), linear-gradient(0deg, #160f20 1%, #170c21c9 20%, #170c215c 48%, transparent 74%); }
  .palm-left { left: -24%; top: -1%; }
  .palm-right { right: -18%; top: 3%; }
  .hero-copy { margin-bottom: 25px; }
  .hero-prefix { margin-bottom: 11px; }
  .hero-lockup { gap: clamp(8px, 2.5vw, 14px); }
  .hero-name { font-size: clamp(56px, 16.5vw, 88px); letter-spacing: -.061em; }
  .game-logo { width: clamp(76px, 23vw, 115px); }
  .hero-copy > p { margin-top: 17px; max-width: 23ch; }
  .hero-actions { margin-top: 21px; gap: 8px 15px; }
  .hero-actions .button { gap: 8px; padding-inline: 12px; min-height: 47px; font-size: 13px; }
  .hero-actions .text-link { font-size: 13px; }
  .hero-index { min-height: 54px; font-size: 13px; }
  .collection-head { margin-bottom: 19px; gap: 12px; }
  .collection h2, .outro h2 { font-size: clamp(44px, 12.5vw, 60px); }
  .collection-head p { margin-top: 11px; }
  .selector { width: 100%; }
  .selector button { flex: 1; }
  .preset-cover { aspect-ratio: 4 / 5; }
  .preset-caption { padding: 34px 10px 12px; min-height: 81px; gap: 6px; }
  .preset-frame-copy { font-size: 11px; }
  .collection-content { scroll-margin-top: 91px; }
  .preset-grid.game-grid { grid-template-columns: minmax(0, 1fr); }
  .game-grid .preset-caption { min-height: 70px; padding-inline: 14px; }
  .outro-grid { grid-template-columns: 1fr; gap: 32px; }
  .outro-copy, .steps { grid-column: auto; }
  .footer-inner { min-height: 86px; align-items: start; gap: 10px; }
  .footer-inner .brand img { width: 103px; }
  .credits { gap: 7px; }
  .credits p { max-width: 24ch; }
  .viewer-card { padding: 11px; gap: 10px; }
  .viewer-stage { border-radius: 14px; }
  .viewer-stage > img { height: min(58dvh, 490px); }
  .thumb { width: 33px; height: 40px; }
  .viewer[data-game] .thumb { width: 34px; height: 27px; }
  .viewer-app { font-size: 12px; }
}
