/* Layout: single column studio site, home-screen icon grid as the hero motif, legal block in the footer */
:root {
  --bg: #f8f5f9;
  --surface: #ffffff;
  --ink: #1f1426;
  --muted: #675b70;
  --line: #e7dfeb;
  --accent: #e2307a;
  --accent-ink: #ffffff;
  --t1: #f7941d;
  --t2: #5cb432;
  --t3: #6b2c91;
  --t4: #e2307a;
  --logo-bg: #ffffff;
  --ph-bg: #fff1b8;
  --ph-ink: #5c4300;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --body: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #150f19; --surface: #1e1625; --ink: #f2ebf5; --muted: #a99bb1; --line: #342a3c;
    --accent: #ff5c9a; --accent-ink: #2a0a18; --ph-bg: #4a3b0c; --ph-ink: #ffe28a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #150f19; --surface: #1e1625; --ink: #f2ebf5; --muted: #a99bb1; --line: #342a3c;
    --accent: #ff5c9a; --accent-ink: #2a0a18; --ph-bg: #4a3b0c; --ph-ink: #ffe28a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Placeholder marker: replaced with real data before going live */
.ph {
  background: var(--ph-bg);
  color: var(--ph-ink);
  padding: 0 .3em;
  border-radius: 4px;
  font-style: normal;
}

/* Header */
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 20px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--ink);
  display: grid; grid-template-columns: repeat(2, 7px); gap: 4px; place-content: center;
}
.brand-mark i { width: 7px; height: 7px; border-radius: 2px; display: block; }
.brand-mark i:nth-child(1) { background: var(--t1); }
.brand-mark i:nth-child(2) { background: var(--t2); }
.brand-mark i:nth-child(3) { background: var(--t3); }
.brand-mark i:nth-child(4) { background: var(--t4); }
.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--ink); }

/* Hero */
.hero .wrap {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center;
  padding-block: 48px 72px;
}
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.03; font-weight: 700; }
h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: 19px; color: var(--muted); max-width: 34em; margin: 20px 0 28px; }
.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none;
  font-weight: 600; padding: 12px 22px; border-radius: 999px;
}
.btn:hover { filter: brightness(1.06); }

.homescreen {
  justify-self: center; width: 100%; max-width: 300px; aspect-ratio: 9 / 16;
  background: var(--ink); border-radius: 38px; padding: 34px 22px;
  display: grid; grid-template-columns: repeat(3, 1fr); align-content: start; gap: 18px 14px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.45);
}
.homescreen span { aspect-ratio: 1; border-radius: 22%; display: block; }
.homescreen span:nth-child(4n+1) { background: var(--t1); }
.homescreen span:nth-child(4n+2) { background: var(--t2); }
.homescreen span:nth-child(4n+3) { background: var(--t3); }
.homescreen span:nth-child(4n+4) { background: var(--t4); }
.homescreen span.dim { opacity: .18; }
@media (prefers-reduced-motion: no-preference) {
  .homescreen span:not(.dim) { animation: bob 3.2s ease-in-out infinite; }
  .homescreen span:nth-child(2) { animation-delay: .4s; }
  .homescreen span:nth-child(5) { animation-delay: .8s; }
  .homescreen span:nth-child(7) { animation-delay: 1.2s; }
  @keyframes bob { 50% { transform: translateY(-4px); } }
}

.brand-logo { width: 30px; height: auto; display: block; }
.logo-card { justify-self: center; width: 100%; max-width: 360px; background: var(--logo-bg); border: 1px solid var(--line); border-radius: 32px; padding: 28px; box-shadow: 0 30px 60px -36px rgba(107,44,145,.45); }
.logo-card img { display: block; width: 100%; height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .logo-card img { animation: sip 4s ease-in-out infinite; transform-origin: 50% 80%; }
  @keyframes sip { 50% { transform: rotate(-1.5deg) translateY(-3px); } }
}
/* Sections */
section { padding-block: 0; }
.section .wrap { padding-block: 64px; border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
h2 { font-size: clamp(28px, 4vw, 38px); line-height: 1.1; }
.section-head p { margin: 0; color: var(--muted); max-width: 30em; }

.games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.store-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.store-link:hover { text-decoration: underline; }
.game-next { border-style: dashed; background: transparent; }
.game-next .game-icon { opacity: .35; }
.game {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px;
  display: grid; grid-template-rows: auto auto 1fr auto auto; gap: 12px; min-width: 0;
}
.game-icon { width: 64px; height: 64px; border-radius: 16px; }
.game:nth-child(1) .game-icon { background: var(--t2); }
.game:nth-child(2) .game-icon { background: var(--t1); }
.game:nth-child(3) .game-icon { background: var(--t3); }
.game h3 { font-size: 21px; }
.game p { margin: 0; color: var(--muted); }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--muted); }

.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.cols h3 { font-size: 20px; margin-bottom: 8px; }
.cols p { margin: 0; color: var(--muted); }
.about-text { max-width: 40em; font-size: 18px; margin: 0 0 40px; }

.contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.contact div { min-width: 0; }
.label { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.contact .value { font-size: 18px; font-weight: 600; margin: 0; overflow-wrap: anywhere; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); }
.site-footer .wrap { padding-block: 40px; display: grid; grid-template-columns: 1fr; gap: 24px; }
.legal { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0; font-size: 14px; }
.legal dt { color: var(--muted); }
.legal dd { margin: 0; overflow-wrap: anywhere; }
.legal .id { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.footer-links { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer-links a { color: var(--muted); }
.copy { grid-column: 1 / -1; color: var(--muted); font-size: 13px; margin: 0; }

/* Legal pages */
.doc .wrap { padding-block: 32px 72px; }
.doc article { max-width: 46em; }
.doc h1 { font-size: clamp(32px, 5vw, 46px); margin-bottom: 8px; }
.doc .meta { color: var(--muted); margin: 0 0 32px; }
.doc h2 { font-size: 24px; margin: 40px 0 10px; }
.doc p, .doc li { color: var(--ink); }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 6px; }
.doc .note { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; padding-block: 24px 56px; }
  .logo-card { max-width: 260px; padding: 20px; }
  .games, .cols, .contact { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
}

.view-nav { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:28px; }
.view-nav a { font-size:14px; text-decoration:none; color:var(--muted); border:1px solid var(--line); border-radius:999px; padding:4px 12px; }
.view-nav a[aria-current="page"] { color:var(--accent-ink); background:var(--accent); border-color:var(--accent); }
