/* BlackBear Mobile — site styles. Mobile-first, one file, no framework. */

:root {
  --black: #1A1A1A;
  --black-2: #232323;      /* raised surfaces */
  --black-3: #2E2E2E;      /* borders */
  --orange: #F26722;
  --orange-dark: #D4551A;
  --white: #FFFFFF;
  --grey: #B5B5B5;         /* body text on dark: 8.9:1 */
  --grey-dim: #8A8A8A;     /* muted text: 5.2:1 */
  --font: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1120px;
  --gutter: 20px;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--grey);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); }
a:hover { color: var(--white); }
h1, h2, h3, h4 { color: var(--white); font-weight: 700; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--orange); color: var(--black); padding: 8px 14px; z-index: 100; border-radius: 6px; font-weight: 700; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 760px; }
.muted { color: var(--grey-dim); }
.lead { font-size: 1.15rem; max-width: 60ch; }

/* ---- Header ---- */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(26,26,26,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--black-3); }
.site-head__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand img { width: 150px; height: auto; }
.nav-toggle { display: flex; flex-direction: column; gap: 5px; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.site-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--black); border-bottom: 1px solid var(--black-3); padding: 8px var(--gutter) 16px; flex-direction: column; }
.site-nav.is-open { display: flex; }
.site-nav a { color: var(--white); text-decoration: none; font-weight: 500; padding: 12px 0; border-bottom: 1px solid var(--black-3); }
.site-nav a:last-child { border: 0; }
.site-nav a[aria-current] { color: var(--orange); }
@media (min-width: 720px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; position: static; flex-direction: row; gap: 32px; background: none; border: 0; padding: 0; }
  .site-nav a { padding: 0; border: 0; position: relative; }
  .site-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--orange); transform: scaleX(0); transition: transform .2s; transform-origin: left; }
  .site-nav a:hover::after, .site-nav a[aria-current]::after { transform: scaleX(1); }
  .brand img { width: 180px; }
}

