:root {
  --navy: #0f2139;
  --navy-light: #16324f;
  --amber: #d97a1f;
  --amber-light: #f0a94e;
  --ink: #1b1f24;
  --paper: #ffffff;
  --paper-alt: #f4f6f8;
  --line: #e2e6ea;
  --muted: #5a6472;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(15, 33, 57, 0.08);
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-narrow { max-width: 640px; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; color: var(--navy); }
h2 { font-size: 1.9rem; margin-bottom: 0.75em; }
h3 { font-size: 1.25rem; }
p { color: var(--ink); }
a { color: var(--navy); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--navy);
}
.site-header nav { display: flex; gap: 22px; }
.site-header nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}
.site-header nav a:hover { color: var(--navy); }

/* Hero */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  padding: 72px 0 56px;
}
.hero-flex {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}
.hero-text { flex: 1; min-width: 0; }
.hero-photo-wrap { flex-shrink: 0; }
.hero-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.25);
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
}
.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--amber-light);
  font-weight: 700;
  margin-bottom: 12px;
}
.hero h1 { color: #fff; font-size: 2.6rem; margin-bottom: 0.2em; }
.hero-sub { font-size: 1.15rem; color: #d8dee6; max-width: 640px; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 14px; margin-bottom: 40px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--amber); color: #fff; }
.btn-primary:hover { background: var(--amber-light); }
.btn-outline { border-color: rgba(255,255,255,0.5); color: #fff; }
.btn-outline:hover { border-color: #fff; }
.btn-small { padding: 8px 16px; font-size: 0.85rem; background: var(--navy); color: #fff; }
.btn-small:hover { background: var(--navy-light); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 620px;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 24px;
}
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 1.6rem; font-weight: 800; color: var(--amber-light); }
.stat-label { font-size: 0.78rem; color: #c3cbd4; }

/* Sections */
.section { padding: 64px 0; }
.section.alt { background: var(--paper-alt); }
.section-sub { color: var(--muted); margin-top: -8px; margin-bottom: 28px; }

.sub-h { margin-top: 32px; }
.chip-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.chip-list li {
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.92rem;
}

/* MEP tabs */
.mep-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.mep-tab {
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--paper);
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.mep-tab:hover { border-color: var(--amber); }
.mep-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.mep-panels { position: relative; margin-top: 24px; }
.mep-panel {
  display: none;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
  animation: mepFadeIn 0.25s ease;
}
.mep-panel.active { display: block; }
.mep-panel ul { margin: 0; padding-left: 20px; }
.mep-panel li { margin-bottom: 10px; font-size: 0.96rem; }
@keyframes mepFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 36px; }
.timeline-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.timeline-dates {
  font-weight: 700;
  color: var(--amber);
  font-size: 0.95rem;
}
.timeline-body h3 { margin-bottom: 4px; }
.feature-img {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius);
  margin: 14px 0;
  display: block;
  box-shadow: var(--shadow);
}
.timeline-body .loc { color: var(--muted); font-weight: 400; font-size: 0.9em; }
.timeline-body ul { margin: 10px 0; padding-left: 20px; }
.timeline-body li { margin-bottom: 6px; font-size: 0.95rem; }
.clients-h { margin-top: 18px; margin-bottom: 6px; font-size: 1rem; color: var(--navy); }
.clients-list { columns: 2; column-gap: 24px; }
.clients-list li { font-size: 0.9rem; break-inside: avoid; }

.cert-note {
  margin-top: 20px;
  padding: 16px 20px;
  border-left: 3px solid var(--amber);
  background: var(--paper-alt);
  border-radius: 4px;
  color: var(--muted);
}

.cert-sub { font-weight: 400; font-size: 0.7em; color: var(--muted); }
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 16px;
}
.cert-group {
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.cert-group h4 { margin: 0 0 8px; font-size: 0.95rem; color: var(--navy); }
.cert-group ul { margin: 0; padding-left: 18px; }
.cert-group li { font-size: 0.88rem; margin-bottom: 4px; }
.cert-footnote { margin-top: 16px; font-size: 0.82rem; color: var(--muted); }

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

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--paper-alt);
}
.gallery-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, var(--paper-alt), var(--paper-alt) 10px, #ebeef1 10px, #ebeef1 20px);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.gallery-item figcaption {
  padding: 10px 12px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Operating standards */
.standards-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.standards-list li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 0.94rem;
  box-shadow: var(--shadow);
}
@media (max-width: 760px) {
  .standards-list { grid-template-columns: 1fr; }
}

/* Background list */
.bg-list { padding-left: 20px; }
.bg-list li { margin-bottom: 10px; }

/* Reviews */
.review-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.review-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.review-col-head h3 { margin: 0; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filter-btn {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.filter-btn:hover { border-color: var(--amber); }
.filter-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }

blockquote {
  margin: 0 0 16px;
  padding: 14px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: 6px;
  font-size: 0.92rem;
  max-height: 300px;
  overflow: hidden;
  transition: opacity 0.25s ease, max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease, border-width 0.3s ease;
}
blockquote.quote-hidden {
  opacity: 0;
  max-height: 0;
  margin: 0;
  padding: 0 18px;
  border-width: 0 0 0 3px;
  pointer-events: none;
}
blockquote cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 6px; }
.contact-form label { font-size: 0.85rem; font-weight: 600; margin-top: 12px; color: var(--navy); }
.contact-form input, .contact-form textarea {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
}
.contact-form button { margin-top: 20px; align-self: flex-start; }
.form-success {
  padding: 14px 18px;
  background: #e8f5ec;
  border: 1px solid #b7e0c3;
  border-radius: 8px;
  color: #1e6b34;
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.form-error {
  padding: 14px 18px;
  background: #fdecec;
  border: 1px solid #f3b8b8;
  border-radius: 8px;
  color: #a12626;
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.field-error { display: block; color: #c0392b; font-size: 0.8rem; margin-top: 4px; }

/* Footer */
.site-footer { padding: 28px 0; border-top: 1px solid var(--line); }
.site-footer p { color: var(--muted); font-size: 0.85rem; margin: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--navy); }

/* Links page */
.links-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.links-list li {
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.links-list a { text-decoration: none; font-weight: 600; font-size: 0.95rem; }

/* Blog */
.hero-small { padding: 48px 0 40px; }
.post-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.post-card {
  display: block;
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.post-card h2 { font-size: 1.1rem; margin-bottom: 8px; }
.post-card p { color: var(--muted); font-size: 0.92rem; margin: 0 0 12px; }
.post-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--amber);
}
.post .post-tag { margin-bottom: 10px; }
.post h1 { font-size: 2rem; }
.post-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 24px; }
.post h2 { font-size: 1.25rem; margin-top: 32px; }
.post p, .post li { font-size: 1rem; }
.post ul { padding-left: 22px; }

/* Responsive */
@media (max-width: 760px) {
  .hero-flex { flex-direction: column-reverse; align-items: center; text-align: center; gap: 20px; }
  .hero-cta, .hero-stats { justify-content: center; }
  .hero h1 { font-size: 2rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .chip-list { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; }
  .clients-list { columns: 1; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .review-cols { grid-template-columns: 1fr; }
  .site-header nav { display: none; }
  .post-list { grid-template-columns: 1fr; }
}
