/* ============================================================
   PETRA VENTURES PLC — Shared site chrome
   Common navbar (mega menus), footer, hero & section imagery
   ============================================================ */

/* ── Scroll offset for anchored sections ── */
section[id], .phil-item[id] { scroll-margin-top: 88px; }

/* ══════════════════════════════════════════════
   NAVBAR (common on all pages)
   ══════════════════════════════════════════════ */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: #FFFFFF;
  border-bottom: 1px solid #E0E0E0;
}
.nav-inner {
  display: flex; justify-content: space-between; align-items: center;
  height: 64px; padding: 0 5vw;
}
.nav-brand {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 16px; font-weight: 600; letter-spacing: .3px;
  color: #0043CE; text-decoration: none;
}
.nav-links { display: flex; gap: 3.2rem; list-style: none; align-items: center; }
.nav-links > li > a {
  display: flex; align-items: center; gap: .5rem;
  height: 64px;
  font-size: 14px; font-weight: 400;
  color: #161616; text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .25s, border-color .25s;
}
.nav-links > li > a:hover,
.nav-links > li > a.active,
.nav-links > li > a[aria-expanded="true"] { color: #0043CE; border-bottom-color: #0043CE; }
.has-mega > a::after {
  content: '';
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-top: 2px;
}

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 8px 0; }
.hamburger span { display: block; width: 24px; height: 2px; background: #161616; transition: transform .35s cubic-bezier(.3,0,.2,1), opacity .25s; }
.site-nav.open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav.open .hamburger span:nth-child(2) { opacity: 0; }
.site-nav.open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mega menu panels (full width, image at right end) ── */
.mega-panel {
  display: none;
  position: fixed; top: 64px; left: 0; right: 0;
  background: #FFFFFF;
  border-bottom: 1px solid #E0E0E0;
  z-index: 210;
}
.mega-panel.open { display: block; animation: megaIn .22s cubic-bezier(.3,0,.2,1) both; }
@keyframes megaIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.mega-inner {
  display: grid;
  grid-template-columns: 240px 1fr 400px;
  gap: 4rem;
  padding: 3.2rem 5vw;
  align-items: start;
}
.mega-head .mega-kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: #8A4B21; display: block; margin-bottom: 1rem;
}
.mega-head .mega-kicker::before {
  content: ''; display: block;
  width: 48px; height: 2px; background: #0043CE; margin-bottom: 1rem;
}
.mega-head p { font-size: 14px; color: #6F6F6F; max-width: 30ch; }
.mega-links { list-style: none; display: grid; gap: 0; }
.mega-links.cols-2 { grid-template-columns: 1fr 1fr; gap: 0 3.2rem; }
.mega-links a {
  display: flex; align-items: baseline; gap: 1.4rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid #E0E0E0;
  text-decoration: none;
}
.mega-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; letter-spacing: 1px; color: #8A4B21; flex-shrink: 0;
}
.mega-text strong {
  display: block;
  font-size: 15px; font-weight: 600; color: #161616;
  transition: color .25s;
}
.mega-text em {
  display: block; font-style: normal;
  font-size: 13px; color: #6F6F6F; margin-top: .15rem;
}
.mega-links a:hover .mega-text strong { color: #0043CE; }
.mega-links a:hover .mega-text strong::after { content: ' →'; }
.mega-figure { border: 1px solid #E0E0E0; }
.mega-figure img {
  display: block; width: 100%; height: 240px;
  object-fit: cover;
}
.mega-scrim {
  display: none;
  position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
  background: rgba(22,22,22,.4);
  z-index: 150;
}
.mega-scrim.open { display: block; }

/* ══════════════════════════════════════════════
   FOOTER (common on all pages)
   ══════════════════════════════════════════════ */
.site-footer {
  background: #161616;
  color: rgba(255,255,255,.75);
  border-top: 2px solid #8A4B21;
  padding: 3.2rem 5vw;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px; letter-spacing: .3px;
}
.site-footer .footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1.6rem;
}
.site-footer .footer-mantras {
  font-family: 'IBM Plex Mono', monospace;
  color: #D2A679; letter-spacing: 1px;
}
.site-footer a { color: #D2A679; text-decoration: none; transition: color .25s; }
.site-footer a:hover { color: #FFFFFF; }

/* ══════════════════════════════════════════════
   PER-PAGE HERO IMAGERY
   ══════════════════════════════════════════════ */
body.page-home #hero {
  background:
    linear-gradient(rgba(0,29,108,.85), rgba(0,29,108,.85)),
    url('assets/images/home-hero.jpg') center / cover no-repeat;
}
body.page-home #philosophy {
  background:
    linear-gradient(rgba(22,22,22,.93), rgba(22,22,22,.93)),
    url('assets/images/philosophy-bg.jpg') center / cover no-repeat;
}
body.page-technology #hero {
  background:
    linear-gradient(rgba(22,22,22,.78), rgba(22,22,22,.78)),
    url('assets/images/tech-hero.jpg') center / cover no-repeat;
}
body.page-consulting #hero {
  background:
    linear-gradient(rgba(22,22,22,.78), rgba(22,22,22,.78)),
    url('assets/images/consulting-hero.jpg') center / cover no-repeat;
}
body.page-mindset #hero {
  background:
    linear-gradient(rgba(22,22,22,.78), rgba(22,22,22,.78)),
    url('assets/images/mindset-hero.jpg') center / cover no-repeat;
}
body.page-import-export #hero {
  background:
    linear-gradient(rgba(22,22,22,.8), rgba(22,22,22,.8)),
    url('assets/images/hero-globe-image.avif') center / cover no-repeat;
}
body.page-manufacturing #hero {
  background:
    linear-gradient(rgba(22,22,22,.78), rgba(22,22,22,.78)),
    url('assets/images/mfg-hero.jpg') center / cover no-repeat;
}
body.page-agro-business #hero {
  background:
    linear-gradient(rgba(22,22,22,.75), rgba(22,22,22,.75)),
    url('assets/images/agro-hero-web.jpg') center / cover no-repeat;
}