/* ---- Buttons ---- */
.btn { display: inline-block; padding: 14px 26px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-family: inherit; font-size: 1rem; transition: transform .15s, background .15s, color .15s; }
.btn--primary { background: var(--orange); color: var(--black); }
.btn--primary:hover { background: var(--white); color: var(--black); transform: translateY(-2px); }
.btn--ghost { border-color: var(--orange); color: var(--orange); background: transparent; }
.btn--ghost:hover { background: var(--orange); color: var(--black); }
.link { color: var(--orange); font-weight: 500; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ---- Sections ---- */
.section { padding: 56px 0; }
.section--tight { padding: 32px 0; }
.section--page { padding-top: 40px; }
.section--alt { background: var(--black-2); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section__head h2 { margin: 0; }
@media (min-width: 720px) { .section { padding: 88px 0; } .section--page { padding-top: 56px; } }

/* ---- Hero ---- */
.hero { padding: 64px 0 56px; text-align: left; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; right: -20vw; top: -30vh; width: 70vw; height: 70vw; max-width: 720px; max-height: 720px;
  border-radius: 50%; border: 60px solid var(--orange); opacity: .08; pointer-events: none;
}
.hero__inner { position: relative; }
.hero__logo { width: 220px; margin-bottom: 32px; }
.hero__title { max-width: 14ch; margin-bottom: 28px; }
@media (min-width: 720px) { .hero { padding: 120px 0 96px; } .hero__logo { width: 300px; } }

/* ---- Cards grid ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; background: var(--black-2); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; border: 1px solid var(--black-3); transition: transform .2s, border-color .2s; }
.card:hover { transform: translateY(-4px); border-color: var(--orange); color: inherit; }
.card__art { aspect-ratio: 1; background: var(--black-3); }
.card__art img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__title { margin: 0; }
.card__pitch { margin: 0; font-size: .95rem; flex: 1; }
.platforms { list-style: none; display: flex; gap: 8px; padding: 0; margin: 10px 0 0; }
.platform { width: 22px; height: 22px; border-radius: 6px; background: var(--black-3) center/14px no-repeat; }
.platform--android { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23F26722'%3E%3Cpath d='M3 20.5v-17c0-.6.6-1 1.2-.7l14.6 8.2c.6.4.6 1.2 0 1.6L4.2 21.2c-.6.4-1.2 0-1.2-.7z'/%3E%3C/svg%3E"); }
.platform--ios { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23F26722'%3E%3Cpath d='M16.4 12.6c0-2.4 2-3.5 2-3.6-1.1-1.6-2.8-1.8-3.4-1.8-1.4-.1-2.8.8-3.5.8-.7 0-1.9-.8-3.1-.8-1.6 0-3 .9-3.9 2.3-1.6 2.8-.4 7 1.2 9.3.8 1.1 1.7 2.4 2.9 2.4 1.2 0 1.6-.8 3-.8s1.8.8 3 .8c1.3 0 2-1.1 2.8-2.3.9-1.3 1.2-2.5 1.3-2.6 0 0-2.3-.9-2.3-3.7zM14 5.8c.6-.8 1.1-1.9 1-3-.9 0-2.1.6-2.7 1.4-.6.7-1.1 1.8-1 2.9 1 .1 2.1-.5 2.7-1.3z'/%3E%3C/svg%3E"); }
.platform--steam { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23F26722'%3E%3Ccircle cx='16' cy='8' r='3.5'/%3E%3Ccircle cx='8' cy='16' r='3'/%3E%3Cpath d='M9.5 13.5l4-3.5' stroke='%23F26722' stroke-width='2'/%3E%3C/svg%3E"); }

/* ---- About / services ---- */
.about { max-width: 720px; }
.about__text { margin-bottom: 24px; }
.services { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin: 40px 0 56px; }
.service { background: var(--black-2); border: 1px solid var(--black-3); border-radius: var(--radius); padding: 24px; transition: transform .2s, border-color .2s; }
.service:hover { transform: translateY(-4px); border-color: var(--orange); }
.service h2 { font-size: 1.25rem; margin: 14px 0 8px; }
.service p { margin: 0; font-size: .95rem; }
.service__icon { display: block; width: 40px; height: 40px; border-radius: 10px; background: var(--orange) center/22px no-repeat; }
.icon-gamepad { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1A1A' stroke-width='2' stroke-linecap='round'%3E%3Crect x='2' y='7' width='20' height='11' rx='5'/%3E%3Cpath d='M7 12h4M9 10v4M15 11h.01M17 13h.01'/%3E%3C/svg%3E"); }
.icon-phone { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1A1A' stroke-width='2' stroke-linecap='round'%3E%3Crect x='6' y='2' width='12' height='20' rx='2'/%3E%3Cpath d='M11 18h2'/%3E%3C/svg%3E"); }
.icon-server { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1A1A' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='3' width='18' height='7' rx='2'/%3E%3Crect x='3' y='14' width='18' height='7' rx='2'/%3E%3Cpath d='M7 6.5h.01M7 17.5h.01'/%3E%3C/svg%3E"); }
.icon-chart { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1A1A' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M22 20H2'/%3E%3C/svg%3E"); }
.cta { text-align: center; padding: 40px 0 8px; }
.cta p { max-width: 50ch; margin: 0 auto 24px; }

/* ---- Product page ---- */
.phero { position: relative; padding: 40px 0 48px; overflow: hidden; }
.phero__bg { position: absolute; inset: 0; z-index: 0; }
.phero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.phero__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(26,26,26,.3), var(--black) 95%); }
.phero__inner { position: relative; z-index: 1; display: grid; gap: 24px; }
.phero__cover { width: 160px; border-radius: 22px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,.5); }
.phero__cover img { aspect-ratio: 1; object-fit: cover; }
.phero__kind { color: var(--orange); font-weight: 700; margin: 0 0 6px; }
.phero__pitch { font-size: 1.2rem; color: var(--white); max-width: 46ch; }
.phero__soon { color: var(--orange); font-weight: 700; font-size: 1.1rem; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.store img { height: 56px; width: auto; transition: transform .15s; }
.store:hover img { transform: translateY(-2px); }
.cta .stores { justify-content: center; }
@media (min-width: 720px) {
  .phero { padding: 72px 0; }
  .phero__inner { grid-template-columns: 240px 1fr; align-items: end; gap: 40px; }
  .phero__cover { width: 240px; }
}

.facts { border-top: 1px solid var(--black-3); border-bottom: 1px solid var(--black-3); background: var(--black-2); }
.facts__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 24px; margin: 0; padding-top: 20px; padding-bottom: 20px; }
.facts__list dt { color: var(--grey-dim); font-size: .85rem; }
.facts__list dd { margin: 0; color: var(--white); font-weight: 500; }
@media (min-width: 720px) { .facts__list { grid-template-columns: repeat(4, 1fr); } }

.video { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: var(--black-2); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.gallery__item { display: block; border-radius: 8px; overflow: hidden; background: var(--black-2); }
.gallery__item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: transform .2s; }
.gallery__item:hover img { transform: scale(1.03); }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.94); display: flex; align-items: center; justify-content: center; padding: 16px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 90vh; width: auto; height: auto; border-radius: 8px; }
.lightbox button { position: absolute; background: var(--black-2); color: var(--white); border: 1px solid var(--black-3); width: 44px; height: 44px; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__nav--prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---- Rich text (markdown output) ---- */
.rich h2, .rich h3, .rich h4 { margin-top: 1.6em; }
.rich ul, .rich ol { padding-left: 1.3em; }
.rich li { margin-bottom: .3em; }
.rich p, .rich li { max-width: 68ch; }

/* ---- Contact ---- */
.contact { display: grid; gap: 40px; }
.contact__email { display: inline-block; font-size: 1.3rem; font-weight: 700; text-decoration: none; margin-bottom: 20px; word-break: break-all; }
.socials { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.socials a { display: inline-block; padding: 8px 14px; border: 1px solid var(--black-3); border-radius: 999px; color: var(--white); text-decoration: none; font-size: .95rem; }
.socials a:hover { border-color: var(--orange); color: var(--orange); }
@media (min-width: 840px) { .contact { grid-template-columns: 1fr 1.2fr; gap: 64px; } }

.field { margin-bottom: 18px; }
.field label { display: block; color: var(--white); font-weight: 500; margin-bottom: 6px; }
.field input, .field textarea { width: 100%; background: var(--black-2); border: 1px solid var(--black-3); color: var(--white); padding: 12px 14px; border-radius: 8px; font: inherit; }
.field input:focus, .field textarea:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 3px rgba(242,103,34,.3); }
.field [aria-invalid="true"] { border-color: #FF6B6B; }
.field--short input { max-width: 160px; }
.field--hp { position: absolute; left: -9999px; }
.error { color: #FF8A8A; font-size: .9rem; margin: 6px 0 0; }
.notice { padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--black-3); background: var(--black-2); }
.notice--ok { border-color: var(--orange); }
.notice strong { color: var(--white); }
.empty { color: var(--grey-dim); }

/* ---- 404 ---- */
.notfound { text-align: center; padding: 40px 0; }
.notfound__code { font-size: clamp(5rem, 20vw, 9rem); font-weight: 700; color: var(--orange); line-height: 1; margin: 0; }
.notfound .lead { margin: 0 auto 24px; }

/* ---- Footer ---- */
.site-foot { border-top: 1px solid var(--black-3); background: var(--black-2); padding: 48px 0 24px; font-size: .95rem; }
.site-foot__inner { display: grid; gap: 32px; }
.site-foot__brand p { margin: 14px 0 0; max-width: 32ch; }
.site-foot__col { display: flex; flex-direction: column; gap: 8px; }
.site-foot__col a { color: var(--grey); text-decoration: none; }
.site-foot__col a:hover { color: var(--orange); }
.site-foot__h { font-size: 1rem; margin-bottom: 4px; }
.site-foot__copy { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--black-3); color: var(--grey-dim); font-size: .85rem; }
@media (min-width: 720px) { .site-foot__inner { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }

/* ---- Scroll reveal (subtle) ---- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
  .reveal.is-visible { opacity: 1; transform: none; }
  .card.reveal.is-visible:hover { transform: translateY(-4px); }
}
