/* howtoplayblackjack.info — site chrome
   Palette: wine family. Type: Bungee (display) + Karla (body). Sharp corners throughout. */

@font-face {
  font-family: 'Bungee';
  src: url('/fonts/bungee-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('/fonts/karla-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('/fonts/karla-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('/fonts/karla-latin-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --wine: #41112b;
  --wine-deep: #2c0a1d;
  --wine-soft: #5d2240;
  --brass: #d9a23b;
  --brass-bright: #f0bc55;
  --ivory: #f4ede4;
  --ivory-dim: #e7dccb;
  --ink: #241019;
  --felt: #1d6e46;
  --felt-deep: #145032;
  --ok: #3f9e64;
  --bad: #c0473b;
  --font-display: 'Bungee', 'Arial Black', sans-serif;
  --font-body: 'Karla', 'Helvetica Neue', Arial, sans-serif;
  --shadow-block: 6px 6px 0 var(--ink);
  --shadow-block-sm: 3px 3px 0 var(--ink);
  --topbar-h: 56px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); color: var(--wine); margin: 2.5em 0 0.7em; }
h3 { font-size: clamp(1.15rem, 3vw, 1.4rem); color: var(--wine-soft); margin: 1.8em 0 0.5em; }
h4 { font-family: var(--font-body); font-weight: 700; font-size: 1.1rem; color: var(--wine); margin: 1.5em 0 0.4em; }

p { margin: 0 0 1.1em; }
a { color: var(--wine); text-decoration-color: var(--brass); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--wine-soft); }
strong { color: var(--wine-deep); }

/* ---------- top bar ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--topbar-h);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  background: var(--wine-deep);
  border-bottom: 3px solid var(--brass);
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}
.topbar .brand img { width: 34px; height: 34px; display: block; }
.topbar h1 {
  font-size: clamp(0.78rem, 2.6vw, 1.05rem);
  color: var(--ivory);
  margin: 0;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar h1 .hl { color: var(--brass); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--ivory);
  border: 2px solid var(--wine-soft);
  padding: 5px 9px;
  user-select: none;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch[open] summary { background: var(--wine-soft); }
.lang-switch ul {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--wine-deep);
  border: 2px solid var(--brass);
  box-shadow: var(--shadow-block-sm);
  min-width: 130px;
}
.lang-switch li a {
  display: block;
  padding: 7px 10px;
  color: var(--ivory);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
}
.lang-switch li a:hover, .lang-switch li a[aria-current] { background: var(--wine-soft); color: var(--brass-bright); }

.btn-board {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--ink);
  background: var(--brass);
  border: 0;
  padding: 7px 11px;
  cursor: pointer;
  box-shadow: var(--shadow-block-sm);
}
.btn-board:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* ---------- game stage shell ---------- */
.stage-wrap {
  margin-top: var(--topbar-h);
  height: calc(100dvh - var(--topbar-h));
  min-height: 480px;
  background: var(--wine-deep);
  position: relative;
  overflow: hidden;
}
.scroll-hint {
  position: absolute;
  bottom: 10px;
  left: 14px;
  z-index: 30;
  color: var(--ivory);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.scroll-hint::after {
  content: '';
  width: 10px; height: 10px;
  border-right: 3px solid var(--brass);
  border-bottom: 3px solid var(--brass);
  transform: rotate(45deg);
  animation: hint-bob 1.6s ease-in-out infinite;
}
@keyframes hint-bob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50% { transform: rotate(45deg) translate(3px, 3px); }
}

/* ---------- anchor nav ---------- */
.anchor-nav {
  position: sticky;
  top: var(--topbar-h);
  z-index: 50;
  background: var(--ivory);
  border-bottom: 3px solid var(--ink);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.anchor-nav::-webkit-scrollbar { display: none; }
.anchor-nav ul {
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0 8px;
  list-style: none;
  white-space: nowrap;
}
.anchor-nav a {
  display: block;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--wine);
  text-decoration: none;
  border-bottom: 4px solid transparent;
}
.anchor-nav a:hover { border-bottom-color: var(--brass); }

/* ---------- content ---------- */
.content {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}
.content > section { scroll-margin-top: calc(var(--topbar-h) + 56px); }

ul.checklist { padding-left: 1.3em; }
ul.checklist li { margin-bottom: 0.45em; }

/* voxel-frame callout — site-specific, no tinted border-l-4 pattern */
.vox-note {
  margin: 1.6em 0;
  padding: 16px 18px;
  background: var(--ivory-dim);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-block);
  position: relative;
}
.vox-note::before {
  content: '';
  position: absolute;
  top: -3px; left: 14px;
  width: 34px; height: 8px;
  background: var(--brass);
  border: 3px solid var(--ink);
  border-top: 0;
}
.vox-note p:last-child { margin-bottom: 0; }

/* data tables (strategy chart, values) */
.table-scroll { overflow-x: auto; margin: 1.4em 0; border: 3px solid var(--ink); box-shadow: var(--shadow-block); }
table.vox-table { border-collapse: collapse; width: 100%; font-size: 0.85rem; background: var(--ivory); }
table.vox-table caption { caption-side: bottom; font-size: 0.78rem; padding: 8px; color: var(--wine-soft); text-align: left; }
table.vox-table th, table.vox-table td { border: 1px solid var(--ink); padding: 6px 8px; text-align: center; }
table.vox-table thead th { background: var(--wine); color: var(--ivory); font-family: var(--font-body); position: sticky; top: 0; }
table.vox-table tbody th { background: var(--wine-soft); color: var(--ivory); }
.act-H { background: #e9c9c2; }
.act-S { background: #c9e0cf; }
.act-D { background: #f0ddb2; }
.act-P { background: #c7d4e8; }
.act-R { background: #ddd0e0; }

.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.82rem; margin: 0.6em 0 1.4em; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border: 1px solid var(--ink); display: inline-block; font-style: normal; }

/* FAQ accordions */
.faq details {
  border: 3px solid var(--ink);
  background: #fff;
  margin-bottom: 10px;
  box-shadow: var(--shadow-block-sm);
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 13px 40px 13px 15px;
  list-style: none;
  position: relative;
  user-select: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  position: absolute;
  right: 16px; top: 50%;
  width: 9px; height: 9px;
  margin-top: -7px;
  border-right: 3px solid var(--wine);
  border-bottom: 3px solid var(--wine);
  transform: rotate(45deg);
  transition: transform 0.15s;
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq details > div { padding: 0 15px 14px; }
.faq details > div p:last-child { margin-bottom: 0; }

/* CTA slots — empty at launch, activated later */
.cta-slot[hidden] { display: none; }

/* footer */
.site-footer {
  background: var(--wine-deep);
  color: var(--ivory-dim);
  padding: 26px 20px;
  font-size: 0.85rem;
}
.site-footer .inner { max-width: 760px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; }
.site-footer a { color: var(--brass-bright); }
.site-footer p { margin: 0; }

@media (max-width: 520px) {
  body { font-size: 1rem; }
  .content { padding: 18px 14px 48px; }
}
