/* ==========================================================================
   Ghana Quiz — Mahjong Blast x Royal Ghana Kente Static Website
   ========================================================================== */

:root {
  --jade-top: #0e6b47;
  --jade-mid: #084b32;
  --jade-deep: #052e20;

  --ivory-top: #fffdf7;
  --ivory-bottom: #f3e9d2;
  --tile-edge: #cbb68e;
  --ink: #1d2722;
  --ink-soft: #4e5f56;

  --ghana-red: #d61f33;
  --ghana-red-dark: #8f0e1d;
  --ghana-gold: #fcd116;
  --ghana-gold-warm: #f5b700;
  --ghana-gold-dark: #b57c00;
  --ghana-green: #007a48;
  --ghana-green-dark: #004f2e;
  --black-star: #121815;

  --radius-lg: 24px;
  --radius-md: 18px;
  --max-width: 1080px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f6faf7;
  background: radial-gradient(circle at 50% 0%, var(--jade-top) 0%, var(--jade-mid) 52%, var(--jade-deep) 100%);
  background-attachment: fixed;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

/* Subtle Ghanaian Kente Diamond Weave Overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(45deg, transparent 48%, rgba(252, 209, 22, 0.5) 49%, rgba(252, 209, 22, 0.5) 51%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, rgba(252, 209, 22, 0.5) 49%, rgba(252, 209, 22, 0.5) 51%, transparent 52%);
  background-size: 48px 48px;
}

header,
main,
footer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

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

h1,
h2,
h3,
h4,
.font-display {
  font-family: "Fredoka", system-ui, sans-serif;
  margin-top: 0;
  line-height: 1.2;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* Ghana Flag Ribbon */
.ghana-ribbon {
  height: 5px;
  width: 100%;
  display: flex;
  overflow: hidden;
}

.ghana-ribbon span:nth-child(1) {
  flex: 1;
  background: var(--ghana-red);
}
.ghana-ribbon span:nth-child(2) {
  flex: 1;
  background: var(--ghana-gold);
}
.ghana-ribbon span:nth-child(3) {
  flex: 1;
  background: var(--ghana-green);
}

/* Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5, 46, 32, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(252, 209, 22, 0.28);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid var(--ghana-gold);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.brand-name {
  font-family: "Fredoka", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ghana-gold);
  letter-spacing: 0.4px;
}

.brand-motto {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.nav-links a {
  font-weight: 700;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ghana-gold);
}

/* Raised 3D Ivory Mahjong Plaque */
.mahjong-card {
  background: var(--tile-edge);
  border-radius: var(--radius-lg);
  padding-bottom: 7px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.mahjong-card-face {
  background: linear-gradient(180deg, var(--ivory-top) 0%, var(--ivory-bottom) 100%);
  border: 2.2px solid rgba(252, 209, 22, 0.85);
  border-radius: calc(var(--radius-lg) - 1px);
  color: var(--ink);
  overflow: hidden;
}

.mahjong-card-body {
  padding: 1.75rem;
}

/* 3D Mahjong Blast Buttons */
.btn-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.4px;
  padding: 0.9rem 1.65rem;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  text-align: center;
}

.btn-tile-red {
  background: linear-gradient(180deg, #e83447 0%, var(--ghana-red) 100%);
  color: #ffffff;
  box-shadow: 0 6px 0 var(--ghana-red-dark), 0 10px 20px rgba(0, 0, 0, 0.28);
}

.btn-tile-green {
  background: linear-gradient(180deg, #12985d 0%, var(--ghana-green) 100%);
  color: #ffffff;
  box-shadow: 0 6px 0 var(--ghana-green-dark), 0 10px 20px rgba(0, 0, 0, 0.28);
}

.btn-tile-ivory {
  background: linear-gradient(180deg, var(--ivory-top) 0%, var(--ivory-bottom) 100%);
  color: var(--ghana-green-dark);
  border-color: var(--ghana-gold);
  box-shadow: 0 5px 0 var(--tile-edge), 0 8px 16px rgba(0, 0, 0, 0.22);
}

.btn-tile:hover {
  transform: translateY(-1px);
}

.btn-tile:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--ghana-red-dark);
}

.btn-tile-green:active {
  box-shadow: 0 2px 0 var(--ghana-green-dark);
}

.btn-tile-ivory:active {
  box-shadow: 0 1px 0 var(--tile-edge);
}

/* Hero Section */
.hero {
  padding: 3.5rem 0 2.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.25rem;
  align-items: center;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: rgba(252, 209, 22, 0.16);
  border: 1.5px solid rgba(252, 209, 22, 0.65);
  color: var(--ghana-gold);
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.15rem, 4.5vw, 3.35rem);
  color: #ffffff;
  margin-bottom: 0.9rem;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
}

.hero h1 .accent-gold {
  color: var(--ghana-gold);
}

.hero-lead {
  font-size: 1.12rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 1.6rem;
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 1.8rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(252, 209, 22, 0.22);
}

.stat-item strong {
  display: block;
  font-family: "Fredoka", sans-serif;
  font-size: 1.35rem;
  color: var(--ghana-gold);
}

