/* Carmilla Games — gothic dark. Colors come from the Carmilla crest. */
:root {
  --bg: #0b0607;
  --bg-raised: #160b0d;
  --bg-card: #1c0f12;
  --line: #3a1a1f;
  --blood: #e0263a;
  --blood-deep: #7a0d18;
  --bone: #f4e9d8;
  --bone-dim: #c9b9a6;
  --muted: #a08c86;
  --gold: #d9a74a;
  /* Per-game colors; a game page overrides these. */
  --accent: var(--blood);
  --accent-deep: var(--blood-deep);
  --highlight: var(--gold);

  --display: "Pirata One", "Times New Roman", serif;
  --pixel: "Pixelify Sans", ui-monospace, monospace;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -200px, #2a0a10 0%, transparent 70%),
    var(--bg);
  color: var(--bone);
  font: 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--bone); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; letter-spacing: .01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2::after {
  content: ""; display: block; width: 72px; height: 4px; margin-top: .35em;
  background: var(--accent);
  box-shadow: 4px 4px 0 var(--accent-deep);
}
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--bone); color: var(--bg); padding: .5rem 1rem; }
:focus-visible { outline: 3px solid var(--highlight); outline-offset: 3px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(11, 6, 7, .86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--bone); font-family: var(--display); font-size: 1.6rem; }
.brand img { width: 44px; height: auto; }
.topbar nav { display: flex; gap: clamp(.8rem, 3vw, 2rem); }
.topbar nav a { font-family: var(--pixel); font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--bone-dim); text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent; }
.topbar nav a:hover, .topbar nav a[aria-current] { color: var(--bone); border-color: var(--accent); }
@media (max-width: 520px) { .brand span { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; cursor: pointer;
  font: 700 1rem/1 var(--pixel); text-transform: uppercase; letter-spacing: .08em;
  color: #fff; text-decoration: none;
  background: var(--accent);
  border: 0; padding: .95rem 1.4rem;
  box-shadow: 0 4px 0 var(--accent-deep), 0 0 0 2px #000;
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { color: #fff; filter: brightness(1.12); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-deep), 0 0 0 2px #000; }
.btn-ghost { background: transparent; color: var(--bone); box-shadow: inset 0 0 0 2px var(--accent); }
.btn-ghost:hover { background: var(--accent); }

/* ---------- home hero ---------- */
.hero {
  position: relative; overflow: hidden;
  display: grid; place-items: center; text-align: center;
  padding: clamp(2rem, 6vw, 4rem) 1.25rem clamp(3rem, 8vw, 5.5rem);
}
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(closest-side at 50% 42%, rgba(224, 38, 58, .32), transparent 75%);
  animation: pulse 6s ease-in-out infinite;
}
.hero-crest { position: relative; width: min(560px, 88vw); height: auto; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .7)); animation: float 7s ease-in-out infinite; }
.hero-tagline { position: relative; font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--bone); margin: 1rem 0 1.6rem; text-shadow: 0 2px 0 var(--blood-deep); }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes pulse { 50% { opacity: .65; } }

