/* ═══════════════════════════════════════════
   FONTS
   ═══════════════════════════════════════════ */
@font-face {
  font-family: 'Hanley Pro Sans';
  src: url('/assets/fonts/Hanley Pro Sans.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/Montserrat-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ═══════════════════════════════════════════
   THEME — change these variables to retheme
   the entire site in one place
   ═══════════════════════════════════════════ */
:root {
  /* Brand */
  --clr-primary:        #ca875b;
  --clr-primary-hover:  #a45d2e;
  --clr-primary-light:  #eff6ff;   /* subtle tint for bg/badges */
  --clr-accent:         #f59e0b;
  --clr-accent-hover:   #d97706;

  /* Backgrounds */
  --clr-bg:             #f7f9fc;
  --clr-surface:        #ffffff;
  --clr-surface-alt:    #f1f5f9;

  /* Text */
  --clr-text:           #111827;
  --clr-text-muted:     #6b7280;
  --clr-text-inverse:   #ffffff;

  /* Borders */
  --clr-border:         #e5e7eb;

  /* Header */
  --clr-header-bg:      #ffffff;
  --clr-header-border:  #e5e7eb;

  /* Footer */
  --clr-footer-bg:      #111827;
  --clr-footer-text:    #f9fafb;
  --clr-footer-muted:   #9ca3af;
  --clr-footer-border:  #374151;

  /* Layout */
  --header-height: 100px;
  --max-width:     1200px;

  /* Border radii */
  --r-sm: 4px;
  --r:    8px;
  --r-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.06);

  /* Typography */
  --font:         'Montserrat', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-heading: 'Hanley Pro Sans', system-ui, -apple-system, sans-serif;
}

/* ═══════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  {
  font-family: var(--font);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-heading); }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }
code {
  font-family: 'Courier New', Courier, monospace;
  font-size: .88em;
  padding: 1px 6px;
  border-radius: var(--r-sm);
  color: var(--clr-primary);
}

/* ═══════════════════════════════════════════
   LAYOUT UTILITIES
   ═══════════════════════════════════════════ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
main { flex: 1; }

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--r);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
  line-height: 1;
  font-family: var(--font-heading);
}
.btn:active { transform: scale(.98); }
.btn-primary  { background: var(--clr-primary); color: var(--clr-text-inverse); }
.btn-primary:hover  { background: var(--clr-primary-hover); }
.btn-accent   { background: var(--clr-accent);  color: var(--clr-text-inverse); }
.btn-accent:hover   { background: var(--clr-accent-hover); }
.btn-outline  { border-color: var(--clr-primary); color: var(--clr-primary); background: transparent; }
.btn-outline:hover  { background: var(--clr-primary); color: var(--clr-text-inverse); }
.btn-ghost    { color: var(--clr-text-inverse); border-color: rgba(255,255,255,.45); background: transparent; }
.btn-ghost:hover    { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.75); }

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--clr-header-bg);
  border-bottom: 1px solid var(--clr-header-border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.logo-icon {
  max-width: 50%;
  margin: 0 auto;
}
.logo-icon-footer {
  max-width: 25%;
  margin: 0 auto;
}

/* Mobile header logo */
.header-logo {
  display: none;
}
.header-logo img {
  height: 64px;
  width: auto;
}


/* Nav links */
.site-nav { display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.nav-link {
  padding: 7px 16px;
  border-radius: var(--r-sm);
  color: var(--clr-text-muted);
  font-size: .9rem;
  font-weight: 500;
  transition: color .15s, background .15s;
  white-space: nowrap;
  font-family: var(--font-heading);
}
.nav-link:hover  { color: var(--clr-text);    background: var(--clr-surface-alt); }
.nav-link.active { color: var(--clr-primary); background: var(--clr-primary-light); font-weight: 600; }

/* Audio mute button */
.audio-mute-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--r-sm);
  color: var(--clr-text-muted);
  transition: background .15s, color .15s;
  /* Fixed so it escapes the header stacking context and stays above all overlays */
  position: fixed;
  top: 32px; /* (100px header height - 36px button) / 2 */
  right: 24px;
  z-index: 100001; /* above #device-overlay (99999) and #jc-flash (99998) */
  pointer-events: auto; /* stays clickable even when body has pointer-events:none */
}
.audio-mute-btn:hover { background: var(--clr-surface-alt); color: var(--clr-text); }

