/* Crooked Bear Games — site styles */
:root {
  --ink: #0b0b0b;
  --ink-2: #131312;
  --ink-3: #1c1b19;
  --line: #2b2a27;
  --bone: #e8e3d8;
  --bone-dim: #a9a499;
  --mute: #75716a;
  --red: #d23a32;
  --red-hi: #e9544b;
  --teal: #8fb3ad;
  --radius: 4px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1200px;
  --tilt: -9deg;
  --display: "Barlow Condensed", "Bahnschrift", "Arial Narrow", sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font: 400 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 3px; }

/* film grain over everything, very subtle */
body::after {
  content: "";
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 100;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--bone); color: var(--ink); padding: 8px 14px; z-index: 200; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.solid { background: rgba(11, 11, 11, .92); backdrop-filter: blur(8px); border-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand svg { width: 34px; height: 34px; color: var(--bone); transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover svg { transform: rotate(9deg); }
.brand span { font: 600 15px/1 var(--display); letter-spacing: .28em; text-transform: uppercase; }
.brand small { display: block; font-size: 10px; letter-spacing: .5em; color: var(--mute); margin-top: 4px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font: 500 14px/1 var(--display); letter-spacing: .18em; text-transform: uppercase; text-decoration: none; color: var(--bone-dim); transition: color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--bone); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.lang button {
  background: none; border: 0; color: var(--mute); cursor: pointer;
  font: 600 12px/1 var(--display); letter-spacing: .12em; padding: 7px 11px;
}
.lang button[aria-pressed="true"] { background: var(--bone); color: var(--ink); }
.menu-btn { display: none; background: none; border: 0; color: var(--bone); padding: 8px; cursor: pointer; }
.menu-btn svg { width: 26px; height: 26px; }

@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(11, 11, 11, .98); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px; transform: translateY(-120%); transition: transform .3s;
  }
  .nav.open { transform: none; }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav .lang { align-self: flex-start; margin-top: 16px; }
  .brand small { display: none; }
}

/* ---------- type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font: 600 13px/1 var(--display); letter-spacing: .32em; text-transform: uppercase; color: var(--bone-dim);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--red); transform: rotate(var(--tilt)); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.02; margin: 0; letter-spacing: .01em; }
h2 { font-size: clamp(36px, 5.5vw, 64px); text-transform: uppercase; }
h3 { font-size: 24px; letter-spacing: .04em; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--bone-dim); max-width: 60ch; }
p { margin: 0 0 1em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 15px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  padding: 16px 26px; border-radius: var(--radius); border: 1px solid var(--bone);
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-hi); border-color: var(--red-hi); }
.btn-ghost { background: transparent; color: var(--bone); border-color: rgba(232, 227, 216, .35); }
.btn-ghost:hover { border-color: var(--bone); }
.btns { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- hero (home) ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; place-items: center;
  text-align: center; padding: 120px 0 90px; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 50% 42%, rgba(232, 227, 216, .07), transparent 70%),
    var(--ink);
}
.hero-mark { display: block; width: clamp(150px, 22vw, 240px); aspect-ratio: 980 / 970; height: auto; margin: 0 auto 40px; color: var(--bone); animation: settle 1.4s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes settle { from { opacity: 0; transform: rotate(14deg) scale(.85); } to { opacity: 1; transform: none; } }
.wordmark { font: 600 clamp(38px, 8vw, 96px)/1 var(--display); letter-spacing: .2em; text-transform: uppercase; margin-right: -.2em; }
.wordmark-sub {
  display: flex; align-items: center; gap: 22px; justify-content: center; margin: 18px auto 0; max-width: 560px;
  font: 600 clamp(13px, 1.6vw, 18px)/1 var(--display); letter-spacing: .7em; color: var(--mute); text-transform: uppercase;
}
.wordmark-sub::before, .wordmark-sub::after { content: ""; flex: 1; height: 1px; background: var(--mute); }
.hero .tagline { margin: 44px auto 40px; font-size: clamp(18px, 2.2vw, 22px); color: var(--bone-dim); max-width: 34ch; }
.hero .btns { justify-content: center; }
.hero .fade-in { animation: up .9s .35s both; }
@keyframes up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; translate: -50% 0;
  width: 1px; height: 54px; background: linear-gradient(var(--bone-dim), transparent);
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue { 0%, 100% { opacity: .2; } 50% { opacity: .9; } }

/* ---------- sections ---------- */
section { position: relative; }
.section { padding: clamp(80px, 12vw, 150px) 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 56px; }
.section-head h2 { margin-top: 18px; }
.rule { border: 0; height: 1px; background: var(--line); margin: 0; }

