/* ─── Bear Falls Games ───────────────────────────────────────────────
   Shared stylesheet for every page on bearfallsgames.github.io.
   ──────────────────────────────────────────────────────────────────── */

/* ─── Reset & Variables ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0e0f11;
  --bg-card:   #15171a;
  --bg-lift:   #1c1f23;
  --border:    #2a2d32;
  --border-hi: #3d4147;
  --text:      #c8cdd6;
  --text-dim:  #636a75;
  --text-hi:   #edf0f5;
  --accent:    #8cc9f0;   /* studio blue - lifted from the logo */
  --accent-2:  #c49a6c;   /* warm amber - human touch */
  --accent-glow: rgba(140, 201, 240, 0.12);
  --accent-line: rgba(140, 201, 240, 0.3);
  --font-mono: 'DM Mono', monospace;
  --font-serif:'Fraunces', serif;
  --font-sans: 'DM Sans', sans-serif;
  --radius:    6px;
  --sidebar-w: 320px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
}
a:hover { color: var(--text-hi); }

/* ─── Layout ────────────────────────────────────────────────────────── */
.wrapper {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ─── Sidebar ───────────────────────────────────────────────────────── */
#sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 3rem 2rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  background: var(--bg-card);
}

.sidebar-top { display: flex; flex-direction: column; gap: 0.75rem; }

.brand-mark { width: 48px; height: 48px; display: block; }

.moniker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

#sidebar h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 300;
  color: var(--text-hi);
  line-height: 1.15;
}

#sidebar h1 em {
  font-style: italic;
  color: var(--accent-2);
}

.tagline {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.6;
  border-left: 2px solid var(--border-hi);
  padding-left: 0.85rem;
}

.available-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  width: fit-content;
  transition: border-color 0.2s;
}
.available-pill:hover { border-color: var(--accent); color: var(--accent); }
.available-pill::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Sidebar nav */
.sidebar-nav { display: flex; flex-direction: column; gap: 0.25rem; }

.sidebar-nav a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.sidebar-nav a .nav-marker {
  width: 18px;
  height: 1px;
  background: var(--border-hi);
  transition: width 0.2s, background 0.2s;
}
.sidebar-nav a:hover { color: var(--text-hi); background: var(--bg-lift); }
.sidebar-nav a:hover .nav-marker { width: 28px; background: var(--accent); }

/* Sidebar links */
.contact-links { display: flex; flex-direction: column; gap: 0.5rem; }

.contact-links a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: color 0.2s;
}
.contact-links a:hover { color: var(--accent); }
.contact-links a svg { flex-shrink: 0; opacity: 0.6; }

.sidebar-section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

/* ─── Main Content ──────────────────────────────────────────────────── */
#main {
  padding: 4rem 3.5rem 5rem;
  max-width: 820px;
}

section { margin-bottom: 5rem; }
section:last-child { margin-bottom: 0; }

section h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--text-hi);
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
section h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

#main p {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1rem;
}
#main p:last-child { margin-bottom: 0; }

#main strong { color: var(--text-hi); font-weight: 500; }

.section-blurb {
  font-size: 0.9rem !important;
  color: var(--text-dim) !important;
  line-height: 1.7 !important;
  margin-bottom: 1.5rem !important;
}

/* ─── Games ─────────────────────────────────────────────────────────── */
.games-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.game-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.game-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.game-card:hover::before { opacity: 1; }

.game-card.featured { grid-column: 1 / -1; }

.game-main { display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }

.game-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.game-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-hi);
  line-height: 1.3;
  margin-bottom: 0;
}

.game-card p {
  font-size: 0.875rem !important;
  color: var(--text-dim) !important;
  line-height: 1.65 !important;
  margin-bottom: 0 !important;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  background: var(--bg-lift);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.18rem 0.45rem;
}
.tag.accent {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-glow);
}

/* Card media strip */
.card-media {
  display: flex;
  gap: 1px;                     /* hairline divider via background showing through */
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: 180px;
  flex-shrink: 0;
}
.card-media img {
  flex: 1 1 0;
  width: 0;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.game-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  transition: color 0.2s;
}
.game-link:hover { color: var(--accent); }

.game-link--primary {
  color: var(--accent);
  border: 1px solid var(--accent-line);
  background: var(--accent-glow);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: background 0.2s, border-color 0.2s;
}
.game-link--primary:hover { border-color: var(--accent); }

/* ─── Contact cards ─────────────────────────────────────────────────── */
/* auto-fit so a lone card fills the row, and extra channels can be added
   later without touching the layout */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: border-color 0.2s, color 0.2s;
}
.contact-card:hover { border-color: var(--accent); color: var(--accent); }
.contact-card svg { flex-shrink: 0; }
.contact-card span { font-family: var(--font-mono); font-size: 0.75rem; }

/* ─── Footer ────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

footer p {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

/* understated: reads as fine print until hovered */
.footer-note a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-note a:hover { color: var(--accent); }

/* ─── Animations ────────────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s ease forwards;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; animation: none; }
  .available-pill::before { animation: none; }
  .game-card:hover { transform: none; }
}

/* ─── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .wrapper { grid-template-columns: 1fr; }

  #sidebar {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 2rem 1.5rem;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .sidebar-top { flex: 1; min-width: 240px; }
  .sidebar-nav { display: none; }

  #main { padding: 2.5rem 1.5rem 3rem; }

  .games-grid { grid-template-columns: 1fr; }
  .card-media { height: 150px; }

  footer { padding: 1.25rem 1.5rem; }
}
