:root {
  --cream: #f4f0e8;
  --cream-light: #faf8f3;
  --burgundy: #4a0718;
  --burgundy-dark: #2d0410;
  --burgundy-light: #6b1b31;
  --text: #291d20;
  --text-muted: #735f62;
  --white: #ffffff;
  --border: #d8cfc5;
  --shadow: 0 12px 30px rgba(74, 7, 24, 0.12);

  --container-width: 1160px;
  --section-padding: 110px;
  --radius: 14px;
}

/* --------------------------------------------------
   Reset and base
-------------------------------------------------- */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  background: var(--cream);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.65;
}

body.modal-open {
  overflow: hidden;
}

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

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

p {
  max-width: 720px;
}

button,
input,
textarea,
select {
  font: inherit;
}

.container {
  width: min(calc(100% - 40px), var(--container-width));
  margin: 0 auto;
}

/* --------------------------------------------------
   Header
-------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  background: rgba(244, 240, 232, 0.92);
  border-bottom: 1px solid rgba(74, 7, 24, 0.12);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--burgundy);
  font-weight: 700;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
}

.brand-name {
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--burgundy);
  font-size: 0.9rem;
  font-weight: 600;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--burgundy);
  color: var(--cream-light);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  margin: 5px 0;
  background: var(--burgundy);
}

/* --------------------------------------------------
   Sections and typography
-------------------------------------------------- */

main {
  overflow: hidden;
}

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

.section-light {
  background: var(--cream-light);
}

.section-burgundy {
  background: var(--burgundy);
  color: var(--cream-light);
}

.section-heading {
  margin-bottom: 42px;
}

.section-heading h2 {
  max-width: 700px;
  color: var(--burgundy);
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.section-heading-light h2 {
  color: var(--cream-light);
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--burgundy-light);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-heading-light .eyebrow {
  color: #dcb9bd;
}

/* --------------------------------------------------
   Hero
-------------------------------------------------- */

.hero-section {
  position: relative;
  display: flex;
  min-height: 100vh;
  align-items: center;
  padding-top: 150px;
  padding-bottom: 130px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 80px;
}

.hero-content h1 {
  max-width: 800px;
  color: var(--burgundy);
  font-size: clamp(3rem, 7vw, 6.3rem);
  letter-spacing: -0.08em;
  line-height: 0.98;
}

.hero-description {
  max-width: 620px;
  margin-top: 28px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-logo-wrapper {
  width: min(100%, 420px);
  padding: 24px;
  border: 1px solid rgba(74, 7, 24, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow);
}

.hero-logo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--burgundy);
  color: var(--cream-light);
}

.btn-primary:hover {
  background: var(--burgundy-dark);
}

.btn-outline {
  border-color: var(--burgundy);
  color: var(--burgundy);
}

.btn-outline:hover {
  background: var(--burgundy);
  color: var(--cream-light);
}

.btn-cream {
  background: var(--cream-light);
  color: var(--burgundy);
}

.btn-cream:hover {
  background: var(--white);
}

.scroll-indicator {
  position: absolute;
  bottom: 38px;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--burgundy-light);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.scroll-arrow {
  font-size: 1.5rem;
  line-height: 1;
}


/* --------------------------------------------------
Hero market / stochastic background
-------------------------------------------------- */

.hero-section {
  isolation: isolate;
  overflow: hidden;
}

.hero-market-canvas {
  position: absolute;
  z-index: -1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.72;
}

/* Lisibilité renforcée au besoin sur petits écrans */
@media (max-width: 760px) {
  .hero-market-canvas {
    opacity: 0.42;
  }
}

/* Respecte les préférences système qui demandent moins d’animations */
@media (prefers-reduced-motion: reduce) {
  .hero-market-canvas {
    display: none;
  }
}

/* --------------------------------------------------
   About
-------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: 0.65fr 1.35fr;
  align-items: center;
  gap: 70px;
}

.about-image {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-content {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.about-content p + p {
  margin-top: 20px;
}

.text-link {
  display: inline-block;
  margin-top: 28px;
  border-bottom: 1px solid var(--burgundy);
  color: var(--burgundy);
  font-weight: 800;
}

/* --------------------------------------------------
   Timeline
-------------------------------------------------- */

.timeline {
  max-width: 900px;
  margin-left: auto;
  border-left: 1px solid var(--border);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 34px;
  padding: 0 0 42px 34px;
}

