/* Half-Ass Games: one stylesheet for the whole site.
   Studio pages use the donkey's colours. Pages with <body class="theme-sea"> (Deep Sea Panic!
   and its privacy policy) switch to the game's deep-sea colours from its itch.io page.
   Fonts are Bungee and Nunito, the same ones the game uses (SIL Open Font License). */

@font-face {
  font-family: "Bungee";
  src: url("../fonts/bungee.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

/* ---------- Colours ---------- */

:root {
  color-scheme: dark;
  /* The studio: the donkey's red-pink, purple mane and cream sign, on a dark plum night */
  --bg: #140F1C;
  --bg-top: #261839;
  --panel: #1E1629;
  --line: #3B2C4D;
  --text: #F4E9E1;
  --muted: #CDBDCB;
  --heading: #FFF6EC;
  --accent: #FF5C7A;        /* "Half-Ass" pink-red: main buttons */
  --accent-hover: #FF7891;
  --accent-deep: #B52F4B;
  --accent-ink: #1A0D14;
  --soft: #CF9BFF;          /* the mane's purple: links, chips, outline buttons */
  --soft-hover: #E6C9FF;
  --glow: rgba(186, 0, 255, 0.2);
  --glow-2: rgba(255, 92, 122, 0.12);
  --donkey: #FF6A88;

  --radius: 18px;
  --wrap: 1080px;
  --display: "Bungee", "Arial Black", Impact, sans-serif;
  --body: "Nunito", ui-rounded, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

.theme-sea {
  /* Deep Sea Panic!: the same colours as its itch.io page */
  --bg: #07121F;
  --bg-top: #0C2034;
  --panel: #0E2236;
  --line: #1E3A55;
  --text: #D9E8F5;
  --muted: #A9C1D6;
  --heading: #FFFFFF;
  --accent: #FF5A3C;        /* "PANIC!" */
  --accent-hover: #FF6E52;
  --accent-deep: #B8361F;
  --accent-ink: #07121F;
  --soft: #3FD7FF;          /* "DEEP SEA" */
  --soft-hover: #8DE9FF;
  --glow: rgba(63, 215, 255, 0.16);
  --glow-2: transparent;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 480px at 18% -140px, var(--glow), transparent 70%),
    radial-gradient(900px 480px at 85% -120px, var(--glow-2), transparent 70%),
    linear-gradient(180deg, var(--bg-top) 0, var(--bg) 720px);
  background-repeat: no-repeat;
  color: var(--text);
  font: 600 1.0625rem/1.65 var(--body);
  font-synthesis: none;
  overflow-x: hidden;
}

main { flex: 1; }

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

a { color: var(--soft); text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
a:hover { color: var(--soft-hover); }

:focus-visible { outline: 3px solid var(--soft); outline-offset: 3px; border-radius: 6px; }

strong { font-weight: inherit; color: var(--heading); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
  color: var(--heading);
  text-wrap: balance;
}
h2 { font-size: clamp(1.45rem, 4.2vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 10px;
  font-family: var(--display); text-decoration: none;
}
.skip:focus { top: 12px; }

.nowrap { white-space: nowrap; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

.site-header { padding: 14px 0; }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--heading); text-decoration: none; font-family: var(--display); font-size: 1.05rem;
}
.brand:hover { color: var(--heading); }
.brand img { width: 44px; height: 44px; }
.brand .half { color: var(--donkey); }

.site-nav { display: flex; gap: 4px 6px; flex-wrap: wrap; }
.site-nav a {
  color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 999px;
}
.site-nav a:hover { background: color-mix(in srgb, var(--soft) 14%, transparent); color: var(--heading); }
@media (max-width: 520px) { .site-nav { margin-left: -12px; } }

.site-footer {
  margin-top: 72px; padding: 28px 0 36px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--heading); }

/* ---------- Buttons and chips ---------- */

.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 50px; padding: 0.7em 1.35em; border-radius: 999px;
  font-family: var(--display); font-size: 0.98rem; line-height: 1.1; letter-spacing: 0.02em;
  text-decoration: none; text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
.btn-main {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 5px 0 var(--accent-deep), 0 12px 26px color-mix(in srgb, var(--accent) 28%, transparent);
}
.btn-main:hover {
  color: var(--accent-ink); background: var(--accent-hover); transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--accent-deep), 0 16px 30px color-mix(in srgb, var(--accent) 34%, transparent);
}
.btn-main:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--accent-deep); }
.btn-soft {
  color: var(--soft); background: color-mix(in srgb, var(--soft) 8%, transparent);
  box-shadow: inset 0 0 0 2px var(--soft);
}
.btn-soft:hover { color: var(--heading); background: color-mix(in srgb, var(--soft) 18%, transparent); transform: translateY(-2px); }
.btn-soft:active { transform: translateY(1px); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 16px 0 0; padding: 0; }
.chips li {
  padding: 4px 12px; border-radius: 999px; font-size: 0.9rem; color: var(--heading);
  background: color-mix(in srgb, var(--soft) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--soft) 40%, transparent);
}

