/* Helper Software — shared site styles
   One stylesheet for the marketing site (root + BeatAI/freecell/dict).
   Visual language follows frontend (statdataviewer.com): #4182e4 primary,
   system fonts, 8px cards, white background.                                */

:root {
  color-scheme: light;

  --primary: #4182e4;
  --primary-hover: #1d4ed8;
  --accent: #00a4ca;

  --ink: #1e1e47;
  --ink-soft: #666;
  --ink-muted: #888;

  --paper: #ffffff;
  --paper-tint: #f8f9ff;
  --paper-gray: #f5f5f5;

  --border: #e5e7eb;
  --border-strong: #d1d5db;

  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.09);

  --font-display: "San Francisco", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  --font-body: "San Francisco", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  --font-mono: "SF Mono", "Consolas", "Liberation Mono", monospace;

  --radius: 8px;
  --radius-sm: 4px;
  --radius-pill: 999px;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
}
h1 strong, h2 strong, h3 strong { font-weight: 700; }

/* ---------------------------------------------------------------- layout */

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.page {
  max-width: 1140px;
  margin: 0 auto;
  padding: 56px 24px 72px;
}

/* ----------------------------------------------- full-bleed site header */

.site-header {
  background: var(--primary);
  color: #fff;
  padding: 18px 0;
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--font-display);
  letter-spacing: -0.005em;
  text-decoration: none;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.brand:hover { color: #fff; opacity: 0.85; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.site-nav a {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.site-nav a[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

/* ------------------------------------------------------------- tagline */

.tagline {
  margin: 0 auto;
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 560px;
  line-height: 1.55;
  font-weight: 300;
}

/* ---------------------------------------------------------- hero block */

.hero {
  display: grid;
  gap: 14px;
  text-align: center;
  justify-items: center;
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

.hero p,
.hero .tagline {
  margin: 0 auto;
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 640px;
  line-height: 1.55;
  font-weight: 300;
}

.hero .promo {
  margin: 0 auto;
  font-size: 0.95rem;
  color: var(--primary);
  font-weight: 600;
  max-width: 640px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-top: 6px;
}

.trust-bar span { display: inline-flex; align-items: center; gap: 6px; }

/* --------------------------------------------------------- cta buttons */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 4px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid var(--primary);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
  box-shadow: 0 4px 12px rgba(65, 130, 228, 0.25);
}

.cta-button.secondary {
  background: #fff;
  color: var(--primary);
}

.cta-button.secondary:hover {
  background: var(--paper-tint);
  color: var(--primary-hover);
}

/* -------------------------------------------------------- section labels */

.section + .section { margin-top: 48px; }

.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(30, 30, 71, 0.18), rgba(30, 30, 71, 0));
}

.list-section,
.content-section {
  display: grid;
  gap: 28px;
}

.list-section h2,
.content-section h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

/* --------------------------------------------------- product grid (home) */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.product-grid.solo { grid-template-columns: 1fr; }

.product-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 24px 26px 26px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  text-decoration: none;
  color: var(--ink);
  animation: float-in 640ms ease both;
  animation-delay: var(--delay, 0ms);
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

.product-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--border-strong);
}

.product-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

.product-card.feature { padding: 30px 32px 32px; }
.product-card.feature h2 { font-size: 1.65rem; }
.product-card.feature p { font-size: 1rem; max-width: 60ch; }

.product-card h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.product-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
  font-size: 0.95rem;
}

.product-card .arrow {
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 240ms ease, color 240ms ease;
}

.product-card:hover .arrow {
  gap: 10px;
  color: var(--primary-hover);
}

/* ---------------------------------------------- list / feature / content */

.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.list-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--card-shadow);
  display: grid;
  gap: 10px;
  animation: float-in 640ms ease both;
  animation-delay: var(--delay, 0ms);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.list-card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: var(--border-strong);
}

.list-card h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink);
}

.list-card p,
.list-card address {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
  font-style: normal;
  font-size: 0.92rem;
}

.list-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 0.92rem;
}

