:root {
  --paper: #F4F1EA;
  --paper-2: #EBE6DA;
  --ink: #1B1D3A;
  --ink-2: #4A4D68;
  --muted: #6B6E86;
  --rule: rgba(27, 29, 58, .16);
  --orange: #FF7A1A;
  --orange-ink: #C2410C;
  --red: #FF4757;
  --green: #2E9E5B;
  --soil: #2B1A12;
  --head: 'Fredoka', 'Trebuchet MS', sans-serif;
  --body: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1200px;
  --gutter: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.65 var(--body); overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; justify-content: center; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px;
  background: var(--ink); color: #fff; text-decoration: none; border-radius: 6px;
  font: 600 17px/1 var(--head); letter-spacing: .01em;
  transition: background .2s, color .2s, transform .2s, box-shadow .2s;
}
.btn:hover { background: var(--orange-ink); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(27, 29, 58, .18); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-small { padding: 10px 16px; font-size: 15px; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--orange); color: #fff; }
.link {
  font: 600 17px/1 var(--head); text-decoration: none; padding-bottom: 5px;
  background: linear-gradient(var(--orange), var(--orange)) 0 100% / 100% 2px no-repeat;
  transition: color .2s, background-size .3s;
}
.link span { display: inline-block; transition: transform .25s; }
.link:hover { color: var(--orange-ink); background-size: 100% 4px; }
.link:hover span { transform: translateX(5px); }
.link-light { color: #fff; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 28px; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(244, 241, 234, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); transition: box-shadow .3s; }
.top.scrolled { box-shadow: 0 6px 24px rgba(27, 29, 58, .08); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 76px; transition: height .3s; }
.top.scrolled .top-in { height: 64px; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) { position: relative; text-decoration: none; font: 500 17px/1 var(--head); padding: 6px 0; }
.nav a:not(.btn)::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--orange); transform: scaleX(0); transition: transform .25s; }
.nav a:not(.btn):hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.menu-btn { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.menu-btn span:not(.sr) { display: block; height: 2px; background: var(--ink); margin: 6px 0; transition: transform .2s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* Home hero */
.hero { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 88px; }
.hero h1 { font-size: clamp(44px, 6.4vw, 82px); font-weight: 700; }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); margin-top: 24px; max-width: 36em; }
.hero-art { margin: 0 calc(var(--gutter) * -1) 0 0; }
.hero-art img { border-radius: 4px; }
figcaption, .caption { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* Sections */
.band, .cta { position: relative; }
.band { padding-top: 64px; padding-bottom: 80px; }
.band::before, .cta::before { content: ''; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--rule); }
.section-title { font-size: clamp(30px, 3.4vw, 44px); margin-bottom: 36px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.cols3 > div { padding: 0 32px; border-left: 1px solid var(--rule); }
.cols3 > div:first-child { padding-left: 0; border-left: 0; }
.cols3 h3, .principles h3 { font-size: 23px; margin-bottom: 12px; }
.cols3 p, .principles p { color: var(--ink-2); }

/* Featured game */
.feature { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; align-items: center; }
.feature-pic img { border-radius: 4px; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.feature-pic { overflow: hidden; border-radius: 4px; }
.feature-pic:hover img { transform: scale(1.05); }
.game-title { font-size: clamp(36px, 4vw, 52px); margin: 8px 0 16px; }
.status { font: 500 15px/1.4 var(--head); color: var(--green); display: flex; align-items: center; gap: 8px; margin: 0; }
.status.muted { color: var(--muted); }
.dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--green); display: inline-block; flex: none; }
.dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(3); opacity: 0; } }
.dot-dev { background: var(--orange); }
.next { margin-top: 56px; padding: 28px 32px; background: var(--paper-2); border-radius: 6px; display: grid; grid-template-columns: 5fr 7fr; gap: 12px 48px; align-items: center; }
.next h3 { font-size: 23px; margin-top: 6px; }
.next p { color: var(--ink-2); }
.next-big { display: block; margin: 0; padding: 0; background: none; max-width: 760px; }
.next-big h2 { font-size: clamp(30px, 3.4vw, 44px); margin: 10px 0 16px; }

/* Principles: numbered, ruled */
.principles { list-style: none; margin: 0; padding: 0; counter-reset: p; display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; }
.principles li { counter-increment: p; padding: 26px 0 26px 64px; border-top: 1px solid var(--rule); position: relative; }
.principles li::before { content: counter(p, decimal-leading-zero); position: absolute; left: 0; top: 26px; font: 600 22px/1 var(--head); color: var(--orange-ink); }

/* Call to action */
.cta { padding-top: 88px; padding-bottom: 104px; text-align: center; }
.cta h2 { font-size: clamp(30px, 4vw, 52px); max-width: 16em; margin: 0 auto 14px; }
.cta p { color: var(--ink-2); }
.cta .btn { margin-top: 18px; }
.cta-mail { display: inline-block; margin-top: 18px; font: 600 clamp(22px, 3vw, 34px)/1.2 var(--head); text-decoration: none; border-bottom: 3px solid var(--orange); overflow-wrap: anywhere; }
.cta-mail:hover { color: var(--orange-ink); }

