/* ================================================================
   GRID EMPIRE — Shared Styles
   Loaded by index.html (./shared.css) and blog pages (../shared.css)
   ================================================================ */

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

:root {
  --bg:      #0a0e1a;
  --surface: #111827;
  --border:  #1e2d40;
  --blue:    #3b82f6;
  --blue-dim:#1d4ed8;
  --text:    #e2e8f0;
  --muted:   #64748b;
  --pixel:   'Lilita One', cursive;
  --body:    'Nunito', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── SECTIONS ─────────────────────────────────────────────────── */
section { padding: 5rem 2rem; border-bottom: 1px solid var(--border); }
.section-inner { max-width: 1080px; margin: 0 auto; }
.section-title { font-family: var(--pixel); font-size: clamp(20px, 2.5vw, 28px); color: var(--text); text-align: center; margin-bottom: .75rem; }
.section-subtitle { font-size: 16px; color: var(--muted); text-align: center; max-width: 520px; margin: 0 auto 3rem; }

/* ── BUTTONS ──────────────────────────────────────────────────── */
.btn-primary { font-family: var(--pixel); font-size: 15px; background: var(--blue); color: #fff; border: none; padding: 14px 28px; text-decoration: none; transition: background .15s; display: inline-block; }
.btn-primary:hover { background: var(--blue-dim); }
.btn-secondary { font-family: var(--pixel); font-size: 15px; background: transparent; color: var(--muted); border: 1px solid var(--border); padding: 14px 28px; text-decoration: none; transition: color .15s, border-color .15s; display: inline-block; }
.btn-secondary:hover { color: var(--text); border-color: var(--muted); }

/* ── HERO ─────────────────────────────────────────────────────── */
#hero {
  display: flex; flex-direction: column; align-items: center;
  padding: 5rem 2rem 6rem;
  border-bottom: 1px solid var(--border);
}
.hero-banner { width: 100%; max-width: 900px; border: 1px solid var(--border); overflow: hidden; margin-bottom: 2.5rem; }
.hero-banner img { width: 100%; display: block; }
.hero-tagline { font-family: var(--pixel); font-size: clamp(18px, 2.5vw, 32px); color: var(--text); text-align: center; line-height: 1.4; margin-bottom: 2rem; }
.hero-tagline em { font-style: normal; color: var(--blue); }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* ── BLOG CARDS ───────────────────────────────────────────────── */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }

.blog-card { background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; transition: border-color .2s, transform .2s; text-decoration: none; }
.blog-card:hover { border-color: var(--blue); transform: translateY(-3px); }
.blog-card-img { width: 100%; aspect-ratio: 16/8; object-fit: cover; display: block; background: var(--border); }
.blog-card-img-placeholder { width: 100%; aspect-ratio: 16/8; background: linear-gradient(135deg, #0f1f35 0%, #1a2d45 100%); display: flex; align-items: center; justify-content: center; font-family: var(--pixel); font-size: 28px; color: var(--border); letter-spacing: 2px; }
.blog-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.blog-card-meta { display: flex; gap: 1rem; align-items: center; margin-bottom: .75rem; }
.blog-card-tag { font-size: 11px; font-family: var(--pixel); color: var(--blue); background: rgba(59,130,246,.12); border: 1px solid rgba(59,130,246,.25); padding: 2px 8px; letter-spacing: .5px; }
.blog-card-date { font-size: 12px; color: var(--muted); }
.blog-card-title { font-family: var(--pixel); font-size: 17px; color: var(--text); margin-bottom: .6rem; line-height: 1.4; }
.blog-card-excerpt { font-size: 14px; color: var(--muted); line-height: 1.7; flex: 1; }
.blog-card-readmore { margin-top: 1.25rem; font-size: 13px; font-family: var(--pixel); color: var(--blue); display: inline-flex; align-items: center; gap: .4rem; transition: gap .15s; }
.blog-card:hover .blog-card-readmore { gap: .7rem; }

/* ── FAQ ──────────────────────────────────────────────────────── */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question { font-family: var(--pixel); font-size: 19px; color: var(--text); padding: 1.75rem 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; line-height: 1.4; user-select: none; }
.faq-question::after { content: '+'; font-size: 26px; color: var(--muted); flex-shrink: 0; transition: transform .2s; }
.faq-item.open .faq-question::after { transform: rotate(45deg); color: var(--blue); }
.faq-item.open .faq-question { color: var(--blue); }
.faq-answer { font-size: 17px; color: var(--muted); padding: 0; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s; line-height: 1.8; }
.faq-item.open .faq-answer { max-height: 600px; padding-bottom: 1.75rem; }

/* ── FOOTER ───────────────────────────────────────────────────── */
footer { padding: 5rem 2rem; text-align: center; }
.footer-logo { font-family: var(--pixel); font-size: 20px; color: var(--blue); margin-bottom: 1.5rem; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.5rem; list-style: none; margin-bottom: 1.5rem; }
.footer-links a { font-size: 14px; color: var(--muted); text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 13px; color: var(--muted); opacity: .5; }

/* ── BLOG POST PAGE ───────────────────────────────────────────── */
.blog-nav { background: var(--surface); border-bottom: 1px solid var(--border); padding: 1rem 2rem; }
.blog-nav-back { font-family: var(--pixel); font-size: 13px; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; transition: color .15s; }
.blog-nav-back:hover { color: var(--blue); }
.blog-post-header-img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.blog-post-header-placeholder { width: 100%; height: 280px; background: linear-gradient(135deg, #0f1f35 0%, #1a2d45 100%); display: flex; align-items: center; justify-content: center; font-family: var(--pixel); font-size: 48px; color: var(--border); }
.blog-post-container { max-width: 760px; margin: 0 auto; padding: 3rem 2rem 5rem; }
.blog-post-meta { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.25rem; }
.blog-post-title { font-family: var(--pixel); font-size: clamp(22px, 3.5vw, 34px); color: var(--text); margin-bottom: 2.25rem; line-height: 1.3; }
.blog-post-divider { border: none; border-top: 1px solid var(--border); margin: 0 0 2.25rem; }
.blog-post-body { font-size: 17px; color: var(--muted); line-height: 1.9; }
.blog-post-body p { margin-bottom: 1.4rem; }
.blog-post-body h2 { font-family: var(--pixel); font-size: clamp(18px, 2.5vw, 22px); color: var(--blue); margin: 2.5rem 0 .75rem; }
.blog-post-body h3 { font-family: var(--pixel); font-size: 17px; color: var(--text); margin: 2rem 0 .6rem; }
.blog-post-body p:last-child { margin-bottom: 0; }

/* ── SCROLL REVEAL ────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (max-width: 640px) {
  .blog-post-container { padding: 2rem 1.25rem 4rem; }
  .blog-post-body { font-size: 16px; }
}
