/* Voltgrave Games + EkohFault website. One stylesheet; each page picks a theme with <body class="studio"> or <body class="game">. */

:root {
  --bg: #121212;
  --bg-2: #1b1b1b;
  --line: #2c2c2c;
  --text: #f2f2f2;
  --muted: #a8a8a8;
  --accent: #e0242f;
  --accent-text: #ffffff;
  --cyan: #3fd6e8;
  --green: #4cd964;
  --head: "Bahnschrift", "DIN Alternate", "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --gutter: 24px;
}
body.game {
  --bg: #141618;
  --bg-2: #1c1f22;
  --line: #2d3236;
  --text: #ece8e1;
  --muted: #a3a49f;
  --accent: #e2621b;
  --accent-text: #141618;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 {
  font-family: var(--head);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 .5em;
  letter-spacing: .02em;
}
h2 { font-size: clamp(28px, 4vw, 42px); text-transform: uppercase; }
h3 { font-size: 22px; text-transform: uppercase; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.eyebrow {
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--accent); color: var(--accent-text); padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  background: linear-gradient(to bottom, rgba(0,0,0,.7), rgba(0,0,0,0));
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav a {
  font-family: var(--head); text-transform: uppercase; letter-spacing: .12em; font-size: 14px;
  text-decoration: none; color: var(--text); opacity: .85;
}
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--head); text-transform: uppercase; letter-spacing: .12em; font-size: 15px; font-weight: 700;
  padding: 14px 24px; text-decoration: none; border: 2px solid var(--accent);
  background: var(--accent); color: var(--accent-text);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: filter .15s;
}
.btn:hover { filter: brightness(1.12); }
.btn.ghost { background: transparent; color: var(--text); border-color: rgba(255,255,255,.35); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.btn[aria-disabled="true"] { cursor: default; opacity: .9; }
.btn .soon {
  font-size: 11px; letter-spacing: .1em; padding: 2px 6px; background: rgba(0,0,0,.25);
}
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: min(92vh, 860px);
  display: flex; align-items: flex-end;
  padding: 140px 0 72px;
  background-color: var(--bg); background-repeat: no-repeat; background-size: cover;
  background-position: var(--hero-pos, center); /* the picture itself is set in each page's style="" */
  isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to right, var(--bg) 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,0) 75%),
    linear-gradient(to top, var(--bg) 0%, rgba(0,0,0,0) 40%);
}
.hero .wrap { width: 100%; }
/* A hero picture shown whole on the right, fading into the background on the left (no zoom on wide screens). */
.hero-art {
  position: absolute; top: 0; right: 0; z-index: -2;
  width: 100%; height: 100%;
  max-width: calc(min(92vh, 860px) * 1.5);
  object-fit: cover; object-position: var(--art-pos, center);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 30%);
  mask-image: linear-gradient(to right, transparent 0, #000 30%);
}
.hero.has-art::before {
  background:
    linear-gradient(to right, var(--bg) 0%, rgba(0,0,0,.35) 40%, rgba(0,0,0,0) 60%),
    linear-gradient(to top, var(--bg) 0%, rgba(0,0,0,0) 35%);
}
.hero-copy { max-width: 620px; }
.hero-logo { width: min(560px, 100%); margin: 0 0 18px -6px; }
.hero .lede { font-size: 19px; color: var(--text); margin-bottom: 28px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; padding: 0; list-style: none; }
.tags li {
  font-family: var(--head); text-transform: uppercase; letter-spacing: .12em; font-size: 12px;
  border: 1px solid rgba(255,255,255,.25); padding: 5px 10px; background: rgba(0,0,0,.35);
}
.ai-note {
  font-size: 12px; color: var(--muted); letter-spacing: .02em;
  position: absolute; right: var(--gutter); bottom: 16px; margin: 0;
  background: rgba(0,0,0,.5); padding: 3px 8px;
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 48px; }