/* ---------- featured game band ---------- */
.featured, .game-hero {
  position: relative; overflow: hidden; isolation: isolate;
  border-block: 2px solid var(--accent);
  background: #0d0816;
}
.featured-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  image-rendering: pixelated; opacity: .55;
}
.featured::before, .game-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 4, 18, .96) 0%, rgba(8, 4, 18, .82) 48%, rgba(8, 4, 18, .35) 100%),
    linear-gradient(0deg, rgba(8, 4, 18, .9), transparent 40%);
}
.featured-inner, .game-hero-inner { max-width: var(--max); margin: 0 auto; padding: clamp(2.5rem, 7vw, 5rem) clamp(1.25rem, 4vw, 2.5rem); }
.featured-inner > *, .game-hero-inner > * { max-width: 560px; }
.eyebrow { font: 700 .95rem var(--pixel); text-transform: uppercase; letter-spacing: .16em; color: var(--highlight); margin-bottom: .8rem; }
.featured-logo, .game-logo { width: min(480px, 100%); height: auto; image-rendering: auto; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .6)); margin-bottom: 1rem; }
.game-hero h1 { margin: 0; }
.featured-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; font: 1rem var(--pixel); color: var(--bone-dim); margin-bottom: 1rem; }
.featured-summary { font-size: 1.1rem; color: var(--bone); }
.featured-actions { margin: 1.4rem 0 2rem; }
.game-tagline { font: 700 1.2rem var(--pixel); text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.store-links { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.4rem 0; }

.badge {
  display: inline-block; font: 700 .85rem/1 var(--pixel); text-transform: uppercase; letter-spacing: .1em;
  padding: .45rem .7rem; color: #140a00; background: var(--highlight);
  box-shadow: 3px 3px 0 #000;
}
.badge-in-development { background: var(--bone-dim); }
.badge-released { background: #5ad17a; }

/* ---------- signup ---------- */
.signup { margin-top: 1rem; }
.signup label { display: block; font: 700 1rem var(--pixel); color: var(--bone); margin-bottom: .5rem; }
.signup-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.signup input[type="email"] {
  flex: 1 1 220px; min-width: 0;
  font: 1rem var(--body); color: var(--bone);
  background: rgba(0, 0, 0, .55); border: 2px solid var(--accent); padding: .85rem 1rem;
}
.signup input::placeholder { color: var(--muted); }
.signup button {
  cursor: pointer; font: 700 1rem/1 var(--pixel); text-transform: uppercase; letter-spacing: .08em;
  color: #140a00; background: var(--highlight); border: 0; padding: .95rem 1.3rem;
  box-shadow: 0 4px 0 #000;
}
.signup button:active { transform: translateY(3px); box-shadow: 0 1px 0 #000; }
.signup button[disabled] { opacity: .6; cursor: wait; }
.signup-note { font-size: .9rem; color: var(--muted); margin: .6rem 0 0; }
.signup.done .signup-note { color: var(--highlight); font-weight: 600; }
.signup.error .signup-note { color: #ff8a8a; }
.hp { position: absolute; left: -9999px; }

/* ---------- sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) clamp(1.25rem, 4vw, 2.5rem); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.section-head a { font-family: var(--pixel); text-decoration: none; }
.narrow { max-width: 720px; }
.prose p { font-size: 1.1rem; color: var(--bone-dim); }
.page-head { text-align: center; padding: clamp(3rem, 8vw, 5rem) 1.25rem 0; }
.page-head p { color: var(--bone-dim); font-size: 1.15rem; }
.page-head h1 { margin-bottom: .3em; }
.page-head .btn { margin-top: 1rem; }
.page-crest { width: min(320px, 70vw); height: auto; margin: 0 auto 1rem; }
.about-teaser { text-align: center; max-width: 720px; }
.about-teaser h2::after { margin-inline: auto; }
.about-teaser p { color: var(--bone-dim); font-size: 1.15rem; }

/* ---------- catalog ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.75rem; }
.game-card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--bone);
  background: var(--bg-card); border: 2px solid var(--line);
  box-shadow: 6px 6px 0 #000;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.game-card:hover { color: var(--bone); transform: translate(-3px, -3px); border-color: var(--accent); box-shadow: 9px 9px 0 var(--accent-deep); }
.game-card-art { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.game-card-art > img:first-child { width: 100%; height: 100%; object-fit: cover; opacity: .6; transition: transform .4s, opacity .3s; }
.game-card:hover .game-card-art > img:first-child { transform: scale(1.05); opacity: .45; }
.game-card-logo { position: absolute; inset: 0; margin: auto; width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .8)); }
.game-card-body { padding: 1.2rem 1.3rem 1.4rem; }
.game-card-meta { display: flex; gap: .7rem; align-items: center; font: .95rem var(--pixel); color: var(--bone-dim); margin-bottom: .7rem; }
.game-card h3 { margin-bottom: .3em; }
.game-card p { color: var(--bone-dim); font-size: 1rem; margin: 0; }

/* ---------- game page ---------- */
.game-about { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 800px) { .game-about { grid-template-columns: 1fr; } }
.facts { margin: 0; background: var(--bg-card); border: 2px solid var(--line); box-shadow: 6px 6px 0 #000; padding: 1.2rem 1.4rem; }
.facts div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px dashed var(--line); }
.facts div:last-child { border: 0; }
.facts dt { font: 700 .95rem var(--pixel); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.facts dd { margin: 0; text-align: right; }

.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.mode { background: var(--bg-card); border: 2px solid var(--line); border-top: 4px solid var(--accent); padding: 1.3rem 1.4rem; box-shadow: 6px 6px 0 #000; }
.mode h3 { font-family: var(--pixel); font-weight: 700; font-size: 1.2rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.mode p { color: var(--bone-dim); margin: 0; font-size: 1rem; }

.heroes { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: 1rem; scroll-snap-type: x mandatory; }
.hero-fig { flex: 0 0 auto; margin: 0; width: 170px; scroll-snap-align: start; text-align: center; }
.hero-fig img {
  width: 100%; height: auto; image-rendering: pixelated;
  background: radial-gradient(closest-side at 50% 60%, color-mix(in srgb, var(--accent) 35%, transparent), transparent);
  transition: transform .2s;
}
.hero-fig:hover img { transform: translateY(-6px) scale(1.03); }
.hero-fig figcaption { font: 700 1.05rem var(--pixel); text-transform: uppercase; letter-spacing: .1em; color: var(--bone); }

.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }
.shot { display: block; border: 2px solid var(--line); box-shadow: 6px 6px 0 #000; overflow: hidden; transition: border-color .15s; }
.shot:hover { border-color: var(--accent); }
.shot img { width: 100%; aspect-ratio: 760 / 819; object-fit: cover; image-rendering: pixelated; }

/* ---------- contact ---------- */
.contact { text-align: center; }
.contact-email { font-family: var(--display); font-size: clamp(1.8rem, 5vw, 2.8rem); text-decoration: none; word-break: break-word; }
.socials { list-style: none; padding: 0; margin: 1rem 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 1.2rem; font-family: var(--pixel); }

/* ---------- footer ---------- */
.footer { text-align: center; padding: 3rem 1.25rem 3.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.footer img { margin: 0 auto 1rem; opacity: .9; }
.footer p { margin: .3rem 0; }

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