/* =========================================================
   GENIE CIVIL RURAL — design tokens
   Palette softened from the original brief: desaturated
   slate-blue + sage-green over a warm survey-paper sand,
   inspired by topographic contour maps and site drawings.
   ========================================================= */

:root{
  --navy:        #223447;
  --navy-deep:   #182531;
  --blue:        #4d7791;
  --blue-soft:   #6f95ab;
  --blue-mist:   #e3ebee;
  --green:       #6a8f70;
  --green-soft:  #8aab8e;
  --green-mist:  #e7eee3;
  --sand:        #f6f3ec;
  --sand-deep:   #eee9dc;
  --paper:       #fbfaf6;
  --ink:         #262622;
  --ink-soft:    #5c5b53;
  --line:        #dcd5c2;
  --line-dark:   #3a4c5c;

  --font-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Public Sans", "Helvetica Neue", Arial, sans-serif;

  --container: 1180px;
  --radius: 4px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--ink);
  background:var(--paper);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4{
  font-family:var(--font-head);
  color:var(--navy);
  margin:0 0 .5em;
  line-height:1.15;
  font-weight:800;
  letter-spacing:-.01em;
}
p{ margin:0 0 1em; max-width:62ch; }
.container{
  width:100%;
  max-width:var(--container);
  margin:0 auto;
  padding:0 28px;
}
:focus-visible{
  outline:2px solid var(--blue);
  outline-offset:3px;
}
@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}