/* ---------- Sections and cards ---------- */

.section { padding: 44px 0 0; }
@media (min-width: 800px) { .section { padding-top: 64px; } }

.section-intro { max-width: 640px; color: var(--muted); margin-bottom: 22px; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
}
@media (min-width: 640px) { .card { padding: 26px; } }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }

.card h3 { margin-bottom: 0.35em; }
.card .kicker { color: var(--soft); margin: 0 0 0.4em; }

.list-bubbles { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.list-bubbles li { position: relative; padding-left: 30px; }
.list-bubbles li::before {
  content: ""; position: absolute; left: 4px; top: 0.48em; width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0 18%, var(--soft) 22%, color-mix(in srgb, var(--soft) 35%, transparent) 70%);
  box-shadow: 0 0 10px color-mix(in srgb, var(--soft) 45%, transparent);
}

.callout {
  background: linear-gradient(135deg, color-mix(in srgb, var(--soft) 12%, transparent), color-mix(in srgb, var(--accent) 10%, transparent));
  border: 1px solid color-mix(in srgb, var(--soft) 38%, transparent); border-radius: var(--radius); padding: 22px;
}
.callout h3 { color: var(--soft); }

.small { font-size: 0.93rem; color: var(--muted); }

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

/* ---------- Studio home ---------- */

.hero { position: relative; padding: 30px 0 8px; text-align: center; }
@media (min-width: 800px) { .hero { padding-top: 48px; } }
.hero h1 { margin: 0 auto 18px; width: clamp(210px, 58vw, 300px); }
.hero h1 img {
  width: 100%;
  animation: bob 5s ease-in-out infinite; transform-origin: 50% 90%;
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.5));
}
.hero .tagline { font-family: var(--display); font-size: clamp(1.15rem, 3.6vw, 1.5rem); color: var(--donkey); margin-bottom: 0.7em; }
.hero .hello { max-width: 640px; margin: 0 auto; font-size: 1.1rem; }

