/* ============================================================
   Carbeon Engineers — shared stylesheet
   ============================================================ */

:root {
  --green-950: #001B14;   /* brand ink green — exact logo colour */
  --green-800: #0C2F25;   /* section-dark background */
  --green-700: #123B2F;   /* lighter panel on dark */
  --gold-500: #C1A66F;    /* brand gold — exact logo colour */
  --gold-700: #A3895A;    /* brand gold shadow tone — exact logo colour */
  --gold-300: #DFCDA3;    /* pale gold for text on dark */
  --paper: #F2F0E8;       /* warm paper background */
  --paper-raised: #EAE7DC;
  --ink: #16211D;         /* body text on paper */
  --slate: #5C685F;       /* secondary text on paper */
  --line: #DDD8C7;        /* hairline on paper */
  --line-dark: rgba(244, 241, 234, 0.16); /* hairline on dark */
  --white: #FFFFFF;

  --font-head: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --container: 1180px;
  --gap-section: 7rem;
  --radius: 3px;
}

@media (max-width: 720px) {
  :root { --gap-section: 4rem; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.6em 0;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 4.2vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em 0; max-width: 62ch; }
p:last-child { margin-bottom: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 640px) {
  .container { padding: 0 1.25rem; }
}

section { padding: var(--gap-section) 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--gold-700);
  font-weight: 600;
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold-700);
  display: inline-block;
}
.section-on-dark .eyebrow { color: var(--gold-300); }
.section-on-dark .eyebrow::before { background: var(--gold-300); }

.lede {
  font-size: 1.1rem;
  color: var(--slate);
  max-width: 46ch;
}
.section-on-dark .lede { color: rgba(244,241,234,0.72); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.7rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn-gold {
  background: var(--gold-500);
  color: var(--green-950);
}
.btn-gold:hover { background: var(--gold-300); }

.btn-line-dark {
  border-color: var(--green-950);
  color: var(--green-950);
  background: transparent;
}
.btn-line-dark:hover { background: var(--green-950); color: var(--paper); }

.btn-line-light {
  border-color: rgba(244,241,234,0.5);
  color: var(--paper);
  background: transparent;
}
.btn-line-light:hover { border-color: var(--paper); background: rgba(244,241,234,0.08); }

/* ============================================================
   Header / Navigation
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(242, 240, 232, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.brand img.mark { height: 34px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text .name {
  font-family: var(--font-head);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--green-950);
  font-weight: 600;
}
.brand-text .sub {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--gold-700);
  margin-top: 0.2rem;
}

.main-nav { display: flex; align-items: center; gap: 2.2rem; }
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}
.main-nav a.nav-link {
  font-size: 0.95rem;
  color: var(--ink);
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.main-nav a.nav-link:hover { color: var(--green-950); }
.main-nav a.nav-link.active {
  border-bottom-color: var(--gold-500);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--green-950);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 900px) {
  .main-nav { position: fixed; inset: 84px 0 0 0; background: var(--paper);
    flex-direction: column; align-items: flex-start; padding: 2rem;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease; }
  .main-nav.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .main-nav ul { flex-direction: column; gap: 1.4rem; width: 100%; }
  .main-nav a.nav-link { font-size: 1.15rem; display: block; }
  .main-nav .btn { margin-top: 1.6rem; width: 100%; }
  .nav-toggle { display: block; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  background: var(--green-950);
  color: var(--paper);
  overflow: hidden;
  padding: 6.5rem 0 5.5rem;
}
.hero-contours {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 2; }
.hero-inner { max-width: 720px; }
.hero-inner h1 { color: var(--white); }
.hero-inner .lede { color: rgba(244,241,234,0.78); font-size: 1.15rem; margin-top: 1.2rem; margin-bottom: 2.2rem; max-width: 52ch; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-specs {
  position: relative;
  z-index: 2;
  margin-top: 4.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-dark);
}
.hero-specs div {
  padding: 1.4rem 1.6rem 0;
  border-left: 1px solid var(--line-dark);
}
.hero-specs div:first-child { border-left: none; padding-left: 0; }
.hero-specs .num { font-family: var(--font-head); font-size: 1.5rem; color: var(--gold-300); display: block; }
.hero-specs .lbl { font-size: 0.82rem; color: rgba(244,241,234,0.62); margin-top: 0.3rem; }

@media (max-width: 800px) {
  .hero-specs { grid-template-columns: repeat(2, 1fr); row-gap: 1.6rem; }
  .hero-specs div:nth-child(3) { border-left: none; padding-left: 0; }
}

/* Page header banner (used on inner pages) */
.page-hero {
  background: var(--green-950);
  color: var(--paper);
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 3.6rem;
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: var(--white); margin-bottom: 0.7rem; }
.page-hero .lede { font-size: 1.05rem; }
.breadcrumb {
  font-size: 0.82rem;
  color: rgba(244,241,234,0.55);
  margin-bottom: 1.2rem;
}
.breadcrumb a:hover { color: var(--gold-300); }

/* ============================================================
   Sections general
   ============================================================ */
.section-on-dark { background: var(--green-950); color: var(--paper); }
.section-on-panel { background: var(--paper-raised); }

.section-head {
  max-width: 640px;
  margin-bottom: 3.2rem;
}
.section-head.wide { max-width: 100%; }

.two-col-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 3.2rem;
  flex-wrap: wrap;
}
.two-col-head .lede { margin: 0; }

