/* ============================================
   TheLab - Everyone's Makerspace
   Dark Industrial Theme with Green Accents
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors */
  --color-bg:           #0d0d0d;
  --color-bg-alt:       #141414;
  --color-surface:      #1a1a1a;
  --color-surface-alt:  #222222;
  --color-card:         #1e1e1e;
  --color-border:       #2a2a2a;
  --color-border-light: #333333;

  --color-accent:       #00C853;
  --color-accent-hover: #00E676;
  --color-accent-dark:  #009624;
  --color-accent-glow:  rgba(0, 200, 83, 0.15);
  --color-accent-subtle:rgba(0, 200, 83, 0.08);

  --color-text:         #e0e0e0;
  --color-text-muted:   #999999;
  --color-text-dim:     #666666;
  --color-heading:      #ffffff;
  --color-link:         #00C853;

  --color-discord:      #5865F2;

  /* Typography */
  --font-heading: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body:    'Source Code Pro', monospace, system-ui, -apple-system, sans-serif;

  /* Spacing */
  --section-padding: 6rem;
  --container-max:   1200px;
  --container-pad:   1.5rem;

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   300ms ease;
  --transition-slow:   500ms ease;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}


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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-hover);
}

address {
  font-style: normal;
}

::selection {
  background: var(--color-accent);
  color: var(--color-bg);
}


/* ---------- Utility / Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section {
  padding: var(--section-padding) 0;
  position: relative;
}

/* Horizontal gradient divider — reusable via .section-divider-top */
.section-divider-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 800px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border-light), transparent);
}

/* Full-width accent gradient bar */
.section-accent-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}


/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: var(--color-bg);
  box-shadow: 0 0 30px var(--color-accent-glow),
              0 0 60px rgba(0, 200, 83, 0.08);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-heading);
  border-color: var(--color-border-light);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-subtle);
}

.btn-discord {
  border-color: var(--color-border-light);
}

.btn-discord:hover {
  border-color: var(--color-discord);
  color: var(--color-discord);
  background: rgba(88, 101, 242, 0.08);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
  text-align: center;
}

.btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}


/* ---------- Cards (shared base) ---------- */
.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 24px var(--color-accent-glow);
}

.card-icon {
  width: 48px;
  height: 48px;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.card-icon--lg {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.5rem;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: 0.5rem;
}

.card-title--lg {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}


/* ---------- Section Header ---------- */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  color: var(--color-heading);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-line {
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 0 auto 1.5rem;
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}


/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: all var(--transition-base);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(13, 13, 13, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: baseline;
  color: var(--color-heading);
}

.nav-logo:hover {
  color: var(--color-heading);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-link {
  display: block;
  padding: 0.5rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
  letter-spacing: 0.01em;
}

.nav-link:hover {
  color: var(--color-heading);
}

.nav-cta {
  background: var(--color-accent);
  color: var(--color-bg) !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  margin-left: 0.75rem;
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--color-accent-hover);
  color: var(--color-bg) !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-heading);
  position: relative;
  transition: var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--color-heading);
  transition: var(--transition-base);
}

.hamburger::before { top: -7px; }
.hamburger::after  { top: 7px; }

.nav-toggle.active .hamburger {
  background: transparent;
}

.nav-toggle.active .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}


/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: calc(100vh - 3.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    url('assets/streetview.jpg') center center / cover no-repeat;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(13, 13, 13, 0.6) 0%,
    rgba(13, 13, 13, 0.75) 50%,
    rgba(13, 13, 13, 0.95) 100%
  );
  z-index: 1;
}

/* Subtle grid pattern overlay for industrial feel */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 2;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 2rem 0;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: var(--color-heading);
}

.hero-tagline {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 500;
  color: var(--color-heading);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--color-text-dim);
  border-bottom: 2px solid var(--color-text-dim);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease infinite;
}

@keyframes scrollBounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(45deg); }
  40%  { transform: translateY(8px) rotate(45deg); }
  60%  { transform: translateY(4px) rotate(45deg); }
}


/* ============================================
   ADDRESS BANNER
   ============================================ */
.address-banner {
  background: var(--color-surface);
  border-top: 1px solid var(--color-accent);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
  position: relative;
}

/* Subtle accent glow along top edge */
.address-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--color-accent) 50%, transparent 100%);
  box-shadow: 0 0 12px var(--color-accent-glow);
}

.address-banner-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.address-banner-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.address-banner-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-accent);
}

