/* ---------- Fonts ---------- */
@font-face {
  font-family: "Varela Round";
  src: url("/fonts/varela-round-v21-latin-regular.woff2") format("woff2");
  font-weight: 400 500 700 800 900 1000;
  font-display: swap;
}
@font-face {
  font-family: "Karla";
  src: url("/fonts/karla-v33-latin-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Slab";
  src: url("/fonts/roboto-slab-v36-latin-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* ---------- Palette ---------- */
:root {
  --blue-link: #3474ec;
  --blue-heading: #2d60c1;
  --blue-tagline: #2a529d;
  --panel-overlay: rgba(12, 73, 186, 0.35);
  --text: #212121;
  --bg: #ffffff;
  /* Bounding box for log over keyart */
  --hero-logo-w: 1080px;     /* max width  */
  --hero-logo-max: 200px;   /* max ht */
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Karla", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}
main { display: block; }
a { color: var(--blue-link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  font-family: "Varela Round", sans-serif;
  color: var(--blue-heading);
  line-height: 1.2;
}

/* Roboto Slab only on About page */
.page.about h2,
.page.about h3 {
  font-family: "Roboto Slab", Georgia, serif;
}

/* ---------- Header + logo ---------- */
.site-header {
  text-align: center;
  padding: 5rem 0rem 1.5rem;
}
.logo-link { display: inline-block; }
.logo-link:hover { text-decoration: none; }
.logo {
  width: 90%;
  max-width: 560px;
  height: auto;
}

/* ---------- Panel Grid ---------- */
.works {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1rem;
}
.works-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: left;
  gap: 10px;
}
.works-row--wide {
  margin-top: 10px;
  align-items: flex-start;
}

.panel {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 5px;
  color: #fff;
}
.panel:hover { text-decoration: none; }
.panel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.8s ease;
}
.panel:hover
 img { transform: scale(1.05); }

/* dark-blue tint + title overlay */
.panel-title {
  position: absolute;
  inset: 0;
  display: flex;
  padding: 0.75rem;
  background: var(--panel-overlay);
  transition: background 0.4s ease;
}
/* fade the tint out on hover */
.panel:hover .panel-title { background: transparent; }

.panel-title h3 {
  margin: 0;
  color: #fff;
  font-family: "Varela Round", sans-serif;
  font-weight: 600;
  font-size: 1.7rem;
  text-shadow: /* solid */
    -1px -1px 0 #000,  1px -1px 0 #000,
    -1px  1px 0 #000,  1px  1px 0 #000,
    -1px  0   0 #000,  1px  0   0 #000,
     0   -1px 0 #000,  0   1px 0 #000;
}

/* big (tall) panels: title centered */
.panel--tall .panel-title {
  align-items: center;
  justify-content: center;
  text-align: center;
}
/* small (wide) panels: title bottom-left */
.panel--wide .panel-title {
  align-items: flex-end;
  justify-content: flex-start;
}
.panel--wide .panel-title h3 { font-size: 1.3rem; }

/* tall (portrait) game panels: 3 across */
.panel--tall {
  flex: 0 0 calc(33.333% - 10px);
  max-width: 320px;
  aspect-ratio: 500 / 800;
}

/* wide (landscape) panels: smaller */
.panel--wide {
  flex: 0 0 150px;
  aspect-ratio: 375 / 250;
}

/* ---------- Divider ---------- */
.divider {
  width: 78%;
  max-width: 900px;
  margin: 1rem auto 2rem;
  border: 0;
  border-top: 9px dotted var(--blue-link);
}

/* ---------- Email Form ---------- */
.signup {
  max-width: 800px;
  margin: 0 auto 2.5rem;
  padding: 0 1rem;
  text-align: center;
}
.signup-tagline {
  font-family: "Karla", sans-serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--blue-tagline);
  margin-bottom: 1.25rem;
}
.signup-form {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.signup-form input[type="email"] {
  flex: 1 1 240px;
  max-width: 500px;
  padding: 0.7rem 1rem;
  font: inherit;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.signup-form button {
  padding: 0.7rem 1.5rem;
  font-family: "Varela Round", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: var(--blue-link);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
.signup-form button:hover { background: #2c5fbd; }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 1rem 1rem 3rem;
  font-size: 1.4rem;
  font-weight: 500;
  color: #666;
}
.site-footer .social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}
.site-footer .copyright { margin: 0; }

/* ---------- Interior pages ---------- */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

/* About: portrait photo floated */
.about-photo {
  float: right;
  width: 240px;
  max-width: 42%;
  height: auto;
  margin: 0.25rem 0 1rem 1.5rem;
  border-radius: 8px;
}

/* About: Gameography table */
.page table {
  display: center;              /* horiz scroll on narrow screens */
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.page th,
.page td {
  border: 1px solid #e0e0e0;
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
.page thead th {
  background: #c7c7c7;
  color: #000;
  font-family: "Varela Round", sans-serif;
  white-space: nowrap;
}
.page tbody tr:nth-child(even) { background: #eaeaea; }
.page td:first-child { white-space: nowrap; }

/* ---------- Blast Rush online manual ---------- */

/* Each "---" renders as a thick line */
.page.manual hr {
  clear: both;
  border: 0;
  height: 8px;
  width: 100%;
  border-radius: 4px;
  background: #8b1a1a;
  margin: 1.5rem auto;
}

.bombline {
  clear: both;
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 2.5rem auto 0.5rem;
}

.manual-ship {
  float: left;
  clear: left;
  width: 90px;
  height: auto;
  margin: 0.25rem 1.25rem 0.5rem 0;
}
/* Animated bomb-type demos (tall canvases), centered */
.manual-anim {
  display: block;
  width: 90px;
  height: auto;
  margin: 1rem auto;
}
/* Keep section headings and dividers from wrapping around a floated sprite */
.page.manual h1,
.page.manual h2,
.page.manual h3 { clear: left; }

/* TIP headings (the ones containing the tip character) are orange */
.page.manual h3:has(.manual-tip) { color: #ff5722; }

/* Little animated character shown beside each "TIP" heading */
.manual-tip {
  height: 1.8em;
  width: auto;
  vertical-align: -0.55em;
  margin-right: 0.35em;
}
/* Enemy sprites, centered */
.manual-enemy {
  display: block;
  margin: 1.5rem auto 0.5rem;
  max-width: 200px;
  height: auto;
}
/* Hyperdodge emblem, inline with the text */
.manual-hd {
  height: 1.5em;
  width: auto;
  vertical-align: -0.35em;
  margin-right: 0.15em;
}
/* Game-screen diagrams */
.manual-screen {
  display: block;
  margin: 1.5rem auto;
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 6px;
}
.manual-screen--wide { max-width: 460px; }

@media (max-width: 600px) {
  .about-photo { float: none; display: block; margin: 0 auto 1.5rem; max-width: 70%; }
}

.about-center-heading {
  text-align: center;
  padding: 1rem 0;
}

.about-center-heading h2 {
  background: #c4daf2;
  color: #000;
  display: inline-block;     /* shrink bg to text width */
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  margin: 0 0;
}
.about-center-heading h3
 {
  background: #e6f5d3;
  color: #000;
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  margin: 0 0;
}


/* ---------- Subpage Heading stripe ---------- */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: #fff;
  border-bottom: 4px solid var(--blue-link);
}
.masthead-logo { display: inline-flex; }
.masthead-logo:hover { text-decoration: none; }
.masthead-logo img {
  height: 44px;
  width: auto;
  display: block;
}
.masthead-nav {
  display: flex;
  gap: 1.75rem;
}
.masthead-nav a {
  font-family: "Varela Round", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue-heading);
  text-decoration: none;
}
.masthead-nav a:hover { text-decoration: underline; }
.masthead-nav a.is-active { color: var(--blue-link); font-weight: 700; }

/* ---------- Work pages ---------- */
.work {
  max-width: 900px;
  margin: 0 auto;
  padding: calc(var(--hero-logo-max) / 2 + 1.5rem) 1rem 3rem;
}

/* Hero/Keyart on subpage */
.work-hero {
  position: relative;
  width: 100%;
  height: 260px;
  margin-bottom: 0;
}
.work-hero > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.work-hero .logo-carousel--hero {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 50%);
  width: min(90%, var(--hero-logo-w));
  z-index: 2;
}
.work-hero .logo-carousel--hero .logo-carousel__slide img {
  max-width: 100%;                    /* bound by the carousel width (--hero-logo-w) */
  max-height: var(--hero-logo-max);   /* bound by the height */
}

/* Brand row: localized-logo carousel + store badges */
.work-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

/* Auto-cycling logo carousel (horizontal sliding track) */
.logo-carousel {
  position: relative;
  width: 100%;
  max-width: 500px;
  overflow: hidden;
}
.logo-carousel__track {
  display: flex;
  transition: transform 0.6s ease;
}
.logo-carousel__slide {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-carousel__slide img { max-width: 100%; height: auto; max-height: 500px; }

.store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.store-badge img { height: 55px; width: auto; display: block; }
.store-badge:hover { text-decoration: none; opacity: 0.85; }

/* Screenshot gallery */
.screenshots {
  display: grid;
  grid-template-columns: repeat(var(--gallery-columns, 2), 1fr);
  gap: 12px;
  margin-bottom: 2.5rem;
}
.screenshot {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  cursor: zoom-in;
}
.screenshot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.screenshot:hover img { transform: scale(1.04); }


.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  background: rgba(0, 0, 0, 0.85);
}
.lightbox[hidden] { display: none; }
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 6px 40px rgba(0, 0, 0, 0.5);
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  font-family: "Varela Round", sans-serif;
  transition: color 0.2s ease;
}
.lightbox__close:hover,
.lightbox__nav:hover { color: var(--blue-link); }
.lightbox__close {
  top: 0.75rem;
  right: 1.25rem;
  font-size: 2.75rem;
}
.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3.5rem;
  padding: 0.25rem 1rem;
}
.lightbox__prev { left: 0.25rem; }
.lightbox__next { right: 0.25rem; }
.lightbox.is-single .lightbox__nav { display: none; }

/* Description body */
.work-body {
  max-width: 720px;
  margin: 0 auto 2rem;
}
.work-body h1 { font-size: 2rem; }
.work-body h5 { color: var(--blue-tagline); margin-bottom: 0.25rem; }

/* "Media" heading above screenshots */
.media-heading {
  text-align: center;
  font-size: 2rem;
  margin: 0 0 1rem;
}


.work-cta { text-align: center; margin-bottom: 1rem; }
.cta-button {
  display: inline-block;
  padding: 0.8rem 2rem;
  font-family: "Varela Round", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  background: var(--cta-color, var(--blue-link));
  border-radius: 6px;
}
.cta-button:hover { text-decoration: none; filter: brightness(0.92); }

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  .logo { width: 80%; }
  .site-header { padding: 2.5rem 1rem 1.5rem; }
  .panel--tall { flex: 0 0 calc(50% - 10px); }
  .panel--wide { flex: 0 0 140px; }
  .panel-title h3 { font-size: 2rem; }
  .signup-tagline { font-size: 1.1rem; }

  .masthead { padding: 0.6rem 1rem; }
  .masthead-logo img { height: 34px; }
  .masthead-nav { gap: 1rem; }
  .work-hero { height: 160px; }
}
