/* hobel.dev — one stylesheet, no inline styles beyond the per-project --accent.
   Dark only: every game on this site is dark, and a light portfolio wrapped
   around eight dark screenshots reads as a different site on every page. */

:root {
  --bg: #0b0d10;
  --bg-raised: #131720;
  --bg-sunken: #080a0d;
  --line: #232936;
  --line-soft: #1a1f29;
  --ink: #e8ebf0;
  --ink-dim: #a3adbd;
  --ink-faint: #6d7788;
  --accent: #8fa4c4;
  --measure: 66ch;
  --pad: clamp(1.15rem, 4vw, 2.5rem);
  --radius: 14px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ── Home ───────────────────────────────────────────────────────────────── */

.hero {
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(90rem 40rem at 50% -18rem, #172032 0%, transparent 65%),
    var(--bg);
}

.wordmark {
  margin: 0;
  font-size: clamp(2.6rem, 9vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 680;
}

.wordmark .dot { color: #4d94ff; }

.hero-tagline {
  margin: 1.1rem 0 0;
  font-size: clamp(1.2rem, 3.2vw, 1.6rem);
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink);
  font-weight: 480;
}

.hero-intro {
  margin: 1.15rem 0 0;
  max-width: 58ch;
  color: var(--ink-dim);
}

/* ── Card grid ──────────────────────────────────────────────────────────── */

main { padding-block: clamp(2.5rem, 6vw, 4rem); }

.grid {
  display: grid;
  gap: clamp(1.1rem, 2.5vw, 1.75rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover,
.card:focus-visible {
  border-color: color-mix(in oklab, var(--accent) 55%, var(--line));
  transform: translateY(-3px);
  box-shadow: 0 12px 34px -14px color-mix(in oklab, var(--accent) 45%, transparent);
}

.card-shot {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}

.card-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.15rem 1.25rem 1.35rem;
}

.card-name {
  font-size: 1.18rem;
  font-weight: 660;
  letter-spacing: 0.005em;
  color: var(--accent);
}

.card-tagline {
  font-size: 0.98rem;
  color: var(--ink);
  line-height: 1.4;
}

.card-text {
  margin-top: 0.15rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-faint);
}

/* ── Tags ───────────────────────────────────────────────────────────────── */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22em 0.7em;
  white-space: nowrap;
}

.tags-lg .tag { font-size: 0.75rem; }

/* ── Project page ───────────────────────────────────────────────────────── */

.topbar { padding-block: 1.35rem; }

.back {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  text-decoration: none;
}

.back::before { content: "← "; }

.back:hover { color: var(--ink); }

.project-head { padding-block: clamp(1.5rem, 4vw, 2.75rem) clamp(1.5rem, 3vw, 2rem); }

.project-name {
  margin: 0;
  font-size: clamp(2.1rem, 7vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--accent);
}

.project-tagline {
  margin: 0.7rem 0 0;
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 30ch;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin: 1.6rem 0 0;
}

.cta-row-end { margin-top: 2.5rem; }

.cta {
  display: inline-block;
  text-decoration: none;
  font-weight: 620;
  font-size: 0.98rem;
  letter-spacing: 0.005em;
  color: #0b0d10;
  background: var(--accent);
  border-radius: 999px;
  padding: 0.62em 1.5em;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.cta:hover { filter: brightness(1.1); transform: translateY(-1px); }

.cta-host {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.shot-hero {
  margin: 0;
  padding-block: clamp(1rem, 3vw, 2rem);
}

/* Cap the IMAGE, not its box. Six of these eight screenshots are portrait
   phone captures; a full-width box with the image letterboxed inside it puts a
   narrow picture in the middle of a wide empty frame. Sizing the image itself
   and centring it lets a portrait shot read as a phone and a landscape shot
   fill the column. */
.shot-hero img {
  width: auto;
  max-width: 100%;
  max-height: 70vh;
  margin-inline: auto;
  border-radius: var(--radius);
  background: var(--bg-sunken);
  border: 1px solid var(--line);
}

/* ── Prose ──────────────────────────────────────────────────────────────── */

.prose { padding-block: clamp(1rem, 3vw, 2rem) clamp(3rem, 7vw, 5rem); }

.prose > p {
  max-width: var(--measure);
  margin: 0 0 1.15rem;
  color: var(--ink-dim);
}

.prose h2 {
  margin: clamp(2.5rem, 6vw, 3.5rem) 0 1.25rem;
  font-size: 0.78rem;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line-soft);
}

.note {
  max-width: var(--measure);
  margin: 0 0 1.9rem;
  padding-left: 1.1rem;
  border-left: 2px solid color-mix(in oklab, var(--accent) 40%, transparent);
}

.note h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 620;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.note p {
  margin: 0;
  color: var(--ink-dim);
}

/* ── Gallery ────────────────────────────────────────────────────────────── */

.gallery {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  scrollbar-width: thin;
}

.gallery img {
  height: min(58vh, 30rem);
  width: auto;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
}

@media (max-width: 640px) {
  .gallery {
    display: grid;
    grid-template-columns: 1fr;
    overflow-x: visible;
  }
  .gallery img { height: auto; width: 100%; }
}

/* ── Pager & footer ─────────────────────────────────────────────────────── */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2rem 4rem;
  border-top: 1px solid var(--line-soft);
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
  color: var(--ink-dim);
}

.pager-next { text-align: right; align-items: flex-end; }

.pager-dir {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.pager-name { font-weight: 600; color: var(--ink); }

.pager-link:hover .pager-name { color: var(--accent); }

.site-footer {
  padding-block: 2rem 4rem;
  border-top: 1px solid var(--line-soft);
}

.site-footer p {
  margin: 0;
  max-width: var(--measure);
  font-size: 0.88rem;
  color: var(--ink-faint);
}

/* ── Motion & focus ─────────────────────────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .card:hover, .cta:hover { transform: none; }
}

/* ── Per-project themes (generated by build.mjs) ─────────────────────────── */

.t-grolf { --accent: #6cbf4a; }
.shot-grolf { object-position: center 62%; }
.t-capesurf { --accent: #2fb6cf; }
.shot-capesurf { object-position: center; }
.t-kurper { --accent: #6d9fd0; }
.shot-kurper { object-position: center 55%; }
.t-longshot { --accent: #c8514a; }
.shot-longshot { object-position: center; }
.t-needle { --accent: #e8913a; }
.shot-needle { object-position: center 22%; }
.t-excalibur { --accent: #d9b04a; }
.shot-excalibur { object-position: center 20%; }
.t-farkle { --accent: #2f9d70; }
.shot-farkle { object-position: center 28%; }
.t-saloon { --accent: #d4693c; }
.shot-saloon { object-position: center 45%; }