.address-banner-text {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.address-banner-text a {
  color: var(--color-text);
  transition: color var(--transition-fast);
}

.address-banner-text a:hover {
  color: var(--color-accent);
}


/* ============================================
   ABOUT
   ============================================ */
.about {
  background: var(--color-bg-alt);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-lead {
  font-size: 1.2rem;
  color: var(--color-heading);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.about-text p {
  margin-bottom: 1rem;
}

.about-text p:last-child {
  font-weight: 500;
  color: var(--color-heading);
  font-style: italic;
}

.about-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.about-highlight {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-base);
}

.about-highlight:hover {
  border-color: var(--color-accent);
}

.about-highlight-icon {
  width: 22px;
  height: 22px;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.about-highlight strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: 0.25rem;
}

.about-highlight span {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}



/* ============================================
   EQUIPMENT / SHOPS
   ============================================ */
.equipment {
  background: var(--color-bg);
}

.shops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.shop-card {
  padding: 2rem 1.75rem;
}


/* ============================================
   MEMBERSHIP
   ============================================ */
.membership {
  background: var(--color-bg-alt);
}

.membership-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.benefits-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.benefits-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.05rem;
}

.check-icon {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  flex-shrink: 0;
}

/* Discord Card */
.discord-card {
  padding: 3rem 2.5rem;
  text-align: center;
}

.discord-card .card-desc {
  margin-bottom: 2rem;
}

.discord-card .btn {
  min-width: 200px;
}

/* Membership CTA Card */
.membership-cta {
  padding: 3rem 2.5rem;
  text-align: center;
}

.membership-cta .card-title--lg {
  margin-bottom: 1.5rem;
}

.membership-cta .benefits-list {
  text-align: left;
  margin-bottom: 2rem;
}

.membership-cta .btn {
  min-width: 200px;
}


/* ============================================
   WAYS TO GIVE
   ============================================ */
.support {
  background: var(--color-bg);
  position: relative;
}

.give-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.give-card {
  padding: 2.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.give-card .card-icon {
  margin-bottom: 1.5rem;
}

.give-card .card-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.give-card .card-desc {
  line-height: 1.7;
  margin-bottom: 1.75rem;
  flex-grow: 1;
}

.give-card .card-desc strong {
  color: var(--color-heading);
  font-weight: 600;
}

.give-footnote {
  text-align: center;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

.give-footnote strong {
  color: var(--color-heading);
  font-weight: 600;
}


/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-logo {
  margin-bottom: 0.75rem;
}

.footer-tagline {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.footer-nonprofit {
  font-size: 0.85rem;
  color: var(--color-text-dim);
  line-height: 1.6;
}

.footer-links h4 {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-heading);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

/* Consolidated footer link styles */
.footer-links a,
.footer-contact-email a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover,
.footer-contact-email a:hover {
  color: var(--color-accent);
}

.footer-links address {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 1.5rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--color-text-dim);
}


/* ============================================
   FADE-IN ANIMATION
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================
   RESPONSIVE — TABLET (768px+)
   ============================================ */
@media (min-width: 768px) {
  :root {
    --section-padding: 7rem;
  }

  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 4rem;
    align-items: start;
  }

  .about-text {
    grid-column: 1;
    grid-row: 1;
  }

  .about-image {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 6rem;
    max-height: 480px;
  }

  .shops-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .membership-grid {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .membership-cta,
  .discord-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .address-banner-inner {
    flex-direction: row;
    gap: 3rem;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
  }
}


/* ============================================
   RESPONSIVE — DESKTOP (1024px+)
   ============================================ */
@media (min-width: 1024px) {
  :root {
    --section-padding: 8rem;
  }

  .shops-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Make the last card in the 7-card grid span the center */
  .shops-grid .shop-card:last-child {
    grid-column: 2 / 3;
  }
}


/* ============================================
   RESPONSIVE — LARGE (1200px+)
   ============================================ */
@media (min-width: 1200px) {
  .shops-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Reset the centering for 4-col layout */
  .shops-grid .shop-card:last-child {
    grid-column: auto;
  }
}


/* ============================================
   RESPONSIVE — MOBILE (<768px)
   ============================================ */
@media (max-width: 767px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--color-surface);
    flex-direction: column;
    align-items: stretch;
    padding: 5rem 2rem 2rem;
    gap: 0;
    border-left: 1px solid var(--color-border);
    transition: right var(--transition-base);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-link {
    padding: 0.875rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 1rem;
    text-align: center;
    border-bottom: none;
  }

  /* Mobile overlay */
  .nav-menu::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
  }

  .nav-menu.active::before {
    opacity: 1;
  }

  .hero-title {
    font-size: clamp(3.5rem, 15vw, 5rem);
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
    max-width: 300px;
    margin: 0 auto;
  }

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

  .membership-cta,
  .discord-card {
    padding: 2rem 1.75rem;
  }

  .give-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
}


/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-arrow {
    animation: none;
  }

  .card,
  .btn {
    transition: none;
  }
}

/* Focus visible for keyboard nav */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}
