/* VERYWELLAUTO Games — one stylesheet, no web fonts, no external requests. */

:root {
  --bg: #0b0b0e;
  --surface: #16161b;
  --surface-2: #202028;
  --line: #2c2c36;
  --text: #f4f4f6;
  --muted: #b4b4bf;          /* 9.6:1 on --bg */
  --accent: #ff8a1f;         /* VERYWELLAUTO orange, 8.4:1 on --bg */
  --accent-ink: #120a02;     /* text on orange buttons */
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --max: 1240px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { color: #ffb066; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Visually hidden, still read by screen readers. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 28px; } }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 11, 14, .92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.wordmark { color: var(--text); text-decoration: none; font-weight: 900; letter-spacing: .06em; font-size: 1.05rem; }
.wordmark span { color: var(--accent); }
.wordmark:hover { color: var(--text); }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

main { display: block; padding-bottom: 48px; }

/* ------------------------------------------------------------------ hero */
.carousel { position: relative; margin: 20px 0 8px; }
.carousel-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%;
  gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; border-radius: var(--radius);
}
.carousel-track::-webkit-scrollbar { display: none; }
.slide { position: relative; scroll-snap-align: start; border-radius: var(--radius); overflow: hidden; background: var(--surface); aspect-ratio: 16 / 9; min-height: 300px; }
.slide .art, .slide .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.45) 55%, rgba(0,0,0,0) 100%), linear-gradient(0deg, rgba(0,0,0,.7), rgba(0,0,0,0) 50%); }
.slide-body { position: absolute; z-index: 1; left: 0; bottom: 0; padding: 20px; max-width: 620px; }
.slide-body h2 { margin: 0 0 6px; font-size: clamp(1.4rem, 4vw, 2.5rem); line-height: 1.15; }
.slide-body p { margin: 0 0 14px; color: #e6e6ea; font-size: clamp(.95rem, 1.6vw, 1.1rem); }
@media (min-width: 768px) { .slide-body { padding: 36px 40px; } }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; }
.carousel-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 1.1rem; cursor: pointer; }
.carousel-btn:hover { background: var(--surface-2); }
.dots { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; background: #4a4a55; cursor: pointer; }
.dot[aria-current="true"] { background: var(--accent); width: 24px; border-radius: 999px; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 999px;
  font: 700 1rem/1 var(--font); text-decoration: none; border: 0; cursor: pointer; white-space: nowrap;
  background: var(--accent); color: var(--accent-ink);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: #ffa04a; color: var(--accent-ink); transform: translateY(-1px); }
.btn.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.btn.secondary:hover { background: #2a2a34; color: var(--text); }
.btn[aria-disabled="true"] { background: var(--surface-2); color: var(--muted); border: 1px dashed #4a4a55; cursor: not-allowed; transform: none; }
.btn.big { min-height: 52px; padding: 14px 26px; font-size: 1.05rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ------------------------------------------------------------ card rows */
.row { margin-top: 36px; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.row-head h2 { margin: 0; font-size: 1.3rem; }
.cards {
  display: grid; grid-auto-flow: column; grid-auto-columns: 46%;
  gap: 14px; overflow-x: auto; scroll-snap-type: x proximity;
  padding: 4px 4px 14px; margin: 0 -4px; list-style: none;
}
@media (min-width: 560px) { .cards { grid-auto-columns: 30%; } }
@media (min-width: 900px) {
  .cards { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); overflow: visible; }
}
.cards.grid { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
@media (min-width: 640px) { .cards.grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
.cards > li { scroll-snap-align: start; min-width: 0; }

.card { display: block; color: var(--text); text-decoration: none; border-radius: var(--radius); }
.card:hover { color: var(--text); }
.card-art { position: relative; aspect-ratio: 5 / 7; border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .card-art img, .card:focus-visible .card-art img { transform: scale(1.06); }
.card-title { margin: 10px 2px 2px; font-weight: 700; font-size: .98rem; line-height: 1.3; }
.card-meta { margin: 0 2px; color: var(--muted); font-size: .85rem; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 2px 0; padding: 0; list-style: none; }
.badge { font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: #d6d6de; border: 1px solid var(--line); }
.badge.soon { color: var(--muted); border-style: dashed; }
.ribbon { position: absolute; top: 10px; left: 10px; z-index: 1; background: var(--accent); color: var(--accent-ink); font-size: .72rem; font-weight: 800; padding: 4px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }

/* Text art when a game has no thumbnail yet */
.fallback-art {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px;
  background:
    radial-gradient(120% 80% at 80% 0%, hsl(var(--hue) 90% 55% / .55), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, hsl(calc(var(--hue) + 40) 80% 45% / .45), transparent 60%),
    linear-gradient(160deg, hsl(var(--hue) 40% 16%), #0d0d12);
}
.fallback-art strong { font-size: 1.25rem; line-height: 1.15; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.fallback-art small { color: #e5e5ea; font-weight: 600; margin-top: 4px; }
.slide .fallback-art > *, .game-hero .fallback-art > * { display: none; } /* the title is already in the hero text */

/* ------------------------------------------------------------ game page */
.game-hero { position: relative; margin-top: 20px; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.game-hero .banner { position: relative; aspect-ratio: 16 / 9; max-height: 520px; width: 100%; }
.game-hero .banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.game-hero-body { padding: 20px; }
@media (min-width: 768px) { .game-hero-body { padding: 28px 32px 32px; } }
.game-hero h1 { margin: 0 0 8px; font-size: clamp(1.7rem, 4.5vw, 2.8rem); line-height: 1.1; }
.pitch { margin: 0 0 12px; font-size: 1.12rem; color: #e6e6ea; max-width: 760px; }
.genre-line { margin: 0 0 18px; color: var(--muted); font-weight: 600; }

.section { margin-top: 40px; }
.section h2 { font-size: 1.4rem; margin: 0 0 12px; }
.two-col { display: grid; gap: 28px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1.6fr 1fr; align-items: start; } }
.prose p { margin: 0 0 12px; max-width: 70ch; }

.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
.features li { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.features svg { flex: none; width: 24px; height: 24px; color: var(--accent); }

.facts { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.facts h2 { font-size: 1.15rem; }
.facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.legal-links a { font-weight: 700; }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.shots img { border-radius: 12px; }

/* ----------------------------------------------------------- text pages */
.page { max-width: 820px; margin: 0 auto; padding-top: 28px; }
.page h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.15; margin: 0 0 10px; }
.page h2 { font-size: 1.3rem; margin: 32px 0 8px; }
.page h3 { font-size: 1.05rem; margin: 20px 0 6px; }
.page p, .page li { max-width: 72ch; }
.page ul { padding-left: 1.2em; }
.meta-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 16px 0 24px; color: #dedee4; }
.meta-box p { margin: 2px 0; }
.lead { font-size: 1.1rem; color: #e6e6ea; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--muted); font-size: .92rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.site-footer nav a { color: var(--text); text-decoration: none; font-weight: 600; }
.site-footer nav a:hover { color: var(--accent); }
.site-footer p { margin: 4px 0; }

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

/* ----------------------------------------------------------------- print */
@media print {
  :root { --text: #000; --muted: #333; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header, .skip, .site-footer nav, .no-print { display: none !important; }
  a { color: #000; text-decoration: underline; }
  .page { max-width: none; padding: 0; }
  .meta-box { border: 1px solid #999; background: none; color: #000; }
  .page h2 { break-after: avoid; }
  .site-footer { border: 0; color: #000; }
}

.btn svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }

@media (max-width: 420px) {
  .wordmark { font-size: .95rem; letter-spacing: .04em; }
  .nav { gap: 0; }
  .nav a { padding: 7px 8px; font-size: .9rem; }
}
