/* =============================================================
   Makerspace Networking Group of Illinois — Stylesheet
   WCAG 2.1 AA compliant · no dependencies · static site
   ============================================================= */

/* ---------- Design Tokens ---------- */
:root {
  --bg:         #ffffff;
  --bg-subtle:  #f0fdf9;
  --text:       #0f172a;
  --text-muted: #52626f;
  --accent:     #10b981;
  --accent-h:   #059669;
  --dark:       #080c18;
  --border:     #e2e8f0;
  --focus:      #f59e0b;
  --radius:     10px;
  --shadow:     0 1px 3px rgb(0 0 0/8%), 0 1px 2px rgb(0 0 0/5%);
  --shadow-up:  0 8px 24px rgb(0 0 0/12%);
  --font:       -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                "Helvetica Neue", sans-serif;
  --max:        960px;
  --pad:        1.5rem;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }

/* ---------- Base ---------- */
html { font-size: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  top: -4rem;
  left: var(--pad);
  background: var(--focus);
  color: #000;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  z-index: 9999;
  transition: top 0.15s;
}
.skip-link:focus { top: 0.75rem; }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}
:focus:not(:focus-visible) { outline: none; }

/* =============================================
   NAV
   ============================================= */
.home-nav {
  background: var(--dark);
  box-shadow: 0 2px 10px rgb(0 0 0/35%);
}

.home-nav ul {
  list-style: none;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}

.home-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.75rem;
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s;
  white-space: nowrap;
}

.home-nav a img {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity 0.15s;
}

.home-nav a:hover { color: #fff; }
.home-nav a:hover img { opacity: 1; }
.home-nav a[aria-current="page"] {
  color: #10b981;
  font-weight: 600;
  border-bottom-color: #10b981;
}
.home-nav a[aria-current="page"] img { opacity: 1; }

/* =============================================
   HOME HERO
   ============================================= */
.home-hero {
  background: linear-gradient(160deg, #080c18 0%, #0a2318 55%, #080c18 100%);
  min-height: calc(100vh - 42px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem var(--pad);
  color: #fff;
}

.home-hero__logo {
  max-width: 420px;
  max-height: 320px;
  width: 80%;
  height: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 8px 24px rgb(0 0 0/50%));
}

.home-hero__tagline {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.72);
  font-style: italic;
  letter-spacing: 0.01em;
  margin-bottom: 1.25rem;
}

.home-hero__desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 2.5rem;
}

.home-hero__actions {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.6rem;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  white-space: nowrap;
}

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

.btn--discord {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgb(16 185 129/40%);
}
.btn--discord:hover {
  background: var(--accent-h);
  box-shadow: 0 6px 22px rgb(16 185 129/50%);
}

.btn--outline {
  border: 2px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.88);
  background: transparent;
}
.btn--outline:hover {
  border-color: rgba(255,255,255,0.65);
  color: #fff;
  background: rgba(255,255,255,0.07);
}

/* =============================================
   PAGE CONTENT
   ============================================= */
.page-content {
  max-width: var(--max);
  margin: 2.75rem auto;
  padding: 0 var(--pad);
}

.page-heading {
  margin-bottom: 1.75rem;
}

.page-heading h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
}

.page-heading p {
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* =============================================
   INTRO TEXT
   ============================================= */
.intro {
  color: var(--text-muted);
  font-size: 0.975rem;
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.intro a { color: var(--accent); }

/* =============================================
   RESOURCE LIST
   ============================================= */
.resource-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.resource-list li {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
}

.resource-list a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  border-radius: var(--radius);
  transition: background 0.15s;
}

.resource-list a:hover { background: var(--bg-subtle); }

.resource-icon { font-size: 1.5rem; flex-shrink: 0; }
.resource-label { font-size: 1rem; display: block; }
.resource-desc { font-size: 0.825rem; color: var(--text-muted); font-weight: 400; }

/* =============================================
   FAQ ACCORDION
   ============================================= */
.faq-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

.faq-list details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-list summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.975rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  user-select: none;
  transition: background 0.15s;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

.faq-list details[open] summary {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.faq-list details[open] summary::after { content: "−"; }
.faq-list summary:hover { background: var(--bg-subtle); }

.faq-answer {
  padding: 1rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-answer p + p { margin-top: 0.75rem; }
.faq-answer a { color: var(--accent); }

.faq-q-text { flex: 1; }

.faq-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
}
.faq-list summary:hover .faq-copy-btn,
.faq-list details[open] .faq-copy-btn { opacity: 1; }
.faq-copy-btn:hover { color: var(--accent); background: var(--bg-subtle); }
.faq-copy-btn--copied { color: var(--accent); opacity: 1; }

.faq-category {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin: 2rem 0 0.6rem;
}
.faq-category:first-child { margin-top: 1rem; }

/* =============================================
   CONTENT CARDS (lesson plans / equipment guides)
   ============================================= */
.content-cards {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.content-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}

.content-card__body { flex: 1; min-width: 0; }

.content-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.content-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.content-card__link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 9999px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}

.content-card__link:hover { background: var(--accent-h); }

/* =============================================
   CALENDAR
   ============================================= */
.calendar-wrapper {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.calendar-wrapper iframe {
  display: block;
  width: 100%;
  min-height: 500px;
  border: none;
}

.calendar-fallback {
  padding: 0.875rem 1.25rem;
  background: var(--bg-subtle);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border);
}

.calendar-fallback a { color: var(--accent); }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.65);
  font-size: 0.8rem;
  text-align: center;
  padding: 1.75rem var(--pad);
  margin-top: 4rem;
  line-height: 1.9;
}

.site-footer a { color: rgba(255,255,255,0.85); text-decoration: underline; }

body.home .site-footer { margin-top: 0; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 700px) {
  .home-nav a { padding: 0.5rem 0.6rem; font-size: 0.8rem; }
  .home-hero { padding: 3.5rem var(--pad) 3.25rem; }
  .content-card { flex-direction: column; }
  .content-card__link { align-self: flex-start; }
}

/* =============================================
   PRINT
   ============================================= */
@media print {
  .home-nav, .skip-link { display: none; }
  body { font-size: 12pt; color: #000; }
  a::after { content: " (" attr(href) ")"; font-size: 10pt; }
}