/* ---------- section rhythm ---------- */
section{ padding:88px 0; position:relative; }
.section-sand{ background:var(--sand); }
.section-paper{ background:var(--paper); }
.section-navy{ background:var(--navy); color:#eef1f2; }
.section-navy h2, .section-navy h3, .section-navy p{ color:#eef1f2; }
.section-navy .ink-soft{ color:#b9c4cb; }

.contour-rule{
  height:14px;
  margin-bottom:56px;
  background-repeat:repeat-x;
  background-size:64px 14px;
  background-image:url("../svg/contour-rule.svg");
  opacity:.55;
}
.contour-rule.flip{ transform:scaleY(-1); margin-bottom:0; margin-top:56px; }

.kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-family:var(--font-head);
  font-size:13px;
  font-weight:700;
  color:var(--blue);
  margin-bottom:14px;
}
.kicker::before{
  content:"";
  width:22px; height:2px;
  background:var(--green);
  display:inline-block;
}

.section-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:32px;
  margin-bottom:44px;
  flex-wrap:wrap;
}
.section-head h2{ font-size:clamp(28px,3.4vw,40px); max-width:16ch; }
.section-head p{ max-width:42ch; color:var(--ink-soft); margin:0; }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-family:var(--font-head);
  font-weight:700;
  font-size:15px;
  padding:13px 24px;
  border-radius:2px;
  border:1.5px solid transparent;
  cursor:pointer;
  transition:background .18s ease, color .18s ease, border-color .18s ease;
}
.btn-primary{ background:var(--green); color:#fff; }
.btn-primary:hover{ background:var(--green-dark,#587a60); }
.btn-outline{ border-color:currentColor; color:var(--navy); background:transparent; }
.btn-outline:hover{ background:var(--navy); color:#fff; border-color:var(--navy); }
.section-navy .btn-outline{ color:#eef1f2; }
.section-navy .btn-outline:hover{ background:#eef1f2; color:var(--navy); }

/* ---------- header ---------- */
.site-header{
  position:sticky; top:0; z-index:50;
  background:var(--paper);
  border-bottom:1px solid var(--line);
}
.site-header .container{
  display:flex; align-items:center; justify-content:space-between;
  height:78px;
}
.brand{ display:flex; align-items:center; gap:12px; }
.brand img, .brand svg{ width:42px; height:42px; flex:none; }
.brand-name{ font-family:var(--font-head); font-weight:800; font-size:19px; color:var(--navy); line-height:1.1; }
.brand-name span{ color:var(--green); }
.brand-tagline{ font-size:11px; color:var(--ink-soft); letter-spacing:.02em; }

.main-nav{ display:flex; align-items:center; gap:2px; }
.main-nav > ul{ display:flex; align-items:center; gap:2px; }
.main-nav a.nav-link{
  font-family:var(--font-head);
  font-weight:600;
  font-size:15px;
  padding:10px 14px;
  color:var(--navy);
  border-bottom:2px solid transparent;
}
.main-nav a.nav-link:hover, .main-nav .nav-item.active > a.nav-link{
  color:var(--blue-dark,#33566b);
  border-bottom-color:var(--green);
}
.nav-item{ position:relative; }
.nav-item.has-dropdown > a::after{
  content:"";
  display:inline-block;
  width:6px; height:6px;
  border-right:1.5px solid currentColor;
  border-bottom:1.5px solid currentColor;
  transform:rotate(45deg);
  margin-left:7px;
}
.dropdown{
  position:absolute; left:0; top:100%;
  min-width:240px;
  background:var(--paper);
  border:1px solid var(--line);
  box-shadow:0 14px 28px rgba(24,37,49,.1);
  padding:8px;
  opacity:0; visibility:hidden; transform:translateY(6px);
  transition:opacity .16s ease, transform .16s ease, visibility .16s;
}
.nav-item.has-dropdown:hover .dropdown,
.nav-item.has-dropdown:focus-within .dropdown{
  opacity:1; visibility:visible; transform:translateY(0);
}
.dropdown a{
  display:flex; flex-direction:column; gap:2px;
  padding:11px 14px;
  font-family:var(--font-head);
  font-weight:700; font-size:14px;
  color:var(--navy);
}
.dropdown a small{ font-family:var(--font-body); font-weight:400; color:var(--ink-soft); font-size:12px; }
.dropdown a:hover{ background:var(--sand); }
.header-cta{ display:flex; align-items:center; gap:18px; }
.nav-toggle{ display:none; }

/* ---------- hero ---------- */
.hero{
  background:var(--navy);
  color:#fff;
  overflow:hidden;
  position:relative;
}
.hero .container{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:40px;
  align-items:center;
  padding-top:64px;
  padding-bottom:56px;
}
.hero h1{
  color:#fff;
  font-size:clamp(34px,4.6vw,54px);
  margin-bottom:20px;
}
.hero h1 .accent{ color:var(--green-soft); }
.hero p.lead{ color:#c7d2d8; font-size:17px; max-width:46ch; }
.hero-ctas{ display:flex; gap:14px; margin-top:28px; flex-wrap:wrap; }
.hero-badges{
  display:flex; gap:26px; margin-top:44px; flex-wrap:wrap;
}
.hero-badges .badge b{ display:block; font-family:var(--font-head); font-size:22px; color:#fff; }
.hero-badges .badge span{ font-size:12.5px; color:#9fb0b9; }
.hero-art{ position:relative; }
.hero-art img, .hero-art svg{ width:100%; height:auto; }

/* ---------- services grid ---------- */
.services-strip{ background:var(--paper); border-bottom:1px solid var(--line); }
.services-grid{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  margin-top:0;
}
.service-card{
  padding:36px 26px;
  border-right:1px solid var(--line);
  transition:background .18s ease;
}
.service-card:last-child{ border-right:none; }
.service-card:hover{ background:var(--sand); }
.service-icon{
  width:52px; height:52px;
  border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  margin-bottom:20px;
}
.service-icon svg{ width:26px; height:26px; }
.service-card h3{ font-size:16.5px; margin-bottom:8px; }
.service-card p{ font-size:14px; color:var(--ink-soft); margin-bottom:14px; }
.service-card .more{ font-size:13px; font-weight:700; font-family:var(--font-head); color:var(--blue); display:inline-flex; align-items:center; gap:6px; }
.service-card .more svg{ width:12px; height:12px; }

.icon-blue{ background:var(--blue-mist); color:var(--blue-dark,#33566b); }
.icon-green{ background:var(--green-mist); color:var(--green-dark,#4c6f52); }

/* ---------- about split ---------- */
.about-split{
  display:grid;
  grid-template-columns:.95fr 1.05fr;
  gap:0;
  align-items:stretch;
}
.about-media{ position:relative; background:var(--sand-deep); }
.about-media img, .about-media svg{ width:100%; height:100%; display:block; object-fit:cover; }
.about-copy{ padding:64px 56px; }
.value-list{ display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-top:28px; }
.value-item{ display:flex; gap:12px; align-items:flex-start; }
.value-item svg{ width:22px; height:22px; flex:none; color:var(--green); margin-top:2px; }
.value-item h4{ font-size:15px; margin-bottom:4px; }
.value-item p{ font-size:13.5px; color:var(--ink-soft); margin:0; }

/* ---------- stats band ---------- */
.stats-band{
  display:grid; grid-template-columns:repeat(3,1fr);
  border-top:1px solid var(--line-dark);
}
.stat{ padding:36px 32px; border-right:1px solid var(--line-dark); }
.stat:last-child{ border-right:none; }
.stat b{ display:block; font-family:var(--font-head); font-size:38px; color:#fff; }
.stat span{ font-size:13.5px; color:#a9b8c0; }

/* ---------- portfolio ---------- */
.filter-tabs{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:40px; }
.filter-tabs a{
  font-family:var(--font-head); font-weight:700; font-size:13.5px;
  padding:9px 16px; border:1px solid var(--line);
  color:var(--ink-soft);
}
.filter-tabs a.active, .filter-tabs a:hover{ background:var(--navy); color:#fff; border-color:var(--navy); }

.project-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:24px;
}
.project-card{
  border:1px solid var(--line);
  background:var(--paper);
}
.project-media{ aspect-ratio:4/3; overflow:hidden; position:relative; border-bottom:1px solid var(--line); }
.project-media img, .project-media svg{ width:100%; height:100%; object-fit:cover; }
.project-tag{
  position:absolute; top:12px; left:12px;
  background:rgba(34,52,71,.88); color:#fff;
  font-family:var(--font-head); font-size:11px; font-weight:700;
  padding:5px 9px;
}
.project-body{ padding:20px; }
.project-body h3{ font-size:16px; margin-bottom:6px; }
.project-body p{ font-size:13.5px; color:var(--ink-soft); margin-bottom:12px; }
.project-body .more{ font-size:13px; font-weight:700; font-family:var(--font-head); color:var(--green-dark,#4c6f52); }

/* ---------- expertise tabs (sub-nav under Notre expertise) ---------- */
.subnav{
  display:flex; gap:6px; border-bottom:1px solid var(--line);
  margin-bottom:48px; flex-wrap:wrap;
}
.subnav a{
  font-family:var(--font-head); font-weight:700; font-size:14.5px;
  padding:14px 6px; margin-right:26px;
  border-bottom:2.5px solid transparent;
  color:var(--ink-soft);
}
.subnav a.active{ color:var(--navy); border-bottom-color:var(--green); }
.section-navy .subnav a{ color:#94a5ad; }
.section-navy .subnav a.active{ color:#fff; border-bottom-color:var(--green-soft); }
.section-navy .subnav{ border-bottom-color:rgba(255,255,255,.18); }

.expertise-row{
  display:grid; grid-template-columns:.9fr 1.1fr; gap:48px;
  align-items:center; padding:46px 0; border-bottom:1px solid var(--line);
}
.expertise-row:last-child{ border-bottom:none; }
.expertise-row.reverse{ direction:rtl; }
.expertise-row.reverse > *{ direction:ltr; }
.expertise-row .tag-list{ display:flex; flex-wrap:wrap; gap:8px; margin-top:18px; }
.expertise-row .tag-list span{
  font-size:12.5px; font-weight:600; padding:6px 12px;
  background:var(--sand-deep); color:var(--ink-soft);
  border:1px solid var(--line);
}
.expertise-media img, .expertise-media svg{ width:100%; height:auto; }

/* materiel table */
.materiel-table{ width:100%; border-collapse:collapse; margin-top:8px; }
.materiel-table th, .materiel-table td{
  text-align:left; padding:16px 18px; border-bottom:1px solid var(--line);
  font-size:14.5px;
}
.materiel-table th{ font-family:var(--font-head); color:var(--navy); font-size:13px; letter-spacing:.02em; }
.materiel-table td.qty{ color:var(--ink-soft); }

/* ---------- process steps (sequence: numbers OK here) ---------- */
.process-list{ counter-reset:step; display:grid; grid-template-columns:repeat(4,1fr); gap:0; }
.process-item{
  padding:28px 24px 28px 0; border-right:1px solid var(--line); position:relative;
}
.process-item:last-child{ border-right:none; padding-right:0; }
.process-item::before{
  counter-increment:step; content:counter(step,decimal-leading-zero);
  font-family:var(--font-head); font-size:13px; color:var(--green-dark,#4c6f52);
  display:block; margin-bottom:14px; letter-spacing:.05em;
}
.process-item h4{ font-size:15.5px; margin-bottom:6px; }
.process-item p{ font-size:13.5px; color:var(--ink-soft); margin:0; }

/* ---------- CTA band ---------- */
.cta-band{
  display:flex; align-items:center; justify-content:space-between;
  gap:24px; flex-wrap:wrap;
  padding:52px 56px;
  background:var(--green-mist);
  border:1px solid var(--line);
}
.cta-band h3{ margin-bottom:6px; font-size:24px; }
.cta-band p{ margin:0; color:var(--ink-soft); }

/* ---------- contact ---------- */
.contact-grid{ display:grid; grid-template-columns:1fr 1fr; gap:64px; }
.contact-info li{ display:flex; gap:14px; padding:18px 0; border-bottom:1px solid var(--line); }
.contact-info li svg{ width:20px; height:20px; color:var(--green); flex:none; margin-top:3px; }
.contact-info li b{ display:block; font-family:var(--font-head); font-size:14.5px; color:var(--navy); }
.contact-info li span{ font-size:13.5px; color:var(--ink-soft); }
.form-field{ margin-bottom:18px; }
.form-field label{ display:block; font-family:var(--font-head); font-weight:700; font-size:13px; margin-bottom:7px; color:var(--navy); }
.form-field input, .form-field select, .form-field textarea{
  width:100%; padding:12px 14px; border:1px solid var(--line); background:var(--paper);
  font-family:var(--font-body); font-size:14.5px; color:var(--ink); border-radius:2px;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus{ outline:none; border-color:var(--blue); }
.form-row{ display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.form-note{ font-size:12.5px; color:var(--ink-soft); margin-top:10px; }
.map-frame{ border:1px solid var(--line); margin-top:26px; aspect-ratio:16/8; }
.map-frame img, .map-frame svg{ width:100%; height:100%; object-fit:cover; }

/* alert */
.alert-success{ padding:14px 18px; background:var(--green-mist); border:1px solid var(--green-soft); color:var(--green-dark,#3f5f45); font-size:14px; margin-bottom:20px; }

/* ---------- footer ---------- */
.site-footer{ background:var(--navy-deep); color:#c6d0d5; padding-top:64px; }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:40px; padding-bottom:44px; border-bottom:1px solid rgba(255,255,255,.1); }
.footer-brand .brand-name{ color:#fff; }
.footer-brand p{ color:#93a3ab; font-size:13.5px; margin-top:14px; }
.footer-col h4{ color:#fff; font-size:14px; margin-bottom:16px; }
.footer-col li{ margin-bottom:10px; }
.footer-col a{ font-size:13.5px; color:#a9b8bf; }
.footer-col a:hover{ color:#fff; }
.footer-col li{ display:flex; gap:10px; }
.footer-col li svg{ width:15px; height:15px; margin-top:2px; flex:none; color:var(--green-soft); }
.social-row{ display:flex; gap:10px; margin-top:16px; }
.social-row a{ width:34px; height:34px; border:1px solid rgba(255,255,255,.18); display:flex; align-items:center; justify-content:center; }
.social-row a:hover{ background:var(--green); border-color:var(--green); }
.social-row svg{ width:15px; height:15px; }
.footer-bottom{ display:flex; justify-content:space-between; padding:20px 0; font-size:12.5px; color:#7e8f96; flex-wrap:wrap; gap:10px; }

/* ---------- responsive ---------- */
@media (max-width:1080px){
  .services-grid{ grid-template-columns:repeat(3,1fr); }
  .service-card:nth-child(3){ border-right:none; }
  .service-card{ border-bottom:1px solid var(--line); }
  .project-grid{ grid-template-columns:repeat(2,1fr); }
  .footer-grid{ grid-template-columns:1fr 1fr; }
}
@media (max-width:900px){
  .main-nav{ display:none; }
  .nav-toggle{ display:flex; }
  .hero .container{ grid-template-columns:1fr; }
  .about-split{ grid-template-columns:1fr; }
  .about-media{ min-height:280px; }
  .expertise-row, .expertise-row.reverse{ grid-template-columns:1fr; direction:ltr; }
  .stats-band{ grid-template-columns:1fr; }
  .stat{ border-right:none; border-bottom:1px solid var(--line-dark); }
  .contact-grid{ grid-template-columns:1fr; }
  .process-list{ grid-template-columns:1fr 1fr; }
}
@media (max-width:640px){
  .site-header .container{ height:auto; padding-top:12px; padding-bottom:12px; }
  .brand-tagline{ display:none; }
  .brand-name{ white-space:nowrap; font-size:16px; }
  .header-contact-btn span{ display:none; }
  .header-contact-btn{ padding:11px 13px; }
  .header-cta{ gap:8px; }
  section{ padding:56px 0; }
  .services-grid{ grid-template-columns:repeat(2,1fr); }
  .service-card:nth-child(2n){ border-right:none; }
  .project-grid{ grid-template-columns:1fr; }
  .form-row{ grid-template-columns:1fr; }
  .cta-band{ padding:36px 24px; flex-direction:column; align-items:flex-start; }
  .footer-grid{ grid-template-columns:1fr; }
  .process-list{ grid-template-columns:1fr; }
  .about-copy{ padding:44px 24px; }
}
