/* Bravest Bear Studio — site styles
   Palette pulled from the logo. Background matches the logo's cream so the
   logo artwork blends in with no visible box. */
:root {
  --cream: #f3e8d3;
  --cream-2: #ebdcc0;
  --paper: #fbf5ea;
  --bark: #3a2213;
  --bark-2: #4f3020;
  --tan: #c4975e;
  --tan-2: #a97a42;
  --ink: #2a180d;
  --muted: #6e5543;
  --line: #d9c6a4;
  --ember: #8f2414;
  --dawn: #3f5e57;
  --radius: 14px;
  --shadow: 0 1px 0 rgba(58, 34, 19, .06), 0 8px 24px -12px rgba(58, 34, 19, .35);
  --max: 1160px;
  --font-head: "Zilla Slab", "Rockwell", "Roboto Slab", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--bark); text-decoration-color: var(--tan); text-underline-offset: 3px; }
a:hover { color: var(--ember); }
:focus-visible { outline: 3px solid var(--tan-2); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.12;
  color: var(--bark);
  margin: 0 0 .5em;
  letter-spacing: .005em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); text-transform: uppercase; letter-spacing: .01em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--bark); color: var(--cream); padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip-link:focus { left: 8px; color: var(--cream); }
.eyebrow { font: 700 .8rem/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--tan-2); margin-bottom: .9rem; display: block; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line);
}
/* Blur lives on a pseudo-element: backdrop-filter on the header itself would
   trap the fixed-position mobile menu inside the header's box. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(243, 232, 211, .94);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bark); }
.brand img { width: 42px; height: auto; }
.brand-name { font: 700 1.35rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .02em; }
.brand-name small { display: block; font: 700 .64rem/1.2 var(--font-body); letter-spacing: .32em; color: var(--tan-2); margin-top: 3px; }

.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; align-items: center; gap: 4px; }
.nav a, .nav .nav-toggle-sub {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 10px;
  font: 600 1rem/1 var(--font-body); color: var(--bark);
  text-decoration: none; background: none; border: 0; cursor: pointer;
}
.nav a:hover, .nav .nav-toggle-sub:hover, .nav .has-sub:focus-within > .nav-toggle-sub { background: var(--cream-2); color: var(--bark); }
.nav a[aria-current="page"], .nav .is-active > .nav-toggle-sub { color: var(--ember); }
.nav .chev { width: 10px; height: 10px; transition: transform .2s; }
.has-sub { position: relative; }
.submenu {
  position: absolute; top: calc(100% + 6px); left: 50%; min-width: 220px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px;
  opacity: 0; visibility: hidden; transform: translate(-50%, -4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.submenu a { padding: 10px 12px; font-weight: 500; }
.has-sub:hover > .submenu, .has-sub:focus-within > .submenu, .has-sub.open > .submenu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.has-sub.open .chev { transform: rotate(180deg); }

.menu-button {
  display: none; background: none; border: 1px solid var(--line); border-radius: 10px;
  width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; color: var(--bark);
}
.menu-button svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .menu-button { display: inline-flex; }
  .nav {
    position: fixed; inset: 72px 0 0 0; background: var(--cream);
    padding: 12px 20px 40px; overflow-y: auto;
    display: none;
  }
  .nav.open { display: block; }
  .nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav a, .nav .nav-toggle-sub { padding: 14px 12px; font-size: 1.15rem; width: 100%; justify-content: space-between; }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; background: transparent; padding: 0 0 6px 14px; display: none;
  }
  .has-sub.open > .submenu { display: block; }
  .has-sub > .submenu, .has-sub.open > .submenu, .has-sub:hover > .submenu, .has-sub:focus-within > .submenu { transform: none; }
  .has-sub:hover > .submenu { display: none; }
  .has-sub.open:hover > .submenu { display: block; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 2px solid var(--bark);
  font: 700 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  background: var(--bark); color: var(--cream); transition: transform .12s, background .12s;
}
.btn:hover { background: var(--bark-2); color: var(--cream); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--bark); }
.btn-outline:hover { background: var(--bark); color: var(--cream); }
.btn-light { background: var(--cream); color: var(--bark); border-color: var(--cream); }
.btn-light:hover { background: #fff; color: var(--bark); }
.btn-ghost-light { background: transparent; color: var(--cream); border-color: rgba(243,232,211,.7); }
.btn-ghost-light:hover { background: rgba(243,232,211,.12); color: var(--cream); }
.btn[aria-disabled="true"] { opacity: .65; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--bark); color: var(--cream); }
.section-dark h2, .section-dark h3 { color: var(--cream); }
.section-dark .muted, .section-dark .lead { color: #d8c5a7; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }

.page-hero { padding: 72px 0 48px; border-bottom: 1px solid var(--line); }
.page-hero .lead { margin-bottom: 0; }

/* ---------- Home hero ---------- */
.home-hero { padding: 56px 0 72px; overflow: hidden; }
.home-hero .grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.home-hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); }
.home-hero .wordmark { width: 100%; max-width: 560px; margin-left: auto; }
@media (max-width: 860px) {
  .home-hero .grid { grid-template-columns: 1fr; gap: 24px; }
  .home-hero .wordmark { order: -1; max-width: 380px; margin: 0 auto; }
}