.group-title {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--display); font-size: 1rem; letter-spacing: 0.04em; color: var(--muted);
  margin: 34px 0 14px;
}
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* The featured game */
.feature { overflow: hidden; padding: 0; }
.feature .art { display: block; background: #0B1A2B; }
.feature .art img { width: 100%; aspect-ratio: 1024 / 500; }
.feature .body { padding: 20px; }
@media (min-width: 640px) { .feature .body { padding: 28px; } }
@media (min-width: 900px) {
  .feature .body { display: grid; grid-template-columns: 1.25fr 1fr; gap: 12px 40px; align-items: start; }
  .feature .actions .chips { margin-top: 4px; }
}
.feature .status { margin: 18px 0 0; color: var(--muted); font-size: 0.97rem; }
/* The game's own colours on its card, even on studio pages */
.feature { --soft: #3FD7FF; --soft-hover: #8DE9FF; --accent: #FF5A3C; --accent-hover: #FF6E52; --accent-deep: #B8361F; --accent-ink: #07121F; border-color: #1E3A55; background: #0E2236; }

.title-split { font-size: clamp(1.7rem, 5vw, 2.4rem); }
.title-split .sea { color: #3FD7FF; }
.title-split .panic { color: #FF5A3C; }

/* Project cards: each game gets its own colour stripe */
.project { position: relative; overflow: hidden; display: flex; flex-direction: column; }
.project::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
  background: linear-gradient(90deg, var(--c1), var(--c2));
}
.project .tag {
  align-self: flex-start; margin: 0 0 12px; padding: 3px 12px; border-radius: 999px; font-size: 0.85rem;
  color: var(--heading); background: color-mix(in srgb, var(--c1) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--c1) 55%, transparent);
}
.project h3 { font-size: 1.3rem; }
.project .genre { color: var(--c1); margin: -0.2em 0 0.7em; font-size: 0.95rem; }
.project .buttons { margin-top: auto; padding-top: 16px; }
.project .btn { min-height: 44px; font-size: 0.9rem; padding: 0.6em 1.1em; }
.p-channel  { --c1: #7CF29A; --c2: #FF4D6D; }   /* CRT green and a red "on air" light */
.p-arcane   { --c1: #F2C14E; --c2: #A26BFF; }   /* painted gold and magic */

.contact-email {
  display: inline-block; font-family: var(--display); font-size: clamp(1rem, 4.4vw, 1.5rem);
  word-break: break-word; margin: 4px 0 10px;
}

/* ---------- Deep Sea Panic! page ---------- */

.game-hero { position: relative; padding-top: 18px; }
.game-hero .keyart {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 60px var(--glow);
}
.game-hero .keyart img { width: 100%; aspect-ratio: 1024 / 500; }
.game-hero .intro { margin-top: 26px; max-width: 760px; }
.game-hero h1 { font-size: clamp(2rem, 7vw, 3.3rem); margin-bottom: 0.2em; }
.game-hero h1 .sea { color: var(--soft); }
.game-hero h1 .panic { color: var(--accent); }
.game-hero .tagline { font-size: clamp(1.12rem, 3.2vw, 1.35rem); color: var(--heading); }

/* Bubbles drifting up behind the game's header */
.bubbles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.bubbles span {
  position: absolute; bottom: -40px; border-radius: 50%;
  border: 2px solid rgba(63, 215, 255, 0.35);
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.5) 0 12%, rgba(63, 215, 255, 0.06) 40%);
  animation: rise linear infinite;
}
.bubbles span:nth-child(1) { left: 8%;  width: 14px; height: 14px; animation-duration: 11s; animation-delay: -2s; }
.bubbles span:nth-child(2) { left: 19%; width: 26px; height: 26px; animation-duration: 15s; animation-delay: -9s; }
.bubbles span:nth-child(3) { left: 31%; width: 10px; height: 10px; animation-duration: 9s;  animation-delay: -5s; }
.bubbles span:nth-child(4) { left: 68%; width: 18px; height: 18px; animation-duration: 13s; animation-delay: -1s; }
.bubbles span:nth-child(5) { left: 79%; width: 30px; height: 30px; animation-duration: 17s; animation-delay: -7s; }
.bubbles span:nth-child(6) { left: 90%; width: 12px; height: 12px; animation-duration: 10s; animation-delay: -4s; }
.bubbles span:nth-child(7) { left: 55%; width: 9px;  height: 9px;  animation-duration: 12s; animation-delay: -11s; }

@keyframes rise {
  from { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 1; }
  50% { transform: translate(14px, -50vh); }
  to { transform: translate(-6px, -100vh); opacity: 0; }
}

.trailer {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line); background: #000; color: #fff;
}
.trailer img, .trailer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trailer img { object-fit: cover; opacity: 0.85; transition: opacity 0.2s ease, transform 0.4s ease; }
.trailer:hover img { opacity: 1; transform: scale(1.02); }
.trailer .play {
  position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 14px 24px 14px 16px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-size: 1rem; white-space: nowrap;
  box-shadow: 0 5px 0 var(--accent-deep), 0 14px 30px rgba(0, 0, 0, 0.45);
}
.trailer .play::before {
  content: ""; width: 0; height: 0; margin-left: 6px;
  border-left: 16px solid var(--accent-ink); border-top: 10px solid transparent; border-bottom: 10px solid transparent;
}
.trailer-note { color: var(--muted); font-size: 0.9rem; margin-top: 10px; }

.shots { display: grid; gap: 12px; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; }
@media (min-width: 720px) {
  .shots { grid-template-columns: 1fr 1fr; }
  .shots li:first-child { grid-column: 1 / -1; }
}
.shots a { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.shots img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; transition: transform 0.3s ease; }
.shots a:hover img { transform: scale(1.025); }

.sub-card .kicker { font-family: var(--display); font-size: 0.85rem; letter-spacing: 0.03em; }

.steps { list-style: none; counter-reset: step; margin: 16px 0; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding-left: 50px; min-height: 36px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-size: 1rem;
}
.steps .btn { margin-top: 8px; min-height: 44px; font-size: 0.9rem; padding: 0.6em 1.1em; }

.get-it { align-items: start; }
.get-it .card { display: flex; flex-direction: column; }
.get-it .card .buttons { margin-top: auto; padding-top: 6px; }

/* ---------- Text pages (privacy) ---------- */

.prose { max-width: 720px; padding-top: 20px; }
.prose h1 { font-size: clamp(1.7rem, 6vw, 2.5rem); }
.prose h2 { font-size: 1.2rem; color: var(--soft); margin: 1.9em 0 0.5em; }
.prose ul { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.3em; }
.prose .date { color: var(--muted); }
.prose .summary {
  border: 1px solid color-mix(in srgb, var(--soft) 45%, transparent); border-radius: 14px; padding: 16px 20px;
  background: color-mix(in srgb, var(--soft) 7%, transparent); color: var(--heading);
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0 0; }

/* ---------- 404 ---------- */

.lost { text-align: center; padding: 60px 0 20px; }
.lost img { width: 128px; margin: 0 auto 16px; animation: bob 4.5s ease-in-out infinite; }
.lost h1 { font-size: clamp(1.8rem, 7vw, 3rem); }
.lost .buttons { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .bubbles { display: none; }
}
