/* Tahoma Studios — shared styles. Colours come from the logo: newsprint cream, ink, blue, yellow and red. */

@font-face {
  font-family: "Hey Comic";
  src: url("../fonts/hey-comic.ttf") format("truetype");
  font-display: swap;
}

:root {
  --paper: #f6efdc;
  --paper-2: #fffaf0;
  --ink: #111;
  --muted: #4b4a52;
  --blue: #2a45c4;
  --blue-deep: #1f3499;
  --yellow: #ffd43b;
  --dots: #f7a400;
  --red: #ff3b3b;
  --border: 3px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --radius: 6px;
  --wrap: 1120px;
  --header-h: 84px;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Hey Comic", "Rubik", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--paper); }

body {
  position: relative;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The big diagonal block of yellow halftone behind the top of every page, with an ink edge */
body::before,
body::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  top: 0;
  height: 980px;
}
body::before {
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% calc(42% + 9px), 0 calc(88% + 9px));
}
body::after {
  background:
    radial-gradient(circle, var(--dots) 2.4px, transparent 2.9px) 0 0 / 14px 14px,
    var(--yellow);
  clip-path: polygon(0 0, 100% 0, 100% 42%, 0 88%);
}
@media (max-width: 860px) {
  body::before, body::after { height: 1100px; }
  body::before { clip-path: polygon(0 0, 100% 0, 100% calc(62% + 9px), 0 calc(80% + 9px)); }
  body::after { clip-path: polygon(0 0, 100% 0, 100% 62%, 0 80%); }
}

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

a { color: var(--blue); font-weight: 500; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--red); }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 800; }

p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }

/* Comic caption label */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--yellow);
  background: var(--ink);
  padding: 4px 12px;
  transform: rotate(-1.5deg);
  margin-bottom: 1rem;
}
a.eyebrow:hover { color: var(--paper); }

.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}
.brand { display: block; flex: none; }
.brand img { width: auto; height: 66px; }
.brand:hover img { transform: rotate(-2deg); }

.nav { display: flex; gap: 6px; align-items: center; }
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 400;
  padding: 6px 12px;
  border: 2px solid transparent;
  border-radius: var(--radius);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--yellow); border-color: var(--ink); }

.nav-toggle { display: none; }

@media (max-width: 720px) {
  :root { --header-h: 72px; }
  .brand img { height: 56px; }
  .nav-toggle {
    display: inline-flex;
    background: var(--yellow);
    border: 2px solid var(--ink);
    color: var(--ink);
    border-radius: var(--radius);
    padding: 6px 12px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
  }
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 16px;
    background: var(--paper);
    border-bottom: var(--border);
  }
  .nav.open { display: flex; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  border: var(--border);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--yellow); color: var(--ink); }
.btn-primary:hover { color: var(--ink); }
.btn-ghost { background: var(--paper-2); color: var(--ink); }
.btn-ghost:hover { color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Home hero (Everon) ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 0;
}
.hero .lead { color: var(--ink); margin-bottom: 28px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-logo { width: min(440px, 100%); margin: 0 0 24px -6px; }
/* Ink keyline and drop so the gold Everon logo reads on the yellow halftone */
.hero-logo {
  filter: drop-shadow(2px 0 0 var(--ink)) drop-shadow(-2px 0 0 var(--ink)) drop-shadow(0 2px 0 var(--ink))
    drop-shadow(0 -2px 0 var(--ink)) drop-shadow(4px 4px 0 var(--ink));
}
/* Logo on the left, the pitch beside it */
.hero-intro {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 40px;
}
.hero-intro .hero-logo { margin-bottom: 0; }
.hero-intro .lead { margin: 0; }
/* Game pages reuse the Everon hero: logo left, meta, pitch and Play button beside it */
.hero-intro .hero-logo { max-height: 240px; object-fit: contain; object-position: left center; }
.hero-intro .eyebrow { text-decoration: none; }
.hero-intro .game-meta { margin-bottom: 14px; }
.hero-intro .btn-row { margin-top: 22px; }
/* Logos that come on their own background (Steam capsules) get a comic frame instead of the ink keyline */
.hero-logo.framed { filter: none; border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); margin-left: 0; }
/* A touch larger for the Everon pitch, so it holds up on the busy halftone */
.hero-intro .lead { font-size: 1.35rem; line-height: 1.5; letter-spacing: 0.02em; }
/* One screenshot at a time, cross-faded; the pager buttons sit under it */
.shots-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  border: 4px solid var(--ink);
  overflow: hidden;
  background: #000;
  box-shadow: 10px 10px 0 var(--ink);
}
.shots-frame a {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}
.shots-frame a.active { opacity: 1; visibility: visible; transition: opacity 0.6s ease; }
.shots-frame img { width: 100%; height: 100%; object-fit: cover; }
.shots-pager {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}
.shots-pager button {
  width: 14px;
  height: 14px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper-2);
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}
.shots-pager button:hover { background: var(--yellow); }
.shots-pager button[aria-current="true"] { width: 34px; border-radius: 7px; background: var(--blue); }
.hero-art {
  background: var(--paper-2);
  border: var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  display: grid;
  place-items: center;
}
.hero-art img { width: 100%; }
/* Sits right on the top edge of the screenshot frame */
.parade {
  position: relative;
  z-index: 1;
  margin: -24px 0 -16px; /* the sprites have 16px of empty space under their feet */
  pointer-events: none;
  height: 128px;
  overflow: hidden;
}
/* Dithered ends, once site.js has drawn the ramps (--dither-*, --dither-w/h). */
.parade[style*="--dither-left"] {
  -webkit-mask: var(--dither-left) left top / var(--dither-w) var(--dither-h) repeat-y,
    linear-gradient(#000, #000) center / calc(100% - 2 * var(--dither-w)) 100% no-repeat,
    var(--dither-right) right top / var(--dither-w) var(--dither-h) repeat-y;
  mask: var(--dither-left) left top / var(--dither-w) var(--dither-h) repeat-y,
    linear-gradient(#000, #000) center / calc(100% - 2 * var(--dither-w)) 100% no-repeat,
    var(--dither-right) right top / var(--dither-w) var(--dither-h) repeat-y;
}
.parade-track {
  display: flex;
  width: max-content;
  animation: parade var(--parade-time, 60s) linear infinite;
}
.runner {
  flex: none;
  width: 128px;
  height: 128px;
  margin-right: 24px;
  background-repeat: no-repeat;
  background-size: calc(var(--frames) * 128px) 128px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  animation: run 0.5s steps(var(--frames)) infinite;
}
@keyframes parade { to { transform: translateX(-50%); } }
@keyframes run { to { background-position: calc(var(--frames) * -128px) 0; } }
@media (prefers-reduced-motion: reduce) {
  .parade-track, .runner { animation: none; }
  .shots-frame a, .shots-pager button { transition: none; }
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 8px;
}
.feature {
  background: var(--paper-2);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.feature p { color: var(--muted); margin: 0; }

@media (max-width: 860px) {
  .hero { padding-top: 48px; }
  .hero-grid, .features, .hero-intro { grid-template-columns: 1fr; }
  .hero-intro { gap: 20px; }
}

/* ---------- Sections ---------- */

.section { padding: 88px 0; }
.section-head { margin-bottom: 36px; }

/* ---------- Game cards ---------- */

.games {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.game-card {
  display: flex;
  flex-direction: column;
  background: var(--paper-2);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  font-weight: 400;
  color: var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.game-card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); color: var(--ink); }
.game-card img { aspect-ratio: 460 / 215; object-fit: cover; width: 100%; background: #000; border-bottom: var(--border); }
.game-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.game-card-body p { color: var(--muted); font-size: 0.95rem; }
.game-card .platforms { margin-top: auto; }

@media (max-width: 860px) { .games { grid-template-columns: 1fr; } }

.platforms { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--paper);
  border: 2px solid var(--ink);
}

/* ---------- Game pages ---------- */

.game-hero { padding: 64px 0 56px; }
.game-hero .lead { color: var(--ink); }
.game-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.game-hero-grid > img { border-radius: var(--radius); border: 4px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); }
.game-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--ink); font-size: 0.95rem; margin: 0 0 24px; }
.game-meta strong { font-weight: 700; }