/* featured game */
.feature { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.feature-media { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; background: var(--ink-3); }
.feature-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.feature-media:hover img { transform: scale(1.04); }
.feature-media::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 120px rgba(0, 0, 0, .55); pointer-events: none; }
.badge {
  position: absolute; top: 18px; left: 18px; z-index: 2;
  font: 600 12px/1 var(--display); letter-spacing: .22em; text-transform: uppercase;
  background: var(--red); color: #fff; padding: 9px 12px; border-radius: 2px;
}
.feature-copy .title-logo { width: min(100%, 420px); margin: 0 0 22px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .6)); }
.meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 22px; padding: 0; list-style: none; }
.meta li { font: 500 13px/1 var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--bone-dim); }
.meta li + li::before { content: "·"; margin-right: 18px; color: var(--mute); }
.feature-copy .btns { margin-top: 28px; }
@media (max-width: 900px) { .feature { grid-template-columns: 1fr; } }

/* games grid */
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 28px; }
.card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; display: flex; flex-direction: column; transition: border-color .25s, transform .25s;
}
a.card:hover { border-color: var(--bone-dim); transform: translateY(-4px); }
.card-img { aspect-ratio: 630 / 500; overflow: hidden; background: var(--ink-3); position: relative; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body p { color: var(--bone-dim); margin: 0; font-size: 16px; }
.status { font: 600 12px/1 var(--display); letter-spacing: .24em; text-transform: uppercase; color: var(--teal); }
.status.live { color: var(--red-hi); }

.classified {
  display: grid; place-items: center; height: 100%;
  background:
    repeating-linear-gradient(-9deg, transparent 0 22px, rgba(232, 227, 216, .025) 22px 23px),
    radial-gradient(circle at 50% 45%, #1e1d1a, var(--ink-2) 70%);
}
.classified .stamp {
  font: 700 clamp(28px, 4vw, 40px)/1 var(--display); letter-spacing: .24em; text-transform: uppercase;
  color: var(--red); border: 3px solid var(--red); padding: 10px 18px 10px 24px; transform: rotate(var(--tilt));
  opacity: .85; mix-blend-mode: screen;
}
.classified .redact { display: block; margin-top: 18px; height: 14px; width: 70%; background: var(--bone); opacity: .9; transform: rotate(var(--tilt)); margin-inline: auto; }

/* studio */
.studio { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.pillars { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.pillars li { padding: 26px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 56px 1fr; gap: 6px 16px; }
.pillars .num { font: 600 15px/1.6 var(--display); color: var(--red); letter-spacing: .1em; grid-row: span 2; }
.pillars h3 { font-size: 22px; text-transform: uppercase; }
.pillars p { margin: 0; color: var(--bone-dim); font-size: 16px; }
@media (max-width: 900px) { .studio { grid-template-columns: 1fr; } }

/* press / contact */
.press { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 24px; }
.panel { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; gap: 14px; }
.panel h3 { text-transform: uppercase; }
.panel p { color: var(--bone-dim); margin: 0; font-size: 16px; }
.panel .btns { margin-top: auto; padding-top: 10px; }
.panel .btn { padding: 13px 18px; font-size: 13px; }
.swatches { display: flex; gap: 10px; }
.swatches span { flex: 1; height: 54px; border-radius: 3px; border: 1px solid var(--line); position: relative; }
.swatches span::after { content: attr(data-hex); position: absolute; left: 0; bottom: -22px; font: 500 11px/1 var(--display); letter-spacing: .1em; color: var(--mute); }

.mail {
  display: inline-block; margin: 0 auto 36px; text-decoration: none;
  font: 600 clamp(22px, 4vw, 40px)/1.1 var(--display); letter-spacing: .04em; color: var(--bone);
  border-bottom: 2px solid var(--red); padding-bottom: 6px; overflow-wrap: anywhere;
}
.mail:hover { color: var(--red-hi); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; color: var(--mute); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: center; }
.site-footer .brand svg { width: 28px; height: 28px; color: var(--bone-dim); }
.socials { display: flex; gap: 22px; flex-wrap: wrap; }
.socials a { text-decoration: none; font: 500 13px/1 var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--bone-dim); }
.socials a:hover { color: var(--bone); }

/* ---------- game page ---------- */
.game-hero {
  position: relative; min-height: 92svh; display: flex; align-items: flex-end; padding: 140px 0 80px; overflow: hidden;
}
.game-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.game-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(11, 11, 11, .55) 0%, rgba(11, 11, 11, .25) 40%, rgba(11, 11, 11, .92) 85%, var(--ink) 100%),
              linear-gradient(90deg, rgba(11, 11, 11, .75), transparent 65%);
}
.game-hero .title-logo { width: min(100%, 640px); margin: 18px 0 20px; filter: drop-shadow(0 8px 30px rgba(0, 0, 0, .8)); }
.game-hero .tagline { font-size: clamp(19px, 2.4vw, 24px); max-width: 36ch; margin-bottom: 30px; }

.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
.prose h3 { margin: 40px 0 14px; text-transform: uppercase; }
.prose ul { padding-left: 1.1em; margin: 0 0 1em; }
.prose li { margin-bottom: 8px; color: var(--bone-dim); }
.prose li::marker { color: var(--red); }
.prose strong { color: var(--bone); font-weight: 600; }
.prose p { color: var(--bone-dim); }
.prose .big { font: 600 clamp(26px, 3vw, 34px)/1.15 var(--display); color: var(--bone); text-transform: uppercase; letter-spacing: .03em; }

.facts { position: sticky; top: 96px; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.facts h3 { text-transform: uppercase; margin-bottom: 14px; }
.facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0; }
.facts dt, .facts dd { padding: 11px 0; border-bottom: 1px solid var(--line); margin: 0; font-size: 15px; }
.facts dt { color: var(--mute); padding-right: 18px; font: 500 13px/1.6 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.facts dd { text-align: right; }
.facts .btn { width: 100%; justify-content: center; margin-top: 22px; }

.keys { width: 100%; border-collapse: collapse; font-size: 15px; }
.keys td { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--bone-dim); }
.keys td:last-child { text-align: right; }
kbd {
  display: inline-block; min-width: 28px; text-align: center; padding: 3px 8px; margin-left: 4px;
  font: 600 13px/1.4 var(--display); letter-spacing: .06em; color: var(--bone);
  background: var(--ink-3); border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 4px;
}
.warning { border-left: 3px solid var(--red); padding: 16px 20px; background: rgba(210, 58, 50, .07); color: var(--bone-dim); font-size: 15px; margin-top: 18px; }

.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.gallery button { padding: 0; border: 0; background: var(--ink-3); cursor: zoom-in; overflow: hidden; border-radius: 3px; aspect-ratio: 16 / 10; grid-column: span 2; }
.gallery button:nth-child(1), .gallery button:nth-child(2) { grid-column: span 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s, opacity .3s; opacity: .9; }
.gallery button:hover img { transform: scale(1.05); opacity: 1; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr 1fr; } .gallery button, .gallery button:nth-child(-n+2) { grid-column: span 1; } }

.lightbox {
  position: fixed; inset: 0; z-index: 150; background: rgba(5, 5, 5, .94);
  display: none; place-items: center; padding: 24px;
}
.lightbox.open { display: grid; }
.lightbox img { max-height: 86vh; width: auto; border-radius: 3px; box-shadow: 0 30px 80px rgba(0, 0, 0, .8); }
.lightbox button { position: absolute; background: none; border: 0; color: var(--bone); cursor: pointer; padding: 14px; font: 600 28px/1 var(--display); }
.lb-close { top: 12px; right: 16px; }
.lb-prev { left: 8px; top: 50%; translate: 0 -50%; }
.lb-next { right: 8px; top: 50%; translate: 0 -50%; }

.embed { display: flex; justify-content: center; }
.embed iframe { border: 0; width: 100%; max-width: 552px; height: 167px; border-radius: 3px; background: var(--ink-2); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s, transform .9s cubic-bezier(.2, .7, .2, 1); }
.reveal.seen { opacity: 1; transform: none; }

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