/* Hamburger toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  transition: background .15s;
}
.nav-toggle:hover { background: var(--clr-surface-alt); }
.nav-toggle span {
  display: block;
  height: 2px;
  width: 20px;
  margin: 0 auto;
  background: var(--clr-text);
  border-radius: 2px;
  transition: transform .25s, opacity .25s, width .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════ */
.section         { padding: 80px 0; }
.section-alt     { background: var(--clr-surface-alt); }
.section-surface { background: var(--clr-surface); }

.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-primary);
  background: var(--clr-primary-light);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin-bottom: 12px;
}
.section-subtitle {
  color: var(--clr-text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 48px;
}

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
  background: var(--clr-surface);
  padding: 96px 0 80px;
  text-align: center;
  border-bottom: 1px solid var(--clr-border);
}
.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 22px;
}
.hero h1 span { color: var(--clr-primary); }
.hero p {
  font-size: 1.15rem;
  color: var(--clr-text-muted);
  max-width: 520px;
  margin: 0 auto 40px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ═══════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

/* Product image cards */
.product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

/* Game image cards */
.game-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.product-card {
  padding: 0;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
}
.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}
.product-name {
  padding: 10px 8px;
  font-size: .875rem;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--clr-text);
}
.game-card {
  padding: 0;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.game-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}
.game-name {
  padding: 10px 8px;
  font-size: .875rem;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--clr-text);
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r);
  background: var(--clr-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 1.4rem;
}
.card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.card p  { color: var(--clr-text-muted); font-size: .9rem; line-height: 1.6; }

/* ═══════════════════════════════════════════
   CTA STRIP
   ═══════════════════════════════════════════ */
.cta-strip {
  background: var(--clr-primary);
  padding: 72px 0;
  text-align: center;
}
.cta-strip h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--clr-text-inverse);
  letter-spacing: -.02em;
  margin-bottom: 14px;
}
.cta-strip p { color: rgba(255,255,255,.8); font-size: 1.05rem; margin-bottom: 36px; }

/* ═══════════════════════════════════════════
   PAGE HEADER (inner pages)
   ═══════════════════════════════════════════ */
.page-header {
  background: var(--clr-surface);
  padding: 60px 0 52px;
  border-bottom: 1px solid var(--clr-border);
}
.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 12px;
}
.page-header p { color: var(--clr-text-muted); font-size: 1.1rem; }

