/* Spidlen Games: shared styles. Ocean blues, gold cartoon headings (Cannonball Heading: Lilita One
   with Czech letters added), friendly text (Nunito). Both fonts are under the SIL Open Font
   License (see assets/fonts). */

@font-face {
  font-family: "Cannonball Heading";
  src: url("../fonts/CannonballHeading.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/Nunito.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --deep: #0b3d66;
  --sea: #1679b8;
  --sea-light: #3fb0e0;
  --foam: #f1faee;
  --gold: #ffb703;
  --gold-dark: #fb8500;
  --ink: #1d3557;
  --card: rgba(9, 45, 82, 0.72);
  --card-border: rgba(255, 255, 255, 0.14);
  --text: #f1faee;
  --text-dim: rgba(241, 250, 238, 0.82);
  --radius: 28px;
  --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 650;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(63, 176, 224, 0.55), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(22, 121, 184, 0.6), transparent 60%),
    linear-gradient(180deg, #1268a3 0%, #0b4f82 40%, var(--deep) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: #ffd166; }

img { max-width: 100%; height: auto; display: block; }

.wrap { width: min(var(--max), 100% - 40px); margin-inline: auto; }

/* ---------- Header and footer ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(11, 61, 102, 0.6);
  border-bottom: 1px solid var(--card-border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Cannonball Heading", sans-serif;
  font-size: 26px;
  color: var(--foam);
  text-decoration: none;
  letter-spacing: 0.5px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--gold);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 22px;
  box-shadow: 0 4px 0 var(--gold-dark);
}
.site-header .wrap { justify-content: flex-start; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; margin-left: auto; }
.nav a { color: var(--text-dim); text-decoration: none; font-weight: 800; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold); }

.site-footer {
  margin-top: 80px;
  padding: 36px 0 48px;
  border-top: 1px solid var(--card-border);
  color: var(--text-dim);
  font-size: 15px;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }

/* Language picker, top right */
.lang { position: relative; flex: none; }
.lang summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--card-border);
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
  user-select: none;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 18px; height: 18px; }
.lang summary:hover, .lang[open] summary { color: var(--gold); }
.lang ul {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  margin: 0;
  padding: 8px;
  list-style: none;
  min-width: 170px;
  background: #0d3b66;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.lang a { display: block; padding: 8px 14px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 800; }
.lang a:hover { background: rgba(255, 255, 255, 0.1); color: var(--gold); }
.lang a[aria-current="true"] { color: var(--gold); }

/* ---------- Headings and text ---------- */

h1, h2, h3 {
  font-family: "Cannonball Heading", sans-serif;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.5px;
  margin: 0 0 0.4em;
}
.title {
  font-size: clamp(48px, 9vw, 96px);
  color: var(--gold);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 6px 0 rgba(29, 53, 87, 0.55);
}
h2 { font-size: clamp(32px, 5vw, 46px); color: var(--gold); text-shadow: 0 3px 0 rgba(29, 53, 87, 0.6); }
h3 { font-size: 26px; color: var(--foam); }
.lead { font-size: clamp(19px, 2.4vw, 23px); color: var(--text-dim); max-width: 40ch; }
.dim { color: var(--text-dim); }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

section { padding: 56px 0; }

/* ---------- Buttons and badges ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 22px;
  background: var(--gold);
  color: var(--ink);
  font-family: "Cannonball Heading", sans-serif;
  font-size: 24px;
  text-decoration: none;
  box-shadow: 0 7px 0 var(--gold-dark), 0 14px 26px rgba(0, 0, 0, 0.25);
  transition: transform 0.08s, box-shadow 0.08s;
}
.button:hover { color: var(--ink); transform: translateY(-2px); }
.button:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--gold-dark); }
.button.secondary { background: var(--foam); box-shadow: 0 7px 0 #9fb3c8, 0 14px 26px rgba(0, 0, 0, 0.2); }
.button small { font-family: "Nunito", sans-serif; font-weight: 800; font-size: 15px; opacity: 0.75; }

.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--card-border);
  font-size: 15px;
  font-weight: 800;
  color: var(--text-dim);
}

.actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 28px; }

/* ---------- Cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.feature .icon { width: 72px; height: 72px; margin-bottom: 12px; }
.feature p { margin: 0; color: var(--text-dim); }

/* ---------- Hero ---------- */

.hero { padding: 72px 0 40px; position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.hero-art { position: relative; justify-self: center; }
.app-icon {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
  margin-bottom: 22px;
}

.phone {
  width: min(320px, 78vw);
  border-radius: 38px;
  border: 10px solid #0f2238;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  background: #0f2238;
  transform: rotate(3deg);
}
.phone img { width: 100%; }

/* A landscape tablet, for games played sideways (Maze of the Bobcats) */
.tablet {
  width: min(460px, 86vw);
  border-radius: 26px;
  border: 10px solid #0f2238;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  background: #0f2238;
  transform: rotate(-2deg);
}
.tablet img { width: 100%; }
/* An icon without its own background (Bobbie's head) */
.app-icon.plain { border-radius: 0; box-shadow: none; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.35)); }

.float {
  position: absolute;
  width: 92px;
  animation: bob 4s ease-in-out infinite;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.3));
}
.float.a { top: 6%; left: -70px; }
.float.b { bottom: 14%; right: -60px; animation-delay: -1.3s; }
.float.c { bottom: -10px; left: -40px; width: 76px; animation-delay: -2.6s; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-14px) rotate(4deg); }
}

/* ---------- Waves ---------- */

.wave { display: block; width: 100%; height: 60px; color: rgba(255, 255, 255, 0.08); }

/* ---------- Screenshots ---------- */

.screens {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 4px 26px;
}
.screens figure { margin: 0; flex: 0 0 auto; width: 230px; scroll-snap-align: center; }
.screens img {
  border-radius: 26px;
  border: 6px solid #0f2238;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
}
.screens.wide figure { width: min(400px, 80vw); }
.screens.wide img { border-radius: 18px; }
.screens figcaption { text-align: center; color: var(--text-dim); font-size: 15px; margin-top: 10px; }

/* ---------- Characters strip ---------- */

.crew { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 18px; }
.crew img { width: 76px; height: 76px; transition: transform 0.2s; }
.crew img:hover { transform: translateY(-6px) rotate(-6deg); }

/* ---------- Steps and prose ---------- */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 18px 20px 18px 74px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 20px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-family: "Cannonball Heading", sans-serif;
  font-size: 22px;
  display: grid;
  place-items: center;
}

.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; font-size: 32px; }
.prose h3 { margin-top: 1.2em; font-size: 23px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 0.3em 0; }
.note {
  border-left: 5px solid var(--gold);
  background: rgba(255, 183, 3, 0.1);
  padding: 14px 18px;
  border-radius: 0 16px 16px 0;
}

/* ---------- Small screens ---------- */

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .lead, .hero .actions { margin-inline: auto; justify-content: center; }
  .app-icon { margin-inline: auto; }
  .float.a { left: -30px; }
  .float.b { right: -24px; }
  .nav { gap: 14px; font-size: 16px; }
}

@media (max-width: 600px) {
  .nav { display: none; }
  .lang { margin-left: auto; }
  .brand { font-size: 22px; }
  body { font-size: 17px; }
  .button { font-size: 21px; padding: 14px 24px; }
  .card { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .float { animation: none; }
  html { scroll-behavior: auto; }
}
