@font-face {
  font-family: "Fredoka";
  src: url("fonts/Fredoka-var.7b33fede4d21.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --pad: clamp(20px, 5vw, 64px);   /* one side padding for the whole page */
  --ink: #141630;        /* the ground */
  --night: #1c1a3c;
  --edge: #686ab8;       /* the ground's light edge */
  --amber: #fab042;      /* Moko */
  --cyan: #96e4ff;       /* Lili */
  --cream: #fff1dc;
  --text: #e9e6f5;
  --muted: #a9a6c8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 18px/1.6 "Fredoka", system-ui, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); }
h2, h3 { font-weight: 600; color: var(--cream); margin: 0 0 .5em; }
h2 { font-size: 2rem; margin-bottom: .45em; }

.top {
  position: absolute; inset: 0 0 auto 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px max(var(--pad), calc(50% - 590px + var(--pad)));
}
.studio { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font-weight: 600; }
.studio img { border-radius: 50%; }
.top nav a { color: var(--cream); text-decoration: none; margin-left: 22px; opacity: .85; }
.top nav a:hover { opacity: 1; }

.hero {   /* fixed height; the picture keeps its scale, wider screens just see more of the level */
  position: relative; height: 500px; display: flex; justify-content: flex-start; align-items: center;
  text-align: center; overflow: hidden; max-width: none; padding: 0; margin: 0; background: #231a45;
}
.hero-bg {
  position: absolute; inset: 0;
  /* 7680x1178 panorama shown at half size (sharp on 2x screens); the arch sits at 80% of it,
     and 80% here keeps it at 80% of any screen width, so the title never covers the heroes */
  /* anchored from the right: the heroes (in front of the arch) stay near the right edge on any width,
     so both heroes are always in view; wider screens show more of the level on the left */
  background: right -595px bottom / 3840px auto no-repeat;   /* the picture: style="background-image" from the game */
}
.hero-bg::after {   /* darker on the left where the text sits, the scene on the right stays clear */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(20,22,48,.78) 0%, rgba(20,22,48,.5) 38%, rgba(20,22,48,0) 62%);
}
.hero-inner {   /* the text column on the left; the heroes stand on the right */
  position: relative; text-align: left; padding: 40px 0 0; margin-left: max(var(--pad), calc(50% - 590px + var(--pad))); max-width: 560px;
}
.hero h1 { margin: 0 0 16px; max-width: 480px; }
.hero .buttons { justify-content: flex-start; }
.hero .tagline, .hero .sub, .hero .meta { text-shadow: 0 1px 3px rgba(10,10,30,.8); }
.hero h1 { margin: 0 auto 10px; max-width: 640px; }
.tagline { font-size: clamp(1.25rem, 2.6vw, 1.7rem); color: var(--cream); font-weight: 500; margin: 0 0 6px; }
.sub { color: #d4d0ec; margin: 0 0 28px; }
.buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.meta { color: #e6e2f7; font-size: .95rem; margin-top: 18px; }
.hero .meta { margin-top: 16px; }

.btn {
  display: inline-block; padding: 14px 26px; border-radius: 999px;
  font-weight: 600; text-decoration: none; font-size: 1.05rem;
}
.btn.amber { background: var(--amber); color: var(--ink); box-shadow: 0 6px 24px rgba(250,176,66,.25); }
.btn.amber:hover { filter: brightness(1.07); }
.btn.ghost { border: 2px solid rgba(150,228,255,.45); color: var(--cyan); }

section { padding: 28px var(--pad); max-width: 1180px; margin: 0 auto; }

.trailer { text-align: center; }
.video, .trailer iframe {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  border: 0; padding: 0; border-radius: 18px; overflow: hidden; cursor: pointer;
  background: #000; box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.video img { width: 100%; height: 100%; object-fit: cover; }
.play {
  position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px;
  border-radius: 50%; background: rgba(250,176,66,.95);
}
.play::after {
  content: ""; position: absolute; left: 38px; top: 28px;
  border-left: 30px solid var(--ink); border-top: 20px solid transparent; border-bottom: 20px solid transparent;
}
.video:hover .play { transform: scale(1.06); }
.note { color: var(--muted); font-size: .95rem; margin: 10px 0 0; }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.hero-card { border-radius: 18px; padding: 24px 26px; background: var(--night); border-top: 4px solid; }
.hero-card.moko { border-color: var(--amber); }
.hero-card.moko h3 { color: var(--amber); }
.hero-card.lili { border-color: var(--cyan); }
.hero-card.lili h3 { color: var(--cyan); }
.hero-card p { margin: 0; }
.hero-card { overflow: hidden; }
.hero-card .portrait { width: calc(100% + 52px); max-width: none; margin: -24px -26px 18px; aspect-ratio: 2 / 1; object-fit: cover; }
.story { font-size: 1.2rem; color: var(--cream); text-align: center; max-width: 760px; margin: 24px auto 0; }
.features { max-width: 760px; margin: 0 auto; padding: 0; list-style: none; }
.features li { padding: 8px 0 8px 32px; position: relative; }
.features li::before {   /* a small spark */
  content: ""; position: absolute; left: 6px; top: 17px; width: 10px; height: 10px;
  background: var(--amber); transform: rotate(45deg); border-radius: 2px;
}
.features li:nth-child(even)::before { background: var(--cyan); }

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.shot { position: relative; margin: 0; }
.shot a { display: block; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.3); cursor: zoom-in; }
.shot img { width: 100%; height: auto; display: block; transition: transform .25s; }
.shot a:hover img { transform: scale(1.02); }
.shot figcaption { color: var(--muted); font-size: .9rem; margin-top: 6px; text-align: center; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(10,10,28,.94); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 10px; box-shadow: 0 20px 80px rgba(0,0,0,.6); }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); color: var(--cream); border: 0; border-radius: 50%;
  width: 52px; height: 52px; font: 600 30px/1 "Fredoka", sans-serif; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.2); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }

