/* GameIntel homepage (index.html) — v0.9.1 design system, Electric Azure accent.
   Shares tokens + top bar with css/styles.css. Green / amber / red are reserved for
   Can play / Not sure yet / Can't play. */
:root {
  --bg: #0b0c12;
  --bg-2: #0f1118;
  --surface: #13151f;
  --surface-2: #191c28;
  --line: #242838;
  --line-2: #2f3447;
  --text: #f1f2f7;
  --muted: #a3aabd;      /* 8.4:1 on --bg */
  --faint: #7d8499;      /* 5.2:1 on --bg */
  /* Electric Azure. --accent = fills/borders; accent TEXT uses --accent-hi (9.4:1 on --bg). */
  --accent: #4a90ff;
  --accent-rgb: 74, 144, 255;
  --accent-hi: #82b4ff;
  --accent-ink: #050b1c;   /* button text on --accent: 6.3:1 */
  --btn-hover: #82b4ff;    /* ink on hover: 9.2:1 */
  --link-hover: #b3d1ff;
  --grad-a: #a9cbff;
  --grad-b: #4a90ff;
  --accent-soft: rgba(var(--accent-rgb), 0.14);
  --accent-line: rgba(var(--accent-rgb), 0.45);
  --yes: #34d399;
  --unsure: #fbbf24;
  --no: #f87171;
  --radius: 16px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.ph {
  margin: 0;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(var(--accent-rgb), 0.22), transparent 62%),
    radial-gradient(700px 420px at 100% 10%, rgba(var(--accent-rgb), 0.08), transparent 60%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--accent-hi); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--accent-hi); outline-offset: 3px; border-radius: 8px; }
.ph-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ph-skip { position: absolute; left: -999px; top: 8px; z-index: 10; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 10px; font-weight: 700; }
.ph-skip:focus { left: 12px; }
main:focus { outline: none; }

.ph-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
@media (min-width: 760px) { .ph-wrap { padding-left: 40px; padding-right: 40px; } }