/* Inner page heads */
.page-head { padding-top: 72px; padding-bottom: 56px; }
.page-head h1 { font-size: clamp(42px, 6vw, 76px); font-weight: 700; }
.page-head.center .lead { margin-left: auto; margin-right: auto; }

/* Games page banner */
.game-banner { background: var(--soil); color: #F4EBDD; border-radius: 6px; overflow: hidden; margin-bottom: 72px; }
.game-banner-art { position: relative; }
.game-banner-logo { position: absolute; left: 50%; top: 50%; width: min(52%, 560px); transform: translate(-50%, -50%); filter: drop-shadow(0 4px 18px rgba(0,0,0,.55)); }
.game-banner-text { display: grid; grid-template-columns: 7fr 5fr; gap: 24px 56px; padding: 44px 48px 48px; }
.game-banner-text .game-title { color: #fff; }
.game-banner-text p { color: #D9CDBB; }
.game-banner-text .status { color: #7FD69F; }
.game-banner-text .dot { background: #7FD69F; }
.game-banner .btn { background: #fff; color: var(--ink); }
.game-banner .btn:hover { background: var(--orange); color: #fff; }
.game-banner .link { color: #fff; }
.game-banner .actions { grid-column: 1 / -1; margin-top: 4px; }

/* Facts lists */
.facts { margin: 0; }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid currentColor; border-color: rgba(127,127,127,.3); }
.facts dt { font: 500 15px/1.6 var(--head); opacity: .75; }
.facts dd { margin: 0; }
.facts-wide { max-width: 860px; }
.facts-wide div { grid-template-columns: 180px 1fr; padding: 16px 0; border-color: var(--rule); }
.game-facts .small { margin-top: 28px; }

/* Lock and Lay page */
.game-hero { position: relative; background: var(--soil); color: #fff; overflow: hidden; }
.game-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.game-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(43,26,18,.25), rgba(43,26,18,.75)); }
.game-hero-in { position: relative; z-index: 1; padding-top: 120px; padding-bottom: 96px; text-align: center; }
.game-hero h1 img { width: min(640px, 86%); margin: 0 auto; filter: drop-shadow(0 4px 20px rgba(0,0,0,.6)); }
.game-hero p { font-size: clamp(18px, 2vw, 22px); margin-top: 18px; color: #F4EBDD; }
.game-hero .actions { justify-content: center; }
.crumb { font-size: 14px; color: var(--muted); }
.crumb a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.intro-split { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; padding-top: 72px; padding-bottom: 56px; }
.intro-split h2 { font-size: clamp(32px, 3.8vw, 50px); margin-top: 12px; }
.intro-split .lead { margin-top: 36px; }
.trailer { padding-bottom: 80px; }
.trailer video { width: 100%; border-radius: 6px; background: #000; aspect-ratio: 16 / 9; }
.rows { padding-bottom: 32px; }
.row { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: center; padding: 48px 0; border-top: 1px solid var(--rule); }
.row figure { margin: 0; }
.row img { border-radius: 4px; }
.row h3 { font-size: clamp(26px, 2.8vw, 36px); margin-bottom: 14px; }
.row p { color: var(--ink-2); }
.row.flip { grid-template-columns: 5fr 7fr; }
.row.flip figure { order: 2; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery a { display: block; overflow: hidden; border-radius: 4px; }
.gallery img { transition: transform .25s; }
.gallery a:hover img { transform: scale(1.04); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1400px, 94vw); width: 100%; }
.lightbox::backdrop { background: rgba(10, 10, 20, .9); }
.lightbox img { width: 100%; border-radius: 4px; }
.lightbox p { color: #ddd; text-align: center; margin-top: 12px; font-size: 15px; }
.lightbox-close { position: absolute; right: 8px; top: 8px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }

/* About */
.about-split { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; padding-bottom: 72px; align-items: start; }
.about-text h2 { font-size: 30px; margin: 0 0 16px; }
.about-text h2:not(:first-child) { margin-top: 44px; }
.about-text p { color: var(--ink-2); max-width: 38em; }
.about-pic { margin: 0; position: sticky; top: 110px; }
.about-pic img { border-radius: 4px; }

/* Contact */
.contact-list { list-style: none; margin: 0 0 80px; padding: 0; }
.contact-list li { display: grid; grid-template-columns: 4fr 5fr 4fr; gap: 32px; align-items: baseline; padding: 32px 0; border-top: 1px solid var(--rule); }
.contact-list h2 { font-size: 24px; }
.contact-list p { color: var(--ink-2); margin: 0; }
.contact-list li > a { font: 600 18px/1.3 var(--head); text-decoration: none; border-bottom: 2px solid var(--orange); justify-self: start; overflow-wrap: anywhere; }

/* Footer */
.foot { background: var(--ink); color: #D8D9E6; padding-top: 64px; }
.foot-in { display: grid; grid-template-columns: 4fr 8fr; gap: 48px; padding-bottom: 48px; }
.foot-brand img { width: 200px; height: auto; }
.foot-brand p { margin-top: 14px; color: #A9ABC2; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.foot h3 { font-size: 15px; color: #fff; margin-bottom: 14px; font-weight: 600; }
.foot a { display: block; text-decoration: none; padding: 4px 0; color: #D8D9E6; overflow-wrap: anywhere; }
.foot a:hover { color: var(--orange); }
.foot-base { padding-top: 20px; padding-bottom: 28px; border-top: 1px solid rgba(255,255,255,.12); font-size: 14px; color: #8F92AD; }

/* Tablet and phone */
@media (max-width: 960px) {
  :root { --gutter: 24px; }
  .hero, .feature, .next, .intro-split, .row, .row.flip, .about-split, .game-banner-text { grid-template-columns: 1fr; gap: 28px; }
  .hero { padding-top: 48px; padding-bottom: 64px; }
  .hero-art { margin-right: 0; }
  .row.flip figure { order: 0; }
  .intro-split .lead { margin-top: 0; }
  .about-pic { position: static; }
  .principles { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .contact-list li { grid-template-columns: 1fr; gap: 10px; }
  .foot-in { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { position: absolute; left: 0; right: 0; top: 76px; background: var(--paper); border-bottom: 1px solid var(--rule);
         flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 24px; display: none; }
  .menu-open .nav { display: flex; }
  .nav a:not(.btn) { padding: 16px 0; border-bottom: 1px solid var(--rule); }
  .nav a[aria-current="page"] { color: var(--orange-ink); border-bottom-color: var(--rule); }
  .nav .btn { margin-top: 20px; justify-content: center; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .top-in { height: 64px; }
  .logo-anim, .top.scrolled .logo-anim { width: 140px; }
  .nav { top: 64px; }
  .cols3 { grid-template-columns: 1fr; }
  .cols3 > div { padding: 22px 0; border-left: 0; border-top: 1px solid var(--rule); }
  .cols3 > div:first-child { border-top: 0; padding-top: 0; }
  .principles li { padding-left: 48px; }
  .game-banner-text { padding: 28px 20px 32px; }
  .game-banner-logo { width: 70%; }
  .facts div, .facts-wide div { grid-template-columns: 1fr; gap: 2px; }
  .game-hero-in { padding-top: 80px; padding-bottom: 64px; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .section-head { flex-direction: column; gap: 0; margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Motion ---------- */
@keyframes unveil { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.1) translateX(-1.5%); } }
.game-hero-bg { animation: drift 24s ease-in-out infinite alternate; }

/* Nav logo intro: the play mark spins in, the name wipes on, the 2 pops */
.logo-anim { display: block; width: 168px; height: auto; overflow: visible; transition: width .3s; }
.top.scrolled .logo-anim { width: 150px; }
.logo-anim .lg-mark { transform-box: fill-box; transform-origin: 45% 50%; animation: lgMark .75s cubic-bezier(.34, 1.56, .64, 1) both; }
.logo-anim .lg-word { animation: lgWipe .6s .35s cubic-bezier(.2, .7, .2, 1) both; }
.logo-anim .lg-two { transform-box: fill-box; transform-origin: 50% 90%; animation: lgPop .55s .7s cubic-bezier(.34, 1.9, .64, 1) both; }
.logo-anim .lg-sub { animation: lgSub .5s .85s ease-out both; }
@keyframes lgMark { from { opacity: 0; transform: scale(.2) rotate(-140deg); } to { opacity: 1; transform: none; } }
@keyframes lgWipe { from { clip-path: inset(0 100% 0 0); transform: translateX(-10px); } to { clip-path: inset(0 0 0 0); transform: none; } }
@keyframes lgPop { from { opacity: 0; transform: scale(0) translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes lgSub { from { opacity: 0; letter-spacing: 0; } to { opacity: .55; } }
.brand:hover .lg-mark { animation: lgWiggle .5s ease-in-out; }
@keyframes lgWiggle { 0%, 100% { transform: none; } 30% { transform: rotate(-10deg) scale(1.06); } 65% { transform: rotate(6deg) scale(1.03); } }

/* Screenshot viewer */
.lightbox[open] { animation: unveil .35s cubic-bezier(.2, .7, .2, 1); }
.lightbox[open]::backdrop { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; } }
.gallery img { transition: transform .6s cubic-bezier(.2, .7, .2, 1), filter .3s; }
.gallery a:hover img { transform: scale(1.06); filter: brightness(1.08); }
.row figure { overflow: hidden; border-radius: 4px; }
.row figure img { transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.row figure:hover img { transform: scale(1.03); }
.contact-list li > a { transition: color .2s, border-color .2s; }
.contact-list li > a:hover { color: var(--orange-ink); }
.foot a { transition: color .2s, transform .2s; }
.foot a:hover { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
