
/* -------------------------
   Global base styling
--------------------------*/

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #222;
  background: linear-gradient(180deg, #f8f8f6 0%, #f0f0ee 100%);
}

/* -------------------------
   Layout wrapper (for grid pages)
--------------------------*/

.main-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* -------------------------
   Header (shared)
--------------------------*/

.header {
  text-align: center;
  margin: 80px auto 40px auto;
  max-width: 800px;
  padding: 0 20px;
}

.header h1 {
  margin: 0;
  font-size: 3.5rem;
  font-weight: 400;
}

.tagline {
  margin-top: 16px;
  font-size: 1.2rem;
  color: #666;
}

/* -------------------------
   Grid system (puzzles + videos)
--------------------------*/

.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin-top: 30px;
  max-width: 1200px;
  padding: 20px;
}

/* -------------------------
   Card system
--------------------------*/

.card {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: inherit;
}

.card img {
  width: 340px;
  display: block;
  border-radius: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover img {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}

.label {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  padding: 6px 10px;
  font-size: 14px;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(4px);
  border-radius: 8px;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.15s ease;
}

.card:hover .label {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------------
   Text pages (About pages)
--------------------------*/

.text-page {
  width: 100%;
  max-width: 800px;
  margin: 80px auto 40px auto;
  padding: 0 24px;
  line-height: 1.6;
}

/* -------------------------
   Typography helpers
--------------------------*/

.subtitle {
  color: #666;
  margin-top: 10px;
  margin-bottom: 30px;
}

/* -------------------------
   Footer (shared everywhere)
--------------------------*/

footer {
  margin-top: 80px;
  padding: 30px 20px;
  text-align: center;
  font-size: 14px;
  border-top: 1px solid #ccc;
}

footer a {
  color: #222;
  text-decoration: none;
  margin: 0 15px;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

footer a:hover {
  opacity: 1;
}