/*
 * Dark theme styles for Mastermind HH.
 *
 * This stylesheet uses a rich nighttime palette with deep blues and
 * purples to evoke an after‑hours atmosphere.  The layout and
 * interactions mirror the Mastermind KC site for familiarity while
 * emphasising exclusivity and sophistication.  CSS variables make it
 * easy to adjust the colours across the entire design.
 */

:root {
  --bg-dark: #0e1a2b;         /* Primary dark background */
  --bg-secondary: #152238;    /* Slightly lighter dark background */
  --primary-color: #3a86ff;   /* Electric blue accent */
  --secondary-color: #8338ec; /* Vibrant purple accent */
  --text-color: #f5f5f5;      /* Near‑white for readability */
  --muted-color: #94a3b8;     /* Soft slate for muted text */
}

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

body {
  font-family: 'Montserrat', 'Poppins', sans-serif;
  color: var(--text-color);
  background: var(--bg-dark);
  overflow-x: hidden;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(14, 26, 43, 0.95);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  transition: background 0.3s, box-shadow 0.3s;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 1.3rem;
}

.logo img {
  height: 40px;
  width: auto;
  margin-right: 10px;
}

.nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s;
  padding: 5px;
}

.nav a:hover,
.nav a.active {
  color: var(--primary-color);
}

/* Mobile toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.mobile-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-color);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.mobile-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-toggle.open span:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero section */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  text-align: center;
  color: var(--text-color);
  background: linear-gradient(135deg, rgba(58, 134, 255, 0.85), rgba(131, 56, 236, 0.85)), url('assets/logo.png') no-repeat center/180px;
  background-color: var(--bg-secondary);
}

.hero-content {
  max-width: 700px;
  padding: 20px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: 700;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: var(--muted-color);
}

.cta-button {
  display: inline-block;
  background: var(--secondary-color);
  color: var(--text-color);
  padding: 12px 28px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
}

.cta-button:hover {
  background: #6a25c3;
}

/* Sections */
.section {
  padding: 120px 0;
  background: var(--bg-secondary);
  color: var(--text-color);
}
.section:nth-of-type(even) {
  background: var(--bg-dark);
}
.section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--primary-color);
  font-weight: 600;
}
.section p {
  max-width: 800px;
  margin-bottom: 40px;
  font-size: 1rem;
  color: var(--muted-color);
}

/* Cards */
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.card {
  flex: 1;
  min-width: 250px;
  background: var(--bg-dark);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}
.card h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--secondary-color);
  font-weight: 600;
}
.card p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted-color);
}

/* Contact / join form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 500px;
}
.contact-form input,
.contact-form textarea {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-color);
  resize: vertical;
}
.contact-form input:disabled,
.contact-form textarea:disabled {
  opacity: 0.6;
}
.contact-form button {
  padding: 12px;
  border: none;
  background: var(--primary-color);
  color: var(--text-color);
  border-radius: 4px;
  font-size: 1rem;
  cursor: not-allowed;
  opacity: 0.6;
}
.contact-form small {
  font-size: 0.8rem;
  color: var(--muted-color);
}

/* Footer */
footer {
  background: var(--bg-dark);
  color: var(--muted-color);
  text-align: center;
  padding: 30px 0;
}
footer p {
  font-size: 0.9rem;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  right: 30px;
  bottom: 30px;
  background: var(--primary-color);
  color: var(--text-color);
  padding: 10px 14px;
  border-radius: 50%;
  display: none;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.back-to-top:hover {
  background: #2b62c8;
}

/* Scroll reveal */
.hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav ul {
    flex-direction: column;
    position: absolute;
    top: 80px;
    right: 0;
    background: var(--bg-secondary);
    width: 200px;
    transform: translateX(100%);
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    padding: 10px 0;
  }
  .nav ul.open {
    transform: translateX(0);
  }
  .nav a {
    padding: 15px;
    display: block;
    color: var(--text-color);
  }
  .mobile-toggle {
    display: flex;
  }
  .hero h1 {
    font-size: 2.3rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .cards {
    flex-direction: column;
  }
}