/* neyo.games: the directory page. Tokens first; dark is the default, light follows the OS. */
:root {
  --bg: #0d0c12;
  --bg-2: #16141d;
  --bg-3: #1e1b27;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f4efe4;
  --muted: #a8a295;
  --accent: #ffd23f;
  --on-accent: #16131c;
  --accent-ink: #ffd23f;
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  --dots: rgba(255, 255, 255, 0.05);
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --radius: 20px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1240px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f2ea;
    --bg-2: #fffdf8;
    --bg-3: #efe9dd;
    --line: rgba(22, 19, 28, 0.1);
    --line-2: rgba(22, 19, 28, 0.2);
    --text: #17151c;
    --muted: #5f5a52;
    --accent-ink: #8a6100;
    --shadow: 0 30px 60px -34px rgba(60, 40, 10, 0.35);
    --dots: rgba(22, 19, 28, 0.06);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dots) 1px, transparent 1.2px);
  background-size: 22px 22px;
  color: var(--text);
  font: 400 17px/1.55 var(--display);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 10px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- top bar ---------- */
.top {
  max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.mark { width: 34px; height: 34px; flex: none; transition: transform 0.3s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover .mark { transform: rotate(-8deg) scale(1.06); }
.wordmark { font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.wordmark span { color: var(--muted); font-weight: 600; }
.top-links { display: flex; align-items: center; gap: 6px; }
.icon-link {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  color: var(--muted); text-decoration: none; transition: color 0.2s, background 0.2s;
}
.icon-link:hover { color: var(--text); background: var(--bg-3); }
.icon-link svg { width: 20px; height: 20px; }
.stroke, .icon-link svg.stroke, .btn svg, .tipjar-cup svg {
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.btn svg .fill { fill: currentColor; stroke: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 18px;
  border-radius: 14px; border: 1px solid transparent; font-weight: 700; font-size: 16px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 0 #c99a12; }
.btn-primary:hover { box-shadow: 0 6px 0 #c99a12; transform: translateY(-2px); }
.btn-primary:active { box-shadow: 0 1px 0 #c99a12; transform: translateY(3px); }
.btn-ghost { border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: var(--bg-3); }
.btn-coffee { min-height: 40px; padding: 0 14px; margin-left: 6px; background: var(--bg-3); border-color: var(--line); font-size: 15px; }
.btn-coffee:hover { border-color: var(--accent); }
.btn-coffee svg { color: var(--accent-ink); }
@media (max-width: 640px) {
  .btn-coffee span { display: none; }
  .btn-coffee { width: 40px; padding: 0; justify-content: center; margin-left: 2px; }
}

/* ---------- hero ---------- */
.hero {
  max-width: var(--max); margin: 0 auto; padding: clamp(28px, 6vw, 72px) var(--gutter) clamp(40px, 6vw, 80px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 64px); align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font: 700 12.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 4px rgba(61, 220, 132, 0.18); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(61, 220, 132, 0.05); } }
h1 {
  margin: 0; font-weight: 800; letter-spacing: -0.045em; line-height: 0.92;
  font-size: clamp(52px, 8.6vw, 112px); text-wrap: balance;
}
.lede { margin: 22px 0 0; max-width: 34ch; font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
#surprise-label { display: inline-block; min-width: 9.5ch; text-align: left; }
.kbd-hint { margin: 18px 0 0; font: 500 13px/1.4 var(--mono); color: var(--muted); }
kbd { font: 700 11.5px/1 var(--mono); padding: 3px 6px 2px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; }
@media (hover: none) { .kbd-hint { display: none; } }

.feature {
  position: relative; display: block; border-radius: calc(var(--radius) + 6px); padding: 10px;
  background: var(--bg-2); border: 1px solid var(--line); box-shadow: var(--shadow);
  text-decoration: none; transform: rotate(1.2deg); transition: transform 0.35s cubic-bezier(.3, 1.4, .5, 1), border-color 0.3s;
}
.feature:hover, .feature:focus-visible { transform: rotate(0deg) translateY(-4px); border-color: color-mix(in oklab, var(--a) 70%, transparent); }
.feature .shot { aspect-ratio: 16 / 10; }
.feature-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 16px 8px 8px; }
.feature-kicker { display: block; font: 700 11.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--a); margin-bottom: 8px; }
.feature-title { display: block; font-weight: 800; font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.03em; line-height: 1; }
.feature-blurb { display: block; color: var(--muted); font-size: 15.5px; margin-top: 8px; max-width: 42ch; }
.feature .btn { flex: none; }
.sticker {
  position: absolute; top: -14px; left: -12px; z-index: 2; padding: 8px 12px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font: 700 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  transform: rotate(-8deg); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.5);
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .feature { transform: none; }
}
@media (max-width: 560px) {
  .feature-body { flex-direction: column; align-items: stretch; }
  .feature .btn { justify-content: center; }
}

/* ---------- shots (shared) ---------- */
.shot { position: relative; display: block; overflow: hidden; border-radius: var(--radius); background: var(--bg-3); aspect-ratio: 16 / 10; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(.2, .8, .2, 1); }
.shot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); pointer-events: none; }

/* ---------- shelves + cards ---------- */
.shelf { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(48px, 7vw, 88px); }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 22px; }
.shelf h2 { margin: 0; font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -0.035em; line-height: 1; }
.shelf-note { margin: 0; color: var(--muted); font-size: 15px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(16px, 2.2vw, 26px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }

.card {
  --a: var(--accent);
  position: relative; display: flex; flex-direction: column; padding: 8px; border-radius: calc(var(--radius) + 6px);
  background: var(--bg-2); border: 1px solid var(--line);
  transition: transform 0.3s cubic-bezier(.3, 1.4, .5, 1), border-color 0.25s, box-shadow 0.3s;
}
.card:hover, .card:focus-within {
  transform: translateY(-5px);
  border-color: color-mix(in oklab, var(--a) 65%, transparent);
  box-shadow: 0 22px 50px -26px color-mix(in oklab, var(--a) 80%, transparent);
}
.card:hover .shot img, .card:focus-within .shot img, .feature:hover .shot img { transform: scale(1.045); }
.play {
  position: absolute; right: 12px; bottom: 12px; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px 8px 14px; border-radius: 999px;
  background: var(--a); color: #111; font-weight: 800; font-size: 14px;
  opacity: 0; transform: translateY(8px); transition: opacity 0.2s, transform 0.25s cubic-bezier(.3, 1.4, .5, 1);
}
.play svg { width: 14px; height: 14px; fill: currentColor; }
.card:hover .play, .card:focus-within .play { opacity: 1; transform: none; }
@media (hover: none) { .play { opacity: 1; transform: none; } }
.card-body { padding: 14px 10px 4px; flex: 1; }
.card h3 { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card h3 a:focus-visible { outline: none; }
.card:has(h3 a:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.card p { margin: 6px 0 0; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.new {
  display: inline-block; vertical-align: 4px; margin-left: 8px; padding: 4px 7px 3px; border-radius: 6px;
  background: var(--a); color: #111; font: 700 10.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
}
.card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 12px 10px 6px; }
.tag, .input {
  font: 700 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 8px 5px; border-radius: 7px; border: 1px solid var(--line-2); color: var(--muted);
}
.input { border-style: dashed; }
.src {
  position: relative; z-index: 2; margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: 9px; color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none;
}
.src svg { width: 16px; height: 16px; fill: currentColor; }
.src:hover { color: var(--text); background: var(--bg-3); }

.grid-stuff { grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
/* other stuff: same grid as the games, lighter cards (no tags row, no play pill) */
.card.slim .card-body { padding: 14px 10px 10px; }
.card.slim .card-meta { display: none; }
.card.slim h3 { font-size: 20px; }
.card.slim p { font-size: 14.5px; }
.card.slim .play { display: none; }

/* ---------- say hi ---------- */
.hi { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(40px, 6vw, 72px); }
.hi-card {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(20px, 4vw, 48px); align-items: stretch;
  padding: clamp(24px, 4vw, 48px); border-radius: calc(var(--radius) + 10px);
  background: var(--bg-2); border: 1px solid var(--line);
}
.hi h2 { margin: 0; font-size: clamp(44px, 6vw, 80px); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; }
.hi-copy > p { margin: 14px 0 0; color: var(--muted); max-width: 40ch; }
.mail {
  display: inline-block; margin-top: 22px; font-weight: 700; font-size: clamp(20px, 2.6vw, 30px); letter-spacing: -0.02em;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: var(--accent);
  overflow-wrap: anywhere;
}
.mail:hover { color: var(--accent-ink); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.social {
  display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px 0 12px; border-radius: 14px;
  border: 1px solid var(--line-2); text-decoration: none; font-weight: 700; transition: background 0.2s, border-color 0.2s;
}
.social svg { width: 20px; height: 20px; }
.social span { color: var(--muted); font-weight: 500; }
.social:hover { background: var(--bg-3); border-color: var(--text); }

.tipjar {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-height: 260px;
  padding: 26px; border-radius: var(--radius); text-decoration: none; overflow: hidden;
  background: var(--accent); color: var(--on-accent);
  transition: transform 0.3s cubic-bezier(.3, 1.4, .5, 1);
}
.tipjar:hover { transform: rotate(-1deg) scale(1.015); }
.tipjar-cup { position: absolute; top: 18px; right: 18px; width: 120px; height: 120px; opacity: 0.9; transform: rotate(10deg); transition: transform 0.4s cubic-bezier(.3, 1.6, .5, 1); }
.tipjar:hover .tipjar-cup { transform: rotate(-6deg) translateY(-4px); }
.tipjar-cup svg { width: 100%; height: 100%; stroke-width: 1.6; }
.tipjar-title { font-size: clamp(28px, 3vw, 36px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.tipjar-sub { font-size: 15.5px; opacity: 0.8; max-width: 30ch; }
.tipjar-warn { margin-top: 10px; font: 700 12px/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
@media (max-width: 800px) { .hi-card { grid-template-columns: 1fr; } }

.foot {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 40px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 14px;
}
.foot p { margin: 0; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }

/* keyboard browsing: the card that arrow keys landed on */
.card.is-cursor { border-color: var(--a); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

/* ---------- small-screen + polish fixes ---------- */
.feature .btn svg { fill: currentColor; stroke: none; width: 16px; height: 16px; }
@media (max-width: 480px) {
  .top { padding-top: 14px; padding-bottom: 14px; }
  .top-links .icon-link:nth-child(n+3) { display: none; }
  .icon-link { width: 38px; height: 38px; }
}
@media (max-width: 360px) {
  .top { gap: 8px; }
  .top-links { gap: 0; }
  .wordmark { font-size: 19px; }
  .mark { width: 30px; height: 30px; }
}
