/* Squarehead Studios — faithful static migration of the original site. */
:root {
  color-scheme: light;
  --ink: #252525;
  --copy: #7a7a7a;
  --paper: #ffffff;
  --line: #dedede;
  --header: #323232;
  --header-active: #292929;
  --band: #1e1e1e;
  --accent: #fb900c;
  --cyan: #63c4e5;
  --content: 1024px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--copy);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  line-height: 1.6667;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure { margin: 0; }
p + p { margin-top: 1.45rem; }
h1, h2, h3 { color: var(--ink); font-weight: 700; line-height: 1.25; }
h1, h2 { font-size: 22px; }
h3 { font-size: 16px; font-weight: 400; }
main { min-height: 52vh; }
.shell { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }
.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 9px 12px;
  background: white;
  color: var(--ink);
}

/* Header — dimensions and proportions mirror the original Weebly site. */
.site-header { height: 70px; background: var(--header); color: white; }
.header-inner {
  height: 70px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
}
.brand {
  display: flex;
  width: 200px;
  align-items: center;
  flex: 0 0 auto;
}
.brand img { width: 200px; height: auto; transform: translateY(4px); }
.primary-nav ul {
  display: flex;
  height: 70px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.primary-nav li { display: flex; }
.primary-nav a {
  display: flex;
  align-items: center;
  padding: 0 24px;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] { background: var(--header-active); }

/* Shared buttons and links. */
.button,
.card-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 0;
  border-radius: 0;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  line-height: 36px;
  text-decoration: none;
  text-transform: uppercase;
}
.button:hover,
.card-link:hover { filter: brightness(1.04); }
.text-link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Home page. */
.home-catalogue { padding: 70px 0 82px; }
.home-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 30px;
}
.home-heading h1 { margin-top: 17px; font-size: 22px; }
.home-heading .button { min-width: 114px; min-height: 46px; line-height: 46px; }
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 28px; }
.game-card { min-width: 0; text-decoration: none; }
.game-card-art {
  display: block;
  overflow: hidden;
  border: 1px solid #d5d5d5;
  background: #fff;
}
.game-card-art img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.game-card-copy { padding-top: 16px; }
.game-card-copy h2,
.game-card-copy h3 {
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  text-transform: uppercase;
}
.game-card-copy p {
  color: var(--copy);
  font-size: 18px;
  line-height: 30px;
}
.game-card-copy .card-link,
.game-card-copy .store-link { margin-top: 10px; }
.store-link { display: inline-block; }
.store-link img { width: 120px; height: auto; }
.card-meta { display: none; }

/* About page. */
.about-intro { padding: 85px 0 69px; }
.about-intro h1 { margin-bottom: 34px; }
.about-intro p { max-width: 1000px; }
.previous-work-band { padding: 71px 0 72px; background: var(--band); }
.previous-work-label {
  margin-bottom: 14px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
}
.previous-work { margin: 0; }
.previous-work img { width: 100%; }
.collaboration { padding: 67px 0 74px; }
.collaboration-copy { max-width: 1020px; }
.collaboration-form { margin-top: 95px; }
.collaboration-form h2 { margin-bottom: 28px; }