/* ══════════════════════════════════════════════
   SECTION IMAGERY
   ══════════════════════════════════════════════ */
figure.section-band { margin: 0; border-top: 1px solid #E0E0E0; border-bottom: 1px solid #E0E0E0; }
figure.section-band img {
  display: block;
  width: 100%;
  height: clamp(240px, 30vw, 420px);
  object-fit: cover;
}
figure.about-figure { margin: 4rem 0 0; border: 1px solid #E0E0E0; grid-column: 1 / -1; }
figure.about-figure img { display: block; width: 100%; height: 320px; object-fit: cover; }
figure.contact-figure { margin: 2.4rem 0 0; border: 1px solid #E0E0E0; }
figure.contact-figure img { display: block; width: 100%; height: 260px; object-fit: cover; }

/* Division card thumbnails (home) */
.card-thumb {
  display: block;
  width: calc(100% + 4.8rem);
  margin: -2.8rem -2.4rem 2rem;
  height: 150px;
  object-fit: cover;
  border-bottom: 1px solid #E0E0E0;
}

/* ══════════════════════════════════════════════
   RESPONSIVE — chrome
   ══════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .mega-inner { grid-template-columns: 200px 1fr 300px; gap: 2.4rem; }
  .mega-figure img { height: 200px; }
}
@media (max-width: 900px) {
  .mega-inner { grid-template-columns: 1fr 1fr; }
  .mega-head { display: none; }
  .mega-figure { display: none; }
}
@media (max-width: 640px) {
  .nav-links {
    display: none; flex-direction: column; align-items: stretch;
    position: absolute; top: 64px; left: 0; right: 0;
    background: #FFFFFF;
    border-bottom: 1px solid #E0E0E0;
    padding: 0 2rem 1.2rem; gap: 0;
    max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .site-nav.open .nav-links { display: flex; }
  .nav-links > li { border-bottom: 1px solid #E0E0E0; }
  .nav-links > li > a { height: auto; padding: 1.4rem 0; border-bottom: none; }
  .hamburger { display: flex; }
  /* Mega panels expand inline inside the open mobile menu */
  .mega-panel {
    position: static;
    border-bottom: none; border-top: 1px solid #E0E0E0;
    animation: none;
  }
  .mega-panel .mega-links { padding: .4rem 0 1.2rem; }
  .mega-panel .mega-links a { padding: .9rem 0; }
  .site-nav.open .mega-panel { display: block; }
  .mega-scrim { display: none !important; }
}