.stat-item span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

.hero-showcase {
  text-align: center;
}

.hero-logo-frame {
  width: 210px;
  height: 210px;
  margin: 0 auto 1.1rem;
  border-radius: 36px;
  border: 4px solid var(--ghana-gold);
  box-shadow: 0 14px 28px rgba(5, 46, 32, 0.35);
  overflow: hidden;
}

.hero-logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Interactive Sample Mahjong Quiz Tile Preview */
.demo-box {
  margin-top: 1.2rem;
  text-align: left;
  background: rgba(0, 122, 72, 0.08);
  border: 1.5px solid rgba(0, 122, 72, 0.22);
  border-radius: 18px;
  padding: 1rem;
}

.demo-label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ghana-green-dark);
  margin-bottom: 0.35rem;
}

.demo-q {
  font-family: "Fredoka", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.75rem;
}

.demo-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.demo-tile {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  background: #ffffff;
  border: 1.8px solid rgba(252, 209, 22, 0.75);
  border-radius: 13px;
  box-shadow: 0 4px 0 var(--tile-edge);
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease;
}

.demo-tile:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--tile-edge);
}

.demo-tile .letter {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Fredoka", sans-serif;
  font-size: 0.85rem;
  color: #ffffff;
  flex-shrink: 0;
}

.demo-tile[data-letter="A"] .letter { background: var(--ghana-red); }
.demo-tile[data-letter="B"] .letter { background: var(--ghana-green); }
.demo-tile[data-letter="C"] .letter { background: var(--ghana-gold-dark); }
.demo-tile[data-letter="D"] .letter { background: #1f3b2e; }

.demo-tile.is-correct {
  background: var(--ghana-green);
  color: #ffffff;
  border-color: var(--ghana-gold);
  box-shadow: 0 4px 0 var(--ghana-green-dark);
}
.demo-tile.is-correct .letter {
  background: #ffffff;
  color: var(--ghana-green);
}

.demo-tile.is-wrong {
  background: var(--ghana-red);
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 4px 0 var(--ghana-red-dark);
}
.demo-tile.is-wrong .letter {
  background: #ffffff;
  color: var(--ghana-red);
}

.demo-feedback {
  min-height: 1.35rem;
  margin-top: 0.65rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ghana-green-dark);
}

/* Sections */
.section {
  padding: 2.75rem 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2rem;
}

.section-header h2 {
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  color: var(--ghana-gold);
  margin-bottom: 0.5rem;
}

.section-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.02rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(0, 122, 72, 0.12);
  border: 1.5px solid rgba(252, 209, 22, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 0.85rem;
}

.feature-title {
  font-size: 1.2rem;
  color: var(--ghana-green-dark);
  margin-bottom: 0.4rem;
}

.feature-desc {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
  font-weight: 600;
}

/* Topic Chips */
.topics-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.topic-chip {
  background: linear-gradient(180deg, var(--ivory-top) 0%, var(--ivory-bottom) 100%);
  color: var(--ink);
  border: 2px solid rgba(252, 209, 22, 0.75);
  box-shadow: 0 4px 0 var(--tile-edge);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-weight: 800;
  font-size: 0.92rem;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.9rem;
  max-width: 780px;
  margin-inline: auto;
}

.faq-item {
  background: linear-gradient(180deg, var(--ivory-top) 0%, var(--ivory-bottom) 100%);
  color: var(--ink);
  border: 2px solid rgba(252, 209, 22, 0.75);
  border-radius: 18px;
  box-shadow: 0 5px 0 var(--tile-edge);
  padding: 1rem 1.25rem;
}

.faq-item summary {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--ghana-green-dark);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.35rem;
  color: var(--ghana-red);
  font-weight: 700;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-weight: 600;
}

/* Privacy Policy Document Layout */
.policy-wrap {
  padding: 2.5rem 0 3.5rem;
  max-width: 860px;
  margin-inline: auto;
}

.policy-content h1 {
  color: var(--ghana-green-dark);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 0.35rem;
}

.policy-meta {
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px dashed rgba(0, 122, 72, 0.22);
}

.policy-content h2 {
  color: var(--ghana-green-dark);
  font-size: 1.3rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.policy-content p,
.policy-content li {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.98rem;
}

.policy-content ul {
  padding-left: 1.25rem;
}

.policy-content a {
  color: var(--ghana-red);
  text-decoration: underline;
  font-weight: 800;
}

.policy-highlight {
  background: rgba(0, 122, 72, 0.08);
  border-left: 4px solid var(--ghana-green);
  border-radius: 12px;
  padding: 0.95rem 1.15rem;
  margin: 1.25rem 0;
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  background: rgba(4, 30, 21, 0.92);
  border-top: 1px solid rgba(252, 209, 22, 0.28);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--ghana-gold);
  font-weight: 700;
}

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

/* Responsive */
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-lead {
    margin-inline: auto;
  }

  .hero-actions,
  .hero-stats {
    justify-content: center;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .demo-options {
    grid-template-columns: 1fr;
  }
  .mahjong-card-body {
    padding: 1.25rem;
  }
}
