/**
 * The Puzzle Architect - Global Styles
 * Navigation, Footer, and CSS Resets
 */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: #222;
  background: #fff;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.3s ease; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* NAVIGATION */
.nav-container {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  color: #0052CC;
}

.nav-logo:hover { color: #003d99; }

.nav-logo-img {
  height: 36px;
  width: auto;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
  position: relative;
}

.nav-link:hover { color: #0052CC; }

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #0052CC;
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
}

.nav-hamburger {
  width: 24px;
  height: 2px;
  background: #333;
  transition: all 0.3s ease;
}

.nav-hamburger::before,
.nav-hamburger::after {
  content: '';
  width: 24px;
  height: 2px;
  background: #333;
  display: block;
  transition: all 0.3s ease;
}

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

.nav-mobile-toggle.active .nav-hamburger::before {
  transform: rotate(45deg) translate(8px, 8px);
}

.nav-mobile-toggle.active .nav-hamburger::after {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* FOOTER */
.footer-block {
  background: #1a1a1a;
  color: #fff;
  padding: 60px 20px 30px;
  margin-top: 80px;
  border-top: 3px solid #0052CC;
}

.footer-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-section h3,
.footer-section h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.footer-brand h3 { color: #FFD700; }

.footer-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-section a {
  color: #bbb;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-section a:hover { color: #FFD700; }

.footer-legal {
  grid-column: 1 / -1;
  border-top: 1px solid #333;
  padding-top: 30px;
  text-align: center;
  font-size: 0.9rem;
  color: #999;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    gap: 1rem;
    padding: 20px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  }

  .nav-menu.active { display: flex; }
  .nav-mobile-toggle { display: flex; }

  .footer-wrapper { grid-template-columns: 1fr; }
  .footer-legal { grid-column: 1; }
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
