/* =============================================
   MERIDIAN DESIGN & ENGINEERING — v2.0
   Main Stylesheet
   ============================================= */

/* --- CSS Variables --- */
:root {
  --blue: #477BB7;
  --blue-dark: #3a669c;
  --green: #7E9C52;
  --green-dark: #6b8544;
  --charcoal: #2C2C2C;
  --grey-light: #F5F5F5;
  --grey-mid: #E0E0E0;
  --grey-text: #666666;
  --white: #FFFFFF;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  --max-width: 1200px;
  --header-height: 80px;
  --transition: 0.25s ease;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.12);
}

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

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

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 3px;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.btn-primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(71,123,183,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--blue);
}

.btn-white {
  background: var(--white);
  color: var(--blue);
  border-color: var(--white);
}
.btn-white:hover {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

/* --- Section Base --- */
.section { padding: 6rem 0; }
.bg-light { background: var(--grey-light); }

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}
.section-header p {
  color: var(--grey-text);
  font-size: 1.05rem;
  margin-top: 0.75rem;
}

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.75rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--charcoal);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--grey-mid);
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo img {
  height: 48px;
  width: auto;
}

.main-nav ul {
  display: flex;
  gap: 2.5rem;
}

.main-nav a {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  transition: color var(--transition);
  position: relative;
  padding-bottom: 4px;
}

.site-header.scrolled .main-nav a {
  color: var(--charcoal);
}

.site-header.scrolled .main-nav a:hover,
.site-header.scrolled .main-nav a.active {
  color: var(--charcoal);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--white);
  transition: width var(--transition);
}

.site-header.scrolled .main-nav a::after {
  background: var(--charcoal);
}

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all var(--transition);
}

.site-header.scrolled .nav-toggle span {
  background: var(--charcoal);
}

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--charcoal);
  background-image: url('../images/hero/hero.png');
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(44,44,44,0.75) 0%,
    rgba(71,123,183,0.35) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding-top: var(--header-height);
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--green);
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero-content h1 {
  color: var(--white);
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.4s forwards;
}

.hero-sub {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  font-weight: 300;
  max-width: 540px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.6s forwards;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.8s forwards;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 2;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.6), transparent);
  animation: scrollPulse 2s ease infinite;
}

/* =============================================
   INTRO
   ============================================= */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.intro-right {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-self: start;
}

.intro-text .section-label { display: block; margin-bottom: 0.75rem; }

.intro-text h2 {
  margin-bottom: 1.25rem;
}

.intro-text p {
  color: var(--grey-text);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.intro-text p em {
  font-style: italic;
  color: var(--charcoal);
  font-weight: 500;
}

.intro-stats {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  border-left: 3px solid var(--grey-mid);
  padding-left: 3rem;
}

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 0.875rem;
  color: var(--grey-text);
  margin-top: 0.25rem;
  font-weight: 500;
}

/* =============================================
   SERVICES OVERVIEW
   ============================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 4px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  border-top: 3px solid transparent;
}

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

.service-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 3px;
  margin-bottom: 1.5rem;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.service-card:hover .service-image img {
  transform: scale(1.04);
}

/* Muthu figure */
.muthu-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.muthu-figure img {
  width: 75%;
  max-height: 320px;
  object-fit: cover;
  object-position: center top;
  border-radius: 4px;
  display: block;
}

.muthu-figure figcaption {
  margin-top: 0.6rem;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--grey-text);
  text-align: left;
}

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

.service-card p {
  color: var(--grey-text);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.service-link {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--blue);
  transition: color var(--transition);
}
.service-link:hover { color: var(--blue-dark); }

/* =============================================
   FEATURED PROJECT
   ============================================= */
.project-feature-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.project-feature-image {
  background: var(--grey-mid);
  min-height: 480px;
  position: relative;
  overflow: hidden;
}

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

.image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grey-mid);
  color: var(--grey-text);
  font-family: var(--font-heading);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-feature-content {
  padding: 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--white);
}

.project-type {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.75rem;
}

.project-feature-content h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.project-feature-content p {
  color: var(--grey-text);
  margin-bottom: 2rem;
}

.project-meta {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-meta li {
  font-size: 0.875rem;
  color: var(--grey-text);
  display: flex;
  gap: 0.75rem;
}

.project-meta li span {
  font-weight: 600;
  color: var(--charcoal);
  min-width: 80px;
}

/* =============================================
   PROJECT TYPES
   ============================================= */
.types-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.type-tag {
  padding: 0.65rem 1.5rem;
  border: 2px solid var(--blue);
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 3px;
  transition: all var(--transition);
  cursor: default;
}

.type-tag:hover {
  background: var(--blue);
  color: var(--white);
}

/* =============================================
   CTA BAND
   ============================================= */
.cta-band {
  background: var(--blue);
  padding: 5rem 0;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cta-text h2 {
  color: var(--white);
  max-width: 560px;
}

.cta-text p {
  color: rgba(255,255,255,0.8);
  margin-top: 0.5rem;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--charcoal);
  padding: 4rem 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
  height: 40px;
  width: auto;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.footer-brand p {
  color: rgba(255,255,255,0.5);
  font-size: 0.875rem;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-nav a {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--white); }

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-contact a {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  transition: color var(--transition);
}
.footer-contact a:hover { color: var(--white); }

.footer-bottom {
  padding: 1.5rem 0;
}

.footer-bottom p {
  color: rgba(255,255,255,0.3);
  font-size: 0.8rem;
  text-align: center;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .intro-grid { grid-template-columns: 1fr; gap: 3rem; }
  .intro-stats { flex-direction: row; border-left: none; padding-left: 0; border-top: 3px solid var(--grey-mid); padding-top: 2rem; }
  .project-feature-card { grid-template-columns: 1fr; }
  .project-feature-image { min-height: 320px; }
}

@media (max-width: 768px) {
  .section { padding: 4rem 0; }
  .services-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .cta-inner { flex-direction: column; text-align: center; }
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(44,44,44,0.97);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--shadow);
  }
  .main-nav.open ul { flex-direction: column; gap: 1rem; }
  .main-nav.open a { color: var(--white) !important; }
  .main-nav.open a::after { background: var(--white) !important; }
  .hero-actions { flex-direction: column; }
  .intro-stats { flex-direction: column; }
  .project-feature-card {
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow);
  }
  .project-feature-image {
    height: 220px;
    min-height: unset;
  }
  .project-feature-content {
    padding: 1.75rem;
  }
  .project-feature-content h3 {
    font-size: 1.1rem;
  }
}

/* =============================================
   PROJECT CARDS GRID (homepage)
   ============================================= */
.project-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

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

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

.project-card-image {
  height: 220px;
  background: var(--grey-mid);
  position: relative;
  overflow: hidden;
}

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

.project-card-content {
  padding: 1.75rem;
}

.project-card-content h3 {
  margin: 0.5rem 0 0.75rem;
  font-size: 1.1rem;
}

.project-card-content p {
  color: var(--grey-text);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
  .project-cards-grid { grid-template-columns: 1fr; }
}

/* =============================================
   CONTACT SECTION
   ============================================= */
.contact-details {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem 2.5rem;
  background: var(--white);
  border-radius: 4px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  min-width: 260px;
}

.contact-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.contact-icon {
  width: 44px;
  height: 44px;
  color: var(--blue);
  flex-shrink: 0;
}

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

.contact-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.contact-label {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}

.contact-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--charcoal);
}

@media (max-width: 768px) {
  .contact-details { flex-direction: column; align-items: center; }
  .contact-item { width: 100%; max-width: 360px; }
}