/* Feature rows: picture and text side by side, alternating. */
.feature {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center;
  margin-bottom: 88px;
}
.feature:last-child { margin-bottom: 0; }
.feature:nth-child(even) .feature-img { order: 2; }
.feature-img { position: relative; }
.feature-img img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}
.feature-img::after {
  content: ""; position: absolute; left: -10px; top: -10px; width: 64px; height: 64px;
  border-left: 3px solid var(--accent); border-top: 3px solid var(--accent);
  pointer-events: none;
}
.feature:nth-child(even) .feature-img::after {
  left: auto; right: -10px; border-left: 0; border-right: 3px solid var(--accent);
}
.feature .num {
  font-family: var(--head); font-size: 14px; letter-spacing: .2em; color: var(--accent); display: block; margin-bottom: 8px;
}
.feature h3 { font-size: clamp(24px, 3vw, 32px); }
.feature p { color: var(--muted); font-size: 18px; }
.accent-cyan { color: var(--cyan); }
.accent-green { color: var(--green); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery a { display: block; overflow: hidden; position: relative; background: #000; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .35s, opacity .35s; opacity: .92; }
.gallery a:hover img { transform: scale(1.04); opacity: 1; }
.gallery .wide { grid-column: span 2; grid-row: span 2; }
.gallery .wide img { height: 100%; }
.caption { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* Call to action band */
.cta { text-align: center; }
.cta .wrap { max-width: 760px; }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 28px 0 0; padding: 0; list-style: none; }
.socials a {
  display: block; padding: 9px 16px; border: 1px solid var(--line); text-decoration: none;
  font-family: var(--head); text-transform: uppercase; letter-spacing: .1em; font-size: 13px;
  background: var(--bg);
}
.socials a:hover { border-color: var(--accent); color: var(--accent); }
.email { font-family: var(--head); font-size: clamp(20px, 3vw, 28px); letter-spacing: .04em; color: var(--accent); text-decoration: none; }
.email:hover { text-decoration: underline; }

/* Studio: game card */
.game-card {
  display: grid; grid-template-columns: 1.3fr 1fr; background: var(--bg-2); border: 1px solid var(--line);
  text-decoration: none; overflow: hidden;
}
.game-card .pic { min-height: 340px; background: #141618 url("../img/ef-hero.webp") 70% center / cover; position: relative; }
.game-card .body { padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.game-card .body img { width: 300px; margin-bottom: 18px; }
.game-card p { color: var(--muted); }
.game-card .go { font-family: var(--head); text-transform: uppercase; letter-spacing: .14em; color: var(--accent); font-size: 15px; margin-top: 8px; }
.game-card:hover .go { text-decoration: underline; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }

/* Press kit */
.facts { width: 100%; border-collapse: collapse; }
.facts th, .facts td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { font-family: var(--head); text-transform: uppercase; letter-spacing: .1em; font-size: 14px; color: var(--muted); width: 38%; font-weight: 700; padding-right: 16px; }
.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.dl { border: 1px solid var(--line); background: var(--bg-2); text-decoration: none; display: flex; flex-direction: column; }
.dl .thumb { aspect-ratio: 16 / 9; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 18px; }
.dl .thumb img { width: 100%; height: 100%; object-fit: contain; }
.dl .thumb.dark { background: #141618; }
.dl .thumb.light { background: #ece8e1; }
.dl .thumb.photo { padding: 0; }
.dl .thumb.photo img { width: 100%; height: 100%; object-fit: cover; max-height: none; }
.dl .label { padding: 12px 14px; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); }
.dl .label span:last-child { color: var(--accent); font-family: var(--head); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; white-space: nowrap; }
.dl:hover { border-color: var(--accent); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.swatch { border: 1px solid var(--line); }
.swatch div { height: 72px; }
.swatch p { margin: 0; padding: 8px 10px; font-size: 13px; }
.swatch code { color: var(--muted); }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 40px 0; font-size: 14px; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--accent); }
.site-foot .mark { height: 28px; width: auto; }

/* ---------- Phones and small tablets ---------- */
@media (max-width: 860px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .site-head .wrap { height: 64px; }
  .brand img { height: 26px; }
  .nav { gap: 16px; }
  .nav a { font-size: 12px; letter-spacing: .08em; }
  .hero { min-height: 0; padding: 110px 0 64px; --hero-pos: var(--hero-pos-m, 70% center); }
  .hero::before {
    background: linear-gradient(to top, var(--bg) 8%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.25) 100%);
  }
  .hero .lede { font-size: 17px; }
  .hero-art { max-width: none; object-position: var(--art-pos-m, 62% center); -webkit-mask-image: none; mask-image: none; }
  .hero.has-art::before {
    background: linear-gradient(to top, var(--bg) 8%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.25) 100%);
  }
  .section { padding: 64px 0; }
  .feature { grid-template-columns: 1fr; gap: 24px; margin-bottom: 56px; }
  .feature:nth-child(even) .feature-img { order: 0; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 8px; }
  .gallery .wide { grid-column: auto; grid-row: auto; }
  .gallery .wide img { height: auto; }
  .feature-img::after { left: -6px; top: -6px; width: 44px; height: 44px; }
  .feature:nth-child(even) .feature-img::after { right: -6px; }
  .game-card { grid-template-columns: 1fr; }
  .game-card .pic { min-height: 220px; }
  .game-card .body { padding: 28px 22px; }
  .game-card .body img { width: 240px; }
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .facts th { width: 42%; }
}
@media (max-width: 420px) {
  .nav .hide-xs { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery img { transition: none; }
}

/* ---------- Hero with a picture: sizes ---------- */
/* Mid-size screens: narrower text and the picture nudged right, so the logo stays off the squad. */
@media (min-width: 1280px) and (max-width: 1700px) {
  .hero.has-art .hero-copy { max-width: 540px; }
  .hero.has-art .hero-logo { width: min(500px, 100%); }
  .hero.has-art .hero-art { right: -5vw; }
}
/* Laptops below 1280, tablets and phones: picture on top, words underneath. */
@media (max-width: 1279px) {
  .hero.has-art { display: block; min-height: 0; padding: 0 0 56px; }
  .hero.has-art::before { display: none; }
  .hero.has-art .hero-art {
    position: relative; width: 100%; height: auto; max-width: none; aspect-ratio: 3 / 2;
    object-fit: cover; object-position: center;
    -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
  }
  .hero.has-art .wrap { position: relative; margin-top: -9vw; }
  .hero.has-art .ai-note { bottom: auto; top: calc(66.6vw - 42px); }
}