.list-card a:not(.tag-link) {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(65, 130, 228, 0.3);
}

.list-card a:not(.tag-link):hover {
  color: var(--primary-hover);
  border-bottom-color: var(--primary-hover);
}

.feature-card {
  background: var(--paper-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  box-shadow: var(--card-shadow);
  animation: float-in 640ms ease both;
  animation-delay: var(--delay, 0ms);
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.feature-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 0.92rem;
}

.content-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--card-shadow);
  animation: float-in 640ms ease both;
  animation-delay: var(--delay, 0ms);
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}

.content-card p {
  margin: 0 0 10px;
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 0.95rem;
}

.content-card p:last-child { margin-bottom: 0; }

.content-card ul {
  margin: 0 0 10px;
  padding-left: 20px;
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 0.95rem;
}

.content-card ul:last-child { margin-bottom: 0; }

.content-card a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(65, 130, 228, 0.3);
}

.content-card a:hover {
  color: var(--primary-hover);
  border-bottom-color: var(--primary-hover);
}

/* ------------------------------------------------------ format/code box */

.format {
  background: var(--paper-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--card-shadow);
  display: grid;
  gap: 12px;
}

.format code {
  display: block;
  background: #fff;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink);
  white-space: pre-line;
}

/* ----------------------------------------------------------- badges */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(65, 130, 228, 0.12);
  color: var(--primary);
  white-space: nowrap;
}

.product-card .badge,
.list-card .badge { justify-self: start; }

.badge-data  { background: rgba(65, 130, 228, 0.12); color: var(--primary); }
.badge-games { background: rgba(29, 78, 216, 0.10);  color: var(--primary-hover); }
.badge-cards { background: rgba(0, 164, 202, 0.12);  color: var(--accent); }
.badge-words { background: rgba(30, 30, 71, 0.08);   color: var(--ink); }

.badge-free  { background: rgba(0, 164, 202, 0.12);  color: var(--accent); }
.badge-pro   { background: rgba(29, 78, 216, 0.12);  color: var(--primary-hover); }
.badge-gold  { background: rgba(65, 130, 228, 0.14); color: var(--primary); }

/* ------------------------------------------------------- arrow link */

.arrow {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------------------------------------------------- dict tag link */

.tag-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--primary);
  text-decoration: none;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--paper-tint);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tag-link:hover {
  background: rgba(65, 130, 228, 0.10);
  border-color: var(--primary);
  color: var(--primary-hover);
}

.tag-link span {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  word-break: break-all;
}

/* ---------------------------------------------------- copy button */

.copy-button {
  justify-self: start;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink-soft);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.copy-button:hover {
  background: var(--paper-tint);
  color: var(--primary);
  border-color: var(--primary);
}

.copy-button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.copy-button[data-copied="true"] {
  background: rgba(65, 130, 228, 0.12);
  color: var(--primary);
  border-color: var(--primary);
}

/* ------------------------------------------------- full-bleed footer */

.site-footer {
  background: #2b2b40;
  color: #999;
  padding: 44px 0 36px;
  margin-top: 96px;
  font-size: 0.9rem;
}

.site-footer .container {
  text-align: center;
}

.site-footer p { margin: 0 0 12px; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  margin-top: 6px;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

.copyright {
  color: #999;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

/* ------------------------------------------------------- animations */

@keyframes float-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ----------------------------------------------------- responsive */

@media (max-width: 720px) {
  .container { padding: 0 18px; }
  .page { padding: 40px 18px 56px; }
  .site-header { padding: 14px 0; }
  .site-header .container { justify-content: center; }
  .site-nav { justify-content: center; }
  .product-card { padding: 22px 22px 24px; }
  .hero-meta { flex-direction: column; align-items: center; }
  .site-footer { margin-top: 64px; padding: 36px 0 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .product-card,
  .list-card,
  .feature-card,
  .content-card { animation: none; transition: none; }
  .product-card:hover,
  .list-card:hover { transform: none; }
  .site-nav a,
  .cta-button,
  .tag-link,
  .copy-button { transition: none; }
}
