@font-face {
  font-family: Fredoka;
  src: url(/assets/fredoka-bold.ttf) format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Baloo 2";
  src: url(/assets/baloo-medium.ttf) format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Baloo 2";
  src: url(/assets/baloo-semibold.ttf) format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fcfaf7;
  --ink: #281d35;
  --muted: #564b5f;
  --line: #e9e2e9;
  --purple: #63408e;
  --berry: #a43c55;
  --lavender: #eee5fc;
  --pale-purple: #f5effb;
  --display: Fredoka, "Segoe UI", system-ui, sans-serif;
  --body: "Baloo 2", "Segoe UI", system-ui, sans-serif;
  --content: min(1200px, 100% - 88px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 1.1rem/1.48 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
:focus-visible { outline: 3px solid #7043a3; outline-offset: 5px; }
::selection { background: #e5d4fb; color: var(--ink); }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.06; }
.wrap { width: var(--content); margin-inline: auto; }
.skip {
  position: absolute; z-index: 5; top: 8px; left: 8px;
  transform: translateY(-150%); padding: .6rem 1rem; background: white; border-radius: 10px;
}
.skip:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); }
.header-content { min-height: 76px; display: flex; align-items: center; }
.wordmark {
  display: inline-flex; align-items: center; gap: 11px; white-space: nowrap;
  font-family: var(--display); font-size: 1.32rem; font-weight: 700; text-decoration: none;
}
.studio-mark {
  width: 32px; height: 32px; flex: none; display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 3px; transform: rotate(-9deg);
}
.studio-mark i { background: #a083cb; border-radius: 4px; }
.studio-mark i:nth-child(2) { background: #f1bc76; }
.studio-mark i:nth-child(3) { background: #cdbbe9; }
.studio-mark i:nth-child(4) { background: #6b4b95; }
.footer-links a {
  font-weight: 600; text-decoration: none; font-size: 1.02rem;
}
.footer-links a:hover { color: var(--purple); text-decoration: underline; text-underline-offset: 5px; }

.hero {
  display: grid; grid-template-columns: 5fr 6fr; gap: clamp(25px, 4.5vw, 67px);
  align-items: center; padding-block: 58px 76px;
}
.hero-copy { padding: 12px 0 18px; }
.game-label { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; color: var(--purple); font-weight: 650; }
.game-label img { border-radius: 11px; box-shadow: 0 2px 6px #281d3525; }
.hero h1 { font-size: clamp(4.1rem, 8.35vw, 8rem); letter-spacing: -.048em; margin-left: -.035em; white-space: nowrap; }
.hero h1 span { color: var(--purple); }
.hero-lead { font-size: clamp(1.09rem, 1.55vw, 1.29rem); color: var(--muted); max-width: 31rem; margin: 21px 0 28px; }
.store-links { display: flex; flex-wrap: wrap; gap: 10px; }
.store-link {
  display: inline-flex; align-items: center; min-height: 55px; padding: 7px 19px; min-width: 136px;
  border: 1px solid var(--ink); border-radius: 13px; background: var(--ink); color: #fff;
  font-size: 1.13rem; font-weight: 700; line-height: 1.18; text-decoration: none;
  transition: background-color .18s, color .18s, transform .18s;
}
.store-link small { display: block; color: #ebe1f4; font-size: .75rem; font-weight: 500; margin-bottom: 2px; }
.store-link:hover { background: #4e3263; transform: translateY(-2px); }
.store-link.secondary { color: var(--ink); background: #fffdf9; border-color: #d8cbe3; }
.store-link.secondary small { color: var(--muted); }
.store-link.secondary:hover { background: var(--lavender); }
.hero-scene {
  aspect-ratio: 1.12; position: relative; isolation: isolate; overflow: hidden;
  border-radius: 32px; background: #708050; box-shadow: inset 0 0 0 1px #fff8;
}
.hero-backdrop { width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; position: absolute; inset: 0; z-index: -2; }
.hero-scene::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(133deg, #20143343, transparent 42%, #24153259), radial-gradient(ellipse at center, #ffe8b155, transparent 72%);
}
.phone {
  position: absolute; width: 38%; left: 32%; top: 8%; padding: 1.15%; overflow: hidden;
  transform: rotate(9deg); background: #292238; border: 2px solid #faf3e5;
  border-radius: clamp(18px, 3.25vw, 42px); box-shadow: 0 22px 49px #1e142e75, 0 0 0 1px #3024376e;
}
.phone img { width: 100%; height: auto; border-radius: clamp(12px, 2.4vw, 31px); }
.float-tile { position: absolute; width: 18%; height: auto; filter: drop-shadow(0 10px 12px #30211b60); }
.float-one { left: 12%; top: 55%; transform: rotate(-17deg); }
.float-two { right: 8%; top: 18%; transform: rotate(15deg); }

.worlds { padding-block: 71px 82px; background: var(--pale-purple); border-block: 1px solid #eae1f3; scroll-margin-top: 12px; }
.section-intro { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.section-intro h2, .collection h2, .studio h2 { font-size: clamp(2.5rem, 5.2vw, 4.5rem); letter-spacing: -.035em; }
.section-intro h2 span { color: var(--berry); }
.section-intro p { max-width: 28rem; color: var(--muted); font-size: 1.15rem; }
.world-carousel { position: relative; }
.world-gallery {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 54px) / 3.12);
  column-gap: 18px; overflow-x: auto; overflow-anchor: none;
  overscroll-behavior-inline: contain; scrollbar-width: none;
  list-style: none; margin: 0; padding: 0;
}
.world-gallery > li { min-width: 0; }
.world-gallery::-webkit-scrollbar { display: none; }
.world-arrow {
  position: absolute; top: 50%; z-index: 1; transform: translateY(-50%);
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  color: var(--purple); border: 1px solid #baa4d4; background: #fffcfa;
  box-shadow: 0 3px 10px #281d3529; cursor: pointer;
}
.world-arrow[hidden] { display: none; }
.world-arrow:hover { background: #e9d9f6; }
.world-arrow::before {
  content: ""; width: 10px; height: 10px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
}
.world-arrow--left { left: -20px; }
.world-arrow--right { right: -20px; }
.world-arrow--left::before { transform: translateX(2px) rotate(135deg); }
.world-arrow--right::before { transform: translateX(-2px) rotate(-45deg); }
.world-card { background: #fffcfa; border: 1px solid #e5dced; border-radius: 22px; overflow: hidden; }
.world-art { aspect-ratio: 1.64; position: relative; }
.world-art > img:first-child { width: 100%; height: 100%; object-fit: cover; object-position: center var(--art-position, 54%); }
.world-tile {
  position: absolute; width: clamp(46px, 14%, 68px); height: auto; right: 13px; bottom: -13px;
  transform: rotate(8deg); filter: drop-shadow(0 3px 5px #291a3330);
}
.world-card h3 { padding: 17px 17px 18px; font-size: 1.44rem; margin-right: 36px; }

.collection {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(38px, 7vw, 96px);
  align-items: center; padding-block: 80px;
}
.collection-visual {
  display: grid; place-items: center; min-height: 384px; position: relative; isolation: isolate;
  border-radius: 32px; overflow: hidden; padding: 30px; background: #e1d3fa;
}
.collection-visual::before, .collection-visual::after {
  content: ""; position: absolute; z-index: -1; width: 64%; aspect-ratio: 1; border-radius: 50%;
}
.collection-visual::before { left: -20%; bottom: -29%; background: #bfa5e8; }
.collection-visual::after { right: -21%; top: -27%; background: #f7e3ad; }
.collection-visual img { height: min(370px, 64vw); width: auto; border-radius: 19px; box-shadow: 0 12px 27px #32255037; transform: rotate(-6deg); }
.collection p { margin-top: 18px; color: var(--muted); font-size: 1.13rem; max-width: 28rem; }
.game-details { list-style: none; margin: 23px 0 0; padding: 0; display: grid; gap: 9px; }
.game-details li { display: flex; gap: 11px; align-items: baseline; font-weight: 650; }
.game-details li::before { content: ""; width: 9px; height: 9px; flex: none; border-radius: 3px; background: #9c76c6; transform: rotate(10deg); }

.studio { scroll-margin-top: 12px; padding-bottom: 58px; }
.studio-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 36px;
  background: #ebe1f9; border: 1px solid #e2d4f2; border-radius: 28px; padding: 36px clamp(24px, 5vw, 63px);
}
.studio h2 { font-size: clamp(2.35rem, 4.6vw, 3.65rem); }
.studio p { max-width: 37rem; margin: 12px 0 15px; color: var(--muted); }
.contact { color: #59307f; font-weight: 700; text-underline-offset: 4px; overflow-wrap: anywhere; }
.contact:hover { color: var(--ink); }
.studio-cat { width: clamp(95px, 17vw, 176px); height: auto; transform: rotate(8deg); }
.site-footer { border-top: 1px solid var(--line); }
.footer-content { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }

@media (max-width: 1020px) {
  :root { --content: min(1200px, 100% - 54px); }
  .hero { gap: 26px; }
  .hero h1 { font-size: clamp(3.4rem, 9.45vw, 6.8rem); }
  .hero-lead { font-size: 1.08rem; }
  .world-gallery { grid-auto-columns: calc((100% - 36px) / 2.65); }
}
@media (max-width: 760px) {
  :root { --content: calc(100% - 38px); }
  .header-content { min-height: 65px; }
  .wordmark { font-size: 1.18rem; gap: 8px; }
  .studio-mark { width: 25px; height: 25px; }
  .hero { grid-template-columns: 1fr; gap: 25px; padding-block: 39px 49px; }
  .hero-copy { padding: 0; }
  .hero h1 { font-size: clamp(4.4rem, 13vw, 7.25rem); }
  .hero-lead { margin-block: 14px 20px; }
  .game-label { margin-bottom: 15px; }
  .hero-scene { max-width: 620px; width: 100%; border-radius: 24px; }
  .phone { border-radius: clamp(20px, 5vw, 36px); }
  .phone img { border-radius: clamp(14px, 4vw, 28px); }
  .worlds { padding-block: 44px 52px; }
  .section-intro { display: grid; gap: 9px; margin-bottom: 21px; }
  .world-gallery { grid-auto-columns: calc((100% - 28px) / 2.16); gap: 12px; }
  .world-arrow--left { left: -9px; }
  .world-arrow--right { right: -9px; }
  .world-art { aspect-ratio: 1.43; }
  .world-card { border-radius: 14px; }
  .world-card h3 { font-size: 1.19rem; padding: 14px 12px 12px; margin-right: 21px; }
  .world-tile { width: clamp(30px, 20%, 53px); bottom: -7px; right: 8px; }
  .collection { gap: 25px; padding-block: 48px; }
  .collection-visual { min-height: 0; padding: 20px; border-radius: 23px; }
  .collection-visual img { height: min(290px, 54vw); border-radius: 12px; }
  .collection p { font-size: 1rem; }
  .studio { padding-bottom: 36px; }
  .studio-panel { padding: 24px; gap: 12px; border-radius: 23px; }
}
@media (max-width: 510px) {
  .world-gallery { grid-auto-columns: 73%; }
  .collection { grid-template-columns: 1fr; gap: 21px; }
  .collection-visual img { height: 290px; }
  .collection-copy { grid-row: 1; }
  .studio-cat { width: 75px; }
  .footer-content { min-height: 0; padding-block: 17px; flex-wrap: wrap; gap: 9px 22px; }
}
@media (max-width: 365px) {
  :root { --content: calc(100% - 28px); }
  .hero h1 { font-size: 3.95rem; }
  .studio-panel { padding-inline: 17px; }
  .studio-cat { width: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
