/* Psyclonix Studios site. Plain CSS, no build step. */

@font-face {
  font-family: "Press Start 2P";
  src: url("fonts/PressStart2P-Regular.ttf") format("truetype");
  font-display: swap;
}

/* Colours sampled from the studio logo and banners: the tile's teal gradient
   (#5fbdce top left, #4dadc1, #1d697e bottom right), the banners' deepest teal
   (#0b2833) and "STUDIOS" cyan (#7cd6e4), and the whirlwind's white and greys. */
:root {
  --bg: #0b2833;
  --bg-2: #134351;
  --panel: #10394a;
  --line: #1d5a6c;
  --text: #fafafa;
  --muted: #cacaca;
  --accent: #7cd6e4;
  --teal: #5fbdce;
  --teal-mid: #4dadc1;
  --teal-deep: #1d697e;
  --accent-ink: #0b2833;
  --pixel: "Press Start 2P", ui-monospace, monospace;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg) linear-gradient(160deg, var(--bg-2) 0, var(--bg) 640px) no-repeat;
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top bar */
.top {
  border-bottom: 1px solid var(--line);
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--pixel);
  font-size: 0.8rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.brand img { display: block; }
.nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

/* Hero */
.hero {
  padding: 64px 0 56px;
}
.hero-head {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 40px);
  margin: 0 0 28px;
}
.hero-logo {
  flex: none;
  width: clamp(80px, 14vw, 128px);
  height: auto;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}
.hero h1 {
  font-family: var(--pixel);
  font-weight: normal;
  font-size: clamp(1.5rem, 5.6vw, 3.4rem);
  line-height: 1.35;
  margin: 0;
  letter-spacing: 0.02em;
}
.hero h1 span { color: var(--accent); }
.lead {
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  color: var(--muted);
  max-width: 40em;
  margin: 0 0 32px;
}

.button {
  display: inline-block;
  background: var(--teal);
  color: var(--accent-ink);
  font-family: var(--pixel);
  font-size: 0.8rem;
  line-height: 1.4;
  padding: 16px 22px;
  text-decoration: none;
  border-radius: 2px;
  box-shadow: 4px 4px 0 var(--teal-deep);
}
.button:hover { background: var(--accent); }
.button:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--teal-deep); }

/* Sections */
section { padding: 40px 0; }
h2 {
  font-family: var(--pixel);
  font-weight: normal;
  font-size: clamp(1rem, 3vw, 1.35rem);
  line-height: 1.5;
  margin: 0 0 20px;
}
h3 {
  font-size: 1.1rem;
  margin: 0 0 6px;
}
p { margin: 0 0 16px; }
.muted { color: var(--muted); }

.hero-shot {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}

.features {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.features li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal-mid);
  padding: 18px 20px;
}
.features p { margin: 0; color: var(--muted); }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0;
}
.gallery figure { margin: 0; }
.gallery img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}
.gallery figcaption {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 6px 2px 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 28px;
}

/* Long text pages */
.prose { max-width: 46em; }
.prose h2 { margin-top: 40px; }
.prose h2:first-of-type { margin-top: 0; }
.prose ul { padding-left: 1.3em; margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.page-title {
  font-family: var(--pixel);
  font-weight: normal;
  font-size: clamp(1.3rem, 4.5vw, 2.2rem);
  line-height: 1.4;
  margin: 0 0 16px;
}

.specs {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 24px;
  margin: 0 0 16px;
}
.specs dt { font-weight: 600; color: var(--text); }
.specs dd { margin: 0; color: var(--muted); }

.email {
  font-size: clamp(1.05rem, 3.6vw, 1.4rem);
  word-break: break-all;
}

/* Footer */
.foot {
  border-top: 1px solid var(--line);
  margin-top: 48px;
}
.foot .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  padding-bottom: 32px;
  color: var(--muted);
  font-size: 0.9rem;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }

/* Social links in the footer, one labelled group for the studio and one for
   the game (filled in by socials.js) */
.socials {
  display: grid;
  grid-template-columns: max-content auto;
  align-items: center;
  gap: 8px 16px;
}
.socials p { margin: 0; grid-column: 1 / -1; }
.social-group { display: contents; }
.social-label {
  font-family: var(--pixel);
  font-size: 0.6rem;
  color: var(--text);
}
.socials ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.socials a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}
.socials a:hover span { text-decoration: underline; }
.socials svg { display: block; flex: none; }

/* Video: a 16:9 box for the YouTube player */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--panel);
  border: 1px solid var(--line);
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Gallery page: a grid of thumbnails */
.shots {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.shots a { display: block; }
.shots img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color 0.15s, transform 0.15s;
}
.shots a:hover img, .shots a:focus-visible img {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Picture viewer (gallery.js) */
.lb-open { overflow: hidden; }
.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(4, 16, 21, 0.94);
  color: var(--text);
}
.lightbox::backdrop { background: rgba(4, 16, 21, 0.94); }
.lightbox figure {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 64px 40px;
  gap: 12px;
}
.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  height: auto;
  border: 1px solid var(--line);
}
.lightbox figcaption { color: var(--muted); font-size: 0.95rem; text-align: center; }
.lightbox button {
  position: absolute;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  font: 1.6rem/1 var(--body);
  width: 44px;
  height: 44px;
  cursor: pointer;
  border-radius: 2px;
}
.lightbox button:hover { background: var(--teal-deep); }
.lightbox button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-count {
  position: absolute;
  top: 12px;
  left: 16px;
  margin: 0;
  font-family: var(--pixel);
  font-size: 0.7rem;
  line-height: 44px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .socials { grid-template-columns: 1fr; gap: 4px; }
  .social-label { margin-top: 6px; }
  .shots { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .lightbox figure { padding: 64px 8px 72px; }
  .lb-prev, .lb-next { top: auto; bottom: 12px; transform: none; }
  .lightbox img { max-height: calc(100vh - 170px); }
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 36px; }
  .hero-head { gap: 16px; }
  .gallery { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
  .nav { gap: 8px 16px; }
  .specs { grid-template-columns: 1fr; gap: 2px; }
  .specs dd { margin-bottom: 10px; }
}