@media (max-width: 860px) { .game-hero-grid { grid-template-columns: 1fr; } }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; border: var(--border); box-shadow: 5px 5px 0 var(--ink); background: #000; }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; transition: transform 0.3s ease; }
.gallery a:hover img { transform: scale(1.03); }
.gallery.tall img { aspect-ratio: 3 / 4; }
.gallery.tall { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

@media (max-width: 600px) { .gallery { grid-template-columns: 1fr; } }

.stores { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.store {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--paper-2);
  border: var(--border);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  font-weight: 400;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.store:hover { background: var(--yellow); color: var(--ink); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.store svg { width: 28px; height: 28px; flex: none; color: var(--blue); }
.store small { display: block; color: var(--muted); font-size: 0.8rem; line-height: 1.3; }
.store span { font-weight: 700; line-height: 1.3; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(17, 17, 17, 0.92);
  cursor: zoom-out;
}
.lightbox.open { display: grid; }
.lightbox img { max-height: 90vh; width: auto; border-radius: var(--radius); border: 4px solid var(--paper); }

/* ---------- Careers ---------- */

.job,
.panel {
  background: var(--paper-2);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}
/* Plain text card, e.g. the About page */
.panel p { font-size: 1.1rem; max-width: 65ch; }
.panel .btn-row { margin-top: 28px; }

.job-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.job-head h3 { font-size: 1.6rem; margin-bottom: 8px; }
.job ul { padding-left: 1.2em; margin: 0 0 1.4em; }
.job li { margin-bottom: 0.35em; }
.job h4 { font-family: var(--font-display); font-size: 1.05rem; margin: 1.6em 0 0.6em; }

/* ---------- Contact ---------- */

.contact-card {
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.13) 2.4px, transparent 2.9px) 0 0 / 14px 14px,
    var(--blue);
  color: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.contact-card a:not(.btn) { color: var(--yellow); }
.contact-card a:not(.btn):hover { color: var(--paper); }
.contact-card .lead, .contact-card p { color: var(--paper); }
.contact-card .eyebrow { background: var(--yellow); color: var(--ink); }
.contact-card .email { font-family: var(--font-display); font-size: clamp(1.3rem, 3.4vw, 2rem); font-weight: 800; color: var(--paper); text-decoration: none; word-break: break-all; }
.contact-card .email:hover { color: var(--yellow); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  padding: 40px 0;
  color: var(--paper);
  font-size: 0.9rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer a { color: var(--paper); font-weight: 400; }
.site-footer a:hover { color: var(--yellow); }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }

/* Mountain silhouette divider */
.ridge { display: block; width: 100%; height: 80px; color: var(--ink); margin-top: -1px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.cover-panel {
  background: radial-gradient(circle at 50% 40%, #fdf6e6, #e9dcc0);
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 10px 10px 0 var(--ink);
  padding: 28px;
}

.hero-shot img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 4px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
}

/* Three screenshots: one wide on top, two below */
.gallery > a:first-child:nth-last-child(3) { grid-column: 1 / -1; }