.timeline-item::before {
  position: absolute;
  top: 8px;
  left: -6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--burgundy);
  box-shadow: 0 0 0 5px var(--cream);
  content: "";
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-date {
  color: var(--burgundy-light);
  font-size: 0.9rem;
  font-weight: 800;
}

.timeline-content h3,
.timeline-content-light h3 {
  margin-bottom: 4px;
  color: var(--burgundy);
  font-size: 1.4rem;
}

.timeline-content-light h3 {
  color: var(--cream);
}

.timeline-location {
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

/* --------------------------------------------------
   Cards and skills
-------------------------------------------------- */

.cards-grid,
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.info-card,
.service-card {
  min-height: 230px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--cream);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.info-card:hover,
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.info-card h3,
.service-card h3 {
  margin: 34px 0 12px;
  color: var(--burgundy);
  font-size: 1.15rem;
}

.info-card p,
.service-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.card-number,
.service-icon {
  color: var(--burgundy-light);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

/* --------------------------------------------------
   Projects
-------------------------------------------------- */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--cream-light);
  box-shadow: 0 5px 15px rgba(74, 7, 24, 0.05);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.project-card-image {
  display: flex;
  width: 100%;
  height: 220px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
  background: var(--cream);
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.project-card:hover .project-card-image img {
  transform: scale(1.04);
}

.project-card-content {
  padding: 24px;
}

.project-category,
.case-study-label {
  margin-bottom: 8px;
  color: var(--burgundy-light);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-card h3 {
  margin-bottom: 12px;
  color: var(--burgundy);
  font-size: 1.25rem;
  line-height: 1.2;
}

.project-card p:not(.project-category) {
  color: var(--text-muted);
  font-size: 0.93rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}

.tag {
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--burgundy);
  font-size: 0.72rem;
  font-weight: 700;
}

/* --------------------------------------------------
   Company
-------------------------------------------------- */

.company-grid,
.company-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: start;
  gap: 80px;
}

.company-text {
  max-width: 100%;
}

.section-burgundy .company-content {
  color: #eadbd8;
}

.company-content p + p {
  margin-top: 20px;
}

.text-paragraph {
  margin-bottom: 1.25rem;
  line-height: 1.8;
  text-indent: 1.5rem;
}

.text-init {
  margin-bottom: 2.2rem;
  line-height: 1.8;
}

.company-text > p.text-paragraph:last-of-type {
  margin-bottom: 3.5rem;
}

.company-logo-wrapper {
  display: flex;
  justify-content: center;
  padding: 30px;
  border-radius: 50%;
  background: rgba(244, 240, 232, 0.08);
}

.company-logo-block {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 1.25rem;
}

.company-logo-small {
  display: block;
  width: auto;
  height: 150px;
}

.company-logo {
  display: block;
  width: auto;
  max-width: 120px;
  max-height: 55px;
  object-fit: contain;
}

.company-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.company-heading h2 {
  margin: 0;
}

.company-highlights {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.highlight-card {
  padding: 1.25rem 1rem;
  border-left: 3px solid var(--cream-light);
  background: rgba(255, 255, 255, 0.03);
}

.highlight-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.highlight-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

.company-cta {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.drop-logo {
  display: block;
  float: left;
  width: 150px;
  height: 150px;
  margin: 0 1rem 0.5rem 0;
  border-radius: 50%;
  object-fit: cover;
}

/* --------------------------------------------------
   Case study
-------------------------------------------------- */

.case-study-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.75fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
}

.case-study-content {
  min-width: 0;
}

.case-study-label {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  line-height: 1.4;
}

.case-study-meta {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.case-study-content > p:not(.case-study-label):not(.case-study-meta) {
  max-width: 760px;
  margin: 0 0 1.25rem;
  line-height: 1.75;
}

.case-study-sidebar {
  position: sticky;
  top: 2rem;
  display: grid;
  gap: 1rem;
}

.case-study-card {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.case-study-card-label {
  margin: 0 0 0.45rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.case-study-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.case-study-card p:not(.case-study-card-label) {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.case-study-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-study-list li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.case-study-list li::before {
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.case-study-points {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.case-study-points > div {
  padding: 1.25rem 1.35rem;
  border-left: 3px solid currentColor;
  border-radius: 0 10px 10px 0;
  background: rgba(17, 24, 39, 0.05);
}

.case-study-points span {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-study-points p {
  margin: 0;
  line-height: 1.65;
}

.case-study-image {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* --------------------------------------------------
   Contact
-------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  align-items: start;
  gap: 50px;
  width: 100%;
}

.contact-content,
.contact-location {
  min-width: 0;
}

.contact-content h2 {
  max-width: 500px;
  color: var(--cream);
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: -0.06em;
  line-height: 1.05;
}

.contact-content > p:not(.eyebrow) {
  margin-top: 22px;
  margin-bottom: 50px;
  color: var(--cream-light);
}

.contact-links {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.contact-links a {
  width: fit-content;
  border-bottom: 1px solid var(--cream);
  color: var(--cream);
  font-weight: 800;
}

/* --------------------------------------------------
   Location map / Leaflet
-------------------------------------------------- */

.contact-location {
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(244, 240, 232, 0.25);
  border-radius: var(--radius);
  background: var(--cream);
  box-shadow: var(--shadow);
}

.location-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 24px 0;
}

.contact-sidebar-label {
  margin: 0;
  color: var(--burgundy-light);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.location-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6d8f5c;
  box-shadow: 0 0 0 4px rgba(109, 143, 92, 0.13);
}

.contact-location h3 {
  margin: 12px 24px 20px;
  color: var(--burgundy);
  font-size: 1.7rem;
  line-height: 1.1;
}

.location-map {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 300px;
  min-height: 300px;
  overflow: hidden;
  border: 0;
}

/*
  Important:
  Leaflet tiles are images. The global img rule above must not
  constrain their width or height.
*/
.location-map .leaflet-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.location-map .leaflet-tile,
.location-map .leaflet-marker-icon,
.location-map .leaflet-marker-shadow {
  max-width: none;
  max-height: none;
}

.location-map .leaflet-tile {
  width: 256px;
  height: 256px;
}

.location-map .leaflet-control-attribution {
  font-size: 9px;
}

.location-map .leaflet-popup-content-wrapper,
.location-map .leaflet-popup-tip {
  background: var(--cream-light);
}

.location-map .leaflet-popup-content {
  color: var(--text);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
}

.location-footer {
  padding: 15px 18px 18px;
  background: var(--cream);
}

.location-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.map-link {
  display: inline-block;
  margin-top: 12px;
  border-bottom: 1px solid var(--burgundy);
  color: var(--burgundy);
  font-size: 0.85rem;
  font-weight: 800;
}

.burgundy-map-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--cream-light);
  border-radius: 50% 50% 50% 0;
  background: var(--burgundy);
  box-shadow: 0 5px 14px rgba(45, 4, 16, 0.35);
  transform: rotate(-45deg);
}

.burgundy-map-marker .marker-inner {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cream-light);
}

/* --------------------------------------------------
   Footer
-------------------------------------------------- */

.site-footer {
  padding: 25px 0;
  background: var(--burgundy-dark);
  color: #dcb9bd;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-content p {
  font-size: 0.85rem;
}

.back-to-top {
  color: var(--cream-light);
  font-size: 0.85rem;
  font-weight: 800;
}

/* --------------------------------------------------
   Project modals
-------------------------------------------------- */

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition:
    visibility 0s linear 0.2s,
    opacity 0.2s ease;
}

.project-modal[aria-hidden="false"] {
  visibility: visible;
  opacity: 1;
  transition:
    visibility 0s linear 0s,
    opacity 0.2s ease;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.modal-content {
  position: relative;
  width: min(90vw, 720px);
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px 28px 28px;
  border-radius: 12px;
  background: var(--cream-light);
  color: var(--text);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

.project-modal[aria-hidden="false"] .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  background: var(--cream);
}

.modal-eyebrow {
  margin: 0 0 8px;
  color: var(--burgundy-light);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-content h3 {
  margin: 0 0 16px;
  font-size: 22px;
  line-height: 1.25;
}

.modal-section {
  margin-top: 20px;
}

.modal-section h4 {
  margin: 0 0 8px;
  font-size: 16px;
}

.modal-subsection {
  margin-top: 12px;
}

.modal-subsection h5 {
  margin: 0 0 6px;
  color: var(--burgundy-light);
  font-size: 14px;
}

.modal-section ul {
  margin: 0 0 10px 18px;
  padding: 0;
}

.modal-section li {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.modal-section p {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.modal-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

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

@media (max-width: 980px) {
  :root {
    --section-padding: 85px;
  }

  .hero-grid,
  .company-grid,
  .case-study-grid {
    gap: 45px;
  }

  .cards-grid,
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .company-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .text-paragraph {
    text-indent: 1rem;
  }

  .drop-logo {
    float: none;
    margin: 0 auto 1rem;
  }

  .text-with-drop-logo {
    text-align: center;
  }

  .case-study-grid {
    grid-template-columns: 1fr;
  }

  .case-study-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-study-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  :root {
    --section-padding: 70px;
  }

  .container {
    width: min(calc(100% - 30px), var(--container-width));
  }

  .header-content {
    min-height: 68px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 68px;
    right: 15px;
    left: 15px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--cream-light);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 12px;
  }

  .hero-section {
    min-height: auto;
    padding-top: 130px;
    padding-bottom: 120px;
  }

  .hero-grid,
  .about-grid,
  .company-grid,
  .case-study-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: clamp(2.8rem, 14vw, 5rem);
  }

  .hero-visual {
    order: -1;
  }

  .hero-logo-wrapper {
    width: min(80vw, 300px);
  }

  .about-image {
    max-width: 280px;
  }

  .timeline {
    margin-left: 8px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-left: 25px;
  }

  .projects-grid,
  .cards-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    gap: 36px;
  }

  .location-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .location-map {
    height: 260px;
    min-height: 260px;
  }

  .case-study-sidebar {
    grid-template-columns: 1fr;
  }

  .case-study-card:last-child {
    grid-column: auto;
  }

  .footer-content {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .company-heading {
    align-items: flex-start;
    gap: 0.75rem;
  }

  .company-heading h2 {
    font-size: 1.7rem;
  }

  .company-logo {
    max-width: 85px;
    max-height: 45px;
  }

  .company-logo-small {
    height: 120px;
  }
}


/* Leaflet map: final overrides */
#montreal-map {
  position: relative;
  width: 100%;
  height: 300px;
  min-height: 300px;
  overflow: hidden;
  background: #e6ded3;
}

#montreal-map.leaflet-container {
  width: 100%;
  height: 300px;
  overflow: hidden;
  background: #e6ded3;
}

/*
  Do not let the global img rule resize Leaflet tiles.
*/
#montreal-map .leaflet-tile {
  width: 256px !important;
  height: 256px !important;
  max-width: none !important;
  max-height: none !important;
}

#montreal-map .leaflet-marker-icon,
#montreal-map .leaflet-marker-shadow {
  max-width: none !important;
  max-height: none !important;
}

#montreal-map .leaflet-pane,
#montreal-map .leaflet-map-pane,
#montreal-map .leaflet-tile-pane,
#montreal-map .leaflet-overlay-pane,
#montreal-map .leaflet-shadow-pane,
#montreal-map .leaflet-marker-pane,
#montreal-map .leaflet-tooltip-pane,
#montreal-map .leaflet-popup-pane {
  position: absolute;
}

@media (max-width: 760px) {
  #montreal-map,
  #montreal-map.leaflet-container {
    height: 260px;
    min-height: 260px;
  }
}

/* Leaflet hard reset */
#montreal-map.leaflet-container {
  position: relative;
  width: 100%;
  height: 300px;
  min-height: 300px;
  overflow: hidden;
  background: #e6ded3;
}