.cta { text-align: center; padding-top: 24px; }

.studio-block {
  display: flex; align-items: center; gap: 28px;
  background: var(--night); border-radius: 22px; margin-bottom: 40px; max-width: 900px;
}
.studio-block img { border-radius: 50%; flex: none; }
.studio-block p { margin: .3em 0; }
.links a { margin-right: 18px; }

footer { text-align: center; color: var(--muted); padding: 30px 0 40px; font-size: .9rem; border-top: 1px solid rgba(104,106,184,.25); }

@media (max-width: 720px) {
  .top nav a { margin-left: 14px; }
  .duo { grid-template-columns: 1fr; }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .studio-block { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---- studio home: the studio's own warm, light look (the logo's colours), not the game's night ---- */
body.home {
  --paper: #fbf2e6; --sun: #f5a35c; --sun-soft: #fbd29c; --dino: #a3b77b; --plum: #3d3550; --plum-soft: #6b6280;
  background: var(--paper); color: var(--plum);
}
.home a { color: #c66a2c; }
.home h2 { color: var(--plum); }
.home .top { position: static; }
.home .studio { color: var(--plum); }
.home .top nav a { color: var(--plum); }
.studio-hero { text-align: center; padding-top: 30px; padding-bottom: 30px; position: relative; }
.studio-hero > * { position: relative; }
.studio-hero img { margin: 0 auto -48px; width: 260px; }   /* the logo's cream background is the page colour: no frame needed */
.studio-hero h1 { font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1.15; color: var(--plum); margin: 0; font-weight: 600; letter-spacing: .5px; }
.home .tagline { color: var(--plum-soft); }
.home .game-card {
  display: grid; grid-template-columns: 1.3fr 1fr; text-decoration: none;
  background: #fff9f1; border-radius: 26px; overflow: hidden; color: var(--plum);
  box-shadow: 0 18px 50px rgba(61,53,80,.14); transition: transform .2s, box-shadow .2s;
}
.game-card:hover { transform: translateY(-3px); box-shadow: 0 24px 60px rgba(61,53,80,.2); }
.game-card > img { width: 100%; height: 100%; object-fit: cover; }
.game-card-text { padding: 28px 30px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.game-card-text h3 { color: var(--plum); font-size: 1.6rem; margin: 0; }
.game-card-text p { margin: 0; }
.game-card-text .btn { align-self: flex-start; }
.home .btn.amber { background: var(--sun); color: #fff; box-shadow: 0 6px 20px rgba(245,163,92,.35); }
.home .btn.ghost { border-color: var(--plum-soft); color: var(--plum); }
.badges { color: var(--plum-soft); font-size: .9rem; }
.home .studio-block { background: #fff9f1; box-shadow: 0 10px 34px rgba(61,53,80,.1); }
.home .studio-block h2 { color: var(--plum); }
.home footer { color: var(--plum-soft); border-top-color: rgba(61,53,80,.12); }
.leaf { display: inline-block; width: 12px; height: 12px; background: var(--dino); border-radius: 0 70% 0 70%; margin-right: 6px; }

/* ---- game page ---- */
.crumbs { max-width: 1180px; margin: 0 auto; padding: 12px var(--pad) 0; color: var(--muted); font-size: .9rem; }
.crumbs a { color: var(--muted); }
.faq details { background: var(--night); border-radius: 14px; padding: 14px 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--cream); }
.faq details p { margin: 10px 0 0; }
.features strong { color: var(--cream); font-weight: 600; }
footer a { color: var(--muted); }

@media (max-width: 720px) {
  .home .game-card { grid-template-columns: 1fr; }
  .home .game-card > img { aspect-ratio: 21 / 9; }
}
@media (max-width: 520px) {
  .top nav { display: none; }
}

@media (max-width: 1300px) {   /* laptops and tablets: a smaller picture so the arch fits beside the title */
  .hero-bg { background-size: 2560px auto; background-position: right -390px bottom; }
}
@media (max-width: 720px) {   /* phones: centred text, smaller picture, the heroes under the buttons */
  .hero { height: auto; padding-bottom: 150px; align-items: flex-start; justify-content: center; }   /* the scene sits right under the text, no empty sky */
  .hero-inner { text-align: center; margin: 0 auto; padding: 72px 20px 0; }
  .hero h1 { margin: 0 auto 10px; }
  .hero .buttons { justify-content: center; }
  .hero-bg::after { background: linear-gradient(to bottom, rgba(20,22,48,.6), rgba(20,22,48,0) 60%); }
  .hero-bg { background-size: 1920px auto; background-position: right -368px bottom; }
}

/* ---- added with the Django site: language menu, forms, news ---- */
.top nav { display: flex; align-items: center; flex-wrap: nowrap; }
.langs { position: relative; margin-left: 22px; }
.langs summary { list-style: none; cursor: pointer; color: var(--cream); opacity: .85; font-weight: 600; padding: 2px 10px;
  border: 1px solid rgba(255,241,220,.35); border-radius: 999px; font-size: .85rem; }
.langs summary::-webkit-details-marker { display: none; }
.langs[open] summary, .langs summary:hover { opacity: 1; }
.langs ul { position: absolute; right: 0; top: calc(100% + 8px); margin: 0; padding: 8px 0; list-style: none; min-width: 210px;
  background: var(--night); border: 1px solid rgba(104,106,184,.4); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.4);
  max-height: 70vh; overflow: auto; z-index: 5; }
.langs li a { display: block; margin: 0; padding: 6px 16px; color: var(--text); text-decoration: none; opacity: 1; }
.langs li a:hover, .langs li a[aria-current] { background: rgba(150,228,255,.12); color: var(--cyan); }
.home .langs summary { color: var(--plum); border-color: rgba(61,53,80,.3); }
.home .langs ul { background: #fff; border-color: rgba(61,53,80,.15); }
.home .langs li a { color: var(--plum); }
.home .langs li a:hover, .home .langs li a[aria-current] { background: rgba(163,183,123,.18); color: var(--plum); }

.trap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.form-ok, .form-error { padding: 10px 14px; border-radius: 10px; }
.form-ok { background: rgba(163,183,123,.2); }
.form-error { background: rgba(240,120,120,.18); }
input[type=email], input[type=text], select, textarea {
  font: inherit; font-size: 1rem; width: 100%; padding: 10px 14px; border-radius: 12px;
  border: 1px solid rgba(104,106,184,.5); background: rgba(255,255,255,.06); color: inherit; }
textarea { resize: vertical; }

.subscribe { text-align: center; max-width: 760px; }
.subscribe p { margin: .3em 0 1em; }
.inline-form { display: flex; gap: 10px; justify-content: center; max-width: 520px; margin: 0 auto; }
.inline-form input[type=email] { flex: 1; }
.inline-form .btn { white-space: nowrap; }

.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 18px; }
.contact-form label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 600; }
.contact-form .wide { grid-column: 1 / -1; }
.contact-form .btn { justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.home input, .home select, .home textarea { background: #fff; border-color: rgba(61,53,80,.2); color: var(--plum); }

.post-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.post-card { display: block; text-decoration: none; color: inherit; border-radius: 16px; overflow: hidden; background: var(--night); }
.post-card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.post-card time, .post-card h3, .post-card p { display: block; margin: 0 18px; }
.post-card time { margin-top: 14px; color: var(--muted); font-size: .85rem; }
.post-card p { margin-bottom: 18px; }
.home .post-card { background: #fff; }
.more { text-align: right; }
.post { max-width: 820px; margin: 0 auto; padding: 28px var(--pad); }
.post .cover { border-radius: 16px; margin: 10px 0 24px; }
.post-body img { border-radius: 12px; }
.news { max-width: 1180px; }
body:not(.home) main > .crumbs:first-child, main > .post:first-child, main > .news:first-child { padding-top: 80px; }

@media (max-width: 720px) {
  .langs { margin-left: 12px; }
  .inline-form { flex-direction: column; }
  .contact-form { grid-template-columns: 1fr; }
}

/* on game and news pages the studio name is a clear way back to the home page */
body:not(.home) .top .studio {
  padding: 6px 16px 6px 12px; border-radius: 999px; border: 1px solid rgba(255,241,220,.35);
  background: rgba(20,22,48,.35); backdrop-filter: blur(4px); transition: background .2s, border-color .2s;
}
body:not(.home) .top .studio::before { content: "←"; font-weight: 600; opacity: .8; transition: transform .2s; }
body:not(.home) .top .studio:hover { background: rgba(20,22,48,.6); border-color: var(--amber); }
body:not(.home) .top .studio:hover::before { transform: translateX(-3px); }
.crumbs a { color: var(--cyan); }
