/* ═══════════════════════════════════════════════════════════
  dalecampo.com — main stylesheet
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Grenze:ital,wght@0,400;0,700;0,800;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;1,9..40,400&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:          #05111e;
  --bg-2:        #0a1e35;
  --bg-card:     #0d2442;
  --bg-card-h:   #102d52;
  --border:      #1a3a5c;
  --border-h:    #00a3fb;
  --blue:        #00a3fb;
  --blue-l:      #34acff;
  --green:       #9dce50;
  --purple:      #b67be6;
  --orange:      #ff931f;
  --amber:       #ffb114;
  --red:         #f34f19;
  --text:        #d8e4f0;
  --text-dim:    #6a8faf;
  --text-muted:  #3d5f7a;
  --white:       #ffffff;
  --gem:         #ffb114;
  --gem-glow:    rgba(255, 177, 20, 0.35);

  --font-display: 'Grenze', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --radius:    10px;
  --radius-lg: 16px;
  --shadow:    0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3);

  --nav-h: 64px;
  --transition: 0.2s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}
img { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-l); }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--white);
}
h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p { color: var(--text); }
em { color: var(--white); font-style: normal; }

.section-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

/* ── Layout ────────────────────────────────────────────────── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3rem) 1.5rem 5rem;
}
section { margin-bottom: 5rem; }
.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.section-header h2 { flex: 1; }
.section-flag {
  height: 1cap;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.35em;
  position: relative;
  top: -0.05em;
}
.section-flag {
  height: 1.5cap;
  margin-left: -0px;
  margin-bottom: 5px;
}
.section-header a {
  font-size: 0.85rem;
  color: var(--text-dim);
  white-space: nowrap;
}
.section-header a:hover { color: var(--blue); }

/* ── Navigation ────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(5, 17, 30, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--white);
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.nav-logo:hover { color: var(--blue-l); }
.nav-logo span { color: var(--amber); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,0.06);
}

/* Gem Counter */
#gem-counter-wrapper {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 177, 20, 0.12);
  border: 1px solid rgba(255, 177, 20, 0.25);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--amber);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}
#gem-counter-wrapper .gem-icon { font-size: 1rem; }

@keyframes gemPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.3); filter: drop-shadow(0 0 8px var(--gem-glow)); }
  100% { transform: scale(1); }
}
#gem-counter-wrapper.earning {
  animation: gemPop 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: 6px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 17, 30, 0.6);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.25s;
}
#nav-overlay.visible { opacity: 1; }

/* ── Toast ─────────────────────────────────────────────────── */
.gem-toast {
  position: fixed;
  top: calc(var(--nav-h) + 12px);
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 177, 20, 0.4);
  border-radius: var(--radius);
  padding: 0.75rem 1.1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,177,20,0.1);
  transform: translateY(-120%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  pointer-events: none;
  max-width: 320px;
}
.gem-toast.visible {
  transform: translateY(0);
  opacity: 1;
}
.gem-toast.hiding {
  transform: translateY(-120%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.25s ease;
}
.gem-toast .toast-gem { font-size: 1.4rem; flex-shrink: 0; }
.gem-toast .toast-text { display: flex; flex-direction: column; gap: 0.1rem; }
.gem-toast .toast-award {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--amber);
}
.gem-toast .toast-msg {
  font-size: 0.8rem;
  color: var(--text-dim);
}
.gem-toast .toast-msg em {
  color: var(--text);
  font-style: italic;
}

/* ── Gem History Panel ─────────────────────────────────────── */
#gem-history-panel {
  position: fixed;
  top: calc(var(--nav-h) + 8px);
  right: 1.5rem;
  z-index: 1999;
  width: 260px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid rgba(255, 177, 20, 0.4);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,177,20,0.1);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}