/* Forms preserve the old page silhouette but submit through the user's mail client. */
.contact-form { width: 100%; }
.form-note { margin-bottom: 13px; color: #888; font-size: 13px; font-style: italic; }
.required { color: #cf4e3e; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 34px; }
.form-field { min-width: 0; }
.form-field label { display: block; margin-bottom: 4px; color: #777; font-size: 16px; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid #d7d7d7;
  border-radius: 0;
  background: white;
  color: #555;
  padding: 8px 9px;
  outline: none;
}
.form-field input,
.form-field select { min-height: 36px; }
.form-field textarea { min-height: 145px; resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: #aaa; box-shadow: 0 0 0 1px #aaa; }
.name-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-span-2 { grid-column: 1 / -1; }
.form-actions { margin-top: 28px; }
.form-status { margin-top: 12px; color: var(--copy); font-size: 13px; }

/* Games catalogue. */
.games-catalogue { padding: 73px 0 86px; }
.games-catalogue .game-grid { row-gap: 55px; }
.games-catalogue .game-card-copy p { min-height: 52px; }

/* Contact page. */
.contact-page { padding: 75px 0 82px; }
.contact-page h1 { margin-bottom: 25px; }
.contact-lede { margin-bottom: 55px; }
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 54px;
  align-items: start;
}
.contact-character { width: 100%; max-width: 330px; justify-self: end; margin-top: 18px; }

/* Individual game pages: retain the migration's content/slideshows, in the original visual system. */
.classic-game-page { padding: 70px 0 85px; }
.game-back { display: inline-block; margin-bottom: 24px; color: #777; font-size: 13px; }
.classic-game-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 66px;
  align-items: center;
}
.classic-game-copy { min-width: 0; }
.game-logo {
  width: min(100%, 440px);
  max-height: 170px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 27px;
}
.classic-game-copy h1,
.split-game-content h1 { margin-bottom: 19px; font-size: 22px; }
.classic-game-copy p,
.classic-game-copy li,
.split-game-content p,
.split-game-content li { color: var(--copy); }
.classic-game-device { width: 100%; max-height: 720px; object-fit: contain; }
.slideshow-wrap { padding: 55px 0 32px; }
.slideshow-wrap .shell { max-width: 1024px; }
.slideshow { width: 100%; background: #fff; }
.slideshow-track { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #111; }
.slideshow-track img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 420ms ease;
}
.slideshow-track img:not([src]) { visibility: hidden; }
.slideshow-track img.is-active { opacity: 1; }
.slideshow-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 3px 7px;
  border: 1px solid #ddd;
  border-top: 0;
  background: #fff;
}
.slideshow-control,
.slideshow-toggle {
  min-width: 38px;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #555;
  cursor: pointer;
}
.slideshow-control { font-size: 24px; line-height: 1; }
.slideshow-toggle { font-size: 13px; }
.slideshow-control:hover,
.slideshow-toggle:hover { background: #f3f3f3; }
.slideshow-status { margin-left: auto; color: #888; font-size: 13px; font-variant-numeric: tabular-nums; }
.split-game-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 72px;
  padding: 36px 0 82px;
}
.split-game-content ul { padding-left: 20px; }
.split-game-content li + li { margin-top: 5px; }
.game-side-card > img:first-child { width: 100%; margin-bottom: 22px; }
.legacy-game-details { font-size: 14px; }
.legacy-game-details p + p { margin-top: 4px; }
.legacy-game-details strong { color: var(--ink); }
.star-page {
  background-color: #030811;
  background-image: url("assets/star-ghost-background.jpg");
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  color: white;
}
.star-page .game-back { color: #b8c1cd; }
.star-page .split-game-content h1,
.star-page .legacy-game-details strong { color: white; }
.star-page .split-game-content p,
.star-page .split-game-content li { color: #d7dde4; }
.star-page .slideshow-controls { border-color: #37404b; background: #101925; }
.star-page .slideshow-control,
.star-page .slideshow-toggle { color: white; }
.star-page .slideshow-status { color: #c9d1db; }
.star-platforms { display: grid; justify-items: start; gap: 15px; margin-top: 20px; }
.star-platforms img { width: auto; max-width: 100%; max-height: 70px; object-fit: contain; }
.prose { max-width: 850px; padding: 72px 0 85px; }
.prose h1 { margin-bottom: 25px; }
.prose h2 { margin: 34px 0 12px; }
.prose p, .prose li { color: var(--copy); }

/* Footer — three-part layout as on the original site. */
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner {
  min-height: 150px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
}
.footer-award-left { justify-self: start; }
.footer-award-right { justify-self: end; }
.footer-award-left img { width: 123px; }
.footer-award-right img { width: 145px; }
.footer-centre { text-align: center; color: #777; font-size: 12px; }
.footer-social { display: flex; justify-content: center; gap: 8px; margin-bottom: 9px; }
.footer-social a {
  color: #e59a33;
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
}
.footer-links { margin-bottom: 6px; }
.footer-links a { color: #555; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.copyright { color: #8a8a8a; }

@media (max-width: 840px) {
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-layout { grid-template-columns: minmax(0, 1fr) 245px; gap: 32px; }
  .classic-game-grid { gap: 34px; }
  .split-game-content { gap: 42px; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .shell { width: min(calc(100% - 32px), var(--content)); }
  .site-header { height: auto; }
  .header-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    align-items: center;
  }
  .brand { width: 180px; min-height: 64px; }
  .brand img { width: 180px; transform: translateY(2px); }
  .primary-nav { width: 100%; margin-inline: -16px; }
  .primary-nav ul { height: 48px; width: calc(100% + 32px); justify-content: stretch; border-top: 1px solid #414141; }
  .primary-nav li { flex: 1; }
  .primary-nav a { width: 100%; justify-content: center; padding: 0 7px; font-size: 12px; }
  .home-catalogue,
  .games-catalogue { padding: 44px 0 58px; }
  .home-heading { margin-bottom: 22px; }
  .home-heading h1 { font-size: 20px; }
  .home-heading .button { min-width: 90px; min-height: 38px; padding-inline: 13px; line-height: 38px; }
  .game-grid { grid-template-columns: 1fr; gap: 42px; }
  .game-card-copy p { min-height: 0 !important; }
  .about-intro { padding: 47px 0 49px; }
  .previous-work-band { padding: 44px 0; }
  .collaboration { padding: 47px 0 56px; }
  .collaboration-form { margin-top: 52px; }
  .form-grid { grid-template-columns: 1fr; gap: 17px; }
  .form-span-2 { grid-column: auto; }
  .contact-page { padding: 48px 0 58px; }
  .contact-lede { margin-bottom: 40px; }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-character { width: 190px; justify-self: center; margin-top: 24px; }
  .classic-game-page { padding: 46px 0 60px; }
  .classic-game-grid { grid-template-columns: 1fr; gap: 28px; }
  .classic-game-device { max-width: 430px; margin-inline: auto; }
  .slideshow-wrap { padding: 35px 0 24px; }
  .split-game-content { grid-template-columns: 1fr; gap: 34px; padding: 28px 0 58px; }
  .game-side-card { width: min(100%, 280px); }
  .footer-inner {
    min-height: 0;
    grid-template-columns: 1fr 1fr;
    padding: 32px 0;
    gap: 22px;
  }
  .footer-centre { grid-column: 1 / -1; grid-row: 1; }
  .footer-award-left { grid-column: 1; grid-row: 2; }
  .footer-award-right { grid-column: 2; grid-row: 2; }
}

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


/* v7 — archive-backed Weebly fidelity pass. */
body {
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 30px;
}
h1, h2, h3, .form-field label { font-family: "Roboto", Arial, Helvetica, sans-serif; }
.primary-nav a, .button, .card-link, .nav-toggle,
.form-field input, .form-field select, .form-field textarea {
  font-family: "Lato", Arial, Helvetica, sans-serif;
}

/* The archived Dusk theme uses a fixed 65px desktop header. */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  height: 65px;
}
.header-inner { height: 65px; }
.brand { height: 65px; }
.brand img { width: 200px; max-height: 40px; transform: none; object-fit: contain; }
.primary-nav ul { height: 65px; }
.primary-nav a {
  padding: 0 20px;
  font-size: 14px;
  letter-spacing: .04em;
}
main { padding-top: 65px; }
.nav-toggle { display: none; }

/* Exact archive container breakpoints: 1024 -> 960 -> fluid. */
.shell { width: 1024px; max-width: none; }

/* Archived Weebly form treatment. */
.form-field input,
.form-field select,
.form-field textarea {
  border-color: #dcdcdc;
  border-radius: 3px;
  color: #626262;
  font-size: 14px;
  line-height: normal;
  padding: 8px;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: #a1a1a1;
  box-shadow: none;
}
.button,
.card-link {
  min-height: 0;
  padding: 8px 16px;
  border: 2px solid var(--accent);
  border-radius: 2px;
  font-size: 14px;
  line-height: normal;
  letter-spacing: .05em;
  transition: background-color 300ms ease, color 300ms ease;
}
.button:hover,
.card-link:hover {
  background: transparent;
  color: var(--accent);
  filter: none;
}
.home-heading .button {
  min-width: 0;
  min-height: 0;
  padding: 12px 24px;
  font-size: 16px;
  line-height: normal;
}

@media (min-width: 768px) {
  body { font-size: 18px; }
  .form-field label { font-size: 18px; }
}

@media (max-width: 1100px) and (min-width: 993px) {
  .shell { width: 960px; }
}

/* The archived theme switches to its full-screen hamburger menu at 992px. */
@media (max-width: 992px) {
  .shell {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }
  .site-header,
  .header-inner,
  .brand { height: 50px; min-height: 50px; }
  .brand { width: auto; max-width: 85%; }
  .brand img { width: 200px; max-width: 100%; max-height: 40px; }
  main { padding-top: 50px; }
  .nav-toggle {
    position: relative;
    display: block;
    width: 50px;
    height: 50px;
    margin-left: auto;
    padding: 10px;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
  }
  .nav-toggle span,
  .nav-toggle span::before,
  .nav-toggle span::after {
    position: absolute;
    left: 14px;
    width: 22px;
    height: 1px;
    background: #fff;
    content: "";
    transition: transform 200ms ease, top 200ms ease, background 200ms ease;
  }
  .nav-toggle span { top: 25px; }
  .nav-toggle span::before { top: -8px; left: 0; }
  .nav-toggle span::after { top: 8px; left: 0; }
  body.nav-open .nav-toggle span { background: transparent; }
  body.nav-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
  body.nav-open .nav-toggle span::after { top: 0; transform: rotate(135deg); }
  .primary-nav {
    position: fixed;
    top: 50px;
    left: 0;
    z-index: 19;
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    max-height: 0;
    margin: 0;
    padding: 0;
    background: var(--header);
    transition: max-height 300ms cubic-bezier(0, .085, .68, .53), padding 300ms ease;
  }
  body.nav-open { overflow: hidden; }
  body.nav-open .primary-nav {
    max-height: calc(100vh - 50px);
    padding: 10px 0;
  }
  .primary-nav ul {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    border: 0;
  }
  .primary-nav li { display: block; width: 100%; }
  .primary-nav a {
    display: block;
    width: 100%;
    padding: 10px 0;
    text-align: center;
    font-size: 14px;
    line-height: normal;
  }
}

/* Weebly stacks multi-column content at 767px, not 640px. */
@media (max-width: 767px) {
  body { font-size: 16px; line-height: 30px; }
  .home-catalogue,
  .games-catalogue { padding: 30px 0; }
  .home-heading { margin-bottom: 20px; }
  .home-heading h1 { margin-top: 0; }
  .game-grid { grid-template-columns: 1fr; gap: 42px; }
  .about-intro { padding: 30px 0; }
  .previous-work-band { padding: 30px 0; }
  .collaboration { padding: 30px 0; }
  .collaboration-form { margin-top: 50px; }
  .form-grid { grid-template-columns: 1fr; gap: 17px; }
  .form-span-2 { grid-column: auto; }
  .form-field label { font-size: 16px; }
  .contact-page { padding: 30px 0; }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-character { width: min(100%, 260px); justify-self: center; margin-top: 24px; }
  .classic-game-page { padding: 30px 0; }
  .classic-game-grid { grid-template-columns: 1fr; gap: 28px; }
  .slideshow-wrap { padding: 30px 0 24px; }
  .split-game-content { grid-template-columns: 1fr; gap: 34px; padding: 30px 0; }
  .game-side-card { width: min(100%, 320px); }
  .footer-inner {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 40px 0 20px;
    gap: 25px;
  }
  .footer-award-left,
  .footer-centre,
  .footer-award-right {
    grid-column: 1;
    grid-row: auto;
    justify-self: center;
  }
  .footer-award-left { order: 1; }
  .footer-centre { order: 2; }
  .footer-award-right { order: 3; }
}
@media (min-width: 768px) and (max-width: 840px) {
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.game-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 14px;
  margin-top: 10px;
}
.game-card-actions .card-link,
.game-card-actions .store-link { margin-top: 0; }
.game-card-actions .store-link img { width: 120px; max-width: 100%; }
@media (max-width: 767px) {
  .game-card-actions { grid-template-columns: auto 1fr; justify-content: start; }
}

/* Original Games fly-out menu. */
.primary-nav > ul > li { position: relative; }
.primary-nav .submenu {
  position: absolute;
  top: 65px;
  left: 0;
  z-index: 30;
  display: block;
  width: 175px;
  height: auto;
  margin: 0;
  padding: 0;
  background: var(--header);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}
.primary-nav .submenu li { display: block; width: 100%; }
.primary-nav .submenu a {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: var(--header);
  font-size: 13px;
  line-height: normal;
  text-transform: none;
  white-space: nowrap;
}
.primary-nav .submenu a:hover,
.primary-nav .submenu a[aria-current="page"] { background: var(--header-active); }
.primary-nav .has-submenu:hover > .submenu,
.primary-nav .has-submenu:focus-within > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.submenu-toggle { display: none; }

@media (max-width: 992px) {
  .primary-nav > ul { display: block; width: 100%; height: auto; }
  .primary-nav > ul > li { position: relative; display: block; width: 100%; }
  .primary-nav .submenu {
    position: static;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    background: rgba(0,0,0,.1);
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: max-height 300ms ease;
  }
  .primary-nav .submenu a {
    padding: 10px 0;
    background: rgba(0,0,0,.1);
    font-size: 14px;
    text-align: center;
  }
  .primary-nav .submenu-open > .submenu { max-height: 260px; }
  .submenu-toggle {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    display: block;
    width: 60px;
    height: 38px;
    padding: 0;
    border: 0;
    background: transparent;
    color: white;
    cursor: pointer;
  }
  .submenu-toggle::before {
    display: inline-block;
    content: "›";
    font: 24px/1 "Lato", Arial, sans-serif;
    transform: rotate(90deg);
    transition: transform 200ms ease;
  }
  .submenu-open > .submenu-toggle::before { transform: rotate(-90deg); }
}

/* v7.1 — preserve Weebly's 20px responsive container gutter.
   Several page sections are also .shell elements and use vertical padding
   shorthands at mobile sizes; this final rule prevents those shorthands from
   zeroing the archive's horizontal container padding. */
@media (max-width: 992px) {
  .shell {
    padding-left: 20px;
    padding-right: 20px;
  }
}
