/* ==========================================================================
   Cromix — Desafio das Cores
   Estilos do site (index.html + politica-privacidade.html).
   A paleta e as formas vêm do tema do app: src/theme/theme.ts
   ========================================================================== */

/* --------------------------------------------------------------- Tokens -- */
:root {
  color-scheme: dark;

  /* Paleta do app */
  --yellow: #ffd93d;
  --yellow-dark: #f5a623;
  --blue: #4d96ff;
  --blue-dark: #1565c0;
  --green: #6bcb77;
  --green-dark: #2e7d32;
  --pink: #ff6b9d;
  --purple: #c77dff;
  --orange: #ff9a3c;
  --red: #ff4757;
  --gold: #ffd700;

  /* Fundo e superfícies */
  --bg-top: #0f172a;
  --bg-mid: #16213e;
  --bg-bottom: #0f3460;
  --surface: #1c2846;
  --surface-2: #243257;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.26);

  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.74);
  --text-dim: rgba(255, 255, 255, 0.52);

  --radius: 20px;
  --radius-lg: 32px;
  --radius-pill: 999px;

  --font-display: "Baloo 2", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

  --shadow-drop: 0 6px 0 rgba(0, 0, 0, 0.38);
  --shadow-soft: 0 20px 45px rgba(0, 0, 0, 0.45);
  --wrap: 1120px;

  /* Triângulo do Play usado como máscara no selo do Google Play */
  --play-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' d='M6.4 2.6 20.2 11.4a.9.9 0 0 1 0 1.2L6.4 21.4A1.2 1.2 0 0 1 4.6 20.4V3.6a1.2 1.2 0 0 1 1.8-1z'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-top);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Fundo do app: círculos coloridos sobrepostos */
body::before {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: -1;
  background:
    radial-gradient(circle at 11% 4%, rgba(255, 217, 61, 0.2), transparent 30%),
    radial-gradient(circle at 91% 13%, rgba(199, 125, 255, 0.22), transparent 28%),
    radial-gradient(circle at 51% 25%, rgba(107, 203, 119, 0.14), transparent 24%),
    radial-gradient(circle at 25% 51%, rgba(255, 107, 157, 0.16), transparent 26%),
    radial-gradient(circle at 89% 58%, rgba(77, 150, 255, 0.2), transparent 28%),
    radial-gradient(circle at 43% 85%, rgba(255, 154, 60, 0.16), transparent 26%),
    radial-gradient(circle at 7% 96%, rgba(77, 150, 255, 0.16), transparent 24%),
    linear-gradient(160deg, var(--bg-top) 0%, var(--bg-mid) 46%, var(--bg-bottom) 100%);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue);
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(var(--wrap), 100% - 2.5rem);
  margin-inline: auto;
}

/* ------------------------------------------------------------- Tipografia - */
h1,
h2,
h3,
.brand-name,
.btn,
.step-num {
  font-family: var(--font-display);
  line-height: 1.1;
}

h1 {
  margin: 0.6rem 0 0;
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

h1 span {
  display: block;
  font-size: clamp(1.15rem, 3.6vw, 1.9rem);
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: 0.02em;
  margin-top: 0.35rem;
}

h2 {
  margin: 0.35rem 0 0.7rem;
  font-size: clamp(1.7rem, 4.4vw, 2.5rem);
  font-weight: 800;
}

h3 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
}

.lead {
  font-size: clamp(1.02rem, 2.4vw, 1.2rem);
  color: var(--text-soft);
  max-width: 46ch;
}

.kicker {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--yellow);
}

.section-head {
  max-width: 62ch;
  margin-bottom: clamp(24px, 4vw, 44px);
}

.section-head p {
  color: var(--text-soft);
  margin: 0;
}

/* --------------------------------------------------------------- Topbar --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 22%;
  border: 2px solid var(--line-strong);
}

.brand-name {
  display: flex;
  flex-direction: column;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.05;
}

.brand-name small {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
}

.topnav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.topnav a {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}

.topnav a:hover {
  color: var(--text);
}

/* --------------------------------------------------------------- Botões --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.85rem 1.7rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  text-align: center;
  text-decoration: none;
  border: 3px solid transparent;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-drop);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.38);
}

.btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.38);
}

.btn-green {
  background: var(--green);
  border-color: var(--green-dark);
}

.btn-blue {
  background: #1d4ed8;
  border-color: var(--blue-dark);
}

.btn-ghost {
  background: #334155;
  border-color: #616161;
}

.btn-lg {
  padding: 1.05rem 2.1rem;
  font-size: clamp(1.05rem, 3vw, 1.3rem);
}

.btn-sm {
  padding: 0.55rem 1.15rem;
  font-size: 0.95rem;
  border-width: 2px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}

.btn-block {
  width: 100%;
}

/* --------------------------------------------------------------- Cards ---- */
.card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 3px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