#gem-history-panel.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.gem-panel-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--amber);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.gem-panel-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.25rem 0 0.5rem;
}
.gem-history-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}
.gem-history-item:last-child { border-bottom: none; }
.gem-history-item .gem-h-award {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--amber);
  flex-shrink: 0;
}
.gem-history-item .gem-h-name {
  font-size: 0.8rem;
  color: var(--text-dim);
  flex: 1;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue);
  color: var(--white);
  border: 1px solid transparent;
}
.btn-primary:hover {
  background: var(--blue-l);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 163, 251, 0.3);
}
.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--white);
  border-color: var(--text-dim);
  background: rgba(255,255,255,0.04);
}
.btn-amber {
  background: var(--amber);
  color: var(--bg);
  border: 1px solid transparent;
  font-weight: 700;
}
.btn-amber:hover {
  background: #ffc02a;
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 177, 20, 0.35);
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  border-color: var(--border-h);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 163, 251, 0.12);
}
.card-body { padding: 1.5rem; }
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ── Tag chips ─────────────────────────────────────────────── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.tag {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 163, 251, 0.12);
  color: var(--blue-l);
  border: 1px solid rgba(0, 163, 251, 0.2);
  letter-spacing: 0.01em;
}
.tag.green  { background: rgba(157,206,80,0.12); color: var(--green); border-color: rgba(157,206,80,0.2); }
.tag.purple { background: rgba(182,123,230,0.12); color: var(--purple); border-color: rgba(182,123,230,0.2); }
.tag.amber  { background: rgba(255,177,20,0.12); color: var(--amber); border-color: rgba(255,177,20,0.2); }
.tag.orange { background: rgba(255,147,31,0.12); color: var(--orange); border-color: rgba(255,147,31,0.2); }

/* ── Tag filter bar ────────────────────────────────────────── */
.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.tag-filter [data-filter] {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: transparent;
  transition: all var(--transition);
}
.tag-filter [data-filter]:hover {
  border-color: var(--text-dim);
  color: var(--white);
}
.tag-filter [data-filter].active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* ── Gem-discoverable highlight ────────────────────────────── */
[data-gem-id] { cursor: pointer; }

/* ── HOME PAGE ─────────────────────────────────────────────── */
.hero {
  padding: 1rem 0 4rem;
  max-width: 680px;
}
.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--amber);
  border-radius: 2px;
}
.hero h1 { margin-bottom: 1.25rem; }
.hero h1 .accent { color: var(--blue-l); }
.hero-desc {
  font-size: 1.1rem;
  color: var(--text);
  max-width: 520px;
  margin-bottom: 2rem;
  line-height: 1.7;
}
.hero-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.gem-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
}
.gem-hint .gem-icon { color: var(--amber); }

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.featured-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition);
  overflow: hidden;
}
.featured-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: inherit;
}
.featured-card.blue::before   { background: linear-gradient(135deg, rgba(0,163,251,0.06), transparent); }
.featured-card.amber::before  { background: linear-gradient(135deg, rgba(255,177,20,0.08), transparent); }
.featured-card.green::before  { background: linear-gradient(135deg, rgba(157,206,80,0.06), transparent); }
.featured-card:hover::before  { opacity: 1; }
.featured-card:hover {
  border-color: var(--border-h);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 163, 251, 0.12);
}
.featured-card .card-type {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.featured-card h3 { color: var(--white); }
.featured-card p { font-size: 0.875rem; color: var(--text-dim); }
.featured-card .card-arrow {
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--blue);
  font-weight: 500;
}
.featured-card .gem-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--amber);
  background: rgba(255,177,20,0.1);
  border: 1px solid rgba(255,177,20,0.2);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}

/* ── GAMES PAGE ────────────────────────────────────────────── */
.gamesdale-hero {
  background: #051830;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  margin-bottom: 1.5rem;
  min-height: 260px;
  position: relative;
  overflow: hidden;
}
.gamesdale-castle-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 65% center;
  z-index: 0;
}
.gamesdale-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(95deg, rgba(5,17,30,0.9) 0%, rgba(5,17,30,0.65) 45%, rgba(5,17,30,0) 100%);
  border-radius: inherit;
  z-index: 1;
}
.gamesdale-hero-content { position: relative; z-index: 2; }
.gamesdale-hero .eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.75rem;
}
.gamesdale-logo-long {
  height: 52px;
  width: auto;
  max-width: 480px;
  display: block;
  margin-bottom: 1.25rem;
}
.gamesdale-hero p { color: var(--text-dim); max-width: 480px; margin-bottom: 1.25rem; }

