/* =========================================================
   bitcoincashcasino.net — global stylesheet
   Editorial black & white theme for a Bitcoin casino review site
   ========================================================= */

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---------- Tokens ---------- */
:root {
  --bg-light: #f6f6f3;
  --bg-panel: #ffffff;
  --black: #111111;
  --black-soft: #1c1c1c;
  --white: #ffffff;
  --border: #d9d9d4;
  --text-muted: #55564f;
  --font-heading: Georgia, "Times New Roman", Times, serif;
  --font-body: "Helvetica Neue", Arial, Helvetica, sans-serif;
  --max-width: 960px;
  --radius: 2px;
}

body {
  background-color: var(--bg-light);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--black);
}

a:focus,
button:focus {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  background-color: var(--black);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 500;
  border-bottom: 1px solid var(--black-soft);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
}

.logo img {
  height: 36px;
  width: auto;
  display: block;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 0.5px;
  color: var(--white);
}

.header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 11px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid var(--white);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn-fill {
  background-color: var(--white);
  color: var(--black);
}

.btn-fill:hover {
  background-color: transparent;
  color: var(--white);
}

.btn-outline {
  background-color: transparent;
  color: var(--white);
}

.btn-outline:hover {
  background-color: var(--white);
  color: var(--black);
}

/* =========================================================
   MAIN CONTENT
   ========================================================= */
main {
  background-color: var(--bg-light);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px 60px;
}

main h1,
main h2,
main h3,
main h4 {
  font-family: var(--font-heading);
  color: var(--black);
  line-height: 1.25;
  margin-top: 1.6em;
  margin-bottom: 0.5em;
}

main h1 {
  font-size: 34px;
  margin-top: 0;
  max-width: 22ch;
}

main h2 {
  font-size: 26px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

main h3 {
  font-size: 20px;
}

main h4 {
  font-size: 17px;
}

main p {
  max-width: 74ch;
  margin: 0 0 1.2em;
  color: var(--black);
}

main .lede {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 70ch;
}

main ul,
main ol {
  max-width: 74ch;
  margin: 0 0 1.2em;
  padding-left: 22px;
}

main li {
  margin-bottom: 0.4em;
}

main blockquote {
  margin: 1.6em 0;
  padding: 14px 20px;
  border-left: 3px solid var(--black);
  background-color: var(--bg-panel);
  font-style: italic;
  color: var(--black-soft);
  max-width: 70ch;
}

main hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.4em 0;
}

/* ---------- Links inside content ---------- */
main a {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 2px;
}

main a:hover {
  color: var(--text-muted);
}

/* ---------- Images inside content ---------- */
main figure.content-image {
  margin: 2em 0;
  max-width: 100%;
}

main figure.content-image img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  background-color: var(--bg-panel);
}

main figure.content-image figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* ---------- Tables ---------- */
main .table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.6em 0;
  border: 1px solid var(--border);
}

main table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  background-color: var(--bg-panel);
  font-size: 14px;
}

main table caption {
  caption-side: top;
  text-align: left;
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 12px;
}

main th,
main td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

main thead th {
  background-color: var(--black);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: normal;
  white-space: nowrap;
}

main tbody tr:hover {
  background-color: var(--bg-light);
}

main tbody tr:last-child td {
  border-bottom: none;
}

/* ---------- Centered CTA button template ---------- */
.cta-wrap {
  display: flex;
  justify-content: center;
  margin: 2.6em 0;
}

.btn-cta {
  display: inline-block;
  background-color: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.3px;
  padding: 16px 40px;
  text-decoration: none;
  border: 1px solid var(--black);
  border-radius: var(--radius);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-cta:hover {
  background-color: transparent;
  color: var(--black);
}

/* =========================================================
   AUTHOR BLOCK
   ========================================================= */
.author-block {
  margin: 3em 0 1em;
  padding: 24px;
  border: 1px solid var(--border);
  background-color: var(--bg-panel);
  display: flex;
  gap: 18px;
  align-items: flex-start;
  max-width: 74ch;
}

.author-avatar {
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  background-color: var(--bg-light);
}

.author-info {
  flex: 1 1 auto;
}

.author-name {
  font-family: var(--font-heading);
  font-size: 17px;
  margin: 0 0 2px;
  color: var(--black);
}

.author-role {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.author-opinion {
  margin: 0;
  font-style: italic;
  color: var(--black-soft);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background-color: var(--black);
  color: #cfcfc9;
  padding: 40px 20px 30px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--black-soft);
}

.footer-nav a {
  color: var(--white);
  text-decoration: none;
  font-size: 14px;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-orgs {
  margin: 0 0 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--black-soft);
}

.footer-orgs p {
  margin: 0 0 10px;
  font-size: 13px;
  color: #9d9d97;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.footer-orgs ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.footer-orgs a {
  color: var(--white);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid #555;
}

.footer-orgs a:hover {
  border-bottom-color: var(--white);
}

.footer-disclaimer {
  font-size: 13px;
  line-height: 1.7;
  color: #b3b3ad;
  max-width: 90ch;
  margin: 0;
}

/* =========================================================
   BACK TO TOP
   ========================================================= */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--black);
  color: var(--white);
  border: 1px solid var(--white);
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 600;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--white);
  color: var(--black);
}

/* =========================================================
   404 PAGE
   ========================================================= */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

.error-code {
  font-family: var(--font-heading);
  font-size: 96px;
  margin: 0;
  color: var(--black);
  line-height: 1;
}

.error-title {
  font-family: var(--font-heading);
  font-size: 24px;
  margin: 10px 0 8px;
}

.error-text {
  color: var(--text-muted);
  max-width: 50ch;
  margin: 0 0 26px;
}

/* =========================================================
   RESPONSIVE / MOBILE
   ========================================================= */
@media (max-width: 720px) {
  .header-inner {
    padding: 12px 16px;
  }

  .logo-text {
    font-size: 18px;
  }

  .logo img {
    height: 30px;
  }

  .header-actions {
    width: 100%;
    justify-content: stretch;
  }

  .header-actions .btn {
    flex: 1 1 auto;
    text-align: center;
    padding: 10px 12px;
    font-size: 13px;
  }

  main {
    padding: 28px 16px 44px;
  }

  main h1 {
    font-size: 26px;
  }

  main h2 {
    font-size: 21px;
  }

  .author-block {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .btn-cta {
    width: 100%;
    text-align: center;
  }

  .error-code {
    font-size: 64px;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
  }
}

/* Extra small screens: guard against any overflow */
@media (max-width: 400px) {
  main table {
    min-width: 480px;
  }
}

html,
body {
  overflow-x: hidden;
}

main .table-wrap {
  overflow-x: auto;
}
