/* Shared stylesheet for every page of the website, in every language (the
   in-app promo cards under /promotions/ have their own). Pages differ only in
   their text, so everything visual lives here and each page just links it:

     <link rel="stylesheet" href="/assets/css/site.css">

   Look: black and white, heavy condensed uppercase headlines, full-bleed
   bands, square edges, black pill buttons. Colour comes from the app
   imagery, not from the chrome around it. */

/* ── Fonts ──
   Self-hosted rather than loaded from Google Fonts so no visitor data goes
   to a third party. Sofia Sans Extra Condensed (SIL OFL, see
   /assets/fonts/OFL.txt) covers Latin and Cyrillic, i.e. all five site
   languages; unicode-range makes a browser fetch only the subsets a page
   actually uses. */
@font-face {
  font-family: "Sofia Sans Extra Condensed";
  font-style: normal;
  font-weight: 1 1000;
  font-display: swap;
  src: url("/assets/fonts/sofia-sans-extra-condensed-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Sofia Sans Extra Condensed";
  font-style: normal;
  font-weight: 1 1000;
  font-display: swap;
  src: url("/assets/fonts/sofia-sans-extra-condensed-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Shown until the webfont arrives. A bold system sans scaled down to roughly
   the same width, so headlines wrap the same way before and after the swap
   instead of reflowing the page. */
@font-face {
  font-family: "Display Fallback";
  font-weight: 1 1000;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"), local("Helvetica-Bold"), local("Roboto Bold"), local("Roboto-Bold"), local("Liberation Sans Bold");
  size-adjust: 63%;
  ascent-override: 143%;
  descent-override: 48%;
  line-gap-override: 0%;
}

/* ── Tokens ── */
:root {
  --ink: #111111;
  --paper: #ffffff;
  --mist: #f5f5f5;
  --line: #e5e5e5;
  --muted: #707072;
  --on-dark-muted: #a7a7a9;
  --line-dark: #2e2e2e;

  --display: "Sofia Sans Extra Condensed", "Display Fallback", "Arial Narrow", sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --page: 1200px;
  --measure: 760px;
  --gutter: clamp(16px, 4vw, 40px);
  --space: clamp(64px, 9vw, 120px);

  /* Headline leading. Accented capitals (É, Ä, Ё, Й) rise to 0.86em and
     tails (Q, J, Ç, ¿, Д, Ц) drop to 0.19em, so languages that use them need
     a full 1.0 to keep stacked uppercase lines from touching. English has no
     accents and can sit tighter. */
  --leading-display: 1;

  color-scheme: light;
}

:root:lang(en) { --leading-display: 0.92; }

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

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

body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, iframe { max-width: 100%; }

::selection { background: var(--ink); color: var(--paper); }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Every band spans the full width and keeps its content on the page grid. */
.site-header,
.site-footer,
.hero,
.how-it-works,
.gameplay,
.features,
.social-proof,
.cta,
.content,
.screenshots,
.faq,
.guides,
.steps,
.note {
  --inset: max(var(--gutter), (100% - var(--page)) / 2);
  padding-inline: var(--inset);
}

/* Text-heavy sections share the page's left edge but stop at a comfortable
   reading width. */
.hero:not(.hero-home),
.content,
.faq,
.steps,
.note {
  padding-right: max(var(--inset), 100% - var(--inset) - var(--measure));
}

/* ── Display type ── */
h1,
.section-heading,
.content h2,
.eyebrow,
.flow-step span,
.feature h3,
.proof-stat strong,
.guide-card h3,
.step-number,
.step h3,
.site-header-brand,
.site-footer-brand,
.sticky-cta-copy strong {
  font-family: var(--display);
  font-weight: 900;
  font-synthesis: none;
  line-height: var(--leading-display);
  text-transform: uppercase;
  overflow-wrap: break-word;
}

h1,
.section-heading,
.content h2 { text-wrap: balance; }

h3 { text-wrap: pretty; }

/* German compounds ("Trainingsmöglichkeiten") are wider than a phone at
   headline sizes; let them hyphenate instead of overflowing. Other languages
   keep whole words. */
:lang(de) :is(h1, h2, h3) {
  -webkit-hyphens: auto;
  hyphens: auto;
  hyphenate-limit-chars: 12 5 5;
}

.section-heading {
  font-size: clamp(2.25rem, 1.4rem + 3.2vw, 4rem);
  margin-bottom: clamp(28px, 4vw, 48px);
  max-width: 18em;
}

.section-caption {
  max-width: 40em;
  margin-top: 32px;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.eyebrow {
  display: block;
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: 0.04em;
}

/* ── Buttons ── */
.button,
.sticky-store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 500 1rem/1 var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.button:hover,
.sticky-store:hover { background: #474747; }

.button-small,
.sticky-store {
  min-height: 36px;
  padding: 0 16px;
  font-size: 0.875rem;
}

/* Official store badges. */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.badge-link {
  display: block;
  border-radius: 8px;
  transition: opacity 0.2s ease;
}

.badge-link:hover { opacity: 0.75; }

.badge-link img {
  display: block;
  width: auto;
  height: 48px;
}

/* ── Header ── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.75rem;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.site-header-brand img {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.site-header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-header-link {
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-header-link:hover { color: var(--muted); }

/* The brand already links home; drop the duplicate before it crowds out
   the download button. */
@media (max-width: 440px) {
  .site-header-link { display: none; }
}

/* ── Hero ── */
.hero {
  --measure: 960px;
  padding-block: clamp(48px, 8vw, 104px);
  background: var(--ink);
  color: var(--paper);
}

.hero ::selection { background: var(--paper); color: var(--ink); }

.hero h1 {
  font-size: clamp(2.75rem, 1.5rem + 5vw, 5.5rem);
  margin-bottom: 24px;
}

.hero p {
  max-width: 34em;
  margin-bottom: 32px;
  color: var(--on-dark-muted);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.55;
}

.hero .badges { margin-top: 8px; }

.hero > :last-child { margin-bottom: 0; }

.hero .eyebrow { margin-bottom: 20px; }

.hero .breadcrumb {
  margin-bottom: 28px;
  font-size: 0.875rem;
}

.hero .breadcrumb a {
  color: var(--paper);
  text-decoration: none;
}

.hero .breadcrumb a:hover { text-decoration: underline; }

/* Home page: copy beside the product shot, which sits on the band's bottom
   edge (the phone is cropped at the bottom of the image). */
.hero-home {
  padding-bottom: 0;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  gap: 40px;
}

.hero-home h1 {
  font-size: clamp(3rem, 1.2rem + 5.2vw, 5.5rem);
  margin-bottom: 0;
}

/* Cyrillic capitals run wider; this keeps the highlighted phrase on one
   line from phone to desktop. */
.hero-home h1:lang(ru) { font-size: clamp(2.75rem, 1.1rem + 4.7vw, 5rem); }

/* The phrase the headline turns on, set as a white label on its own line.
   A block rather than an inline highlight: an inline background would paint
   over the tails of the line above, and the top padding has to reach past
   accented capitals or their marks would vanish into the black band. */
.hero-home h1 span {
  display: table;
  margin-top: 0.06em;
  padding: 0.1em 0.12em 0.02em;
  background: var(--paper);
  color: var(--ink);
}

.hero-content .eyebrow { margin-bottom: 20px; }

.hero-copy { margin: 24px 0 32px; }

.hero-copy p { margin: 0; }

.hero-copy .hero-support {
  margin-top: 8px;
  font-size: 1rem;
}

.hero-visual {
  justify-self: center;
  width: 100%;
  max-width: 440px;
}

.hero-visual-frame { aspect-ratio: 1320 / 1300; }

.hero-visual-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: end;
    gap: 56px;
  }

  .hero-content { padding-bottom: clamp(56px, 7vw, 104px); }

  .hero-visual {
    justify-self: end;
    max-width: 560px;
  }
}

/* ── How it works ── */
.how-it-works { padding-top: var(--space); }

.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 24px;
  counter-reset: flow;
}

.flow-step {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 20px;
  border-top: 2px solid var(--ink);
  counter-increment: flow;
}

.flow-step::before {
  content: counter(flow, decimal-leading-zero);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1;
  color: var(--muted);
}

.flow-icon {
  width: 40px;
  height: 40px;
}

.flow-step span { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }

@media (max-width: 640px) {
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Gameplay video ── */
.gameplay { padding-top: var(--space); }

.video-facade {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--ink);
  cursor: pointer;
}

.video-facade img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.3s ease, transform 0.6s ease;
}

.video-facade:hover img {
  opacity: 1;
  transform: scale(1.02);
}

.video-facade .play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  border-radius: 50%;
  background: var(--paper);
  transition: transform 0.2s ease;
}