.web-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}
.game-card:hover {
  border-color: var(--border-h);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 163, 251, 0.12);
}
.game-card-thumb {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  position: relative;
  overflow: hidden;
}
.game-card-thumb.pairaphrase {
  background: linear-gradient(180deg, #061525 0%, var(--bg-card) 100%);
}
.game-card-thumb.blockaid {
  background: linear-gradient(180deg, #061525 0%, var(--bg-card) 100%);
}
.game-card-body { padding: 1.25rem; flex: 1; }
.game-card-body h3 { margin-bottom: 0.4rem; }
.game-card-body p { font-size: 0.875rem; color: var(--text-dim); }
.game-card-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.gem-award-label {
  font-size: 0.72rem;
  color: var(--amber);
  font-weight: 600;
}

/* Board game cards */
.board-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}
.board-game-entry {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  min-height: 430px;
}
/* ── Magic Frog Bog bespoke layout ─────────────────────────── */
.mfb-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0.75rem 1.5rem;
  background: linear-gradient(180deg, #061525 0%, var(--bg-card) 100%);
}
.mfb-main-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.mfb-mat {
  display: block;
  width: min(260px, 100%);
  flex-shrink: 0;
  border-radius: 8px;
  box-shadow: 0 6px 28px rgba(0,0,0,0.7);
  position: relative;
  z-index: 1;
}
.mfb-side-fan {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
/* each fan nudges slightly over the mat edge */
.mfb-side-fan.left  { margin-right: -10px; }
.mfb-side-fan.right { margin-left:  -10px; }

.mfb-side-card {
  height: 118px;
  width: auto;
  border-radius: 6px;
  box-shadow: 3px 4px 12px rgba(0,0,0,0.65);
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
/* Left stack — top (Creature): inner bottom corner tilts toward mat */
.mfb-side-fan.left .mfb-side-card:nth-child(1) {
  transform: rotate(8deg);
  z-index: 3;
}
/* Left stack — bottom (Story): peeks out below, slightly less tilt */
.mfb-side-fan.left .mfb-side-card:nth-child(2) {
  transform: rotate(5deg);
  z-index: 2;
  margin-top: -62px;
}
/* Right stack — top (Prophecy): inner bottom corner tilts toward mat */
.mfb-side-fan.right .mfb-side-card:nth-child(1) {
  transform: rotate(-8deg);
  z-index: 3;
}
/* Right stack — bottom (Reference): peeks out below */
.mfb-side-fan.right .mfb-side-card:nth-child(2) {
  transform: rotate(-5deg);
  z-index: 2;
  margin-top: -62px;
}
/* Hover: scale up and translate toward mat center to avoid edge clipping */
.mfb-side-fan.left .mfb-side-card:hover {
  transform: translateX(30px) translateY(-10px) scale(1.22) rotate(0deg) !important;
  z-index: 10 !important;
  box-shadow: 6px 16px 30px rgba(0,0,0,0.85);
}
.mfb-side-fan.right .mfb-side-card:hover {
  transform: translateX(-30px) translateY(-10px) scale(1.22) rotate(0deg) !important;
  z-index: 10 !important;
  box-shadow: 6px 16px 30px rgba(0,0,0,0.85);
}
.mfb-items-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: -1.6rem;
  position: relative;
  z-index: 4;
  padding-bottom: 0.25rem;
}
.mfb-item {
  height: 70px;
  width: auto;
  border-radius: 7px;
  box-shadow: 3px 6px 14px rgba(0,0,0,0.65);
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.mfb-item:nth-child(1) { transform: rotate(-4deg);                 z-index: 1; }
.mfb-item:nth-child(2) { transform: rotate(1deg) translateY(-4px); z-index: 2; }
.mfb-item:nth-child(3) { transform: rotate(-2deg);                 z-index: 1; }
.mfb-item:hover {
  transform: rotate(0deg) translateY(-14px) scale(1.12) !important;
  z-index: 6 !important;
  box-shadow: 4px 16px 28px rgba(0,0,0,0.8);
}

/* Real card photo row */
.real-cards-row {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  background: linear-gradient(180deg, #061525 0%, var(--bg-card) 100%);
}
.real-card-img {
  height: 148px;
  width: auto;
  border-radius: 7px;
  box-shadow: 4px 8px 20px rgba(0,0,0,0.65);
  margin: 0 -10px;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, z-index 0s;
}
.real-cards-row .real-card-img:nth-child(1) { transform: rotate(-7deg) translateY(6px); z-index: 1; }
.real-cards-row .real-card-img:nth-child(2) { transform: rotate(-2deg) translateY(2px); z-index: 2; }
.real-cards-row .real-card-img:nth-child(3) { transform: rotate(2deg) translateY(2px); z-index: 3; }
.real-cards-row .real-card-img:nth-child(4) { transform: rotate(7deg) translateY(6px); z-index: 4; }
.real-cards-row:hover .real-card-img:nth-child(1) { transform: rotate(-10deg) translateY(2px) translateX(-10px); }
.real-cards-row:hover .real-card-img:nth-child(2) { transform: rotate(-3deg) translateY(-6px) translateX(-3px); }
.real-cards-row:hover .real-card-img:nth-child(3) { transform: rotate(3deg) translateY(-6px) translateX(3px); }
.real-cards-row:hover .real-card-img:nth-child(4) { transform: rotate(10deg) translateY(2px) translateX(10px); }
.real-card-img:hover {
  transform: translateY(-18px) rotate(0deg) scale(1.06) !important;
  z-index: 10 !important;
  box-shadow: 6px 20px 40px rgba(0,0,0,0.75);
}

.board-game-entry:hover {
  border-color: var(--border-h);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 163, 251, 0.1);
}

.playing-cards-row {
  display: flex;
  justify-content: center;
  padding: 2rem 1.5rem 1rem;
  gap: -8px;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-card) 100%);
}

.playing-card {
  width: 80px;
  height: 120px;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  position: relative;
  margin: 0 -6px;
  box-shadow: 2px 4px 12px rgba(0,0,0,0.5);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.playing-cards-row:hover .playing-card { margin: 0 2px; }
.playing-cards-row .playing-card:hover { transform: translateY(-8px); z-index: 2; }

.playing-card .card-sym {
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: 0.2rem;
}
.playing-card .card-label {
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}
.playing-card .card-corner {
  position: absolute;
  top: 5px;
  left: 7px;
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1;
  text-align: left;
}
.playing-card .card-corner-br {
  position: absolute;
  bottom: 5px;
  right: 7px;
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1;
  transform: rotate(180deg);
}

/* Card color themes */
.card-theme-amber {
  background: linear-gradient(145deg, #2a1800, #3d2200);
  color: var(--amber);
  border-color: rgba(255, 177, 20, 0.35);
}
.card-theme-blue {
  background: linear-gradient(145deg, #001a3a, #002a5a);
  color: var(--blue-l);
  border-color: rgba(0, 163, 251, 0.35);
}
.card-theme-green {
  background: linear-gradient(145deg, #0f2a0a, #1a3d0f);
  color: var(--green);
  border-color: rgba(157, 206, 80, 0.35);
}
.card-theme-purple {
  background: linear-gradient(145deg, #1a0a2e, #2a1545);
  color: var(--purple);
  border-color: rgba(182, 123, 230, 0.35);
}
.card-theme-red {
  background: linear-gradient(145deg, #2a0500, #3d0800);
  color: #ff7050;
  border-color: rgba(243, 79, 25, 0.35);
}

.board-game-info { padding: 1.25rem 1.5rem 1.5rem; flex-shrink: 0; }
.board-game-info p { font-size: 0.875rem; color: var(--text-dim); margin-bottom: 0.75rem; }
.game-title-row {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}
.game-title-row h3 { margin-bottom: 0; }
.mechanics { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ── CODE PAGE ─────────────────────────────────────────────── */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}
.project-card:hover {
  border-color: var(--border-h);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 163, 251, 0.1);
}
.project-thumb {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: -0.02em;
  overflow: hidden;
}
.project-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.project-card-body h3 { margin-bottom: 0.4rem; }
.project-card-body p { font-size: 0.875rem; color: var(--text-dim); flex: 1; }
.project-card-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ── CREATIVE PAGE ─────────────────────────────────────────── */
.photo-collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.photo-collection {
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  aspect-ratio: 4/3;
  transition: transform var(--transition), box-shadow var(--transition);
}
.photo-collection:hover { transform: scale(1.02); box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
.photo-collection-bg {
  width: 100%; height: 100%;
  background: var(--bg-2);
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
}
.photo-collection-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
}
.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,17,30,0.8) 0%, transparent 60%);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.photo-overlay h3 { font-size: 1rem; color: var(--white); }
.photo-overlay p { font-size: 0.8rem; color: rgba(255,255,255,0.6); margin-top: 0.2rem; }

.standalones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}
.photo-thumb {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.photo-thumb:hover { transform: scale(1.04); box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
.photo-thumb-bg {
  width: 100%;
  height: 100%;
}

.film-entries { display: flex; flex-direction: column; gap: 2rem; }
.film-entry {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  height: 280px;
  transition: all var(--transition);
}
.film-entry:hover { border-color: var(--border-h); }
.film-thumb {
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  align-self: stretch;
}
.film-thumb img {
  height: 100%;
  width: auto;
  display: block;
}
.film-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 40%, var(--bg-card) 100%);
  z-index: 1;
}
.film-info { flex: 1; padding: 1.75rem; display: flex; flex-direction: column; gap: 0.75rem; }
.film-info h3 { margin-bottom: 0.25rem; }
.film-info p { font-size: 0.875rem; color: var(--text-dim); flex: 1; }
.film-info .film-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── ABOUT PAGE ────────────────────────────────────────────── */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}
.about-bio h2 { margin-bottom: 1.25rem; }
.about-bio p { color: var(--text); margin-bottom: 1rem; line-height: 1.75; }
.about-bio p:last-of-type { margin-bottom: 1.75rem; }

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all var(--transition);
}
.social-link:hover {
  border-color: var(--border-h);
  color: var(--blue-l);
  background: var(--bg-card-h);
}
.social-link .social-icon { font-size: 1.1rem; width: 24px; text-align: center; }

.gem-total-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 177, 20, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  margin-top: 2rem;
}
.gem-total-card .big-gem { font-size: 2.5rem; margin-bottom: 0.25rem; }
.gem-total-card h3 { font-size: 1rem; color: var(--text-dim); font-weight: 500; margin-bottom: 0.25rem; }
.gem-total-card .gem-big-num {
  font-family: var(--font-body);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.gem-total-card .gem-progress-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--white); }

