/* ============================================
   Bitcoin Educational Site - Futuristic Theme
   Privacy-first, dark mode, semantic layout
   ============================================ */

/* ----- Self-hosted Inter font (privacy) ----- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/Inter-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/Inter-Medium.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/Inter-SemiBold.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/Inter-Bold.woff2") format("woff2");
}

:root {
  --bitcoin-orange: #F7931A;
  --bitcoin-orange-hover: #ffa94d;
  --charcoal: #1a1a1f;
  --charcoal-light: #252530;
  --charcoal-muted: #2d2d38;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b8;
  --text-muted: #78788a;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --glow-orange: rgba(247, 147, 26, 0.25);
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
  --header-height: 72px;
  --radius: 12px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--charcoal);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ----- Typography ----- */
h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-weight: 600;
  line-height: 1.25;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

p {
  margin: 0 0 1em;
  color: var(--text-secondary);
}

a {
  color: var(--bitcoin-orange);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--bitcoin-orange-hover);
}

/* ----- Skip link (accessibility) ----- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--bitcoin-orange);
  color: var(--charcoal);
  font-weight: 600;
  border-radius: var(--radius);
  transition: top var(--transition);
}

.skip-link:focus {
  top: 1rem;
}

/* ----- Header & Navigation ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: rgba(26, 26, 31, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.site-logo span {
  color: var(--bitcoin-orange);
}

.nav-list {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: var(--radius);
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--bitcoin-orange);
  background: rgba(247, 147, 26, 0.1);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 0.5rem;
  cursor: pointer;
  font-size: 1.5rem;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-list {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--charcoal-light);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem;
    gap: 0.25rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
  }

  .nav-list.is-open {
    max-height: 320px;
    opacity: 1;
  }

  .nav-list a {
    padding: 0.75rem 1rem;
  }
}

/* ----- Main content ----- */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* ----- Hero ----- */
.hero {
  text-align: center;
  padding: 3rem 0 4rem;
}

.hero-image-wrap {
  margin: 0 auto 2rem;
  max-width: 640px;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--charcoal-muted) 0%, var(--charcoal-light) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 40px var(--glow-orange);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-image-placeholder {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 1rem;
}

.hero h1 {
  margin-bottom: 0.75rem;
}

.hero .lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 1.5rem;
}

/* ----- Sections ----- */
.section {
  margin-bottom: 4rem;
}

.section-title {
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--bitcoin-orange);
  display: inline-block;
}

/* ----- About block ----- */
.about-block {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--charcoal-light);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-align: justify;
}

.about-block p:last-child {
  margin-bottom: 0;
}

/* ----- Credits & Disclaimer (aprende page) ----- */
.credits-disclaimer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.credits-disclaimer h2 {
  font-size: 1rem;
  color: var(--bitcoin-orange);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.credits-block {
  max-width: 800px;
  margin-bottom: 1.5rem;
}

.credits-block:last-child {
  margin-bottom: 0;
}

.credits-block h3 {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.credits-block p {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-muted);
  text-align: justify;
}

/* ----- Card grids ----- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--charcoal-light);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: rgba(247, 147, 26, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card-image {
  aspect-ratio: 16 / 9;
  background: var(--charcoal-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  position: relative;
}

.card-image.youtube {
  background: #0d0d0d;
}

.card-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.35rem 0.65rem;
  background: var(--bitcoin-orange);
  color: var(--charcoal);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 6px;
}

.card-body {
  padding: 1.25rem;
}

.card-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.btn-primary {
  background: var(--bitcoin-orange);
  color: var(--charcoal);
}

.btn-primary:hover {
  background: var(--bitcoin-orange-hover);
}

.btn-outline {
  background: transparent;
  color: var(--bitcoin-orange);
  border: 2px solid var(--bitcoin-orange);
}

.btn-outline:hover {
  background: rgba(247, 147, 26, 0.15);
}

/* ----- Game page ----- */
.game-section {
  text-align: center;
  padding: 2rem 0;
}

/* Thumbnail do jogo: cartão clicável com imagem + nome do jogo */
a.game-thumbnail-card {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--charcoal-light);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  max-width: 280px;
}
a.game-thumbnail-card:hover,
a.game-thumbnail-card:focus {
  border-color: var(--bitcoin-orange);
  box-shadow: 0 0 0 2px rgba(247, 147, 26, 0.2);
  outline: none;
}
a.game-thumbnail-card:hover .game-thumbnail,
a.game-thumbnail-card:focus .game-thumbnail {
  opacity: 0.95;
}
.game-thumbnail-img-wrap {
  display: block;
  margin-bottom: 0.75rem;
}
.game-thumbnail {
  max-width: 160px;
  height: auto;
  display: block;
  margin: 0 auto;
  transition: opacity 0.2s ease;
}
.game-thumbnail-title {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--bitcoin-orange);
  margin-bottom: 0.25rem;
}
.game-thumbnail-cta {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
a.game-thumbnail-wrap {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 1.5rem;
}
a.game-thumbnail-wrap:hover .game-thumbnail,
a.game-thumbnail-wrap:focus .game-thumbnail {
  opacity: 0.9;
}

.game-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--charcoal-light);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-align: center;
}

.game-card-desc {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.game-btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  font-size: 1.1rem;
  margin: 0.5rem;
}

.game-steps {
  margin: 1rem 0 0.5rem;
  color: var(--text-primary);
}

.game-steps-list {
  text-align: left;
  margin: 0 0 1rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.game-steps-list li {
  margin-bottom: 0.5rem;
}

.game-links {
  margin: 1rem 0;
}

.game-placeholder {
  color: var(--text-muted);
  padding: 2rem;
  font-size: 1rem;
}

.game-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.game-note code {
  padding: 0.2em 0.4em;
  background: var(--charcoal-muted);
  border-radius: 4px;
  font-size: 0.9em;
}

/* ----- Recursos lists ----- */
.recursos-layout {
  display: grid;
  gap: 2.5rem;
}

.recursos-category {
  background: var(--charcoal-light);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
}

.recursos-category h2 {
  margin-bottom: 1rem;
  font-size: 1.35rem;
}

.recursos-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.recursos-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.recursos-list li:last-child {
  border-bottom: none;
}

.recursos-list a {
  font-weight: 500;
}

.recursos-list .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ----- Footer ----- */
.site-footer {
  margin-top: auto;
  padding: 2rem 1.5rem;
  background: var(--charcoal-light);
  border-top: 1px solid var(--border-subtle);
}

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

.footer-disclaimer {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}

.footer-disclaimer strong {
  color: var(--bitcoin-orange);
}

/* ----- Utility ----- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