.video-facade .play-btn::before {
  content: "";
  margin-left: 5px;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent var(--ink);
}

.video-facade:hover .play-btn { transform: scale(1.06); }

.video-facade iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Key benefits ── */
.features { padding-block: var(--space); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 24px;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 24px;
  border-top: 2px solid var(--ink);
}

.feature-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
}

.feature h3 { font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem); }

.feature p {
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .features-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ── Social proof (hidden until real numbers exist) ── */
.social-proof { padding-top: var(--space); }

.social-proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.proof-stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 2px solid var(--ink);
}

.proof-stat strong { font-size: 3.5rem; }

.proof-stat span { color: var(--muted); }

.testimonial {
  max-width: 40em;
  font-size: 1.25rem;
  line-height: 1.5;
}

.testimonial cite {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9375rem;
  font-style: normal;
}

/* ── Download band ── */
.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding-block: clamp(88px, 12vw, 168px);
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("/assets/backgrounds/banner-background-3.webp") 72% center / cover no-repeat;
  filter: grayscale(1) contrast(1.15) brightness(0.5);
}

.cta ::selection { background: var(--paper); color: var(--ink); }

.cta .section-heading {
  max-width: 11em;
  margin: 0;
  font-size: clamp(3rem, 1.5rem + 5.5vw, 6.5rem);
}