/* ---------- Cards ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card-body p:last-child { margin-bottom: 0; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card.linked { position: relative; transition: transform .15s; }
.card.linked:hover { transform: translateY(-3px); }

.game-card .art { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bark); }
.game-card .art img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.game-card:hover .art img { transform: scale(1.03); }
.tag {
  display: inline-block; font: 700 .72rem/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px; background: var(--cream-2); color: var(--bark-2); margin: 0 6px 10px 0;
}
.tag-ember { background: #f3d4c6; color: var(--ember); }
.tag-dawn { background: #d5e4dc; color: var(--dawn); }

.post-card time { font-size: .88rem; color: var(--muted); display: block; margin-bottom: 6px; }
.post-card .read-more { margin-top: auto; padding-top: 12px; font-weight: 700; }

/* ---------- News list ---------- */
.post { padding: 36px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.post:first-child { padding-top: 0; }
.post:last-child { border-bottom: 0; }
.post time { color: var(--muted); font-size: .95rem; }
.post h2 { margin-top: 6px; }
.news-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; }
.chip {
  border: 1px solid var(--line); background: var(--paper); color: var(--bark);
  padding: 8px 14px; border-radius: 999px; font: 600 .95rem/1 var(--font-body); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--bark); color: var(--cream); border-color: var(--bark); }

/* ---------- Game pages ---------- */
.game-hero { position: relative; color: #fff; min-height: min(78vh, 680px); display: flex; align-items: flex-end; overflow: hidden; }
.game-hero .bg { position: absolute; inset: 0; }
.game-hero .bg img { width: 100%; height: 100%; object-fit: cover; }
.game-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(15,8,4,.82) 100%); }
.game-hero .container { position: relative; z-index: 1; padding-bottom: 56px; padding-top: 120px; }
.game-hero h1 { color: #fff; font-size: clamp(2.6rem, 7vw, 5rem); margin-bottom: .2em; text-shadow: 0 2px 24px rgba(0,0,0,.4); }
.game-hero .lead { color: rgba(255,255,255,.88); margin-bottom: 26px; }
.game-hero .tag { background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(4px); }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.facts div { padding: 20px 22px; border-right: 1px solid var(--line); }
.facts div:last-child { border-right: 0; }
.facts dt { font: 700 .75rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--tan-2); margin-bottom: 8px; }
.facts dd { margin: 0; font: 700 1.1rem/1.3 var(--font-head); color: var(--bark); }
@media (max-width: 760px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div:nth-child(2) { border-right: 0; }
  .facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

.feature-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .feature-list { grid-template-columns: 1fr; } }
.feature { padding: 26px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.feature .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--cream-2); color: var(--bark); margin-bottom: 14px; }
.feature .icon svg { width: 24px; height: 24px; }
.theme-ember .feature .icon { background: #f3d4c6; color: var(--ember); }
.theme-dawn .feature .icon { background: #d5e4dc; color: var(--dawn); }

.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .media-grid { grid-template-columns: 1fr 1fr; } }
.media-slot {
  aspect-ratio: 16 / 9; border-radius: 12px; border: 2px dashed var(--line);
  display: grid; place-items: center; color: var(--muted); font-weight: 600; font-size: .95rem; text-align: center; padding: 10px;
  background: repeating-linear-gradient(45deg, transparent 0 12px, rgba(196,151,94,.08) 12px 24px);
}

/* ---------- Two-column content ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.top { align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

.values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 600px) { .values { grid-template-columns: 1fr; } }
.value { padding: 22px 24px; border-left: 4px solid var(--tan); background: var(--paper); border-radius: 0 12px 12px 0; }
.value h3 { margin-bottom: .3em; font-size: 1.2rem; }
.value p { margin: 0; color: var(--muted); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--bark); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border-radius: 10px; border: 1px solid #cbb48d;
  background: #fffdf8; color: var(--ink); font: inherit;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--tan-2); box-shadow: 0 0 0 3px rgba(196,151,94,.35); }
.hp { position: absolute; left: -9999px; }
.form-status { padding: 14px 16px; border-radius: 10px; font-weight: 600; display: none; }
.form-status.ok { display: block; background: #dfeedd; color: #24502a; }
.form-status.err { display: block; background: #f6dcd3; color: #7a2412; }

.contact-cards { display: grid; gap: 16px; }
.contact-card { padding: 20px 22px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.contact-card h3 { font-size: 1.1rem; margin-bottom: .25em; }
.contact-card p { margin: 0; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); margin-bottom: 12px; }
.faq summary {
  cursor: pointer; padding: 18px 22px; font: 700 1.1rem/1.35 var(--font-head); color: var(--bark);
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.5rem/1 var(--font-body); color: var(--tan-2); }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 22px 18px; color: var(--muted); }
.faq .answer p:last-child { margin: 0; }

/* ---------- Careers ---------- */
.job { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.empty-state { text-align: center; padding: 44px 24px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--paper); }
.empty-state img { width: 84px; margin: 0 auto 12px; }

/* ---------- CTA band ---------- */
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 .2em; }
.cta-band p { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bark); color: #d8c5a7; padding: 56px 0 28px; margin-top: 0; }
.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { color: var(--tan); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.footer-grid h2 { font: 700 .8rem/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--tan); margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.footer-brand img { width: 46px; background: var(--cream); border-radius: 12px; padding: 4px; }
.footer-brand span { font: 700 1.25rem/1.1 var(--font-head); color: var(--cream); text-transform: uppercase; }
.footer-bottom { border-top: 1px solid rgba(243,232,211,.15); margin-top: 40px; padding-top: 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .92rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding: 96px 0; }
.not-found img { width: 150px; margin: 0 auto 20px; }

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