/* --------------------------------------------------------------- Seções --- */
.section {
  padding: clamp(40px, 7vw, 80px) 0;
}

section[id],
.doc[id] {
  scroll-margin-top: 96px;
}

/* --------------------------------------------------------------- Hero ----- */
.hero {
  padding: clamp(32px, 6vw, 64px) 0 clamp(20px, 3vw, 36px);
}

.hero-inner {
  display: grid;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}

.hero-art img {
  display: block;
  width: 100%;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

@media (min-width: 940px) {
  .hero-inner {
    grid-template-columns: 1fr 1.05fr;
  }
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0.4rem 1rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yellow);
  background: rgba(0, 0, 0, 0.28);
  border: 2px solid rgba(255, 217, 61, 0.45);
  border-radius: var(--radius-pill);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 1.8rem;
}

/* ------------------------------------------------ Selo do Google Play ---- */
.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0.6rem 1.4rem 0.6rem 1.15rem;
  color: #fff;
  text-decoration: none;
  background: #0a0d16;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-radius: 16px;
  box-shadow: var(--shadow-drop);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.btn-play:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.38);
}

.btn-play:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.38);
}

.btn-play-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  background: linear-gradient(150deg, #00c3ff 0%, #6bcb77 42%, #ffd93d 68%, #ff4757 100%);
  -webkit-mask: var(--play-glyph) center / contain no-repeat;
  mask: var(--play-glyph) center / contain no-repeat;
}

.btn-play-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

.btn-play-text small {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.btn-play-text strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
}

.highlights li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-soft);
}

.highlights li::before {
  content: "✔";
  color: var(--green);
  font-size: 0.95rem;
}

/* --------------------------------------------------------------- Passos --- */
.steps {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.step {
  padding: 28px 24px;
}

.step-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #1a1a2e;
  border: 3px solid rgba(0, 0, 0, 0.25);
  border-radius: 50%;
}

.step:nth-child(1) .step-num {
  background: var(--yellow);
}

.step:nth-child(2) .step-num {
  background: var(--blue);
}

.step:nth-child(3) .step-num {
  background: var(--green);
}

.step p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.97rem;
}

/* --------------------------------------------------------------- Feature -- */
.feature {
  display: grid;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  margin-top: clamp(40px, 6vw, 76px);
}

.feature:first-of-type {
  margin-top: 0;
}

/* ------------------------------------------------- Moldura de celular ----- */
/* As capturas são telas de celular (1220x2712) já com a barra de status do
   Android. Aqui elas ganham um corpo de aparelho: bezel metálico, cantos
   arredondados, botões laterais e sombra. O componente é o mesmo na captura
   grande do "Como jogar" e nas miniaturas da galeria — só o tamanho muda,
   pelas variáveis abaixo. */
.phone {
  --phone-pad: 11px; /* espessura do bezel */
  --phone-radius: 48px; /* raio externo do aparelho */
  --phone-metal: linear-gradient(
    150deg,
    #7b8296 0%,
    #2f3446 16%,
    #0c0e14 50%,
    #2b3144 84%,
    #5c6479 100%
  );

  position: relative;
  display: block;
  padding: var(--phone-pad);
  border-radius: var(--phone-radius);
  background: var(--phone-metal);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 0 2px rgba(0, 0, 0, 0.75),
    0 26px 48px -16px rgba(0, 0, 0, 0.8);
}

/* Botões laterais */
.phone::before,
.phone::after {
  content: "";
  position: absolute;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #7b8296, #1a1d27);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55);
}