/* ---------- Services row (spec-sheet style, no cards) ---------- */
.services-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.service-item {
  padding: 2.2rem 1.7rem 0;
  border-left: 1px solid var(--line);
}
.service-item:first-child { border-left: none; padding-left: 0; }
.service-item .icon { width: 34px; height: 34px; margin-bottom: 1.3rem; color: var(--green-950); }
.service-item h3 { margin-bottom: 0.6rem; }
.service-item p { color: var(--slate); font-size: 0.95rem; }
.service-item .go {
  display: inline-flex;
  margin-top: 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-950);
  border-bottom: 1px solid var(--gold-500);
  padding-bottom: 2px;
}

@media (max-width: 900px) {
  .services-row { grid-template-columns: 1fr 1fr; row-gap: 2.6rem; }
  .service-item:nth-child(3) { border-left: none; padding-left: 0; }
}
@media (max-width: 560px) {
  .services-row { grid-template-columns: 1fr; }
  .service-item { border-left: none !important; padding-left: 0 !important; border-top: 1px solid var(--line); padding-top: 2.2rem; }
  .service-item:first-child { border-top: none; padding-top: 0; }
}

/* ---------- Approach (4-up, no cards) ---------- */
.approach-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.4rem;
}
.approach-item .icon { width: 30px; height: 30px; margin-bottom: 1.2rem; color: var(--gold-300); }
.approach-item h3 { color: var(--white); }
.approach-item p { color: rgba(244,241,234,0.68); font-size: 0.95rem; }

@media (max-width: 800px) {
  .approach-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .approach-row { grid-template-columns: 1fr; }
}

/* ---------- Capability checklist ---------- */
.check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 3rem;
}
.check-grid li {
  list-style: none;
  display: flex;
  gap: 0.8rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
}
.check-grid li svg { flex: none; width: 18px; height: 18px; margin-top: 0.2rem; color: var(--gold-700); }

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

/* ---------- Project type tiles ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.project-tile {
  background: var(--green-950);
  color: var(--paper);
  padding: 2.2rem 1.6rem;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.project-tile .icon { width: 34px; height: 34px; color: var(--gold-300); margin-bottom: 1.4rem; }
.project-tile h3 { color: var(--white); margin-bottom: 0.3rem; font-size: 1.05rem; }
.project-tile p { color: rgba(244,241,234,0.62); font-size: 0.88rem; }
.project-tile:nth-child(2) { background: var(--green-700); }
.project-tile:nth-child(4) { background: var(--green-700); }

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

/* ---------- Stat / credential strip ---------- */
.credential-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.credential-strip div { padding: 1.8rem 1.6rem; border-left: 1px solid var(--line); }
.credential-strip div:first-child { border-left: none; }
.credential-strip .num { font-family: var(--font-head); font-size: 1.9rem; color: var(--green-950); display: block; }
.credential-strip .lbl { font-size: 0.85rem; color: var(--slate); margin-top: 0.3rem; }

@media (max-width: 800px) {
  .credential-strip { grid-template-columns: 1fr 1fr; }
  .credential-strip div:nth-child(3) { border-left: none; }
  .credential-strip div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Process steps (legitimately sequential) ---------- */
.process-list { display: flex; flex-direction: column; }
.process-step {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}
.process-step:last-child { border-bottom: 1px solid var(--line); }
.process-step .step-num {
  font-family: var(--font-head);
  font-size: 2.1rem;
  color: var(--gold-700);
}
.process-step h3 { margin-bottom: 0.5rem; }
.process-step p { color: var(--slate); }

@media (max-width: 600px) {
  .process-step { grid-template-columns: 1fr; gap: 0.6rem; }
}

/* ---------- Split layout (image/text alternating) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.split.reverse .split-visual { order: 2; }
.split-visual {
  background: var(--green-950);
  border-radius: var(--radius);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
}
.split-visual svg { width: 100%; height: auto; max-width: 340px; }
.split-visual.photo {
  padding: 0;
  background: none;
  overflow: hidden;
  min-height: 320px;
}
.split-visual.photo img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
}

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 2.4rem; }
  .split.reverse .split-visual { order: 0; }
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--green-950);
  color: var(--paper);
  padding: 3.6rem 0;
}
.cta-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-banner h2 { color: var(--white); margin-bottom: 0.3rem; }
.cta-banner .contact-line { color: rgba(244,241,234,0.7); font-size: 0.98rem; }
.cta-banner .contact-line a { border-bottom: 1px solid rgba(244,241,234,0.35); }
.cta-banner .contact-line a:hover { border-color: var(--gold-500); color: var(--gold-300); }
.cta-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--green-950); color: rgba(244,241,234,0.7); padding: 4.5rem 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--line-dark);
}
.footer-brand img.mark { height: 30px; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.9rem; max-width: 30ch; color: rgba(244,241,234,0.55); }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--gold-300);
  margin-bottom: 1.1rem;
  font-weight: 600;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.7rem; font-size: 0.92rem; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.6rem 0;
  font-size: 0.8rem;
  color: rgba(244,241,234,0.45);
  flex-wrap: wrap;
  gap: 0.6rem;
}

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Contact page specifics
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 4rem;
}
@media (max-width: 860px) {
  .contact-layout { grid-template-columns: 1fr; }
}

.contact-detail { display: flex; gap: 1rem; padding: 1.4rem 0; border-top: 1px solid var(--line); }
.contact-detail:last-child { padding-bottom: 0; }
.contact-detail .icon { width: 22px; height: 22px; color: var(--gold-700); flex: none; margin-top: 0.2rem; }
.contact-detail h4 { margin-bottom: 0.2rem; font-family: var(--font-body); font-size: 0.95rem; font-weight: 600; }
.contact-detail p { color: var(--slate); font-size: 0.95rem; }

.field { margin-bottom: 1.4rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--gold-500);
  outline-offset: 1px;
  border-color: var(--gold-500);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.form-note { font-size: 0.85rem; color: var(--slate); margin-top: 1rem; }

/* Accessibility: visible focus ring everywhere */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
}

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