/* ─────────────────────────────────────────────────────────────
   Design tokens
   ───────────────────────────────────────────────────────────── */
:root {
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 18px;
  --radius-sm: 10px;
  --container: 1160px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Dark (default) */
  --bg: #0b0f17;
  --bg-2: #0f1520;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8ecf3;
  --muted: #8b95a7;
  --accent: #5eead4;
  --accent-2: #818cf8;
  --accent-ink: #04201b;
  --ridge-a: 94, 234, 212;
  --ridge-b: 129, 140, 248;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f7fb;
    --bg-2: #eef0f6;
    --surface: rgba(255, 255, 255, 0.7);
    --surface-hover: #ffffff;
    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.18);
    --text: #0f172a;
    --muted: #5b6475;
    --accent: #0d9488;
    --accent-2: #4f46e5;
    --accent-ink: #ffffff;
    --ridge-a: 13, 148, 136;
    --ridge-b: 79, 70, 229;
    --shadow: 0 20px 50px -24px rgba(15, 23, 42, 0.25);
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-2: #eef0f6;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-hover: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.18);
  --text: #0f172a;
  --muted: #5b6475;
  --accent: #0d9488;
  --accent-2: #4f46e5;
  --accent-ink: #ffffff;
  --ridge-a: 13, 148, 136;
  --ridge-b: 79, 70, 229;
  --shadow: 0 20px 50px -24px rgba(15, 23, 42, 0.25);
  color-scheme: light;
}

/* ─────────────────────────────────────────────────────────────
   Base
   ───────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

/* Subtle grain over everything for depth */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; }

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  z-index: 200;
}
.skip-link:focus { top: 16px; }

/* ─────────────────────────────────────────────────────────────
   Nav
   ───────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
}

/* Blur lives on a pseudo-element: backdrop-filter on .nav itself would trap the
   fixed mobile tab bar inside the header. */
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: opacity 0.3s var(--ease);
}

.nav.is-scrolled::before { opacity: 1; }

.nav__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin-right: auto;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--accent) 60%, transparent);
}

.brand__mark svg { width: 24px; height: 24px; }

.brand__name { white-space: nowrap; }

/* Tabs — the active pill slides between pages via the View Transitions API */
.tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  view-transition-name: tab-bar;
}

.tab {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.tab:hover { color: var(--text); }
.tab[aria-current="page"] { color: var(--text); }

.tab[aria-current="page"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--surface-hover);
  border: 1px solid var(--border-strong);
  box-shadow: 0 4px 14px -6px color-mix(in srgb, var(--accent) 45%, transparent);
  view-transition-name: tab-pill;
}

.tab__icon {
  display: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav .icon-btn { justify-self: end; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease);
}

.icon-btn:hover {
  border-color: var(--border-strong);
  transform: rotate(-12deg);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .icon-sun { display: none; }
  :root:not([data-theme="dark"]) .icon-moon { display: block; }
}

/* ─────────────────────────────────────────────────────────────
   Hero
   ───────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: min(92svh, 920px);
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
  isolation: isolate;
}

/* Soft colored glow behind the ridges */
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  max-height: 900px;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 70%),
    radial-gradient(closest-side at 30% 70%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
  filter: blur(20px);
  z-index: -2;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Fade the ridges into the page below */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 30%;
  background: linear-gradient(to bottom, transparent, var(--bg));
  z-index: -1;
  pointer-events: none;
}

.hero__content {
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 28px;
}

.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s var(--ease) infinite;
}

@keyframes pulse {
  from { transform: scale(1); opacity: 0.7; }
  to { transform: scale(3); opacity: 0; }
}

.hero__title {
  font-size: clamp(2.6rem, 7.5vw, 5.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  max-width: 14ch;
}

.gradient-text {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  margin-top: 24px;
  max-width: 52ch;
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--muted);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  translate: -50% 0;
  width: 26px;
  height: 42px;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
}

.scroll-hint span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--text);
  animation: scroll 1.8s var(--ease) infinite;
}

@keyframes scroll {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ─────────────────────────────────────────────────────────────
   Buttons
   ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 500 0.95rem/1 var(--font-body);
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s, border-color 0.2s;
}

.btn--primary {
  background: var(--text);
  color: var(--bg);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--accent) 70%, transparent);
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
}

/* ─────────────────────────────────────────────────────────────
   Sections
   ───────────────────────────────────────────────────────────── */
