:root {
  --sky: #C4DDEB;
  --cream: #FFF6E6;
  --paper: #FFFBF3;
  --grid: rgba(70, 120, 160, 0.13);
  --terracotta: #CF5F2C;
  --terracotta-dark: #A8461C;
  --ink: #3A2516;
  --ink-soft: #6B5443;
  --teal: #2E6E72;
  --tape: rgba(244, 222, 160, 0.85);
  --hand: "Shantell Sans", "Comic Sans MS", cursive;
  --body: "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  overflow-x: clip; /* tilted cards and tape must not cause sideways scroll */
}
img, video { display: block; max-width: 100%; }
a { color: var(--terracotta-dark); }

h2 {
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 0.6em;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: center;
  padding: 48px 16px 64px;
}
.hero-bg, .hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 70%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(196, 221, 235, 0.55) 0%, rgba(196, 221, 235, 0) 45%, rgba(58, 37, 22, 0.35) 100%);
}
.hero-inner { position: relative; z-index: 1; max-width: 900px; }
.logo { margin: 0 auto; width: min(640px, 88vw); }
.logo img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(58, 37, 22, 0.35));
  animation: drop 0.9s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes drop { from { transform: translateY(-40px) scale(0.96); opacity: 0; } }
.tagline {
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(1.25rem, 3.2vw, 1.8rem);
  margin: 4px 0 24px;
  color: var(--cream);
  text-shadow: 0 2px 10px rgba(58, 37, 22, 0.7);
}
.cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.platforms {
  margin: 20px 0 0;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--cream);
  text-shadow: 0 1px 6px rgba(58, 37, 22, 0.8);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 14px;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-2px) rotate(-1deg); }
.btn:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.btn-steam {
  background: var(--terracotta);
  color: var(--cream);
  box-shadow: 0 5px 0 var(--terracotta-dark), 0 10px 20px rgba(58, 37, 22, 0.3);
}
.btn-steam:hover { box-shadow: 0 7px 0 var(--terracotta-dark), 0 14px 24px rgba(58, 37, 22, 0.3); }
.btn-ghost {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 5px 0 #D9C6A8, 0 10px 20px rgba(58, 37, 22, 0.2);
}

/* ---------- Sections ---------- */
.section { max-width: 1100px; margin: 0 auto; padding: 72px 16px 0; }
.intro, .pace { max-width: 760px; text-align: center; }
.intro p, .pace p, .lead { color: var(--ink-soft); margin: 0 auto; max-width: 720px; }
.lead { text-align: center; margin-bottom: 32px; }
.gallery h2 { text-align: center; }

/* Graph-paper card with masking tape */
.paper {
  position: relative;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  border: 2px solid #5A4433;
  border-radius: 6px;
  box-shadow: 6px 8px 0 rgba(58, 37, 22, 0.12);
}
.tape {
  position: absolute;
  width: 110px;
  height: 30px;
  background: var(--tape);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  z-index: 2;
}
.tape-l { top: -14px; left: -20px; transform: rotate(-32deg); }
.tape-r { top: -14px; right: -20px; transform: rotate(32deg); }
.tape-c { top: -15px; left: 50%; transform: translateX(-50%) rotate(-3deg); }

.trailer { padding-top: 80px; }
.video-frame { padding: 12px; transform: rotate(-0.6deg); }
.video-frame video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 3px; }

/* Gameplay clips */
.clips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 28px;
}
.clip { margin: 0; position: relative; }
.clip video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  border: 3px solid var(--paper);
  box-shadow: 0 8px 20px rgba(58, 37, 22, 0.2);
}
.clip:nth-child(odd) { transform: rotate(-1deg); }
.clip:nth-child(even) { transform: rotate(1deg); }
.note {
  position: absolute;
  bottom: -18px;
  right: 16px;
  padding: 6px 14px;
  background: #FFE98A;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 2px 3px 6px rgba(58, 37, 22, 0.2);
  transform: rotate(-3deg);
}

/* Features */
.features .paper { padding: 44px clamp(20px, 5vw, 56px) 32px; transform: rotate(0.4deg); }
.features h2 { text-align: center; }
.features ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 40px; }
.features li { position: relative; padding-left: 34px; }
.features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 20px;
  height: 22px;
  background: var(--terracotta);
  border-radius: 3px 3px 10px 10px;
  box-shadow: 0 3px 0 var(--terracotta-dark);
  transform: rotate(-6deg);
}
.features b { font-weight: 900; }

/* Screenshots */
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.shots a {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(58, 37, 22, 0.18);
  transition: transform 0.2s;
}
.shots a:hover, .shots a:focus-visible { transform: scale(1.03) rotate(-0.5deg); }
.shots img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

.pace .btn { margin-top: 28px; }

.footer {
  margin-top: 96px;
  padding: 28px 16px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--cream);
  background: var(--ink);
}
.footer a { color: #FFD9A8; }

/* Lightbox */
.lightbox {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: 96vw;
  max-height: 96vh;
}
.lightbox::backdrop { background: rgba(30, 20, 12, 0.88); }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 6px; }
.lb-btn {
  position: fixed;
  border: 0;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 16px; top: 16px; }

@media (max-width: 800px) {
  body { font-size: 17px; }
  .section { padding-top: 56px; }
  .clips { grid-template-columns: 1fr; }
  .features ul { grid-template-columns: 1fr; }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .tape-l, .tape-r { width: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .logo img { animation: none; }
  .btn, .shots a { transition: none; }
}
