/* ============================================================
   BIKE QUESTS — style.css
   Shared styles for all pages
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=UnifrakturMaguntia&family=MedievalSharp&family=Cinzel:wght@400;600;900&family=IM+Fell+English:ital@0;1&family=VT323&display=swap');

/* ── CSS Variables ── */
:root {
  --black:       #0a0905;
  --deep:        #0f0d08;
  --dark-brown:  #1a1409;
  --parchment:   #c8a96e;
  --parchment-lt:#e8d5a3;
  --bone:        #f0e8cc;
  --gold:        #c9923a;
  --gold-bright: #e8b84b;
  --gold-dim:    #7a5a1e;
  --forest:      #1e3b1e;
  --moss:        #3a5c2a;
  --rust:        #8b3a1a;
  --blood:       #6b1a1a;
  --ink:         #1a1409;

  --font-blackletter: 'UnifrakturMaguntia', cursive;
  --font-display:     'Cinzel', serif;
  --font-body:        'IM Fell English', Georgia, serif;
  --font-pixel:       'VT323', monospace;

  --border-gold: 2px solid var(--gold-dim);
  --border-parchment: 1px solid var(--parchment);

  --shadow-glow: 0 0 20px rgba(201, 146, 58, 0.25);
  --shadow-deep: 0 4px 24px rgba(0,0,0,0.8);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--black);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  min-height: 100vh;
  /* Subtle noise texture overlay */
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% 0%, #1a1409 0%, #0a0905 70%);
  background-size: 200px 200px, cover;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); text-decoration: underline; }

p { margin-bottom: 1em; }

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

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--deep); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 0; }

/* ── Page Wrapper ── */
.page-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Nav ── */
.site-nav {
  border-bottom: 1px solid var(--gold-dim);
  background: rgba(10,9,5,0.95);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.site-nav .nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--gold-bright);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo:hover { color: var(--bone); text-decoration: none; }

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--parchment);
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-bright);
  border-bottom-color: var(--gold-bright);
  text-decoration: none;
}

/* ── Section Headings ── */
.section-label {
  font-family: var(--font-pixel);
  font-size: 1rem;
  color: var(--gold-dim);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  display: block;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--gold-bright);
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 900; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); font-weight: 600; margin-bottom: 1rem; }
h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.6rem; color: var(--parchment-lt); }

/* ── Decorative Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.5rem 0;
  opacity: 0.5;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-dim), transparent);
}

.divider-symbol {
  font-size: 1.2rem;
  color: var(--gold);
  flex-shrink: 0;
}

/* ── Pixel/Scroll Box ── */
.scroll-box {
  border: 2px solid var(--gold-dim);
  background: rgba(26,20,9,0.7);
  padding: 1.5rem 1.75rem;
  position: relative;
  box-shadow: var(--shadow-deep), inset 0 0 40px rgba(0,0,0,0.5);
}

/* Corner ornaments */
.scroll-box::before,
.scroll-box::after {
  content: '✦';
  position: absolute;
  color: var(--gold-dim);
  font-size: 0.7rem;
  line-height: 1;
}
.scroll-box::before { top: 0.4rem; left: 0.5rem; }
.scroll-box::after  { bottom: 0.4rem; right: 0.5rem; }

/* ── Quest Card ── */
.quest-card {
  border: 1px solid var(--gold-dim);
  background: rgba(20,15,6,0.85);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.quest-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-glow);
}

.quest-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.quest-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--parchment-lt);
  margin: 0;
}

.quest-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.badge {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  padding: 0.15rem 0.6rem;
  border: 1px solid;
  letter-spacing: 0.05em;
}

.badge-difficulty-easy   { color: #7ecf7e; border-color: #7ecf7e; }
.badge-difficulty-medium { color: var(--gold); border-color: var(--gold); }
.badge-difficulty-hard   { color: #cf7e7e; border-color: #cf7e7e; }
.badge-difficulty-cursed { color: #b57ecf; border-color: #b57ecf; }

.badge-points {
  color: var(--gold-bright);
  border-color: var(--gold-dim);
  background: rgba(201,146,58,0.08);
}

.badge-status-complete {
  color: #7ecf7e;
  border-color: #3a6a3a;
  background: rgba(30,60,30,0.3);
}

.badge-status-active {
  color: var(--gold-bright);
  border-color: var(--gold);
  background: rgba(201,146,58,0.1);
  animation: pulse-glow 2.5s ease-in-out infinite;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.7rem 1.6rem;
  border: 2px solid;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  position: relative;
  background: transparent;
}

.btn-primary {
  color: var(--black);
  background: var(--gold);
  border-color: var(--gold-bright);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.8);
}
.btn-primary:hover {
  background: var(--gold-bright);
  box-shadow: 5px 5px 0 rgba(0,0,0,0.8);
  transform: translate(-1px, -1px);
  text-decoration: none;
  color: var(--black);
}

.btn-secondary {
  color: var(--parchment);
  border-color: var(--gold-dim);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.8);
}
.btn-secondary:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
  box-shadow: 5px 5px 0 rgba(0,0,0,0.8);
  transform: translate(-1px, -1px);
  text-decoration: none;
}

/* ── Footer ── */
.site-footer {
  margin-top: 5rem;
  padding: 2.5rem 1.25rem;
  border-top: 1px solid var(--gold-dim);
  text-align: center;
}

.site-footer p {
  font-family: var(--font-pixel);
  font-size: 1rem;
  color: var(--gold-dim);
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}

.site-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.site-footer .footer-links a {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.site-footer .footer-links a:hover {
  color: var(--gold);
  text-decoration: none;
}

/* ── Animations ── */
@keyframes pulse-glow {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

@keyframes slow-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

@keyframes flicker {
  0%, 92%, 100% { opacity: 1; }
  93%            { opacity: 0.4; }
  94%            { opacity: 1; }
  95%            { opacity: 0.2; }
  96%            { opacity: 1; }
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Utility ── */
.text-center { text-align: center; }
.text-gold   { color: var(--gold-bright); }
.text-dim    { color: var(--gold-dim); }
.text-pixel  { font-family: var(--font-pixel); font-size: 1.1rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ── Mobile ── */
@media (max-width: 600px) {
  .nav-links { gap: 0.8rem; }
  .nav-links a { font-size: 0.65rem; }

  .scroll-box { padding: 1rem 1.1rem; }
  .quest-card { padding: 1rem 1.1rem; }

  h1 { font-size: 2rem; }
}
