/* ==================================================
   DESIGN TOKENS — Football Quiz
   ================================================== */
:root{
  --turf:         #E9F1E6;
  --turf-deep:    #D6E4D0;
  --ink:          #17261C;
  --ink-soft:     #56675C;
  --gold:         #B98B2A;
  --gold-soft:    #E4C77C;
  --pitch:        #1F4D36;
  --pitch-dark:   #163A29;
  --sage:         #4C7A3E;
  --sage-bg:      #E1EEDC;
  --crimson:      #A23B3B;
  --crimson-bg:   #F3DEDA;
  --card-shadow:  0 10px 30px rgba(23,38,28,0.12);
  --radius-lg:    22px;
  --radius-md:    14px;
  --font-display: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Black", sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*{ box-sizing: border-box; }

html,body{
  margin:0; padding:0;
  background: var(--turf);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body{ min-height:100vh; }

main.wrap{
  display:flex;
  justify-content:center;
  padding: 20px 14px 48px;
}

.app{ width:100%; max-width:420px; }

/* ==================================================
   TOP NAVIGATION / HAMBURGER MENU
   ================================================== */
.site-nav{
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--pitch);
  box-shadow: 0 2px 10px rgba(23,38,28,0.25);
}

.site-nav-inner{
  max-width: 420px;
  margin: 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 16px;
}

.brand{
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing:0.5px;
  color: var(--gold-soft);
  text-decoration:none;
}

.hamburger-btn{
  background:none;
  border:none;
  cursor:pointer;
  width:42px; height:42px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:5px;
  padding:0;
}

.hamburger-btn span{
  width:22px; height:2px;
  background: #F5F3EC;
  border-radius:2px;
  transition: transform 200ms ease, opacity 200ms ease;
}

.hamburger-btn[aria-expanded="true"] span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.hamburger-btn[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.hamburger-btn[aria-expanded="true"] span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

.hamburger-btn:focus-visible{
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
  border-radius: 6px;
}

.nav-menu{
  max-height: 0;
  overflow: hidden;
  background: var(--pitch-dark);
  border-top: 1px solid transparent;
  transition: max-height 260ms ease;
}

.nav-menu.open{
  max-height: 340px;
  border-top-color: rgba(255,255,255,0.12);
}

.nav-menu ul{
  list-style:none;
  margin:0 auto;
  padding: 8px 16px 14px;
  max-width: 420px;
}

.nav-menu li + li{ border-top: 1px solid rgba(255,255,255,0.08); }

.nav-menu a{
  display:block;
  padding: 12px 4px;
  color: #F5F3EC;
  text-decoration:none;
  font-size: 0.95rem;
}

.nav-menu a:hover,
.nav-menu a:focus-visible{ color: var(--gold-soft); }

.nav-menu a[aria-current="page"]{ color: var(--gold-soft); font-weight:600; }

/* ==================================================
   AD PLACEHOLDER
   ================================================== */
.ad-container{
  margin: 18px 0;
  padding: 18px 10px;
  text-align:center;
  font-size:0.72rem;
  letter-spacing:1.5px;
  text-transform:uppercase;
  color: var(--ink-soft);
  background: var(--turf-deep);
  border: 1px dashed #B9C9AF;
  border-radius: var(--radius-md);
}

.ad-container span{ display:block; font-size:0.65rem; margin-top:4px; opacity:0.8; }

/* Live GPT ad slot (as opposed to the placeholder above) */
.ad-slot-wrap{
  margin: 18px 0;
  padding: 12px 0 4px;
  text-align:center;
}

.ad-slot-label{
  display:block;
  font-size:0.7rem;
  letter-spacing:1.5px;
  text-transform:uppercase;
  color: var(--ink-soft);
  margin-bottom:10px;
}

/* ==================================================
   HEADER
   ================================================== */
.site-header{ text-align:center; margin: 4px 0 18px; }

.site-header h1{
  font-family: var(--font-display);
  font-size: 1.9rem;
  letter-spacing:0.5px;
  line-height:1.2;
  margin: 0 0 8px;
  color: var(--pitch);
}

.site-header p{ margin:0; font-size:0.92rem; color: var(--ink-soft); }

/* ==================================================
   CARD
   ================================================== */
.card{
  background:#FDFEFB;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 26px 22px 24px;
}

.progress-wrap{ margin-bottom: 20px; }

.progress-meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:0.8rem;
  color: var(--ink-soft);
  margin-bottom:8px;
}

.progress-meta strong{ color: var(--ink); font-weight:600; }

.beads{ display:flex; gap:4px; height:6px; }

.bead{ flex:1; border-radius:4px; background: var(--turf-deep); transition: background 300ms ease; }
.bead.lit{ background: linear-gradient(90deg, var(--gold-soft), var(--gold)); }

/* ==================================================
   QUESTION
   ================================================== */
.question-text{
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing:0.2px;
  line-height:1.35;
  margin: 0 0 20px;
  color: var(--ink);
}

fieldset{ border:none; margin:0; padding:0; }

legend{
  position:absolute;
  width:1px; height:1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
}

.options{ display:flex; flex-direction:column; gap:12px; margin-bottom:22px; }

.option{ position:relative; }

.option input{ position:absolute; opacity:0; width:1px; height:1px; }

.option label{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:54px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid #D6E4D0;
  background:#FDFEFB;
  font-size:0.98rem;
  line-height:1.35;
  cursor:pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.option .marker{
  flex:0 0 auto;
  width:22px; height:22px;
  border-radius:50%;
  border:1.5px solid #B9C9AF;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:0.7rem;
  color: var(--ink-soft);
  background:#fff;
}

.option input:checked + label{ border-color: var(--gold); background: #FBF3DC; transform: translateY(-1px); }
.option input:focus-visible + label{ outline: 2px solid var(--pitch); outline-offset: 2px; }
.option input:disabled + label{ cursor:default; }

.option.correct label{ border-color: var(--sage); background: var(--sage-bg); }
.option.correct .marker{ border-color: var(--sage); background: var(--sage); color:#fff; }

.option.wrong label{ border-color: var(--crimson); background: var(--crimson-bg); }
.option.wrong .marker{ border-color: var(--crimson); background: var(--crimson); color:#fff; }

/* ==================================================
   EXPLANATION
   ================================================== */
.explanation{
  display:none;
  padding:14px 16px;
  border-radius: var(--radius-md);
  font-size:0.9rem;
  line-height:1.5;
  margin-bottom:20px;
}

.explanation.show{ display:block; }
.explanation.correct-msg{ background: var(--sage-bg); color:#25401F; }
.explanation.wrong-msg{ background: var(--crimson-bg); color:#511B1B; }
.explanation strong{ display:block; margin-bottom:4px; font-size:0.95rem; }

/* ==================================================
   BUTTONS
   ================================================== */
.btn{
  width:100%;
  height:54px;
  border-radius: var(--radius-md);
  border:none;
  font-size:1rem;
  font-weight:600;
  font-family: var(--font-body);
  cursor:pointer;
  transition: background 150ms ease, opacity 150ms ease, transform 100ms ease;
}

.btn:active{ transform: scale(0.98); }

.btn-primary{ background: var(--pitch); color:#fff; }
.btn-primary:disabled{ background: #C7D0C3; color:#8B958A; cursor:not-allowed; }
.btn-primary:not(:disabled):hover{ background: var(--pitch-dark); }

/* ==================================================
   FADE TRANSITION
   ================================================== */
.fade{ animation: fadeIn 200ms ease; }
@keyframes fadeIn{
  from{ opacity:0; transform:translateY(4px); }
  to{ opacity:1; transform:translateY(0); }
}

/* ==================================================
   RESULTS
   ================================================== */
.result-card{ text-align:center; }

.result-card h2{
  font-family: var(--font-display);
  font-size:1.6rem;
  letter-spacing:0.3px;
  margin:0 0 6px;
  color: var(--pitch);
}

.score-ring{
  width:140px; height:140px;
  margin: 18px auto 14px;
  border-radius:50%;
  background: conic-gradient(var(--gold) calc(var(--pct) * 1%), var(--turf-deep) 0);
  display:flex; align-items:center; justify-content:center;
}

.score-ring-inner{
  width:112px; height:112px;
  border-radius:50%;
  background:#FDFEFB;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

.score-ring-inner .fraction{
  font-family: var(--font-display);
  font-size:1.5rem;
  color: var(--ink);
}

.score-ring-inner .pct{ font-size:0.8rem; color: var(--ink-soft); }

.performance-msg{ font-size:1.02rem; font-weight:600; color: var(--pitch); margin: 6px 0 4px; }
.result-sub{ font-size:0.88rem; color: var(--ink-soft); margin: 0 0 6px; }
.restart-btn{ margin-top:18px; }

/* ==================================================
   LONG-FORM ARTICLE
   ================================================== */
.article-section{
  margin-top: 26px;
  background:#FDFEFB;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 26px 22px;
}

.article-section h2{
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing:0.2px;
  margin: 0 0 14px;
  line-height:1.25;
  color: var(--pitch);
}

.article-section h3{
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing:0.2px;
  margin: 20px 0 8px;
  color: var(--pitch);
}

.article-section p{ font-size: 0.95rem; line-height: 1.7; margin: 0 0 14px; color: var(--ink); }

/* ==================================================
   STATIC CONTENT PAGES
   ================================================== */
.page-content h1{
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing:0.3px;
  margin: 6px 0 16px;
  line-height:1.25;
  color: var(--pitch);
}

.page-content h2{
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 22px 0 10px;
  color: var(--pitch);
}

.page-content p{ font-size: 0.95rem; line-height: 1.65; margin: 0 0 14px; color: var(--ink); }
.page-content ul{ padding-left: 20px; margin: 0 0 14px; }
.page-content li{ margin-bottom:6px; font-size:0.95rem; line-height:1.55; }
.page-content a{ color: var(--pitch); }

.contact-details{
  background: var(--turf-deep);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 6px 0 20px;
  font-size:0.92rem;
}

.contact-details strong{ display:block; margin-bottom:4px; }

/* ==================================================
   SITE FOOTER
   ================================================== */
.site-footer-main{
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid #C7D6BF;
  text-align:center;
}

.site-footer-main nav{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap: 8px 16px;
  margin-bottom: 10px;
}

.site-footer-main a{ color: var(--ink-soft); text-decoration:none; font-size:0.82rem; }
.site-footer-main a:hover,
.site-footer-main a:focus-visible{ color: var(--pitch); text-decoration:underline; }

.site-footer-main p{ margin:0; font-size:0.72rem; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce){
  .fade, .bead, .option label, .btn, .nav-menu, .hamburger-btn span{
    animation:none !important;
    transition:none !important;
  }
}
