@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@800;900&family=DM+Mono:wght@400;500&display=swap');

/* detroit.games — main stylesheet */


/* ── Ghost spade watermark ── */
.ghost-spade-bg {
  position: fixed;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: 520px;
  height: auto;
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* dark theme (default) */
  --bg:        #0D1B2E;
  --bg-card:   #132238;
  --bg-nav:    #091422;
  --accent:    #c8a951;
  --accent-dk: #a88a38;
  --text:      #e8e8f0;
  --muted:     #c3c3dd;
  --border:    #2a2a42;
  --radius:    8px;
  /* Reading measure for the prose pages. */
  --max-w:     900px;
  /* Nav, and the layouts that run wide (the /euchre hub). Same width as the
     home page's shell, so the header does not jump between them. */
  --shell:     1120px;
}


html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 85% 50%, rgba(232,185,35,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 90% 20%, rgba(232,185,35,0.04) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Nav ── */
body > header,
body > nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav {
  position: relative;
  background: var(--bg-nav);
  border-bottom: 1px solid rgba(200, 169, 81, 0.16);
}

.nav-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 80px;
}

.nav-logo {
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-img {
  height: 48px;
  width: auto;
  display: block;
}

.nav-brand {
  font-family: 'Barlow', sans-serif;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  flex: 1;
}

/* Padded to a 44px target rather than sized to the text, per HIG. */
.nav-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

/* The page you are on, said twice: gold, and underlined. */
.nav-links a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 6px 6px 0 0;
}

/* ── Mobile menu button ── */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle:hover, .nav-toggle:focus-visible { border-color: var(--accent); }

/* Three bars from one element: the middle bar is the box, the outer two are
   its pseudo-elements. */
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.15s, opacity 0.15s;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: '';
  position: relative;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 4px; }

/* Open state folds the bars into a close icon. */
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-4px) rotate(-45deg); }


.nav-cta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}


/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #0a0a14;
  font-family: 'Barlow', sans-serif;
  font-weight: 800;
}

.btn-primary:hover { background: var(--accent-dk); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-family: 'Barlow', sans-serif;
  font-weight: 800;
}

.btn-outline:hover {
  background: var(--accent);
  color: #0a0a14;
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 1.05rem;
}

/* ── Layout ── */
main {
  flex: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  width: 100%;
}

/* ── Hero ── */
.hero {
  text-align: center;
  /*padding: 3.5rem 0 2.5rem;*/
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p {
  font-size: 1.15rem;
  color: var(--text);
  max-width: 580px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Card grid ── */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 2.5rem 0;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.game-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.game-card .badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  background: rgba(200,169,81,0.12);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  width: fit-content;
}

.game-card .badge.soon {
  color: var(--muted);
  background: rgba(144,144,168,0.1);
}

.game-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.game-card p {
  font-size: 0.9rem;
  color: var(--muted);
  flex: 1;
}

/* ── Section prose ── */
.section {
  margin: 3rem 0;
}

.section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}

.section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.4rem;
}

.section p { margin-bottom: 0.75rem; color: var(--text); }

a:not([class]), a.bluesky-link { color: var(--accent); }
a:not([class]):visited, a.bluesky-link:visited { color: var(--gold-dim, #c9971a); }
a:not([class]):hover, a.bluesky-link:hover { color: var(--text); }
.section p:last-child { margin-bottom: 0; }

.section ul, .section ol {
  padding-left: 1.4rem;
  color: var(--text);
}

.section li { margin-bottom: 0.35rem; }

/* ── Definition list (glossary) ── */
dl dt {
  font-weight: 700;
  color: var(--accent);
  margin-top: 1rem;
}

dl dd {
  color: var(--text);
  padding-left: 1rem;
}

/* ── FAQ accordion ── */
.faq-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

details[open] { border-color: var(--accent); }

summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--muted);
  transition: transform 0.15s;
}

details[open] summary::after {
  transform: rotate(45deg);
  color: var(--accent);
}

.faq-answer {
  padding: 0 1.25rem 1rem;
  color: var(--text);
  font-size: 0.95rem;
}

/* ── Page header (inner pages) ── */
.page-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text);
  font-size: 1.05rem;
}

/* ── Coming soon ── */
.coming-soon-banner {
  text-align: center;
  padding: 3rem 1rem;
}

.coming-soon-banner .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.coming-soon-icon {
  width: 64px;
  height: 64px;
  display: block;
  margin: 0 auto 1rem;
}

.coming-soon-banner h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.coming-soon-banner p { color: var(--muted); }

/* ── Footer ── */
.site-footer {
  background: var(--bg-nav);
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  list-style: none;
  align-items: center;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}

.footer-links a:visited { color: var(--accent-dk); }
.footer-links a:hover { color: var(--text); }

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ── Utilities ── */
.text-accent { color: var(--accent); }
.text-muted  { color: var(--muted); }

/* ── Responsive ── */
/* Seven items, a wordmark, and a button stop fitting before the phone
   breakpoint, so the wordmark goes first and the links follow. */
@media (max-width: 1000px) {
  .nav-brand { display: none; }
  .nav-links a { padding: 0 0.5rem; }
}

/* Below this the links do not fit beside the wordmark and the button, so they
   move behind the hamburger. The panel drops out of the bar at full width;
   rows are 48px so they clear the 44pt target with room to spare. */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  /* With the links gone from the bar there is room for the name again. */
  .nav-brand { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-nav);
    border-bottom: 1px solid rgba(200, 169, 81, 0.16);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    padding: 0.5rem 1.25rem 1rem;
  }

  .nav-links.is-open { display: flex; }

  .nav-links a {
    min-height: 48px;
    padding: 0 0.75rem;
    font-size: 17px;
    border-radius: 6px;
  }

  .nav-links a[aria-current="page"] {
    box-shadow: inset 2px 0 0 var(--accent);
    background: rgba(200, 169, 81, 0.08);
    border-radius: 6px;
  }
}

@media (max-width: 600px) {
  .hero { padding: 2rem 0 1.5rem; }
  .game-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 1rem; }
}
