/* SumSquare pages on invenity.games. Colours and the wordmark font come from the approved brand
   kit (apps/sumsquare/design/brand: tokens.json "suggested" dark tones, palette 48 "Super Hero",
   Lilita One). Lilita One lacks ğ ş İ: it is used only for the Latin wordmark and the title,
   everything else is the system font stack. Source: apps/site-sumsquare/_src/sumsquare.css
   (tools/build.mjs copies it to assets/sumsquare/). Nothing is loaded from other hosts (the site CSP). */
@font-face {
  font-family: "Lilita One";
  src: url("/assets/sumsquare/fonts/LilitaOne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #07144c;
  --surface: #0a1c6c;
  --raised: #102b88;
  --border: #2a4ab0;
  --text: #fff;
  --muted: #b8c4f0;
  --red: #ee1b37;
  --red-d: #b51235;
  --yellow: #ffee57;
  --yellow-d: #dc9f04;
  --cyan: #57e3ff;
  --ink: #3a0812;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-brand: "Lilita One", var(--font);
  --radius: 18px;
  --wrap: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(120% 60% at 50% 0%, var(--surface) 0%, var(--bg) 62%) fixed, var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font);
}
main {
  flex: 1 0 auto;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: var(--yellow);
  text-underline-offset: 3px;
}
a:hover {
  color: #fff;
}
:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}
h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
}
p {
  margin: 0 0 1rem;
}
code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.05em 0.35em;
  font-size: 0.92em;
}
.wrap {
  width: min(100% - 40px, var(--wrap));
  margin-inline: auto;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--yellow);
  color: var(--ink);
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

/* ---------- header / footer ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(7 20 76 / 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.top__in {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  margin-right: auto;
}
.brand__word {
  font: 400 1.5rem/1 var(--font-brand);
  letter-spacing: 0.04em;
}
.nav {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  display: inline-block;
  padding: 10px 12px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  border-radius: 10px;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: #fff;
  background: var(--raised);
}
.lang {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.lang a {
  min-width: 44px;
  padding: 10px 12px;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}
.lang a[aria-current="page"] {
  background: var(--yellow);
  color: var(--ink);
}
@media (max-width: 560px) {
  .nav__opt {
    display: none;
  }
  .brand__word {
    font-size: 1.25rem;
  }
}
.foot {
  margin-top: 64px;
  padding: 32px 0 40px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 0.9rem;
}
.foot__row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin-bottom: 16px;
}
.foot__row a,
.linkbtn {
  color: var(--text);
  padding: 8px 0;
}
.linkbtn {
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.foot__legal {
  max-width: 78ch;
  margin: 0;
}

/* ---------- buttons, badges ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 22px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--raised);
  color: #fff;
  font: 700 1rem var(--font);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover {
  background: #15379e;
  color: #fff;
}
.btn--primary {
  background: var(--red-d);
  border-color: var(--red);
  box-shadow: 0 4px 0 #7a0c24;
}
.btn--primary:hover {
  background: var(--red);
}
.stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.badge-google--en {
  margin: -10px -10px -10px -11px;
}
.badge-google--tr {
  margin: 0;
}
.soon {
  display: inline-block;
  margin: 0;
  padding: 10px 18px;
  border: 2px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
  font-weight: 600;
}

/* ---------- home ---------- */
.hero {
  padding: 48px 0 24px;
}
.hero__in {
  display: grid;
  gap: 32px;
  align-items: center;
}
.kicker {
  margin: 0 0 8px;
  color: var(--cyan);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.hero__title {
  font: 400 clamp(3rem, 11vw, 5.5rem) / 1 var(--font-brand);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--yellow);
  text-shadow: 0 4px 0 var(--yellow-d), 0 8px 0 var(--ink);
  margin-bottom: 24px;
}
.hero__slogan {
  font-size: clamp(1.4rem, 4.5vw, 2rem);
  font-weight: 800;
  margin-bottom: 12px;
}
.hero__lead {
  color: var(--muted);
  max-width: 56ch;
}
.hero__stores {
  margin-top: 24px;
}
.hero__shot {
  justify-self: center;
}
.hero__shot img {
  width: min(270px, 66vw);
  height: auto;
  border-radius: 12% / 5.7%; /* clips the square corners of the phone-frame JPEG */
  filter: drop-shadow(0 24px 40px rgb(0 0 0 / 0.45));
}
@media (min-width: 820px) {
  .hero {
    padding: 72px 0 40px;
  }
  .hero__in {
    grid-template-columns: 1.3fr 1fr;
  }
}
.band {
  padding: 56px 0;
}
.band--alt {
  background: rgb(10 28 108 / 0.55);
  border-block: 1px solid var(--border);
}
.band h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 28px;
}
.steps,
.feats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
  .feats {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 480px) and (max-width: 719px) {
  .feats {
    grid-template-columns: repeat(2, 1fr);
  }
}
.step,
.feat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.step h3,
.feat h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.step p,
.feat p {
  color: var(--muted);
  margin: 0;
}
.step__n {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--red) 0%, var(--red-d) 100%);
  border: 2px solid var(--ink);
  font: 400 1.5rem/1 var(--font-brand);
}
.shots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 820px) {
  .shots {
    grid-template-columns: repeat(4, 1fr);
  }
}
.shots__item img {
  width: 100%;
  max-width: 260px;
  margin-inline: auto;
  border-radius: 12% / 5.7%;
}
.note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}
.band--cta {
  text-align: center;
}
.cta p {
  color: var(--muted);
}
.cta .hero__stores {
  display: flex;
  justify-content: center;
}

