/* ========================================
   McMillan Manufacturing USA - Styles
   ======================================== */

/* Custom Properties */
:root {
  --navy: #1B3A91;
  --navy-dark: #142D70;
  --red: #D42426;
  --red-dark: #B01E20;
  --white: #FFFFFF;
  --light-gray: #F5F6FA;
  --medium-gray: #E8EAF0;
  --text-dark: #1A1A2E;
  --text-medium: #4A4A5A;
  --font-heading: Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ========================================
   Navigation
   ======================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--navy);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.nav-logo span {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links a {
  color: var(--white);
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: background 0.3s, color 0.3s;
}

.nav-links a:hover,
.nav-links a:focus {
  background: rgba(255, 255, 255, 0.15);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 60px;
  background: linear-gradient(175deg, var(--navy) 0%, var(--navy) 40%, var(--white) 100%);
  position: relative;
  overflow: hidden;
}

/* Mountain/triangle background pattern */
.hero::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 300px;
  background:
    linear-gradient(135deg, transparent 33.3%, rgba(27, 58, 145, 0.06) 33.3%, rgba(27, 58, 145, 0.06) 66.6%, transparent 66.6%),
    linear-gradient(225deg, transparent 33.3%, rgba(27, 58, 145, 0.04) 33.3%, rgba(27, 58, 145, 0.04) 66.6%, transparent 66.6%);
  background-size: 200px 200px;
  pointer-events: none;
}

/* Decorative mountain peaks */
.hero::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 80px;
  background: var(--white);
  clip-path: polygon(
    0% 100%, 0% 60%,
    8% 30%, 16% 60%,
    22% 35%, 30% 70%,
    38% 20%, 46% 55%,
    50% 40%, 58% 70%,
    65% 15%, 73% 55%,
    78% 35%, 85% 65%,
    92% 25%, 100% 55%,
    100% 100%
  );
  pointer-events: none;
}

.hero-logo {
  width: 280px;
  max-width: 80%;
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease-out;
}

.hero-tagline {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 40px;
  max-width: 500px;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-contact a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 6px;
  font-size: 1.05rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
}

.hero-contact .email-btn {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(212, 36, 38, 0.4);
}

.hero-contact .email-btn:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 36, 38, 0.5);
}

.hero-contact .phone-btn {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.hero-contact .phone-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.phone-note {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: -8px;
}

/* ========================================
   Section Common
   ======================================== */

.section {
  padding: 80px 24px;
}

.section-container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-label {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  padding: 6px 24px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  border-radius: 3px;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}

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

/* ========================================
   Capabilities Section
   ======================================== */

.capabilities {
  background: var(--light-gray);
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.capability-card {
  background: var(--white);
  border-radius: 8px;
  padding: 36px 28px;
  text-align: center;
  border: 1px solid var(--medium-gray);
  border-top: 4px solid var(--navy);
  transition: transform 0.3s, box-shadow 0.3s;
}

.capability-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(27, 58, 145, 0.12);
}

.capability-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  color: var(--navy);
}

.capability-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 10px;
}

.capability-card p {
  font-size: 0.95rem;
  color: var(--text-medium);
  line-height: 1.5;
}

/* ========================================
   Materials Section
   ======================================== */

.materials {
  background: var(--white);
  position: relative;
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.material-item {
  background: var(--light-gray);
  border-radius: 8px;
  padding: 32px 20px;
  text-align: center;
  border-bottom: 3px solid var(--red);
  transition: transform 0.3s, box-shadow 0.3s;
}

.material-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.material-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  color: var(--navy);
}

.material-item h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--navy);
  line-height: 1.3;
}

/* ========================================
   About Section
   ======================================== */

.about {
  background: var(--light-gray);
  position: relative;
  overflow: hidden;
}

/* Subtle triangle motif */
.about::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -60px;
  width: 300px;
  height: 300px;
  background: rgba(27, 58, 145, 0.04);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  pointer-events: none;
}

.about-family {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--red);
  text-align: center;
  margin-bottom: 48px;
  font-weight: 700;
  letter-spacing: 1px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.stat-card {
  text-align: center;
  padding: 32px 16px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-medium);
  font-weight: 500;
}

.about-text {
  max-width: 750px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-medium);
  line-height: 1.8;
}

/* ========================================
   Footer / Contact
   ======================================== */

.footer {
  background: var(--navy);
  color: var(--white);
  padding: 60px 24px 32px;
  position: relative;
}

/* Mountain silhouette top edge */
.footer::before {
  content: "";
  position: absolute;
  top: -39px;
  left: 0;
  width: 100%;
  height: 40px;
  background: var(--navy);
  clip-path: polygon(
    0% 100%,
    0% 100%,
    10% 40%,
    20% 80%,
    30% 30%,
    40% 70%,
    50% 20%,
    60% 60%,
    70% 35%,
    80% 75%,
    90% 25%,
    100% 60%,
    100% 100%
  );
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  width: 180px;
  margin: 0 auto 24px;
  display: block;
}

.footer-contact {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  transition: color 0.3s;
}

.footer-contact a:hover {
  color: var(--white);
}

.footer-contact .contact-icon {
  width: 20px;
  height: 20px;
}

.footer-phone-note {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  border: 2px solid var(--red);
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 28px;
}

.footer-badge svg {
  width: 20px;
  height: 20px;
}

.footer-divider {
  width: 60px;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 auto 20px;
}

.footer-copy {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ========================================
   Scroll Animations
   ======================================== */

.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);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 992px) {
  .capabilities-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--navy-dark);
    flex-direction: column;
    padding: 16px 0;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links a {
    padding: 14px 24px;
    border-radius: 0;
    font-size: 1.05rem;
  }

  .nav-logo span {
    font-size: 0.95rem;
  }

  .hero-tagline {
    font-size: 1.6rem;
  }

  .hero-logo {
    width: 220px;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .hero-contact a {
    padding: 12px 24px;
    font-size: 0.95rem;
  }

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

  .footer-contact {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .capabilities-grid {
    grid-template-columns: 1fr;
  }

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

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

  .hero-tagline {
    font-size: 1.3rem;
    letter-spacing: 1px;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section {
    padding: 60px 16px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .about-family {
    font-size: 1.2rem;
  }

  .stat-number {
    font-size: 1.8rem;
  }
}
