/* Base styles for the arcade homepage (root index.html).
   Class names follow Grok's arcade theme (/grok/arcade-theme/theme.css, `arc-*`),
   so the theme can be layered on top of this file once Jason promotes it.
   This file stands alone: dark, readable, responsive, no external fonts. */

:root {
  --home-bg: #0f1022;
  --home-bg-2: #171936;
  --home-card: #1c1f40;
  --home-card-hover: #252a55;
  --home-border: #2e3366;
  --home-text: #f3f4ff;
  --home-muted: #a7acd6;
  --home-accent: #8b9bff;
  --home-accent-2: #ff70b8;
  --home-classic: #ffb547;
  --home-focus: #ffd166;
  --home-radius: 14px;
}

* { box-sizing: border-box; }

.arc {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 20% -10%, #2a1f5c 0%, transparent 60%), var(--home-bg);
  color: var(--home-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.45;
}

a { color: inherit; }
:focus-visible { outline: 3px solid var(--home-focus); outline-offset: 2px; }

.arc-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.arc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}
.arc-brand { font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: 0.02em; }
.arc-brand__mark {
  display: inline-block;
  width: 14px; height: 14px;
  margin-right: 8px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--home-accent-2), var(--home-accent));
  vertical-align: -1px;
}
.arc-header__nav { display: flex; gap: 4px; }
.arc-link {
  color: var(--home-muted);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.arc-link:hover { color: var(--home-text); background: var(--home-bg-2); }

.arc-wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px 48px; }

.arc-hero { padding: 24px 0 8px; }
.arc-hero__title { font-size: clamp(30px, 6vw, 52px); line-height: 1.05; margin: 0 0 10px; }
.arc-hero__title em { font-style: normal; color: var(--home-accent-2); }
.arc-hero__sub { margin: 0; color: var(--home-muted); font-size: 17px; max-width: 46em; }

.arc-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px 0;
  margin: 8px 0 4px;
}
.arc-search { flex: 1 1 240px; }
.arc-search__input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--home-border);
  background: var(--home-bg-2);
  color: var(--home-text);
  font: inherit;
}
.arc-search__input::placeholder { color: var(--home-muted); }

.arc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.arc-chip {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--home-border);
  background: transparent;
  color: var(--home-muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.arc-chip:hover { color: var(--home-text); }
.arc-chip[aria-pressed="true"] { background: var(--home-accent); border-color: var(--home-accent); color: #0d0f24; font-weight: 700; }

.arc-section { margin-top: 28px; }
.arc-section[hidden] { display: none; }
.arc-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.arc-section__title { margin: 0; font-size: 22px; }
.arc-section__count { color: var(--home-muted); font-size: 14px; }
.arc-section__note { margin: -4px 0 12px; color: var(--home-muted); font-size: 14px; }

.arc-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 14px;
}
.arc-cell { display: flex; flex-direction: column; min-width: 0; }
.arc-cell[hidden] { display: none; }

.arc-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--home-card);
  border: 1px solid var(--home-border);
  border-radius: var(--home-radius);
  overflow: hidden;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.arc-card:hover { background: var(--home-card-hover); border-color: var(--home-accent); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .arc-card, .arc-card:hover { transition: none; transform: none; } }

.arc-card__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #2b2f63, #1a1c3d);
  font-size: 52px;
  line-height: 1;
}
.arc-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.arc-card__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.arc-card__title { font-weight: 700; font-size: 17px; }
.arc-card__desc {
  color: var(--home-muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.arc-card__meta { display: flex; flex-wrap: wrap; gap: 6px; }

.arc-card__original {
  align-self: flex-start;
  margin-top: 4px;
  padding: 6px 4px;
  font-size: 13px;
  color: var(--home-muted);
}
.arc-card__original:hover { color: var(--home-text); }

.arc-tag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--home-muted);
}
.arc-tag--remaster { background: rgba(255, 112, 184, 0.18); color: #ffc2e1; }
.arc-tag--3d { background: rgba(110, 231, 255, 0.15); color: #b8f3ff; }
.arc-tag--classic { background: rgba(255, 181, 71, 0.16); color: #ffd79a; }

.arc-section--classic .arc-section__title { color: var(--home-classic); }
.arc-section--classic .arc-card:hover { border-color: var(--home-classic); }

.arc-empty { color: var(--home-muted); padding: 24px 0; }

.arc-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  color: var(--home-muted);
  font-size: 14px;
  border-top: 1px solid var(--home-border);
}

/* Phones: keep the header on one line. Below 640px, Grok's theme handles
   the toolbar and grid; these rules only cover the standalone base. */
.arc-brand { white-space: nowrap; }
@media (max-width: 640px) {
  .arc-header__nav .arc-link--wide { display: none; }
}
