/* bDevStudios site: dark "bDev Neon" look shared with the games.
   Fonts are served from here (not Google Fonts) so visiting the site sends nothing to third parties.
   Home and title pages are generated by tools/build_site.py; privacy pages are hand-written and use the
   "privacy pages" rules near the end. */
@font-face { font-family: "Lilita One"; src: url("fonts/LilitaOne-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("fonts/OpenSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("fonts/OpenSans-Semibold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --bg: #0e0f15;
  --bg-mid: #171a26;
  --bg-top: #232b44;
  --bg-alt: #12141d;
  --panel: #1e2130;
  --panel-hi: #252a3c;
  --panel-stroke: #2e3348;
  --text: #f4f6fb;
  --muted: #8b93a7;
  --soft: #b8bfcf;
  --cyan: #2ee6f0;
  --orange: #ff8a1f;
  --orange-deep: #ff6a00;
  --display: "Lilita One", system-ui, sans-serif;
  --body: "Open Sans", system-ui, sans-serif;
  --radius: 22px;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 400 16px/1.6 var(--body);
  background: radial-gradient(ellipse 90% 60% at 50% 0%, var(--bg-top) 0%, var(--bg-mid) 55%, var(--bg) 100%) no-repeat var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: var(--cyan); }
a:hover { color: var(--orange); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: 0.5px; }
.accent { color: var(--cyan); text-shadow: 3px 4px 0 var(--orange-deep); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--cyan); color: #000; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 15, 21, 0.78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(46, 51, 72, 0.7);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--display); font-size: 22px; letter-spacing: 0.5px; }
.logo:hover { color: var(--text); }
.logo img { height: 34px; width: auto; border-radius: 8px; }
.logo b { font-weight: 400; color: var(--cyan); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--soft); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav .nav-cta { color: #0e0f15; background: var(--cyan); margin-left: 6px; }
.nav .nav-cta:hover { color: #0e0f15; background: var(--orange); }
@media (max-width: 560px) {
  .logo span { display: none; }
  .nav a { padding: 6px 9px; font-size: 14px; }
}

/* ---------- buttons, tags, eyebrow ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; font-weight: 600; text-decoration: none;
  color: var(--text); background: var(--panel); border: 1.5px solid var(--panel-stroke);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { color: var(--text); border-color: var(--cyan); transform: translateY(-1px); }
.btn-primary { color: #0e0f15; background: var(--cyan); border-color: var(--cyan); }
.btn-primary:hover { color: #0e0f15; background: var(--orange); border-color: var(--orange); }
.btn-lg { font-size: 17px; padding: 14px 26px; word-break: break-all; }

.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--orange); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tag { font-size: 12px; font-weight: 600; color: var(--soft); border: 1px solid var(--panel-stroke); background: rgba(30, 33, 48, 0.6); border-radius: 999px; padding: 2px 10px; }

/* ---------- home hero ---------- */
main.page { max-width: none; margin: 0; padding: 0; }
.hero { padding: 72px 0 56px; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6.2vw, 72px); line-height: 1.04; margin: 0 0 18px; }
.hero-text { font-size: 18px; color: var(--soft); max-width: 540px; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.stats { display: flex; gap: 36px; margin: 40px 0 0; padding: 0; }
.stats div { display: flex; flex-direction: column; }
.stats dt { font-family: var(--display); font-size: 40px; line-height: 1; color: var(--text); }
.stats dd { margin: 4px 0 0; color: var(--muted); font-size: 14px; text-transform: uppercase; letter-spacing: 1.5px; }
.hero-art { position: relative; height: 520px; }
.phone {
  position: absolute; width: 230px; height: auto; aspect-ratio: 9 / 16; object-fit: cover; object-position: top;
  border-radius: 28px; border: 6px solid #05060a; box-shadow: 0 30px 60px rgba(0, 0, 0, .55), 0 0 0 1px var(--panel-stroke);
  background: #05060a;
}
.phone-0 { left: 4%; top: 60px; transform: rotate(-9deg); }
.phone-1 { left: 50%; top: 0; transform: translateX(-50%); z-index: 2; width: 250px; }
.phone-2 { right: 4%; top: 60px; transform: rotate(9deg); }
@media (max-width: 900px) {
  .hero { padding: 48px 0 32px; }
  .hero-in { grid-template-columns: 1fr; gap: 28px; }
  .hero-art { height: 380px; }
  .phone { width: 160px; border-radius: 20px; border-width: 4px; }
  .phone-1 { width: 180px; }
  .phone-0 { left: 0; top: 50px; } .phone-2 { right: 0; top: 50px; }
}
@media (max-width: 420px) { .hero-art { height: 320px; } .phone { width: 130px; } .phone-1 { width: 150px; } .stats { gap: 24px; } }

/* Rotating hero: site.js adds .is-rotating and moves the slot classes round, so each title takes the spotlight in
   turn. Without JS (or with reduced motion) the static fan above is used. */
.hero-art.is-rotating { --side-x: 25%; --side-y: 60px; --tilt: 9deg; --side-scale: .9; }
.hero-art.is-rotating .phone {
  left: var(--x); right: auto; top: 0; width: 250px;
  transform: translateX(-50%) translateY(var(--y)) rotate(var(--r)) scale(var(--s));
  transition: left .9s cubic-bezier(.65, 0, .35, 1), transform .9s cubic-bezier(.65, 0, .35, 1),
              filter .9s ease, opacity .45s ease, box-shadow .9s ease;
  cursor: pointer;
}
.hero-art.is-rotating .slot-center {
  --x: 50%; --y: 0px; --r: 0deg; --s: 1; z-index: 3; filter: none;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .55), 0 0 0 1px var(--panel-stroke), 0 0 46px rgba(46, 230, 240, .28);
  cursor: default;
}
.hero-art.is-rotating .slot-left { --x: var(--side-x); --y: var(--side-y); --r: calc(-1 * var(--tilt)); --s: var(--side-scale); z-index: 2; filter: brightness(.62) saturate(.8); }
.hero-art.is-rotating .slot-right { --x: calc(100% - var(--side-x)); --y: var(--side-y); --r: var(--tilt); --s: var(--side-scale); z-index: 2; filter: brightness(.62) saturate(.8); }
/* Waiting their turn: tucked behind the spotlight phone, invisible. */
.hero-art.is-rotating .slot-hidden { --x: 50%; --y: 30px; --r: 0deg; --s: .78; z-index: 0; opacity: 0; filter: brightness(.5); pointer-events: none; }
/* The phone wrapping round from left to right (three titles) slips behind the others. */
.hero-art.is-rotating .phone.crossing { z-index: 1; opacity: .15; }
/* Without the script only the first three phones make the static fan. */
.hero-art:not(.is-rotating) .phone:nth-child(n+4) { display: none; }
.hero-art.is-rotating .phone:not(.slot-center):hover { filter: brightness(.85) saturate(.95); }
@media (max-width: 900px) {
  .hero-art.is-rotating { --side-x: 27%; --side-y: 50px; }
  .hero-art.is-rotating .phone { width: 180px; }
}
@media (max-width: 420px) {
  .hero-art.is-rotating { --side-x: 24%; --side-y: 44px; --side-scale: .86; }
  .hero-art.is-rotating .phone { width: 150px; }
}

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.section-tight { padding: 28px 0; }
.section-alt { background: linear-gradient(180deg, var(--bg-alt), var(--bg)); border-top: 1px solid var(--panel-stroke); }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(34px, 5vw, 46px); line-height: 1.05; margin: 0 0 10px; }
.section-head p { color: var(--soft); margin: 0; }
.section-head.row { max-width: none; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-head.row h2 { font-size: 32px; margin: 0; }
.more-link { font-weight: 600; text-decoration: none; }
.h-small { font-size: 26px; margin: 0 0 16px; color: var(--text); }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (max-width: 360px) { .grid, .grid-3 { grid-template-columns: 1fr; } }
.card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1.5px solid var(--panel-stroke); border-radius: var(--radius); overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { color: var(--text); transform: translateY(-4px); border-color: var(--cyan); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.card-cover { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-alt); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.card:hover .card-cover img { transform: scale(1.04); }
.card-body { display: flex; align-items: center; gap: 14px; padding: 0 20px; margin-top: -26px; position: relative; }
.card-icon { width: 64px; height: 64px; border-radius: 16px; flex: none; border: 3px solid var(--panel); background: var(--panel); box-shadow: 0 6px 16px rgba(0, 0, 0, .4); }
.card-body > div { padding-top: 22px; min-width: 0; }
.card h3 { margin: 0; font-size: 22px; line-height: 1.15; }
.card-kicker { margin: 2px 0 0; font-size: 13px; color: var(--orange); font-weight: 600; }
.card-text { margin: 12px 20px 20px; color: var(--muted); font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .card, .card-cover img, .btn { transition: none; } .card:hover, .btn:hover { transform: none; } .card:hover .card-cover img { transform: none; } }

/* ---------- studio values ---------- */
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.value { background: var(--panel); border: 1.5px solid var(--panel-stroke); border-radius: var(--radius); padding: 26px; }
.value-mark { font-family: var(--display); font-size: 18px; color: var(--cyan); }
.value h3 { font-size: 24px; margin: 6px 0 8px; }
.value p { margin: 0; color: var(--soft); }

/* ---------- contact + footer ---------- */
.contact-in {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  background: linear-gradient(120deg, #1b2a44, #2a1d33); border: 1.5px solid var(--panel-stroke); border-radius: 28px; padding: 40px;
}
.contact-in h2 { font-size: 40px; margin: 0 0 6px; }
.contact-in p { color: var(--soft); margin: 0; }
@media (max-width: 600px) { .contact-in { padding: 28px 22px; } }
.footer { border-top: 1px solid var(--panel-stroke); padding: 36px 0 44px; color: var(--muted); font-size: 14px; }
.footer-in { display: flex; flex-direction: column; gap: 6px; }
.footer p { margin: 0; }
.footer .fine { margin-top: 8px; }

/* ---------- title pages ---------- */
.title-hero { position: relative; padding: 36px 0 40px; overflow: hidden; isolation: isolate; }
.title-hero::before {
  content: ""; position: absolute; inset: -40px; z-index: -1;
  background: var(--cover) center / cover no-repeat; filter: blur(30px) saturate(1.2); opacity: .45;
}
.title-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14, 15, 21, .2), var(--bg)); }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-bottom: 26px; }
.crumbs a { color: var(--soft); text-decoration: none; }
.crumbs a:hover { color: var(--cyan); }
.title-head { display: flex; align-items: center; gap: 24px; margin-bottom: 24px; }
.title-icon { width: 128px; height: 128px; border-radius: 30px; flex: none; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.title-head h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.02; margin: 0; }
.title-tagline { font-size: 19px; color: var(--soft); margin: 6px 0 0; }
@media (max-width: 560px) { .title-head { flex-direction: column; align-items: flex-start; gap: 16px; } .title-icon { width: 96px; height: 96px; border-radius: 24px; } }

.gallery {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 18px;
  scrollbar-width: thin; scrollbar-color: var(--panel-stroke) transparent;
}
.shot {
  flex: none; scroll-snap-align: start; padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 1.5px var(--panel-stroke), 0 12px 30px rgba(0, 0, 0, .4);
  transition: transform .2s ease, box-shadow .2s ease;
}
.shot:hover { transform: translateY(-3px); box-shadow: 0 0 0 1.5px var(--cyan), 0 16px 36px rgba(0, 0, 0, .5); }
.shot img { display: block; height: 460px; width: auto; }
@media (max-width: 600px) { .shot img { height: 360px; } .shot-wide img { height: 200px; } }
@media (min-width: 601px) { .shot-wide img { height: 300px; } }
.gallery-empty { display: flex; align-items: center; gap: 18px; padding: 28px; background: var(--panel); border: 1.5px dashed var(--panel-stroke); border-radius: var(--radius); color: var(--muted); }
.gallery-empty img { border-radius: 18px; }
.gallery-empty p { margin: 0; }

.detail { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
.detail-about p { color: var(--soft); font-size: 17px; margin: 0 0 14px; }
.detail-side { background: var(--panel); border: 1.5px solid var(--panel-stroke); border-radius: var(--radius); padding: 24px 26px; align-self: start; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 28px; margin: 10px 0; color: var(--soft); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 14px; border-radius: 4px; background: var(--cyan); box-shadow: 3px 3px 0 var(--orange-deep); }
@media (max-width: 820px) { .detail { grid-template-columns: 1fr; gap: 24px; } }

.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; }
.pager a { display: flex; flex-direction: column; text-decoration: none; color: var(--text); font-family: var(--display); font-size: 22px; }
.pager a span { font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; }
.pager a:hover { color: var(--cyan); }
.pager .next { text-align: right; }

.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(5, 6, 10, .92); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: calc(100vw - 140px); max-height: calc(100vh - 60px); border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lightbox button {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--panel-stroke);
  background: var(--panel); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer;
}
.lightbox button:hover { border-color: var(--cyan); color: var(--cyan); }
.lb-close { top: 16px; right: 16px; font-size: 18px !important; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .lightbox img { max-width: calc(100vw - 24px); max-height: calc(100vh - 140px); }
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
  .lb-prev { left: calc(50% - 60px); } .lb-next { right: calc(50% - 60px); }
}