/* —— Top bar (shared with css/styles.css — keep in sync) —— */
.gi-top { border-bottom: 1px solid rgba(255, 255, 255, 0.06); background: rgba(11, 12, 18, 0.55); }
.gi-top-inner { max-width: 1200px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
@media (min-width: 760px) { .gi-top-inner { padding-left: 40px; padding-right: 40px; } }
.gi-brand { display: inline-flex; align-items: center; gap: 10px; color: #f1f2f7; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; border-radius: 10px; }
.gi-brand:hover { color: #f1f2f7; }
.gi-brand img { display: block; }
.gi-brand-accent { color: #82b4ff; }
.gi-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.gi-nav::-webkit-scrollbar { display: none; }
.gi-nav a { color: #a3aabd; text-decoration: none; font-size: 15px; font-weight: 600; padding: 9px 12px; border-radius: 10px; white-space: nowrap; }
.gi-nav a:hover { color: #f1f2f7; background: rgba(255, 255, 255, 0.05); }
.gi-nav a.active, .gi-nav a[aria-current="page"] { color: #f1f2f7; background: rgba(74, 144, 255, 0.14); box-shadow: inset 0 0 0 1px rgba(74, 144, 255, 0.35); }
.gi-nav a:focus-visible, .gi-brand:focus-visible { outline: 3px solid #82b4ff; outline-offset: 2px; }
@media (max-width: 640px) {
  .gi-top-inner { padding-top: 12px; padding-bottom: 6px; min-height: 0; row-gap: 6px; }
  .gi-nav { width: calc(100% + 20px); margin: 0 -10px; gap: 0; }
  .gi-nav a { font-size: 14.5px; padding: 8px 10px; }
}
@media (max-width: 420px) {
  .gi-nav a { font-size: 14px; padding: 8px 8px; }
}
/* —— end top bar —— */

/* Hero grid: copy | demo, then covers full width. Mobile: copy → covers → demo. */
.ph-hero { display: grid; gap: 28px; padding-top: 40px; }
.ph-hero-copy { min-width: 0; }
.ph-popular { min-width: 0; }
@media (max-width: 959px) {
  /* copy (minus search) → covers → search → demo */
  .ph-hero { display: flex; flex-direction: column; gap: 0; padding-top: 26px; }
  .ph-hero-copy { display: contents; }
  .ph-hero-copy > * { order: 1; }
  .ph-eyebrow { align-self: flex-start; }
  .ph-popular { order: 2; margin-top: 40px; }
  .ph-search { order: 3; margin-top: 30px !important; max-width: none; }
  .ph-demo { order: 4; margin-top: 28px; }
}
@media (min-width: 960px) {
  .ph-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    grid-template-areas: "copy demo" "pop pop";
    column-gap: 56px; row-gap: 56px; padding-top: 56px; align-items: center;
  }
  .ph-hero-copy { grid-area: copy; }
  .ph-demo { grid-area: demo; }
  .ph-popular { grid-area: pop; }
}

.ph-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 7px 14px 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); color: var(--muted); font-size: 14px; font-weight: 600; }
.ph-eyebrow #phCount { color: var(--text); }
.ph-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.22); }
.ph h1 { margin: 0; font-size: clamp(2.6rem, 6.4vw, 4.6rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 850; font-weight: 800; text-wrap: balance; }
.ph-accent-text { color: var(--accent-hi); background: linear-gradient(92deg, var(--grad-a), var(--grad-b) 70%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ph-sub { margin: 22px 0 0; max-width: 31em; text-wrap: pretty; color: var(--muted); font-size: clamp(1.06rem, 1.6vw, 1.22rem); line-height: 1.6; }
.ph-yes { color: var(--yes); font-weight: 700; white-space: nowrap; }
.ph-unsure { color: var(--unsure); font-weight: 700; white-space: nowrap; }
.ph-no { color: var(--no); font-weight: 700; white-space: nowrap; }

.ph-cta-row { display: flex; align-items: center; gap: 14px 26px; flex-wrap: wrap; margin-top: 32px; }
.ph-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 28px; border-radius: 14px; font-weight: 750; font-weight: 700; font-size: 18px; text-decoration: none; transition: transform 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease; }
.ph-btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -10px rgba(var(--accent-rgb), 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.ph-btn-primary:hover { background: var(--btn-hover); color: var(--accent-ink); transform: translateY(-1px); }
.ph-btn-primary:active { transform: translateY(0); }
.ph-cta-links { display: flex; gap: 6px 22px; flex-wrap: wrap; }
.ph-cta-links a { color: var(--text); font-weight: 600; font-size: 16px; text-decoration: none; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.ph-cta-links a:hover { border-color: var(--accent-hi); color: var(--accent-hi); }
@media (max-width: 559px) {
  .ph-cta-row { margin-top: 28px; gap: 16px; }
  .ph-btn { width: 100%; }
  .ph-cta-links { width: 100%; justify-content: center; gap: 6px 28px; }
  .ph-cta-links a { font-size: 15.5px; }
}

.ph-search { position: relative; display: flex; align-items: center; margin-top: 28px; max-width: 520px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; transition: border-color 0.12s ease, box-shadow 0.12s ease; }
.ph-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.2); }
.ph-search-ico { width: 20px; height: 20px; color: var(--faint); margin-left: 16px; flex: none; }
.ph-search input { flex: 1; min-width: 0; height: 52px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; padding: 0 12px; }
.ph-search input::placeholder { color: var(--faint); }
.ph-search input:focus { outline: none; }
.ph-search-btn { margin: 6px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.ph-search-btn:hover { border-color: var(--accent-line); }

/* Demo answer card */
.ph-demo { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: 22px; text-decoration: none; color: var(--text);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.10), rgba(var(--accent-rgb), 0.02) 46%), var(--surface);
  border: 1px solid var(--accent-line); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.02) inset; transition: transform 0.15s ease, border-color 0.15s ease; }
.ph-demo:hover { color: var(--text); transform: translateY(-2px); border-color: var(--accent-hi); }
.ph-demo-kicker { font-size: 12.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-hi); }
.ph-demo-group { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 15px; }
.ph-plat { padding: 5px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); font-weight: 650; font-weight: 600; font-size: 14px; }
.ph-plus { color: var(--faint); font-weight: 700; }
.ph-demo-party { padding-left: 4px; }
.ph-demo-big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 750; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
.ph-demo-big b { color: var(--yes); font-size: clamp(2.8rem, 4.6vw, 3.6rem); font-weight: 850; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.ph-bar { display: flex; gap: 3px; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.ph-bar > span { flex: 1 1 0; min-width: 6px; }
.ph-bar-yes { flex-grow: 104; background: var(--yes); }
.ph-bar-unsure { flex-grow: 21; background: var(--unsure); }
.ph-bar-no { flex-grow: 225; background: rgba(248, 113, 113, 0.55); }
.ph-demo-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: -4px; }
.ph-stat { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--muted); white-space: nowrap; }
.ph-stat::before { content: ""; width: 9px; height: 9px; border-radius: 3px; }
.ph-stat b { color: var(--text); font-weight: 800; }
.ph-stat-yes::before { background: var(--yes); }
.ph-stat-unsure::before { background: var(--unsure); }
.ph-stat-no::before { background: var(--no); }
.ph-demo-covers { display: flex; align-items: center; padding-left: 10px; min-height: 64px; }
.ph-demo-covers .gi-cover { margin-left: -10px; border: 2px solid var(--surface); }
.ph-demo-morecount { margin-left: 10px; color: var(--muted); font-weight: 700; font-size: 15px; }
.ph-demo-foot { color: var(--faint); font-size: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.ph-demo-foot u { color: var(--accent-hi); text-decoration-color: var(--accent-line); }

/* Section heads */
.ph-section { padding-top: 72px; }
@media (max-width: 759px) { .ph-section { padding-top: 52px; } }
.ph-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ph-popular .ph-section-head { flex-wrap: nowrap; }
.ph-more { white-space: nowrap; }
.ph h2 { margin: 0; font-size: clamp(1.35rem, 2.4vw, 1.75rem); letter-spacing: -0.02em; font-weight: 800; }
.ph-h2-center { text-align: center; margin-bottom: 26px !important; }
.ph-more { font-weight: 650; font-weight: 600; font-size: 15.5px; text-decoration: none; }
.ph-hint { margin: 0; color: var(--faint); font-size: 15px; }

/* Covers (shared.js coverHtml → .gi-cover; styled here for the homepage) */
.ph .gi-cover { --cover-hue: 260; position: relative; display: inline-block; overflow: hidden; flex: none; border-radius: 12px; background: linear-gradient(150deg, hsl(var(--cover-hue) 45% 32%), hsl(calc(var(--cover-hue) + 40) 40% 14%)); }
.ph .gi-cover-img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.25s ease; }
.ph .gi-cover.is-loaded .gi-cover-img { opacity: 1; }
/* Wide art: fit inside the tall card; portrait cards stay object-fit: cover */
.ph .gi-cover-bg { display: none; }
.ph .gi-cover.is-wide .gi-cover-bg {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(20px) brightness(0.4);
  transform: scale(1.2);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  opacity: 1;
}
.ph .gi-cover.is-wide .gi-cover-img {
  position: relative;
  z-index: 1;
  object-fit: contain;
  background: transparent;
}
.ph .gi-cover.is-initials { display: inline-grid; place-items: center; }
.ph .gi-cover-initials { font-weight: 850; font-weight: 800; letter-spacing: -0.02em; color: rgba(255, 255, 255, 0.92); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
.ph .gi-cover--poster { width: 100%; aspect-ratio: 2 / 3; box-shadow: 0 14px 34px -16px rgba(0, 0, 0, 0.9); }
.ph .gi-cover--poster .gi-cover-initials { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.ph .gi-cover--mini { width: 30px; height: 42px; border-radius: 5px; }
.ph .gi-cover--mini .gi-cover-initials { font-size: 11px; }
.ph .gi-cover--chip { width: 42px; height: 60px; border-radius: 8px; }
.ph .gi-cover--chip .gi-cover-initials { font-size: 15px; }

.ph-covers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px 18px; }
@media (max-width: 1099px) and (min-width: 760px) { .ph-covers { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 759px) {
  /* Mobile: one swipeable row that bleeds to the screen edge */
  .ph-covers { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin: 0 -20px; padding: 2px 20px 10px; scroll-padding: 0 20px; scrollbar-width: none; }
  .ph-covers::-webkit-scrollbar { display: none; }
  .ph-covers > li { flex: 0 0 38%; scroll-snap-align: start; }
}
.ph-load-error { grid-column: 1 / -1; }
.ph-covers > li.ph-load-error { flex: 1 0 100%; max-width: 36rem; }
.ph-load-error p { margin: 0 0 12px; color: var(--muted); }
.ph-load-error .ph-btn { min-height: 44px; padding: 0 18px; font-size: 16px; }
.ph-cover-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--text); border-radius: 14px; }
.ph-cover-card .gi-cover { transition: transform 0.15s ease, box-shadow 0.15s ease; outline: 1px solid rgba(255, 255, 255, 0.06); outline-offset: -1px; }
.ph-cover-card:hover { color: var(--text); }
.ph-cover-card:hover .gi-cover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--accent), 0 20px 40px -18px rgba(var(--accent-rgb), 0.6); }
.ph-cover-card:focus-visible { outline-offset: 4px; }
.ph-cover-title { font-weight: 700; font-size: 15.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ph-cover-meta { display: flex; flex-direction: column; gap: 2px; margin-top: -4px; }
.ph-cover-status { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.ph-cover-status::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--accent); }
.ph-cover-status--partial::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--accent-hi); }
.ph-cover-plats { font-size: 12.5px; color: var(--faint); }