/* ---------- documents: privacy, terms, support ---------- */
.doc {
  padding: 40px 0 0;
}
.doc__head h1 {
  font-size: clamp(2rem, 6vw, 3rem);
}
.doc__meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.doc__lead {
  margin: 16px 0 32px;
  max-width: 70ch;
  color: var(--muted);
  font-size: 1.15rem;
}
.doc__body {
  display: grid;
  gap: 28px;
}
@media (min-width: 900px) {
  .doc__body {
    grid-template-columns: 250px minmax(0, 1fr);
    align-items: start;
  }
  .toc {
    position: sticky;
    top: 88px;
  }
}
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.toc h2 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.toc ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
  font-size: 0.95rem;
}
.toc a {
  display: block;
  padding: 5px 0;
  color: var(--text);
  text-decoration: none;
}
.toc a:hover {
  color: var(--yellow);
  text-decoration: underline;
}
.prose {
  max-width: 76ch;
}
.prose--wide {
  max-width: 820px;
}
.prose section {
  margin-bottom: 36px;
}
.prose h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}
.prose ul {
  padding-left: 1.3em;
  margin: 0 0 1rem;
}
.prose li {
  margin-bottom: 0.5rem;
}
.faq {
  display: grid;
  gap: 12px;
}
.faq__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.faq__item summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 700;
  min-height: 48px;
  list-style-position: outside;
}
.faq__item[open] summary {
  color: var(--yellow);
}
.faq__a {
  padding: 0 20px 6px;
  color: var(--muted);
}
.faq__a strong,
.faq__a em {
  color: var(--text);
}

/* ---------- consent banner (hooks: assets/analytics.js) ---------- */
.consent {
  position: fixed;
  z-index: 40;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 460px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px 18px;
  box-shadow: 0 16px 48px rgb(0 0 0 / 0.5);
}
.consent[hidden] {
  display: none;
}
.consent h2 {
  font-size: 1.1rem;
  margin: 0 28px 8px 0;
}
.consent p {
  margin: 0 0 14px;
  font-size: 0.95rem;
  color: var(--muted);
}
.consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.consent__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
}
.consent__close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}
@media (forced-colors: active) {
  .btn,
  .step,
  .feat,
  .faq__item,
  .consent {
    border: 1px solid CanvasText;
  }
}
