/* ========================================
   O'Rourke Mechanical & Electrical — Styles
   ======================================== */

/* --- Custom Properties --- */
:root {
  --navy: #1a2744;
  --white: #ffffff;
  --light-grey: #f4f6f8;
  --accent-blue: #2e86de;
  --accent-orange: #e67e22;
  --text-dark: #2c3e50;
  --text-light: #6b7c93;
  --border: #dce1e8;
  --shadow: 0 2px 12px rgba(26, 39, 68, 0.08);
  --shadow-lg: 0 8px 30px rgba(26, 39, 68, 0.12);
  --radius: 8px;
  --transition: 0.3s ease;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color var(--transition);
}

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

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.2;
  color: var(--navy);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.35rem; }

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

.section {
  padding: 5rem 0;
}

.section--grey {
  background: var(--light-grey);
}

.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  border: none;
  text-align: center;
}

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

.btn--primary {
  background: var(--accent-orange);
  color: var(--white);
}

.btn--primary:hover {
  background: #cf6d17;
  color: var(--white);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn--outline:hover {
  background: var(--white);
  color: var(--navy);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header p {
  color: var(--text-light);
  margin-top: 0.75rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.1rem;
}

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  text-decoration: none;
}

.logo__mark {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.65rem;
  color: var(--navy);
  letter-spacing: 1px;
}

.logo__text {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--text-light);
}

.nav__list {
  display: flex;
  gap: 2rem;
}

.nav__link {
  font-weight: 500;
  color: var(--text-dark);
  position: relative;
  padding: 0.25rem 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-blue);
  transition: width var(--transition);
}

.nav__link:hover,
.nav__link--active {
  color: var(--accent-blue);
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  margin: 6px 0;
  transition: transform var(--transition), opacity var(--transition);
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #243352 100%);
  color: var(--white);
  padding: 6rem 0;
  text-align: center;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.25rem;
  font-size: 2.75rem;
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  opacity: 0.9;
}

.hero .btn {
  margin: 0 0.5rem;
}

/* --- Service Cards --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.service-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  background: var(--light-grey);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent-blue);
}

.service-card h3 {
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.service-card__link {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* --- Why Choose Us --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature {
  text-align: center;
  padding: 2rem 1.5rem;
}

.feature__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  background: var(--accent-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--white);
}

.feature h3 {
  margin-bottom: 0.75rem;
}

.feature p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #1a6dbf 100%);
  color: var(--white);
  text-align: center;
  padding: 4rem 0;
}

.cta-banner h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.cta-banner p {
  margin-bottom: 2rem;
  opacity: 0.9;
  font-size: 1.1rem;
}

/* --- About Page --- */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-intro__image {
  background: var(--light-grey);
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.9rem;
}

.about-intro__content h2 {
  margin-bottom: 1rem;
}

.about-intro__content p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.value-card {
  padding: 2rem;
  text-align: center;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.value-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: var(--light-grey);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--accent-blue);
}

.value-card h3 {
  margin-bottom: 0.5rem;
}

.value-card p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.certs {
  text-align: center;
}

.certs__badges {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.cert-badge {
  width: 120px;
  height: 80px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.8rem;
  font-weight: 600;
}

.service-area {
  text-align: center;
}

.service-area p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0.75rem auto 0;
  font-size: 1.05rem;
}

/* --- Services Page (detail) --- */
.service-detail {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  padding: 2.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.service-detail__icon {
  width: 64px;
  height: 64px;
  background: var(--light-grey);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.service-detail h3 {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.service-detail > div > p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.service-detail ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  list-style: none;
}

.service-detail ul li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.service-detail ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-blue);
  font-weight: 700;
}

/* --- Projects Page --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.project-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.project-card__image {
  aspect-ratio: 16 / 10;
  background: var(--light-grey);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.85rem;
}

.project-card__body {
  padding: 1.25rem;
}

.project-card__tag {
  display: inline-block;
  background: var(--light-grey);
  color: var(--accent-blue);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-card__body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.project-card__body p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--navy);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-status {
  margin-top: 1rem;
  font-weight: 500;
  display: none;
}

.form-status--success {
  color: #27ae60;
  display: block;
}

.form-status--error {
  color: #e74c3c;
  display: block;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-info__item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-info__icon {
  width: 44px;
  height: 44px;
  background: var(--light-grey);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.contact-info__item h4 {
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.contact-info__item p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.map-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--light-grey);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 1.5rem;
  border: 1px solid var(--border);
}

/* --- Page Header (inner pages) --- */
.page-header {
  background: linear-gradient(135deg, var(--navy) 0%, #243352 100%);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.page-header h1 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.page-header p {
  opacity: 0.85;
  font-size: 1.1rem;
}

/* --- Footer --- */
.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 0;
}

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

.footer h4 {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.footer__brand .logo__mark {
  color: var(--white);
}

.footer__brand .logo__text {
  color: rgba(255, 255, 255, 0.5);
}

.footer__brand > p {
  margin-top: 1rem;
}

.footer__links ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

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

.footer__contact p {
  line-height: 1.8;
}

.footer__badges {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.footer__badge {
  width: 80px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.65rem;
  font-weight: 600;
}

.footer-bottom {
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
}

/* --- Mobile Nav --- */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
    z-index: 1001;
  }

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

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

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

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    transition: right var(--transition);
    z-index: 1000;
    padding: 5rem 2rem 2rem;
  }

  .nav.active {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    gap: 1.25rem;
  }

  .nav__link {
    font-size: 1.1rem;
  }

  .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
  }

  .nav-overlay.active {
    display: block;
  }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-intro {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.65rem; }

  .section {
    padding: 3.5rem 0;
  }

  .hero {
    padding: 4rem 0;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .features-grid,
  .values-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

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

  .service-detail {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .service-detail__icon {
    margin: 0 auto;
  }

  .service-detail ul {
    grid-template-columns: 1fr;
    text-align: left;
  }

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

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

  .hero .btn {
    display: block;
    margin: 0.5rem auto;
    max-width: 260px;
  }

  .certs__badges {
    gap: 1rem;
  }
}