/* Volume: dois botões com um vão no meio */
.phone::before {
  left: -3px;
  top: 14%;
  height: 15%;
  background:
    linear-gradient(180deg, #7b8296, #1a1d27) top / 100% 42% no-repeat,
    linear-gradient(180deg, #7b8296, #1a1d27) bottom / 100% 42% no-repeat;
}

/* Liga/desliga */
.phone::after {
  right: -3px;
  top: 25%;
  height: 9%;
}

/* A tela dentro do aparelho. O `cover` com um pequeno corte embaixo tira a
   barra de navegação do Android que vem na captura, sem mexer no arquivo
   original: a proporção fica a de uma tela de celular. As capturas são
   1220x2712 e a barra começa sempre na linha 2570 — daí o 1220/2560. */
.phone > img {
  display: block;
  width: 100%;
  object-fit: cover;
  object-position: top center;
  border: 0;
  border-radius: calc(var(--phone-radius) - var(--phone-pad));
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.85); /* fresta entre o vidro e o bezel */
}

/* As capturas de tela são de celular (1220x2712): sem um limite elas viram
   uma parede gigante quando o card ocupa a coluna inteira no desktop. */
.feature-media {
  max-width: 340px;
  margin-inline: auto;
}

.feature-body p {
  color: var(--text-soft);
}

@media (min-width: 900px) {
  .feature {
    grid-template-columns: 1fr 1fr;
  }

  .feature--flip .feature-media {
    order: -1;
  }
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.8rem;
  margin-bottom: 0.8rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  border: 2px solid;
}

.tag-yellow {
  color: var(--yellow);
  border-color: rgba(255, 217, 61, 0.5);
  background: rgba(255, 217, 61, 0.12);
}

.tag-blue {
  color: var(--blue);
  border-color: rgba(77, 150, 255, 0.5);
  background: rgba(77, 150, 255, 0.12);
}

.tag-gold {
  color: var(--gold);
  border-color: rgba(255, 215, 0, 0.5);
  background: rgba(255, 215, 0, 0.12);
}

/* --------------------------------------------------------------- Modos ---- */
.modes {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.mode {
  padding: 28px 24px;
  border-top-width: 8px;
}

.mode--daily {
  border-top-color: var(--green);
}

.mode--story {
  border-top-color: var(--blue);
}

.mode--ranking {
  border-top-color: var(--gold);
}

.mode-icon {
  font-size: 2rem;
  line-height: 1;
  display: block;
  margin-bottom: 10px;
}

.mode p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.97rem;
}

/* --------------------------------------------------------------- Galeria -- */
.gallery {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 200px));
  justify-content: center;
}

.shot {
  margin: 0;
}

/* Miniaturas: mesmo aparelho, em escala menor */
.shot .phone {
  --phone-pad: 7px;
  --phone-radius: 30px;
}

.shot .phone::before,
.shot .phone::after {
  width: 2px;
}

.shot figcaption {
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dim);
  text-align: center;
}

@media (max-width: 640px) {
  .gallery {
    grid-auto-flow: column;
    grid-auto-columns: 62%;
    grid-template-columns: none;
    justify-content: start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
  }

  .shot {
    scroll-snap-align: center;
  }
}

/* --------------------------------------------------------------- CTA ----- */
.cta-box {
  padding: clamp(32px, 5vw, 56px);
  text-align: center;
}

.cta-box h2 {
  margin-top: 0;
}

.cta-box p {
  color: var(--text-soft);
  max-width: 52ch;
  margin-inline: auto;
}

.cta-box .cta-row {
  justify-content: center;
  margin-top: 1.6rem;
}

/* --------------------------------------------------------------- Rodapé --- */
.site-footer {
  margin-top: clamp(40px, 7vw, 80px);
  padding: 40px 0 32px;
  border-top: 2px solid var(--line);
  background: rgba(15, 23, 42, 0.6);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: 22%;
  border: 2px solid var(--line-strong);
}

.footer-brand p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
}

.footer-brand span {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.copyright {
  width: min(var(--wrap), 100% - 2.5rem);
  margin: 28px auto 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* --------------------------------------------------------------- Documento */
.doc {
  padding: clamp(28px, 5vw, 56px);
  margin: clamp(28px, 5vw, 56px) 0 0;
}

.doc-head {
  padding-bottom: 22px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--line);
}

.doc-head h1 {
  font-size: clamp(1.9rem, 5.5vw, 2.8rem);
  margin: 0.4rem 0 0.8rem;
}

.doc-head .lead {
  margin: 0;
  max-width: 60ch;
}

.prose {
  max-width: 78ch;
}

.prose h2 {
  font-size: clamp(1.15rem, 3vw, 1.35rem);
  color: var(--yellow);
  margin: 2.2rem 0 0.5rem;
}

.prose > h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--text-soft);
}

.prose ul {
  padding-left: 1.3rem;
  margin: 0 0 1rem;
}

.prose li {
  margin: 0.35rem 0;
}

.prose strong {
  color: var(--text);
}

.prose a {
  color: var(--blue);
  text-underline-offset: 3px;
}

.prose a:hover {
  color: #9ec5ff;
}

.doc-foot {
  margin-top: 2.5rem;
  padding-top: 22px;
  border-top: 2px solid var(--line);
}

/* --------------------------------------------------------------- Diversos - */
@media (max-width: 860px) {
  .topnav {
    display: none;
  }

  .topbar-inner {
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