.cta-subtext {
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.375rem);
  line-height: 1.4;
}

.cta .badges {
  justify-content: center;
  margin-top: 16px;
}

/* ── Article ── */
.content { padding-block: var(--space); }

.content h2 {
  font-size: clamp(1.875rem, 1.3rem + 2vw, 2.75rem);
  margin: 64px 0 20px;
}

.content .section-heading {
  font-size: clamp(2.25rem, 1.4rem + 3.2vw, 4rem);
  margin: 0 0 32px;
}

.content h2:first-child { margin-top: 0; }

.content h3 {
  margin: 36px 0 10px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.content p,
.content ul,
.content ol {
  margin-bottom: 20px;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.content ul,
.content ol { padding-left: 1.25em; }

.content ul { list-style: square; }

.content li {
  margin-bottom: 8px;
  padding-left: 0.25em;
}

.content li::marker { color: var(--ink); }

.content ol li::marker { font-weight: 700; }

.content strong { font-weight: 700; }

.content a,
.step p a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.content a:hover,
.step p a:hover { color: var(--muted); }

.content .disclaimer {
  color: var(--muted);
  font-size: 0.875rem;
  font-style: italic;
  line-height: 1.6;
}

/* App tie-in inside an article. */
.callout {
  margin-top: 48px;
  padding: clamp(24px, 4vw, 40px);
  background: var(--mist);
}

.callout p { margin-bottom: 24px; }

.callout .badge-link img { height: 40px; }

/* ── Screenshots: a swipeable row ── */
.screenshots {
  padding-block: var(--space);
  background: var(--mist);
}

.screenshots-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(270px, 60vw);
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

/* Below the page width the band's inset is just the gutter, so the row can
   run to the screen edges and still start in line with the heading. */
@media (max-width: 1280px) {
  .screenshots-grid {
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
  }
}

.screenshot-item {
  aspect-ratio: 1320 / 2868;
  overflow: hidden;
  background: var(--ink);
  scroll-snap-align: start;
}

.screenshot-item img,
.screenshot-item iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

/* ── FAQ ── */
.faq { padding-block: var(--space); }

.faq-item {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.faq-item:last-child { border-bottom: 1px solid var(--line); }

.faq-item h3 {
  margin-bottom: 8px;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.35;
}

.faq-item p {
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* ── Guide links ── */
.guides {
  padding-block: var(--space);
  background: var(--mist);
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.guide-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  padding: 28px 28px 84px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.guide-card h3 { font-size: clamp(1.75rem, 1.4rem + 0.8vw, 2.125rem); }

.guide-card p {
  color: var(--muted);
  line-height: 1.5;
  transition: color 0.2s ease;
}

.guide-card::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: 28px;
  width: 28px;
  height: 28px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h18M14 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h18M14 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: translate 0.2s ease;
}

.guide-card:hover {
  background: var(--ink);
  color: var(--paper);
}

.guide-card:hover p { color: var(--on-dark-muted); }

.guide-card:hover::after { translate: 6px 0; }

@media (max-width: 900px) {
  .guides-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .guides-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .guide-card {
    min-height: 0;
    padding: 20px 64px 20px 20px;
    gap: 6px;
  }

  .guide-card::after {
    top: calc(50% - 12px);
    right: 20px;
    bottom: auto;
    left: auto;
    width: 24px;
    height: 24px;
  }
}

/* ── Giveaway steps ── */
.steps { padding-block: var(--space) 32px; }

.step {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.step:last-child { border-bottom: 1px solid var(--line); }

.step-number { font-size: 3.25rem; }

.step h3 {
  margin-bottom: 8px;
  font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem);
}

.step p {
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.note {
  padding-bottom: var(--space);
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ── Footer ── */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 40px;
  border-top: 1px solid var(--line-dark);
  background: var(--ink);
  color: var(--on-dark-muted);
  font-size: 0.875rem;
}

.site-footer-brand {
  color: var(--paper);
  font-size: 2rem;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.site-footer-credit {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer-credit:hover { color: var(--paper); }

/* ── Sticky download bar (phones, home page) ── */
.sticky-cta {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  transition: transform 0.25s ease;
}

.sticky-cta.is-hidden { transform: translateY(100%); }

.sticky-cta-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sticky-cta-brand img {
  display: block;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 9px;
}

.sticky-cta-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.sticky-cta-copy strong {
  font-size: 1.375rem;
  white-space: nowrap;
}

.sticky-cta-copy span {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.2;
}

.sticky-cta-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
}

@media (max-width: 767px) {
  .sticky-cta { display: flex; }
  body:has(> .sticky-cta) { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}