/* ── Lightbox ──────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.lightbox.open {
  opacity: 1;
  pointer-events: all;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
}
.lightbox-content {
  position: relative;
  max-width: 900px;
  width: 100%;
  z-index: 1;
}
.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  font-size: 1.5rem;
  color: var(--text-dim);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover { color: var(--white); }
.lightbox-img-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-height: 70vh;
}
.lightbox-placeholder {
  width: 100%;
  padding-bottom: 60%;
  border-radius: var(--radius-lg);
}
.lightbox-placeholder img { width: 100%; height: 100%; object-fit: cover; }
.lightbox-caption {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-dim);
}

/* ── Utility ───────────────────────────────────────────────── */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.divider { border: none; border-top: 1px solid var(--border); margin: 3rem 0; }

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.5s ease forwards; }
.fade-up-2 { animation: fadeUp 0.5s 0.1s ease both; }
.fade-up-3 { animation: fadeUp 0.5s 0.2s ease both; }

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.gem-shimmer {
  background: linear-gradient(90deg, var(--amber) 0%, #ffe080 50%, var(--amber) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  main { padding-top: calc(var(--nav-h) + 2rem); padding-bottom: 4rem; }

  /* Mobile nav */
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 0;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s;
    z-index: 999;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-links a {
    display: block;
    width: 100%;
    padding: 0.25rem 1.5rem;
    border-radius: 0;
    border-bottom: none;
    font-size: 1.25rem;
    text-align: center;
  }
  .nav-links a:hover,
  .nav-links a.active {
    background: none;
    color: var(--blue-l);
  }
  .nav-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
  }
  #gem-counter-wrapper { justify-self: center; }
  .nav-toggle { display: flex; justify-self: end; }
  #nav-overlay { display: block; pointer-events: none; }
  #nav-overlay.visible { pointer-events: all; }

  /* Stack layouts */
  .about-layout { grid-template-columns: 1fr; }
  .film-entry { flex-direction: column; height: auto; }
  .film-thumb::before { display: none; }
  .gamesdale-hero { grid-template-columns: 1fr; }
  .gamesdale-hero p { color: var(--white); }
  .gamesdale-logo-img { display: none; }
  .mfb-side-fan { display: none; }
  .mfb-mat { width: 100%; }

  .card-grid,
  .web-games-grid,
  .board-games-grid,
  .featured-grid,
  .photo-collections-grid { grid-template-columns: 1fr; }

  .hero h1 { font-size: 2.2rem; }
}

@media (max-width: 480px) {
  .gem-toast { right: 1rem; left: 1rem; max-width: 100%; }
  .standalones-grid { grid-template-columns: repeat(2, 1fr); }
}