/* ═══════════════════════════════════════════
   TEAM CARDS
   ═══════════════════════════════════════════ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
.team-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: 32px 24px 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.team-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
}
/* Avatar colour variants */
.av-blue   { background: var(--clr-primary); }
.av-purple { background: #7c3aed; }
.av-green  { background: #059669; }
.av-amber  { background: var(--clr-accent); }
.av-red    { background: #dc2626; }
.av-teal   { background: #0891b2; }

.team-card h3   { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.team-card .role {
  color: var(--clr-primary);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  margin-bottom: 12px;
}
.team-card p { color: var(--clr-text-muted); font-size: .875rem; line-height: 1.55; }

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.site-footer { background: var(--clr-footer-bg); color: var(--clr-footer-text); }
.footer-body {
  padding: 60px 0 48px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 56px;
}
.footer-brand .logo { color: var(--clr-footer-text); margin-bottom: 16px; }
.footer-brand p {
  color: var(--clr-footer-muted);
  font-size: .9rem;
  line-height: 1.7;
  max-width: 280px;
}
.footer-col h4 {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-footer-muted);
  margin-bottom: 18px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { color: var(--clr-footer-text); font-size: .9rem; opacity: .75; transition: opacity .15s; }
.footer-col ul li a:hover { opacity: 1; }
.footer-bottom {
  border-top: 1px solid var(--clr-footer-border);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p { color: var(--clr-footer-muted); font-size: .83rem; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--clr-footer-muted); font-size: .83rem; transition: color .15s; }
.footer-links a:hover { color: var(--clr-footer-text); }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .audio-mute-btn {
    right: 68px; /* step left of the hamburger (36px toggle + 8px gap + 24px edge) */
  }

  .header-inner { justify-content: flex-end; }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--clr-header-bg);
    border-bottom: 1px solid var(--clr-header-border);
    padding: 8px 16px 16px;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow-md);
  }
  .site-nav.open { display: flex; }
  .nav-link { padding: 10px 14px; }

  .section { padding: 56px 0; }
  .hero    { padding: 64px 0 56px; }

  .footer-body { grid-template-columns: 1fr; gap: 36px; padding: 48px 0 36px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .founder-card { flex-direction: column; }
  .founder-img  { width: 100%; max-width: 320px; margin: 0 auto; }

  .header-logo {
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 280px; justify-content: center; }
}

/* ═══════════════════════════════════════════
   BLOG — listing & article
   ═══════════════════════════════════════════ */

/* Toolbar */
.blog-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.search-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 16px;
  border: 1px solid var(--clr-border);
  border-radius: var(--r);
  font-family: var(--font);
  font-size: .95rem;
  background: var(--clr-surface);
  color: var(--clr-text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search-input:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(202,135,91,.15);
}
.sort-btn {
  padding: 10px 18px;
  border: 1px solid var(--clr-border);
  border-radius: var(--r);
  background: var(--clr-surface);
  color: var(--clr-text-muted);
  font-family: var(--font);
  font-size: .9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}
.sort-btn:hover { border-color: var(--clr-primary); color: var(--clr-primary); }

@keyframes post-card-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes log-line-in {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.log-line {
  display: block;
  opacity: 0;
  animation: log-line-in 0.15s ease-out forwards;
}

/* Post grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s, border-color .2s;
  color: inherit;
}
.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--clr-primary);
}
.post-date {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--clr-primary);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.post-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; line-height: 1.3; }
.post-card p  { color: var(--clr-text-muted); font-size: .9rem; line-height: 1.6; flex: 1; margin-bottom: 20px; }
.post-read-more { font-size: .88rem; font-weight: 600; color: var(--clr-primary); }
.post-empty {
  color: var(--clr-text-muted);
  font-size: 1rem;
  padding: 48px 0;
  text-align: center;
  grid-column: 1 / -1;
}

/* Individual article */
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--clr-primary);
  margin-bottom: 24px;
}
.article-back:hover { text-decoration: underline; }
.article-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; flex-wrap: wrap; }
.article-date { font-size: .85rem; color: var(--clr-text-muted); }
.article-body {
  max-width: 720px;
  font-size: 1.05rem;
  line-height: 1.8;
}
.article-body h1, .article-body h2, .article-body h3, .article-body h4 {
  margin-top: 2em;
  margin-bottom: .6em;
  line-height: 1.25;
}
.article-body h1 { font-size: 2rem; }
.article-body h2 { font-size: 1.5rem; }
.article-body h3 { font-size: 1.2rem; }
.article-body p  { margin-bottom: 1.2em; }
.article-body ul, .article-body ol { padding-left: 1.5em; margin-bottom: 1.2em; list-style: disc; }
.article-body ol  { list-style: decimal; }
.article-body li  { margin-bottom: .4em; }
.article-body blockquote {
  border-left: 3px solid var(--clr-primary);
  padding: 8px 16px;
  margin: 1.2em 0;
  color: var(--clr-text-muted);
  font-style: italic;
}
.article-body a { color: var(--clr-primary); text-decoration: underline; }
.article-body img { border-radius: var(--r); margin: 1.5em 0; }
.article-body hr { border: none; border-top: 1px solid var(--clr-border); margin: 2em 0; }
.article-body strong { font-weight: 700; }

/* ═══════════════════════════════════════════
   FOUNDER SPLIT SECTIONS
   ═══════════════════════════════════════════ */
.founder-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 100%;
  margin: 0 auto;
}

.founder-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
}

.founder-img {
  max-width: 30%;
  flex-shrink: 0;
  border-radius: 8px;
}

.founder-card p {
  flex: 1;
  font-size: 1.2em;
  margin: 0;
}
