/* maxim-puzzle.pages.dev — mobile-first link page. No external fonts, no frameworks. */

:root {
  --bg: #111217;
  --surface: #1b1c23;
  --text: #f5f1e8;
  --muted: #a7a39b;
  --line: rgba(245, 241, 232, 0.1);
  --yellow: #ffc21a;
  --green: #34d27b;

  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --gutter: 16px;
  --page-width: 460px;

  --font: ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --shadow-card: 0 18px 40px -18px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.25);

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  /* Graph-paper dots plus a warm glow behind the profile. */
  background-image:
    radial-gradient(ellipse 80% 40% at 50% -5%, rgba(255, 194, 26, 0.18), transparent 70%),
    radial-gradient(rgba(245, 241, 232, 0.07) 1px, transparent 1.5px);
  background-size: 100% 100%, 22px 22px;
  background-attachment: fixed, scroll;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Yellow disappears on the light app cards; use the card's own ink there. */
.card :focus-visible {
  outline-color: var(--app-ink, var(--yellow));
}

.page {
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top)) var(--gutter) calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- Profile ---------- */

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.avatar-stack {
  display: flex;
  margin-bottom: 6px;
}

.avatar-stack img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 3px solid var(--bg);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

.avatar-stack img:nth-child(1) {
  transform: rotate(-9deg) translate(10px, 4px);
}

.avatar-stack img:nth-child(2) {
  position: relative;
  z-index: 1;
  transform: translateY(-4px) scale(1.08);
}

.avatar-stack img:nth-child(3) {
  transform: rotate(9deg) translate(-10px, 4px);
}

.profile h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.bio {
  max-width: 34ch;
  color: var(--muted);
  font-size: 14.5px;
  text-wrap: balance;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 4px 0 0;
  list-style: none;
}

.socials a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  background: var(--surface);
}

/* ---------- Cards (shared) ---------- */

.card {
  background: var(--app-bg, var(--surface));
  color: var(--app-ink, var(--text));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.app-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-icon {
  flex: none;
  border-radius: 22.5%;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
}

.card h2,
.card h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.card h2 {
  font-size: 26px;
}

.card h3 {
  font-size: 20px;
}

.tagline {
  margin-top: 3px;
  font-weight: 700;
  font-size: 15px;
  opacity: 0.78;
}

.pitch {
  font-size: 15.5px;
}

/* ---------- Featured (live) card ---------- */

.featured {
  padding: 20px 18px 22px;
}

.card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.pill.live {
  background: var(--app-ink, #111);
  color: var(--app-bg, #fff);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(52, 210, 123, 0.7);
  animation: pulse 1.8s ease-out infinite;
}

.kicker {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.07);
  background: color-mix(in srgb, var(--app-ink) 9%, transparent);
}

/* ---------- Store buttons ----------
   Official badges in identical frames, side by side. The artwork covers its frame (Apple's
   badge is slightly narrower than Google's), so each loses at most a few pixels of its own
   black edge, and the frame draws the shared grey outline. The visitor's store comes first. */

.cta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cta[data-count='1'] {
  grid-template-columns: minmax(0, calc(50% - 5px));
  justify-content: center;
}

.store-btn {
  position: relative;
  display: block;
  aspect-ratio: 3.2;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.6);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease;
}

.store-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px #a6a6a6;
  pointer-events: none;
}

.store-btn:active {
  transform: scale(0.97);
}

html[data-platform='android'] .store-btn[data-store='appStore'] {
  order: 2;
}

/* A light sweep over the badges: animated links are the most-clicked on link pages. */
.store-btn::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-120%);
  animation: shine 3.6s ease-in-out 1.2s infinite;
  pointer-events: none;
}

.store-btn[data-store='playStore']::before {
  animation-delay: 1.5s;
}

@media (hover: hover) {
  .store-btn:hover {
    transform: translateY(-2px);
  }
}

/* ---------- Coming soon ---------- */

.soon {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-title::before,
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.compact {
  padding: 16px;
  gap: 12px;
  border-radius: var(--radius-lg);
}

.compact .pitch {
  font-size: 14.5px;
  opacity: 0.9;
}

.compact h2,
.compact h3 {
  font-size: 19px;
}

.soon-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  border: 2px dashed currentColor;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  opacity: 0.85;
}

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

/* ---------- Legal pages ---------- */

.legal {
  gap: 10px;
  max-width: 640px;
}

.legal h1 {
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.legal h2 {
  margin-top: 14px;
  font-size: 17px;
}

.legal p {
  color: #d9d4ca;
}

.legal .muted {
  color: var(--muted);
}

.legal a {
  color: var(--yellow);
}

.back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-weight: 700;
  text-decoration: none;
}

/* ---------- Motion ---------- */

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(52, 210, 123, 0.7);
  }
  70%,
  100% {
    box-shadow: 0 0 0 8px rgba(52, 210, 123, 0);
  }
}

@keyframes shine {
  0%,
  55% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(320%);
  }
}

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

/* App themes (generated from config.mjs) */
.app-iq-mogged{--app-bg:#F1E8D8;--app-ink:#2B2722;--app-accent:#E0961C}
.app-meowt{--app-bg:#FFD84D;--app-ink:#2A2342;--app-accent:#FF5050}
.app-how-big{--app-bg:#1D1E26;--app-ink:#F3EEE3;--app-accent:#FFC21A}
