/* Marketing-page components (landing + product pages). Loaded after
   tokens.css and app.css, which provide the body base, .wrap, .topbar,
   .brand, .btn, focus rules, and dark mode. */

/* --- Hero ------------------------------------------------------------- */

.hero {
  margin-top: var(--sp-7);
  max-width: 640px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hero-tagline {
  margin: var(--sp-3) 0 0;
  font-size: var(--fs-lg);
  color: var(--text-muted);
}

.hero .card-badge { margin-bottom: var(--sp-3); }

/* --- Product grid (landing) ------------------------------------------- */

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--text);
  transition: background 120ms ease, transform 120ms ease,
              box-shadow 120ms ease;
}

.product-card:hover {
  background: var(--surface-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}

/* Name first, badge tucked top-right — the product name is scanned before
   its status. */
.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-2);
}

/* The name keeps at least ~2/3 of the row; when the badge can't fit in
   the rest it wraps below instead of strangling the name's line length. */
.card-head .card-name { flex: 1 1 auto; min-width: 65%; }

.card-head .card-badge { flex: none; }

/* The one live product visually outranks the coming-soon cards. */
.product-card.live { border-color: var(--ok); }

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.card-badge.green { background: var(--ok-tint); color: var(--ok-text); }
.card-badge.dev { background: var(--warn-tint); color: var(--warn-text); }

.card-name {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.card-desc {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  flex-grow: 1;
}

/* CTAs are full-width buttons, not inline links — comfortable thumb
   targets on phones, pinned to the card bottom so rows line up. */
.card-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}

.card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--accent);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease;
}

.card-cta:hover { border-color: var(--accent); }

.card-cta.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.card-cta.primary:hover {
  background: color-mix(in srgb, var(--accent) 85%, #000);
}

/* --- Product page sections -------------------------------------------- */

.site-section { margin-top: var(--sp-6); }

.site-section h2 {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-xl);
  font-weight: 650;
  letter-spacing: -0.01em;
}

/* Hero notice for products that are not released yet (bounty-preflop). */
.dev-note {
  margin: var(--sp-4) 0 0;
  padding: var(--sp-3) var(--sp-4);
  background: var(--warn-tint);
  border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  color: var(--text);
}

.features {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  font-size: var(--fs-md);
}

.features li {
  display: flex;
  gap: var(--sp-2);
}

.features li::before {
  content: "✓";
  color: var(--ok-text);
  font-weight: 700;
  flex: none;
}

/* End-of-page "If you're interested, email …" line on product pages. */
.contact-note {
  margin: var(--sp-6) 0 0;
  font-size: var(--fs-md);
}

/* The page's one explicit ask: invitation text + the visible address. */
.email-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3) var(--sp-5);
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.email-cta p {
  margin: 0;
  font-size: var(--fs-md);
}

.email-cta-text {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.built-by {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* The contact CTA shows the address itself — mailto: opens nothing on
   machines without a mail client, so the address must be readable and
   copyable even when clicking does nothing. */
.email-address {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--sp-2) var(--sp-4);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--accent);
  font-size: var(--fs-md);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.email-address:hover { border-color: var(--accent); }

/* Non-link explainer cards — one per side game on the squid page. */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-4);
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.game-card h3 {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.game-zh {
  margin-left: var(--sp-1);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-faint);
}

.game-card p {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.section-note {
  margin: var(--sp-4) 0 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* Feature sections with one full-width screenshot each (bounty-postflop). */
.feature-intro {
  margin: 0 0 var(--sp-4);
  max-width: 70ch;
  font-size: var(--fs-md);
  color: var(--text-muted);
}

/* A standalone .shot is a full-width figure under its feature section. */
.shot { margin: 0; }

/* Dense solver screenshots are unreadable squeezed into the 960px text
   column; .shot.wide breaks the figure out of the column — up to the
   image's natural size, centered on the page, one per row. */
.shot.wide {
  width: min(1360px, calc(100vw - 2 * var(--sp-5)));
  margin-left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.shot.wide img { margin-inline: auto; }

.shot img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
}

.shot figcaption {
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* Inside .shots, tab screenshots of differing natural heights are capped
   at one shared height (width follows the aspect ratio) — two shots side
   by side read as a matched pair instead of one tall and one short. */
.shots {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
  align-items: flex-start;
}

.shots .shot {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
}

.shots .shot img {
  max-height: 600px;
  width: auto;
}

.shots .shot figcaption {
  margin-top: 0;
  max-width: 400px;
  text-align: center;
}

.shot-placeholder {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text-faint);
  font-size: var(--fs-sm);
}

.requirements {
  margin: var(--sp-6) 0 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* --- Telegram alerts promo (dashboard page) ---------------------------- */

.promo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-5) var(--sp-6);
  margin-top: var(--sp-7);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.promo-body {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.promo-body h2 {
  margin: 0;
  font-size: var(--fs-xl);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.promo-body p {
  margin: 0;
  font-size: var(--fs-md);
  color: var(--text-muted);
}

.promo-shot {
  margin: 0;
  flex: none;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}

.promo-shot img {
  max-height: 460px;
  width: auto;
  max-width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
}

.promo-contact {
  margin: 0;
  font-size: var(--fs-md);
  color: var(--text-muted);
}

.promo-shot figcaption {
  max-width: 280px;
  font-size: var(--fs-xs);
  color: var(--text-faint);
  text-align: center;
}

/* --- Footer ------------------------------------------------------------ */

.site-footer {
  margin-top: var(--sp-7);
  padding: var(--sp-5) 0;
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.site-footer p { margin: 0 0 var(--sp-1); }
