:root {
  --bg: #ffffff;
  --fg: #001150;          /* InnoQA deep blue */
  --muted: #5a6172;
  --accent: #001150;      /* deep blue */
  --accent-dark: #000a2e;
  --cream: #eeeadd;       /* InnoQA cream accent */
  --card: #f7f7f7;
  --border: #e6e6ee;
  --maxw: 1040px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.brand img { height: 30px; width: auto; display: block; }
.nav a {
  margin-left: 22px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav a:hover { color: var(--fg); }

/* Hero */
.hero {
  padding: 110px 0 96px;
  text-align: center;
  background: var(--accent);            /* dark blue band */
  color: #fff;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 900;
  color: #fff;
}

/* Sections */
section { padding: 64px 0; }
.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
}

/* Games grid */
.games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.game-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.app-icon {
  width: 84px; height: 84px;
  border-radius: 20px;
  background: linear-gradient(135deg, #2a3d80, var(--accent-dark));
  display: grid; place-items: center;
  color: #fff; font-weight: 900; font-size: 1.4rem;
  box-shadow: 0 6px 18px rgba(0, 17, 80, 0.25);
  overflow: hidden;
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-icon.icon-plain { background: #0a0a0f; }
.app-icon.icon-plain img { object-fit: contain; padding: 10px; }
/* Icons that already carry their own tile shape + background */
.app-icon.icon-bare { background: none; box-shadow: none; }
.app-icon.icon-bare img { object-fit: contain; padding: 0; }
/* Reserve two lines so titles/body align across cards regardless of wrapping */
.game-card h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.25;
  min-height: calc(2 * 1.25em);
}
.game-card p { margin: 0; color: var(--muted); }
/* Push the button row to the card bottom so all rows align */
.game-card .btn-row { margin-top: auto; }

/* Store / action buttons under each game box */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 0.95rem;
  transition: transform 0.1s ease, background 0.2s ease;
}
.store-btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.store-btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.store-btn.ghost:hover { background: rgba(0, 17, 80, 0.06); transform: none; }
.store-btn.disabled {
  background: #e6e6ee;
  color: #9a9aa8;
  cursor: not-allowed;
  font-weight: 600;
}
.store-btn.disabled:hover { background: #e6e6ee; transform: none; }

/* Document pages (Support, Privacy) */
/* Back link on sub-pages */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 24px;
  transition: color 0.2s ease;
}
.back-link:hover { color: var(--accent); }
.back-link::before { content: "\2190"; font-size: 1.1em; line-height: 1; }

.doc { max-width: 760px; margin: 0 auto; padding: 56px 20px 80px; }
.doc h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin: 0 0 24px; font-weight: 900; letter-spacing: -0.02em; }
.doc h2 { font-size: 1.4rem; margin: 40px 0 12px; font-weight: 800; }
.doc h3 { font-size: 1.1rem; margin: 26px 0 6px; font-weight: 700; }
.doc p { margin: 10px 0; }
.doc ul { padding-left: 22px; margin: 10px 0; }
.doc li { margin: 5px 0; }
.doc a { color: var(--accent); font-weight: 600; word-break: break-word; }
.doc h2 { border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.doc .updated { color: var(--muted); font-size: 0.95rem; margin-bottom: 24px; }
.doc .note { background: var(--card); border-radius: 10px; padding: 12px 16px; font-size: 0.95rem; }
.doc code {
  background: var(--card);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Contact */
.contact { text-align: center; background: var(--card); border-top: 1px solid var(--border); }
.contact p { color: var(--muted); max-width: 520px; margin: 0 auto 20px; }
.contact-email {
  display: inline-block;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--accent);
}

/* Footer */
.site-footer {
  background: var(--accent);
  color: rgba(255, 255, 255, 0.75);
  padding: 40px 0;
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  justify-content: space-between;
}
.site-footer .foot-brand img { height: 34px; width: auto; display: block; margin-bottom: 8px; }
.site-footer a { color: #fff; font-weight: 600; }
.site-footer a:hover { text-decoration: underline; }
