/* ==========================================================================
   STELLAR JOY CREATIONS — global stylesheet
   Dark, game-first: one big wordmark, game artwork, contact form.
   ========================================================================== */

:root {
  --ink: #0B0C0E;
  --paper: #F5F3EE;
  --white: #ffffff;
  --accent: #FF5A1F;
  --accent-deep: #D9420C;
  --muted: #5D6068;
  --line: rgba(11, 12, 14, .10);
  --line-strong: rgba(11, 12, 14, .16);
  --line-dark: rgba(255, 255, 255, .12);
  --max: 1200px;
  --r-lg: 26px;
  --r-md: 16px;
  --r-sm: 10px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ff-display: "Bricolage Grotesque", "Helvetica Neue", Helvetica, sans-serif;
  --ff-body: "DM Sans", "Helvetica Neue", Helvetica, sans-serif;
}

/* --------------------------------------------------------------------------
   Fonts — self-hosted, latin subset, variable weight. Two files (45 KB) replace
   the 5 woff2 files (171 KB) + an extra origin that fonts.google.com used to
   cost on first paint. Regenerate with pyftsubset if the copy changes.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.wrap {
  width: min(100% - 48px, var(--max));
  margin-inline: auto;
}

section { scroll-margin-top: 88px; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: 72px;
  display: flex;
  align-items: center;
  /* solid black bar, same colour as the footer: the first screen is pale now, so
     a translucent bar would leave white links on a mid-tone */
  background: #07080A;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  transition: background .35s var(--ease), border-color .35s var(--ease);
}

.site-header.is-scrolled {
  background: #07080A;
  border-bottom-color: rgba(255, 255, 255, .1);
  box-shadow: 0 12px 40px -24px rgba(0, 0, 0, .9);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--ff-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-transform: uppercase;
  white-space: nowrap;
}

.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 90, 31, .16);
  flex: none;
}

/* the header wordmark reads as the full name in one voice — "STELLAR JOY
   CREATIONS" — instead of a muted trailing label */
.logo-name {
  font-family: var(--ff-display);
  font-size: 1em;
  font-weight: 700;
  letter-spacing: -.01em;
  color: inherit;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav a {
  position: relative;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .66);
  padding: 6px 0;
  transition: color .25s var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}

.nav a:hover { color: #fff; }
.nav a:hover::after { transform: scaleX(1); }

/* --------------------------------------------------------------------------
   Hero — the company name is the whole first screen
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 150px 0 110px;
  background: #E9F1FA;
  color: var(--ink);
  overflow: hidden;
  isolation: isolate;
}

/* -- simulated game key-art ------------------------------------------------ */

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-art {
  width: 100%;
  height: 100%;
  display: block;
}

/* Very pale mist instead of a dark scrim: a light warm-white wash over the whole
   frame with a slightly denser, soft-topped patch behind the wordmark only. The
   picture keeps its colour and brightness (nothing gets darkened), and the type
   is near-black so it still clears 4.5:1. Re-run measure_hero_v3.py after
   swapping the artwork. */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(255, 253, 250, .16) 0%,
    rgba(255, 253, 250, .10) 12%,
    rgba(255, 253, 250, .07) 28%,
    rgba(255, 253, 250, .06) 62%,
    rgba(255, 253, 250, .12) 100%);
}

/* local patch: flat-topped so the type sits on an even plate, feathered at the
   rim so it melts into the picture instead of reading as a hard card */
.hero .wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(138%, 1160px);
  height: 176%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%,
    rgba(255, 253, 250, .62) 0%,
    rgba(255, 253, 250, .62) 72%,
    rgba(255, 253, 250, .34) 78%,
    rgba(255, 253, 250, 0) 94%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero .wrap {
  position: relative;
  z-index: 2;
  max-width: 1080px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 26px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: #FF9A63;
  /* tight shadow keeps the 11px label legible over the bright key-art */
  text-shadow: 0 1px 2px rgba(8, 4, 16, .9), 0 2px 24px rgba(8, 4, 16, .6);
}

.hero .eyebrow {
  color: #A8380C;
  text-shadow: none;
}