/* Example chips — calm, secondary */
.ph-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ph-chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); color: var(--text); text-decoration: none; font-size: 15px; font-weight: 600; transition: border-color 0.12s ease, background-color 0.12s ease; }
.ph-chips a:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); }
@media (max-width: 559px) {
  .ph-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px; padding: 0 20px 6px; scrollbar-width: none; }
  .ph-chips::-webkit-scrollbar { display: none; }
  .ph-chips a { white-space: nowrap; }
}

/* How it works */
.ph-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 759px) { .ph-steps { grid-template-columns: 1fr; gap: 12px; } }
.ph-steps li { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.ph-step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-hi); font-weight: 800; }
.ph-steps h3 { margin: 14px 0 6px; font-size: 18px; letter-spacing: -0.01em; }
.ph-steps p { margin: 0; color: var(--muted); font-size: 15.5px; }
@media (max-width: 759px) {
  .ph-steps li { display: grid; grid-template-columns: 34px 1fr; column-gap: 14px; padding: 18px; }
  .ph-step-n { grid-row: span 2; }
  .ph-steps h3 { margin: 4px 0 4px; }
}

/* Trust line */
.ph-trust { margin-top: 64px; display: flex; align-items: center; justify-content: center; gap: 8px 18px; flex-wrap: wrap; text-align: center; }
.ph-trust p { margin: 0; color: var(--muted); font-size: 15.5px; }
.ph-trust b { color: var(--text); }
.ph-trust a { font-weight: 650; font-weight: 600; text-decoration: none; }

