/* =========================================================
   MECN Corporate Website – Main Stylesheet
   Colour palette: Deep Navy (#0D1B2E), Accent Blue (#1A4F8A),
   Light (#F5F7FA), Text (#222D3A), Mid-grey (#6B7B8D)
   ========================================================= */

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #222D3A;
  background: #ffffff;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

ul { list-style: none; }

address { font-style: normal; }

/* Screen-reader only */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Typography ---------- */
h1 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; font-weight: 600; line-height: 1.35; }
p  { max-width: 70ch; }

/* ---------- Layout ---------- */
.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

.section { padding-block: 80px; }
.section-alt { background: #F5F7FA; }

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 52px;
}
.section-header p { margin: 12px auto 0; color: #6B7B8D; }

.section-footer { text-align: center; margin-top: 44px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 5px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  text-decoration: none !important;
  line-height: 1;
}
.btn-primary {
  background: #1A4F8A;
  color: #ffffff;
  border-color: #1A4F8A;
}
.btn-primary:hover { background: #163f6e; border-color: #163f6e; box-shadow: 0 4px 16px rgba(26,79,138,.25); }
.btn-outline {
  background: transparent;
  color: #1A4F8A;
  border-color: #1A4F8A;
}
.btn-outline:hover { background: #1A4F8A; color: #fff; }
.btn-secondary {
  background: transparent;
  color: #1A4F8A;
  border-color: #1A4F8A;
}
.btn-secondary:hover { background: #1A4F8A; color: #fff; }
.btn-white {
  background: #ffffff;
  color: #0D1B2E;
  border-color: #ffffff;
}
.btn-white:hover { background: #e8edf2; border-color: #e8edf2; }
.btn-full { width: 100%; justify-content: center; }

/* ---------- Header & Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid #e4e9ef;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

/* Logo */
.logo {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-decoration: none !important;
  flex-shrink: 0;
}
.logo-mark {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0D1B2E;
  letter-spacing: 0.05em;
}
.logo-sub {
  font-size: 0.65rem;
  color: #6B7B8D;
  font-weight: 400;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Desktop nav */
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #222D3A;
  transition: background 0.15s, color 0.15s;
  text-decoration: none !important;
}
.nav-link:hover, .nav-link.active { background: #f0f4f9; color: #1A4F8A; }
.nav-cta {
  background: #1A4F8A;
  color: #ffffff !important;
  border-radius: 4px;
  padding: 7px 18px;
}
.nav-cta:hover { background: #163f6e !important; color: #fff !important; }
.nav-cta.active { background: #163f6e; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #222D3A;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero (Home) ---------- */
.hero {
  background: #0D1B2E;
  color: #ffffff;
  padding-block: 100px 90px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-eyebrow {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7AAED4;
  margin-bottom: 16px;
  max-width: none;
}
.hero h1 { color: #ffffff; }
.hero-desc {
  margin-top: 20px;
  color: #a8b8cc;
  font-size: 1.05rem;
}
.hero-actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero-graphic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.hero-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.hero-card:hover {
  background: rgba(255,255,255,.13);
  border-color: rgba(122,174,212,.5);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.hero-card-icon {
  width: 56px;
  height: 56px;
  background: rgba(122,174,212,.18);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7AAED4;
  transition: background 0.2s, color 0.2s;
}
.hero-card-icon svg { width: 26px; height: 26px; }
.hero-card:hover .hero-card-icon {
  background: #1A4F8A;
  color: #ffffff;
}
.hero-card p { font-size: 0.875rem; font-weight: 500; color: #c2d3e3; max-width: none; margin: 0; }
.br-lg { display: inline; }

/* ---------- Intro Strip ---------- */
.intro-strip {
  background: #1A4F8A;
  color: #ffffff;
  padding-block: 22px;
  text-align: center;
}
.intro-strip p {
  max-width: none;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ---------- Services Grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.service-card {
  background: #fff;
  border: 1px solid #e4e9ef;
  border-radius: 10px;
  padding: 32px 28px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.service-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.08);
  border-color: #c0cfe0;
}
.service-icon {
  width: 48px;
  height: 48px;
  background: #EBF2FA;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #1A4F8A;
}
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 { margin-bottom: 10px; }
.service-card p { font-size: 0.9rem; color: #4A5B6E; }
.card-link {
  display: inline-block;
  margin-top: 18px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1A4F8A;
}
.card-link:hover { text-decoration: underline; }

/* ---------- Why Teaser ---------- */
.why-teaser { background: #F5F7FA; }
.why-teaser-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.why-teaser-text h2 { margin-bottom: 16px; }
.why-teaser-text > p { color: #4A5B6E; }
.check-list {
  margin: 24px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.check-list li {
  padding-left: 28px;
  position: relative;
  font-size: 0.9375rem;
  color: #222D3A;
}
.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #1A4F8A;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='2 6 5 9 10 3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}
.why-teaser-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.stat-block {
  background: #fff;
  border: 1px solid #e4e9ef;
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-num {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1A4F8A;
  line-height: 1;
}
.stat-label { font-size: 0.8rem; color: #6B7B8D; font-weight: 500; }

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: #0D1B2E;
  color: #ffffff;
  padding-block: 72px;
  text-align: center;
}
.cta-inner h2 { color: #ffffff; margin-bottom: 12px; }
.cta-inner p { color: #a8b8cc; margin: 0 auto 32px; max-width: 500px; }

/* ---------- Page Hero (inner pages) ---------- */
.page-hero {
  background: #0D1B2E;
  color: #ffffff;
  padding-block: 72px 60px;
  border-bottom: 3px solid #1A4F8A;
}
.page-hero .hero-eyebrow { color: #7AAED4; margin-bottom: 10px; }
.page-hero h1 { color: #ffffff; }
.page-hero p { color: #a8b8cc; margin-top: 14px; max-width: 600px; }

/* ---------- About / Two-col ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 64px;
  align-items: start;
}
.two-col-text h2 { margin-bottom: 20px; }
.two-col-text p + p { margin-top: 16px; }
.two-col-aside { display: flex; flex-direction: column; gap: 20px; }
.aside-card {
  background: #EBF2FA;
  border-radius: 10px;
  padding: 24px;
}
.aside-card h3 { color: #1A4F8A; margin-bottom: 8px; font-size: 1rem; }
.aside-card p { font-size: 0.9rem; color: #4A5B6E; }
.aside-highlight {
  background: #0D1B2E;
  border-radius: 10px;
  padding: 28px;
}
.aside-highlight blockquote p { color: #c2d3e3; font-style: italic; font-size: 1rem; max-width: none; }
.aside-highlight cite { display: block; margin-top: 14px; font-size: 0.8125rem; color: #7AAED4; font-style: normal; }

/* Vision / Mission */
.vmv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.vmv-card {
  background: #fff;
  border: 1px solid #e4e9ef;
  border-radius: 10px;
  padding: 40px 36px;
}
.vmv-icon {
  width: 52px; height: 52px;
  background: #EBF2FA;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #1A4F8A;
  margin-bottom: 20px;
}
.vmv-icon svg { width: 26px; height: 26px; }
.vmv-card h2 { margin-bottom: 14px; font-size: 1.3rem; }
.vmv-card p { color: #4A5B6E; }

/* Values */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.value-item {
  padding: 28px 24px;
  border-left: 3px solid #1A4F8A;
  background: #fff;
  border-radius: 0 8px 8px 0;
}
.value-num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #1A4F8A;
  margin-bottom: 10px;
}
.value-item h3 { margin-bottom: 8px; }
.value-item p { font-size: 0.9rem; color: #4A5B6E; }

/* ---------- Services Detail ---------- */
.service-detail { max-width: 960px; margin-inline: auto; }
.service-detail-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.service-detail-icon {
  width: 56px; height: 56px;
  background: #EBF2FA;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #1A4F8A;
  flex-shrink: 0;
}
.service-detail-icon svg { width: 28px; height: 28px; }
.service-detail-intro { color: #4A5B6E; margin-bottom: 40px; font-size: 1.025rem; }
.service-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.feature-item {
  padding: 24px;
  background: #fff;
  border: 1px solid #e4e9ef;
  border-radius: 8px;
}
.section-alt .feature-item { background: #fff; }
.feature-item h3 { margin-bottom: 8px; font-size: 1rem; color: #0D1B2E; }
.feature-item p { font-size: 0.9rem; color: #4A5B6E; }

/* ---------- Why Grid ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.why-card {
  background: #fff;
  border: 1px solid #e4e9ef;
  border-radius: 10px;
  padding: 32px 28px;
  transition: box-shadow 0.2s;
}
.why-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.07); }
.why-card-icon {
  width: 52px; height: 52px;
  background: #EBF2FA;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #1A4F8A;
  margin-bottom: 20px;
}
.why-card-icon svg { width: 24px; height: 24px; }
.why-card h3 { margin-bottom: 10px; }
.why-card p { font-size: 0.9rem; color: #4A5B6E; }

/* ---------- Contact ---------- */
.contact-section { padding-block: 72px; }
.contact-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 64px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 32px; }
.contact-detail-item { display: flex; gap: 18px; align-items: flex-start; }
.contact-detail-icon {
  width: 44px; height: 44px;
  background: #EBF2FA;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #1A4F8A;
  flex-shrink: 0;
}
.contact-detail-icon svg { width: 20px; height: 20px; }
.contact-detail-item h3 { font-size: 0.9375rem; margin-bottom: 6px; }
.contact-detail-item p, .contact-detail-item address { font-size: 0.9rem; color: #4A5B6E; }
.contact-detail-item a { color: #1A4F8A; }
.contact-detail-item a:hover { text-decoration: underline; }

/* Contact Form */
.contact-form-wrap h2 { margin-bottom: 28px; }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.875rem; font-weight: 500; color: #222D3A; }
.form-group label span { color: #c0392b; }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 11px 14px;
  border: 1px solid #d0d9e3;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #222D3A;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1A4F8A;
  box-shadow: 0 0 0 3px rgba(26,79,138,.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }
/* Formspree Status & Validation Styling */
.fs-success-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #e8f5ec;
  color: #1a7a3a;
  border: 1px solid #c2e7cc;
  padding: 16px 18px;
  border-radius: 6px;
  margin-bottom: 24px;
}
.fs-success-banner svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke: #1a7a3a;
}
.fs-success-banner p {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #1a7a3a;
}

.fs-error-banner {
  background: #fdf0ed;
  color: #c0392b;
  border: 1px solid #f9d3cc;
  padding: 14px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}
.fs-error-banner:empty {
  display: none;
}

.fs-field-error {
  color: #c0392b;
  font-size: 0.8125rem;
  margin-top: 2px;
  display: block;
}
.fs-field-error:empty {
  display: none;
}

.form-group input[aria-invalid="true"],
.form-group select[aria-invalid="true"],
.form-group textarea[aria-invalid="true"] {
  border-color: #c0392b;
  background-color: #fffaf9;
}

button[data-fs-submit-btn]:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Map */
.map-section { padding-block: 0 0; }
.map-wrapper { line-height: 0; }
.map-wrapper iframe { width: 100%; display: block; }
.map-note { text-align: center; padding: 14px; font-size: 0.875rem; }
.map-note a { color: #1A4F8A; font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer { background: #0D1B2E; color: #a8b8cc; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-block: 60px 48px;
}
.footer-brand .logo-mark { display: block; color: #fff; font-size: 1.3rem; margin-bottom: 14px; }
.footer-brand > p { font-size: 0.875rem; max-width: 300px; line-height: 1.6; }

.footer-nav h3, .footer-contact h3 { color: #ffffff; font-size: 0.9rem; font-weight: 600; margin-bottom: 18px; letter-spacing: 0.04em; text-transform: uppercase; }
.footer-nav ul { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { font-size: 0.875rem; color: #a8b8cc; transition: color 0.15s; }
.footer-nav a:hover { color: #fff; text-decoration: none; }
.footer-contact address p { font-size: 0.875rem; line-height: 1.7; }
.footer-contact a { color: #a8b8cc; }
.footer-contact a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-block: 20px;
  font-size: 0.8125rem;
  color: #6B7B8D;
}
.footer-bottom p { max-width: none; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding-block: 72px; }
  .hero-graphic { grid-template-columns: repeat(4, 1fr); }
  .why-teaser-inner { grid-template-columns: 1fr; gap: 40px; }
  .two-col { grid-template-columns: 1fr; }
  .two-col-aside { max-width: 480px; }
  .vmv-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; gap: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e4e9ef;
    border-bottom: 1px solid #e4e9ef;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    padding: 12px 0;
    z-index: 99;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .nav-link { display: block; padding: 12px 24px; border-radius: 0; }
  .nav-cta { margin: 8px 24px; border-radius: 4px; text-align: center; display: block; }
  .nav-cta.active { border-radius: 4px; }
  .site-header { position: relative; }

  .hero-graphic { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: column; }
  .br-lg { display: none; }

  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .why-teaser-visual { grid-template-columns: 1fr 1fr; }
  .section { padding-block: 56px; }
}

@media (max-width: 400px) {
  .hero-graphic { grid-template-columns: 1fr 1fr; }
  .why-teaser-visual { grid-template-columns: 1fr 1fr; }
}
