/* HEdway Group meanwhile website
   Palette per HG00-01 MGT-01 (hedway-document-format base, WCAG-checked):
   MPETROL #0E3445 | INK #1A1A1A | SLATE #2C6785 | AMBER #C88620
   TERRA #B04A3A | PINE #1F6B4F | CYAN #00B7F0 (dark backgrounds only)
   MUTED #6B6B6B | LIGHT #F5F5F5 | RULE #D0D0D0 */

:root {
  --mpetrol: #0E3445;
  --ink: #1A1A1A;
  --slate: #2C6785;
  --amber: #C88620;
  --cyan: #00B7F0;
  --muted: #6B6B6B;
  --light: #F5F5F5;
  --rule: #D0D0D0;
}

* { box-sizing: border-box; }

html { font-size: 100%; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: #ffffff;
}

/* Skip link: visually hidden until focused */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--mpetrol);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

/* Focus visibility (WCAG 2.2: visible, not obscured) */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: 2px;
}

header.site-header {
  border-bottom: 4px solid var(--amber);
  background: #ffffff;
}

.header-inner {
  max-width: 66rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.wordmark {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--mpetrol);
  text-decoration: none;
  padding: 0.5rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.wordmark img { display: block; }
.wordmark .accent { color: var(--slate); }

nav.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

nav.site-nav a {
  display: inline-block;
  padding: 0.6rem 0.8rem; /* comfortably above the 24px minimum target size */
  color: var(--mpetrol);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

nav.site-nav a:hover { border-bottom-color: var(--slate); }

nav.site-nav a[aria-current="page"] {
  border-bottom-color: var(--amber);
  font-weight: bold;
}

main {
  max-width: 66rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

h1 {
  color: var(--mpetrol);
  font-size: 2rem;
  line-height: 1.25;
  margin: 1rem 0 0.5rem;
}

.h1-rule {
  border: 0;
  border-top: 4px solid var(--amber);
  width: 5rem;
  margin: 0 0 1.5rem;
}

h2 {
  color: var(--mpetrol);
  font-size: 1.4rem;
  margin-top: 2rem;
}

h3 { color: var(--mpetrol); font-size: 1.15rem; }

a { color: var(--slate); }
a:hover { color: var(--mpetrol); }

.lede { font-size: 1.2rem; }

.panel {
  background: var(--light);
  border-left: 4px solid var(--slate);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

/* Service cards */
ul.cards {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
}

ul.cards li {
  background: var(--light);
  border-top: 4px solid var(--slate);
  padding: 1rem 1.25rem;
}

ul.cards h2, ul.cards h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }

/* Testimonials */
ul.testimonials {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

ul.testimonials li { margin: 0 0 1rem; }

ul.testimonials blockquote {
  margin: 0;
  background: var(--light);
  border-left: 4px solid var(--amber);
  padding: 1rem 1.25rem;
  font-style: normal;
}

/* Diagram */
figure.diagram {
  margin: 1.5rem 0;
  text-align: center;
}

figure.diagram svg,
figure.diagram img {
  max-width: 100%;
  height: auto;
}

figure.diagram img {
  border: 1px solid var(--rule);
}

figcaption {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.5rem;
  text-align: left;
}

/* Contact banner */
.contact-banner {
  background: var(--mpetrol);
  color: #ffffff;
  padding: 1.5rem 1.25rem;
  margin-top: 2.5rem;
}

.contact-banner .inner { max-width: 66rem; margin: 0 auto; }

.contact-banner h2 { color: #ffffff; margin-top: 0; }

.contact-banner a {
  color: var(--cyan); /* CYAN permitted on dark backgrounds only; 8.1:1 on MPETROL */
  font-weight: bold;
}

footer.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-inner {
  max-width: 66rem;
  margin: 0 auto;
  padding: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  align-items: center;
  justify-content: space-between;
}

footer.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

footer.site-footer a {
  color: var(--slate);
  display: inline-block;
  padding: 0.4rem 0; /* target size */
}

/* Reflow: single column, no horizontal scroll at 400% zoom (WCAG 1.4.10) */
@media (max-width: 40rem) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  h1 { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