.section {
  padding: 110px 0;
  scroll-margin-top: 40px;
}

.section__head {
  margin-bottom: 48px;
  max-width: 640px;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 14px;
}

.section__head h2,
.contact-card h2 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 600;
}

.section__sub {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.05rem;
}

.section--tight { padding: 40px 0 110px; }

/* ─────────────────────────────────────────────────────────────
   Inner page header (plain background)
   ───────────────────────────────────────────────────────────── */
.page-head {
  padding: 150px 0 8px;
}

.page-head h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.page-head__sub {
  margin-top: 16px;
  max-width: 56ch;
  font-size: 1.1rem;
  color: var(--muted);
}

/* ─────────────────────────────────────────────────────────────
   Home — explore cards
   ───────────────────────────────────────────────────────────── */
.explore { padding-top: 24px; }

.explore__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.explore-card {
  --c: hsl(var(--hue) 75% 62%);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 250px;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--c) 16%, transparent), transparent 60%),
    var(--surface);
  overflow: hidden;
}

.explore-card h2 {
  margin-top: auto;
  font-size: 2rem;
  font-weight: 600;
}

.explore-card p { color: var(--muted); }

.explore-card__count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--c);
}

.explore-card__go {
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: transform 0.35s var(--ease), background-color 0.2s, color 0.2s, border-color 0.2s;
}

.explore-card:hover {
  border-color: color-mix(in srgb, var(--c) 45%, transparent);
  box-shadow: 0 24px 50px -26px color-mix(in srgb, var(--c) 60%, transparent);
}

.explore-card:hover .explore-card__go {
  transform: rotate(-45deg);
  background: var(--c);
  border-color: transparent;
  color: var(--bg);
}

/* ─────────────────────────────────────────────────────────────
   Projects — bento grid
   ───────────────────────────────────────────────────────────── */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(220px, auto);
  gap: 16px;
}

.tile {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.tile:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.tile__glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%);
  transition: opacity 0.3s;
}

.tile:hover .tile__glow { opacity: 1; }

.tile--lg { grid-column: span 2; grid-row: span 2; }
.tile--wide { grid-column: span 2; }

.tile--lg {
  background:
    radial-gradient(120% 90% at 100% 100%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 60%),
    radial-gradient(90% 70% at 0% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    var(--surface);
}


.tile__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tile__arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: transform 0.35s var(--ease), color 0.2s, background-color 0.2s;
}

.tile:hover .tile__arrow {
  transform: rotate(45deg);
  color: var(--accent-ink);
  background: var(--accent);
  border-color: transparent;
}

.tile h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 8px;
}

.tile p {
  color: var(--muted);
  font-size: 0.96rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status--live { color: #34d399; }
.status--wip { color: #fbbf24; }
.status--idea { color: var(--accent-2); }

:root[data-theme="light"] .status--live { color: #059669; }
:root[data-theme="light"] .status--wip { color: #b45309; }
:root[data-theme="light"] .game,
:root[data-theme="light"] .explore-card { --c: hsl(var(--hue) 70% 38%); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .status--live { color: #059669; }
  :root:not([data-theme="dark"]) .status--wip { color: #b45309; }
  :root:not([data-theme="dark"]) .game,
  :root:not([data-theme="dark"]) .explore-card { --c: hsl(var(--hue) 70% 38%); }
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: auto 0 0;
}

.tile.tile--lg h3 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-top: auto; }
.tile.tile--lg p { font-size: 1.08rem; max-width: 46ch; }
.tile.tile--lg .tags { margin-top: 4px; }

.tags li {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ─────────────────────────────────────────────────────────────
   Games
   ───────────────────────────────────────────────────────────── */
.games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.game {
  --c: hsl(var(--hue) 80% 60%);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.4s var(--ease);
}

a.game:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--c) 50%, transparent);
  box-shadow: 0 24px 50px -24px color-mix(in srgb, var(--c) 55%, transparent);
}

.game__art {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background:
    linear-gradient(color-mix(in srgb, var(--c) 18%, transparent) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, color-mix(in srgb, var(--c) 18%, transparent) 1px, transparent 1px) 0 0 / 22px 22px,
    radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--c) 35%, transparent), transparent 65%),
    var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.game__art span {
  font-size: 3.4rem;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35));
  transition: transform 0.5s var(--ease);
}

a.game:hover .game__art span { transform: scale(1.15) rotate(-6deg); }