.hero-name {
  margin: 0;
  font-family: var(--ff-display);
  font-weight: 700;
  line-height: .92;
  letter-spacing: -.045em;
  text-transform: uppercase;
  font-size: clamp(2.5rem, 7.4vw, 6.6rem);
  color: #0B0C0E;
  text-shadow: none;
}

.hero-name .line { display: block; }

.hero-name .sub {
  margin-top: 16px;
  font-size: .34em;
  font-weight: 600;
  letter-spacing: .02em;
  color: rgba(11, 12, 14, .72);
}

.hero-tagline {
  margin: 34px 0 0;
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  letter-spacing: .01em;
  color: rgba(11, 12, 14, .80);
  text-shadow: none;
}

/* --------------------------------------------------------------------------
   Games — artwork left, game identity + store buttons on the right
   -------------------------------------------------------------------------- */

.games {
  background: var(--paper);
  padding: 96px 0 116px;
}

.section-title {
  margin: 0 0 44px;
  font-family: var(--ff-display);
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
}

.games-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.game-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 34px;
  align-items: stretch;
  padding: 20px;
  background: var(--white);
  border: 1px solid rgba(11, 12, 14, .07);
  border-radius: var(--r-lg);
  box-shadow: 0 1px 2px rgba(11, 12, 14, .04), 0 30px 60px -40px rgba(11, 12, 14, .35);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}

.game-card:hover {
  transform: translateY(-5px);
  border-color: rgba(11, 12, 14, .12);
  box-shadow: 0 1px 2px rgba(11, 12, 14, .05), 0 42px 80px -44px rgba(11, 12, 14, .45);
}

.card-art {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #2E1409;
}

.card-art svg {
  width: 100%;
  height: 100%;
  transition: transform .7s var(--ease);
}

.game-card:hover .card-art svg { transform: scale(1.035); }

.card-body {
  display: flex;
  flex-direction: column;
  padding: 14px 18px 10px 2px;
  min-width: 0;
  text-align: left;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.card-icon {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid rgba(11, 12, 14, .1);
  box-shadow: 0 6px 16px -8px rgba(11, 12, 14, .5);
}

.card-icon svg { width: 100%; height: 100%; }

.card-top h3 {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
}

.card-desc {
  margin: 16px 0 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 24px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  transition: transform .3s var(--ease), background .3s var(--ease);
}

.badge:hover {
  background: #1D2027;
  transform: translateY(-2px);
}

.badge svg { width: 20px; height: 20px; flex: none; }

.badge span { display: flex; flex-direction: column; line-height: 1.15; }
.badge i {
  font-style: normal;
  font-size: 8.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
}
.badge b { font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; }

/* --- toast: store links are live-but-empty until our games ship --------- */
/* --- "coming soon": a translucent bar across the middle of the screen ---- */
.soon {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(9, 10, 12, .26);
  opacity: 0;
  visibility: hidden;
  transition: opacity .26s var(--ease), visibility .26s;
}

.soon.is-visible {
  opacity: 1;
  visibility: visible;
}

.soon-bar {
  margin: 0;
  padding: 15px 30px;
  border-radius: 14px;
  background: rgba(12, 13, 17, .68);
  border: 1px solid rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -.005em;
  text-align: center;
  max-width: min(90vw, 620px);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .65);
  transform: translateY(10px);
  transition: transform .32s var(--ease);
}

.soon.is-visible .soon-bar { transform: none; }

@media (max-width: 640px) {
  .soon-bar { padding: 13px 20px; font-size: 13px; border-radius: 12px; }
}

/* --------------------------------------------------------------------------
   Contact — a slim, centred strip (about a third of the screen)
   -------------------------------------------------------------------------- */

.contact {
  min-height: 34vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 0;
  background:
    radial-gradient(760px 380px at 50% 0%, rgba(255, 90, 31, .16), transparent 66%),
    var(--ink);
  color: #fff;
}

.contact .eyebrow { margin-bottom: 16px; }

.contact h2 {
  margin: 0;
  font-family: var(--ff-display);
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.03em;
}