#montreal-map.leaflet-container .leaflet-pane,
#montreal-map.leaflet-container .leaflet-map-pane,
#montreal-map.leaflet-container .leaflet-tile-pane,
#montreal-map.leaflet-container .leaflet-overlay-pane,
#montreal-map.leaflet-container .leaflet-shadow-pane,
#montreal-map.leaflet-container .leaflet-marker-pane,
#montreal-map.leaflet-container .leaflet-tooltip-pane,
#montreal-map.leaflet-container .leaflet-popup-pane {
  position: absolute;
  left: 0;
  top: 0;
}

/*
  Important:
  Leaflet uses <img> elements for its tiles.
  Restore the dimensions expected by Leaflet.
*/
#montreal-map.leaflet-container .leaflet-tile {
  position: absolute !important;
  display: block !important;
  width: 256px !important;
  height: 256px !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

#montreal-map.leaflet-container .leaflet-marker-icon,
#montreal-map.leaflet-container .leaflet-marker-shadow {
  max-width: none !important;
  max-height: none !important;
}

@media (max-width: 760px) {
  #montreal-map.leaflet-container {
    height: 260px;
    min-height: 260px;
  }
}

/* --------------------------------------------------
Hero: market canvas stacking
-------------------------------------------------- */

.hero-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero-market-canvas {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.72;
}

.hero-section .hero-grid {
  position: relative;
  z-index: 1;
}

.hero-section .scroll-indicator {
  position: absolute;
  z-index: 2;
}