.ph-foot { margin-top: 56px; padding-top: 24px; padding-bottom: 36px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; color: var(--faint); font-size: 14px; }
.ph-foot p { margin: 0; }
.ph-foot a { color: var(--muted); }


@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}



.ph-demo[hidden] { display: none; }

/* Homepage: Recently updated (real changes from data/recent_changes.json) */
.ph-recent-hint { color: var(--muted); margin: -4px 0 14px; font-size: 0.95rem; }
.ph-recent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ph-recent-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; display: grid; gap: 4px; }
.ph-recent-list time { color: var(--faint); font-size: 0.85rem; }
.ph-recent-what { color: var(--text); }
.ph-recent-what b { color: #82b4ff; }
.ph-recent-games { color: var(--muted); font-size: 0.92rem; }
.ph-recent-games a { color: #82b4ff; }

/* ---- Scaling pass 2026-10-17 (WRZ Labs build rule) ----
 * Big screens: main column grows to ~1560px (still centred with margin auto), then the whole
 * page steps up with a graduated zoom so 1440p / ultrawide / 4K screens don't get a tiny strip.
 * min-height uses 100vh / zoom so short pages don't get extra scroll when zoomed. */
@media (min-width: 1680px) {
  .gi-top-inner, .ph-wrap, .app, .app.app-wide, .app.app-together, .app.app-filter, .app.app-game,
  .app.app-about, .app.app-hub, .app.app-pairs { max-width: 1560px; }
}
@media (min-width: 2400px) { body { zoom: 1.25; min-height: calc(100vh / 1.25); } }
@media (min-width: 3200px) { body { zoom: 1.5; min-height: calc(100vh / 1.5); } }
/* Very small phones (320-360px): keep all four nav links on screen. */
@media (max-width: 360px) {
  .gi-nav { justify-content: space-between; }
  .gi-nav a { font-size: 13px; padding: 8px 5px; }
}