.contact-mail {
  margin: 20px 0 0;
  font-size: 16px;
}

.contact-mail a {
  color: rgba(255, 255, 255, .78);
  border-bottom: 1px solid rgba(255, 255, 255, .22);
  padding-bottom: 2px;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}

.contact-mail a:hover {
  color: #fff;
  border-bottom-color: var(--accent);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: #07080A;
  color: rgba(255, 255, 255, .5);
  padding: 30px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .45);
}

.footer-bottom a { color: rgba(255, 255, 255, .55); transition: color .25s var(--ease); }
.footer-bottom a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   Legal pages (privacy / terms)
   -------------------------------------------------------------------------- */

.legal-hero {
  background:
    radial-gradient(700px 420px at 82% 0%, rgba(255, 90, 31, .2), transparent 62%),
    var(--ink);
  color: #fff;
  padding: 168px 0 72px;
}

.legal-hero h1 {
  margin: 0;
  font-family: var(--ff-display);
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.03em;
}

.legal-hero p {
  margin: 16px 0 0;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
}

.legal {
  background: var(--paper);
  padding: 72px 0 104px;
}

.legal .wrap { max-width: 860px; }

.legal-intro {
  margin: 0 0 36px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

.prose h2 {
  margin: 44px 0 14px;
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
}

.prose h3 {
  margin: 26px 0 10px;
  font-size: 15.5px;
  font-weight: 700;
}

.prose p, .prose li {
  font-size: 15px;
  line-height: 1.75;
  color: #3C3F45;
}

.prose p { margin: 0 0 14px; }

.prose ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

.prose li { margin-bottom: 8px; }

.prose a {
  color: var(--accent-deep);
  border-bottom: 1px solid rgba(217, 66, 12, .3);
}

.prose a:hover { border-bottom-color: var(--accent-deep); }

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}

.legal-back:hover { border-bottom-color: var(--ink); }

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  /* nav stays flat — it only gets tighter, never collapses */
  .nav { gap: 22px; }
  .nav a { font-size: 10.5px; letter-spacing: .1em; }
  .logo-suffix { display: none; }
  .site-header .wrap { gap: 16px; }

  .game-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .card-body { padding: 4px 6px 6px; }

  .games { padding-top: 76px; padding-bottom: 84px; }
}

@media (max-width: 700px) {
  .nav { gap: 15px; }
  .nav a { font-size: 9.5px; letter-spacing: .06em; }
  /* the two legal links move out of the header on very narrow screens —
     they are still reachable from the footer */
  .nav a:nth-child(n+3) { display: none; }
  .logo { font-size: 15px; letter-spacing: 0; }
}

@media (max-width: 640px) {
  .wrap { width: min(100% - 32px, var(--max)); }

  .hero { padding: 118px 0 78px; min-height: 82vh; }
  .hero .eyebrow { margin-bottom: 20px; font-size: 10px; letter-spacing: .2em; }
  .hero-name .sub { margin-top: 12px; font-size: .38em; letter-spacing: .015em; }
  .hero-tagline { margin-top: 26px; }

  .section-title { margin-bottom: 30px; }

  .game-card { padding: 12px; border-radius: 20px; }
  .card-art { border-radius: 14px; }
  .card-icon { width: 46px; height: 46px; border-radius: 12px; }
  .card-top h3 { font-size: 18px; }
  .card-desc { font-size: 14px; }
  .badge { height: 44px; padding: 0 13px; }

  .contact { padding: 52px 0; }

  .legal-hero { padding: 132px 0 52px; }
  .legal { padding: 48px 0 72px; }
  .legal-intro { padding: 18px; }
}

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

/* --------------------------------------------------------------------------
   Real artwork
   main.js renders <img> instead of the SVG placeholders when HERO_IMAGE /
   game.shot / game.icon are set. These rules make the images cover exactly
   the same boxes the placeholders did.
   -------------------------------------------------------------------------- */
/* <picture> only wraps the img — keep it out of the layout box maths */
.hero-media picture,
.card-art picture,
.card-icon picture {
  display: block;
  width: 100%;
  height: 100%;
}

img.hero-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}