/* ---------- privacy pages (hand-written, plain <main>) ---------- */
main:not(.page) { max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; }
main:not(.page) h1 { font-size: clamp(34px, 8vw, 52px); line-height: 1.1; margin: 0 0 8px; text-align: center; }
main:not(.page) h2 { font-size: 26px; color: var(--cyan); margin: 36px 0 8px; }
.panel { background: var(--panel); border: 1.5px solid var(--panel-stroke); border-radius: var(--radius); padding: 20px 22px; }
.meta { color: var(--muted); text-align: center; margin: 0 0 28px; }
table { width: 100%; border-collapse: collapse; margin: 8px 0; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--panel-stroke); vertical-align: top; }
th { font-family: var(--display); font-weight: 400; color: var(--orange); letter-spacing: 0.5px; }
.table-wrap { overflow-x: auto; }
main:not(.page) ul { padding-left: 22px; }
main:not(.page) li { margin: 4px 0; }
main:not(.page) > footer { margin-top: 48px; text-align: center; color: var(--muted); font-size: 14px; }

/* Coming soon: titles announced but not built yet */
.card-cover { position: relative; }
.badge-soon { position: absolute; top: 12px; right: 12px; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #0e0f15; background: var(--orange); border-radius: 999px; padding: 3px 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
.tag.tag-soon { color: #0e0f15; background: var(--orange); border-color: var(--orange); }
.gallery-soon { border-color: rgba(255, 138, 31, .5); }
.gallery-soon strong { color: var(--text); }

/* Now testing: titles in Play testing, not yet on the store */
.badge-soon.badge-testing { background: var(--cyan); }
.tag.tag-testing { color: #0e0f15; background: var(--cyan); border-color: var(--cyan); font-weight: 600; }

/* Available now: titles on the Play Store */
.badge-soon.badge-available { background: #3ddc84; }
.tag.tag-available { color: #0e0f15; background: #3ddc84; border-color: #3ddc84; font-weight: 600; }