.game__body {
  padding: 20px 22px 6px;
}

.game__body h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

.game__body p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.93rem;
}

.game__cta {
  padding: 12px 22px 20px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--c);
}

.game--soon { opacity: 0.55; }
.game--soon .game__art span { filter: grayscale(0.6); }
.game--soon .game__cta { color: var(--muted); }

/* ─────────────────────────────────────────────────────────────
   Links
   ───────────────────────────────────────────────────────────── */
.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}

.link-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr auto;
  align-items: center;
  gap: 20px;
  padding: 22px 8px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s, padding 0.35s var(--ease);
}

.link-row:hover {
  background: var(--surface);
  padding-left: 20px;
  padding-right: 20px;
}

.link-row__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
}

.link-row__note { color: var(--muted); }

.link-row__url {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-row__arrow {
  color: var(--muted);
  transition: transform 0.35s var(--ease), color 0.2s;
}

.link-row:hover .link-row__arrow {
  color: var(--accent);
  transform: translate(3px, -3px);
}

/* ─────────────────────────────────────────────────────────────
   Contact
   ───────────────────────────────────────────────────────────── */
.contact-card {
  position: relative;
  padding: clamp(36px, 6vw, 72px);
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid var(--border);
  overflow: hidden;
  background:
    radial-gradient(80% 120% at 100% 0%, color-mix(in srgb, var(--accent-2) 20%, transparent), transparent 60%),
    radial-gradient(70% 100% at 0% 100%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    var(--surface);
}

.contact-card h2 { max-width: 16ch; }

.contact-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ─────────────────────────────────────────────────────────────
   Footer & toast
   ───────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.footer a:hover { color: var(--text); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  translate: -50% 20px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, translate 0.4s var(--ease);
  z-index: 60;
}

.toast.is-visible {
  opacity: 1;
  translate: -50% 0;
}

/* ─────────────────────────────────────────────────────────────
   Reveal animation
   ───────────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease) var(--d, 0ms), transform 0.8s var(--ease) var(--d, 0ms);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Keep hover transforms snappy once revealed */
.tile.reveal.is-in,
.game.reveal.is-in,
.explore-card.reveal.is-in {
  transition: opacity 0.8s var(--ease), border-color 0.3s, transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.tile.reveal.is-in:hover,
.game.reveal.is-in:hover,
.explore-card.reveal.is-in:hover { transform: translateY(-4px); }
.game--soon.reveal.is-in:hover { transform: none; }

/* ─────────────────────────────────────────────────────────────
   Page transitions between tabs (Chrome/Edge/Safari; others just navigate)
   ───────────────────────────────────────────────────────────── */
@view-transition { navigation: auto; }

::view-transition-old(root) { animation: 0.22s ease both vt-out; }
::view-transition-new(root) { animation: 0.5s cubic-bezier(0.22, 1, 0.36, 1) both vt-in; }
::view-transition-group(tab-pill) { animation-duration: 0.45s; animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ─────────────────────────────────────────────────────────────
   Responsive
   ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .link-row { grid-template-columns: 1fr 1fr auto; }
  .link-row__url { display: none; }
}

/* Tablet: the tabs share the top row with the brand, so show the logo only */
@media (min-width: 681px) and (max-width: 960px) {
  .brand__name { display: none; }
}

@media (max-width: 680px) {
  .container { padding: 0 16px; }
  .nav__inner { grid-template-columns: 1fr auto; height: 64px; }
  .section { padding: 80px 0; }
  .section--tight { padding: 32px 0 80px; }
  .page-head { padding-top: 112px; }

  /* Tabs become an app-style bottom bar */
  body { padding-bottom: 92px; }
  .tabs {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    padding: 6px;
    border-radius: 22px;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    box-shadow: var(--shadow);
  }
  .tab {
    flex: 1;
    flex-direction: column;
    gap: 3px;
    padding: 7px 2px;
    border-radius: 16px;
    font-size: 0.68rem;
  }
  .tab__icon { display: block; }
  .toast { bottom: 104px; }
  .bento,
  .games { grid-template-columns: 1fr; }
  .tile--lg,
  .tile--wide { grid-column: auto; grid-row: auto; }
  .tile--lg { min-height: 320px; }
  .link-row { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .link-row__note { grid-row: 2; font-size: 0.9rem; }
  .link-row__arrow { grid-row: 1 / span 2; grid-column: 2; }
  .footer__inner { flex-direction: column; }
}
