/* ==========================================================================
   1. DESKTOP — your design, unchanged, now living in one place.
   These are the exact values that were in the <style> block of index.html
   (140px transparent header, 5.5cm logo, 4.8cm once scrolled). Nothing here
   is a change to how the site looks: it is the same rules, moved, so the
   mobile layer below can override them without the two fighting.
   ========================================================================== */

/* --- Header & navigation ------------------------------------------------ */
#header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 140px !important;
  z-index: 99999 !important;
  background: transparent !important;
  transition: background 0.35s ease, box-shadow 0.35s ease, height 0.35s ease !important;
}

#header.header-scrolled {
  background: rgba(18, 30, 46, 0.75) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  height: 4.8cm !important;
}

#header .logo img,
#header.header-scrolled .logo img {
  width: 5.5cm !important;
  height: 5.5cm !important;
  max-height: none !important;
  object-fit: contain !important;
  transition: none !important;
}

#header .container {
  transform: translateY(-10px) !important;
}

#navbar {
  display: block !important;
}

#navbar ul {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 26px !important;
  position: relative !important;
  top: -8px !important;
}

#navbar li {
  display: inline-block !important;
  white-space: nowrap !important;
}

#navbar a,
#navbar a:focus {
  color: rgba(255, 255, 255, 0.9) !important;
  font-family: 'Work Sans', sans-serif !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  transition: color 0.3s ease !important;
}

#navbar a:hover,
#navbar .active {
  color: #2aa198 !important;
}

/* Hidden on desktop so your desktop view never changes */
.mobile-nav-toggle {
  display: none !important;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  line-height: 0;
}

/* --- Hero --------------------------------------------------------------- */
#hero {
  position: relative !important;
  width: 100% !important;
  height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.epangelia-typography-matrix {
  position: relative !important;
  z-index: 10 !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 40px !important;
  opacity: 1 !important;
}

.epangelia-typography-matrix h1 {
  font-family: 'English1766', 'Georgia', serif !important;
  font-style: italic !important;
  font-weight: normal !important;
  text-transform: none !important;
  color: #ffffff !important;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.2 !important;
  margin: 0 0 20px 0 !important;
  text-shadow: 0px 4px 15px rgba(0, 0, 0, 0.7) !important;
  white-space: normal !important;
}

.epangelia-typography-matrix h2 {
  font-family: 'Work Sans', sans-serif !important;
  font-weight: 500 !important;
  color: #9aa5b1 !important;
  font-size: clamp(11px, 1.5vw, 14px);
  letter-spacing: 3px !important;
  text-transform: uppercase !important;
  margin: 0 0 45px 0 !important;
  line-height: 1.5 !important;
  display: block !important;
}

.epangelia-typography-matrix .btn-get-started {
  font-family: 'Work Sans', sans-serif !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 1.5px !important;
  padding: 14px 52px !important;
  background-color: #2aa198 !important;
  border: 2px solid #2aa198 !important;
  color: #ffffff !important;
  border-radius: 4px !important;
  transition: all 0.3s ease !important;
  display: inline-block !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.epangelia-typography-matrix .btn-get-started:hover {
  background-color: #1f7a73 !important;
  border-color: #1f7a73 !important;
  transform: translateY(-2px);
}

/* ==========================================================================
   MOBILE / RESPONSIVE LAYER
   Everything below this line only applies at phone and small-tablet widths.
   The desktop design above is untouched.
   ========================================================================== */

/* ==========================================================================
   GLOBAL BRAND STYLE RULES (epangelia GROUP)
   ========================================================================== */
@import url('https://googleapis.com');

@font-face {
  font-family: 'English1766';
  src: url('../fonts/English1766-Regular.woff2') format('woff2'),
       url('../fonts/English1766-Regular.woff') format('woff'),
       url('../fonts/English1766-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

html, body {
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  font-family: 'Work Sans', sans-serif !important;
  background-color: #ffffff !important;
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* ==========================================================================
   DEWI-BENCHMARKED ORGANIC FIXED HEADER STYLES
   ========================================================================== */
#header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 140px !important;              /* Expanded height parameter allows 8cm logo breakout safely */
  background: transparent !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: background 0.35s ease, box-shadow 0.35s ease, height 0.35s ease !important;
  z-index: 99999 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

/* Dynamic Class: Deepens backdrop tint organically when leaving top fold */
#header.header-scrolled {
  height: 4.8cm !important;
  background-color: rgba(18, 30, 46, 0.75) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
  border-bottom: 0 !important;
}

/* Dynamic logo animation scale overrides */
#header .logo img {
  transition: all 0.4s ease-in-out !important;
}
/* The logo does not change size on scroll — it stays at 5.5cm. */
#header.header-scrolled .logo img {
  width: 5.5cm !important;
  height: 5.5cm !important;
}

/* ==========================================================================
   NAVIGATION MENU LINKS ROW STYLE MAP (Like Dewi)
   ========================================================================== */
.navbar {
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
}

.navbar ul {
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  list-style: none !important;
  align-items: center !important;
  gap: 12px !important;
}

.navbar li {
  position: relative !important;
  display: inline-block !important;
}

.navbar a, .navbar a:focus {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 18px !important;       /* Clean interior link box breathability margins */
  font-family: 'Work Sans', sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: rgba(255, 255, 255, 0.85) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  white-space: nowrap !important;       /* Prevents menu links from squishing or wrapping links */
  transition: 0.3s ease !important;
  text-decoration: none !important;
}

.navbar a:hover, 
.navbar .active, 
.navbar .active:focus {
  color: #2aa198 !important;            /* Highlight active paths beautifully with Zomp */
}

.mobile-nav-toggle {
  color: #ffffff !important;
  font-size: 28px !important;
  cursor: pointer !important;
  display: none !important;
}

@media (max-width: 991px) {
  /* the burger's real styling lives in the mobile layer at the end of this
     file — this only makes sure it is not hidden */
  .mobile-nav-toggle {
    display: inline-flex !important;
  }
  .navbar ul {
    display: none !important;
  }
}


/* ==========================================================================
   ONE BUTTON, THREE PLACES
   The reference is the portfolio "View Case Study" button. These three were
   each written with their own inline size (14px text, 14px 44px padding),
   which is why they never matched. They now share one rule here — outside
   every media query, so the same size applies on a phone and on a desktop.
   ========================================================================== */
.btn-get-started.btn-primary,
#profile a.btn-primary,
#contact form button.btn-primary,
button.btn-primary[type="submit"] {
  font-size: 12px !important;
  letter-spacing: 1px !important;
  line-height: 1.4 !important;
  padding: 8px 16px !important;
  min-height: 0 !important;
  gap: 8px !important;
  border-radius: 4px !important;
  width: auto !important;
  max-width: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}
.btn-get-started.btn-primary i,
#profile a.btn-primary i,
#contact form button.btn-primary i {
  font-size: 12px !important;
  line-height: 1 !important;
  width: auto !important;
  height: auto !important;
}

/* ==========================================================================
   EDGE-TO-EDGE FULLSCREEN HERO CONTENT SECTION
   ========================================================================== */
#hero {
  width: 100% !important;
  height: 100vh !important;
  position: relative !important;
  background-color: #121e2e !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

.hero-video-bg {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  width: auto !important;
  height: auto !important;
  transform: translate(-50%, -50%) !important;
  object-fit: cover !important;
  z-index: 1 !important;
}

.hero-contrast-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: radial-gradient(circle, rgba(18, 30, 46, 0.45) 0%, rgba(18, 30, 46, 0.85) 100%),
              linear-gradient(to bottom, rgba(18, 30, 46, 0.25), rgba(18, 30, 46, 0.65)) !important;
  z-index: 2 !important;
}

.hero-content-alignment-box {
  position: relative !important;
  z-index: 3 !important;
  max-width: 1140px !important;
  margin-top: 60px !important;          /* Adjusts spacing down safely underneath expanded menu bar heights */
}

/* Title Display Configuration (Serif Slant text treatment setup) */
.brand-hero-title {
  font-family: 'English1766', 'Georgia', serif !important;
  font-size: clamp(36px, 5.5vw, 68px) !important;
  color: #ffffff !important;
  margin: 0 0 24px 0 !important;
  line-height: 1.2 !important;
  font-weight: normal !important;
  font-style: italic !important;        /* Slanted setting parameter configuration */
  text-shadow: 0px 4px 18px rgba(0, 0, 0, 0.55) !important;
  text-transform: none !important;
}

/* Wide Letter-Spaced Corporate Alignment Subtext Block */
.brand-hero-subtitle {
  font-family: 'Work Sans', sans-serif !important;
  font-weight: 500 !important;
  font-size: clamp(12px, 2.2vw, 15px) !important;
  color: #9aa5b1 !important;            /* Custom brand Cadet Grey */
  letter-spacing: 3.5px !important;     /* Tracking spread setting rules */
  text-transform: uppercase !important;
  margin: 0 0 52px 0 !important;
  line-height: 1.6 !important;
  max-width: 950px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Flat Solid Zomp Styled HIRE US Interactive CTA Link (Completely free of drop shadows) */
.brand-hero-title + p + .btn-zomp-flat,
.btn-zomp-flat {
  font-family: 'Work Sans', sans-serif !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  text-transform: uppercase !important;
  letter-spacing: 1.5px !important;
  padding: 15px 52px !important;
  background-color: #2aa198 !important; /* Solid Brand Zomp */
  color: #ffffff !important;
  border-radius: 4px !important;
  display: inline-block !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
  border: 2px solid #2aa198 !important;
  box-shadow: none !important;          /* Guarantees style stays completely solid */
}

.btn-zomp-flat:hover {
  background-color: #21837c !important; /* Flat dark color shift on hover interaction */
  border-color: #21837c !important;
  transform: translateY(-2px) !important;
  color: #ffffff !important;
}

/* Disable original template preloader elements safely */
#preloader {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}
html,
body {
  overflow-x: hidden !important;
}

#hero {
  overflow: hidden !important;
}

video {
  display: block !important;
  max-width: 100% !important;
}

@layer epangelia-desktop, epangelia-mobile;

/* ==========================================================================
   INNER PAGES (privacy, terms, POPIA, portfolio details, service details)
   These sit on a light page with no hero behind the bar, so the bar keeps a
   solid dark background of its own — otherwise a white logo on white.
   ========================================================================== */
#header.header-inner-pages,
#header.header-inner-pages.header-scrolled {
  height: 118px !important;
  /* Same strip as the home page: translucent navy with a blur, so the case
     study page reads as one site. (It used to be an opaque navy bar.) */
  /* Exactly the home page's scrolled strip: translucent navy, no extra tint. */
  background: rgba(18, 30, 46, 0.75) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22) !important;
  background-image: none !important;
  /* Without this the fixed bar is stacked at the default level and the page
     content paints OVER it: the header is there but hidden behind the page. */
  z-index: 99999 !important;
}

/* Inner pages: the document scrolls under a fixed bar, so the banner needs its
   own top offset equal to the bar. It was being hidden behind the strip. */
/* The space above the banner must be the STRIP, not white.
   It used to be a `body::before` navy band — but html/body carry
   overflow-x:hidden, so a fixed bar has nothing to blur and only the flat band
   showed (the "gunmetal strip", logo flashing as it scrolled past). The band is
   gone; instead the page background above the banner is the same photograph the
   home hero uses, so the translucent bar has real content behind it. */
@media (min-width: 992px) {
  #main > .breadcrumbs,
  body > main > .breadcrumbs,
  body > #main > .breadcrumbs {
    margin-top: 118px !important;
    position: relative !important;
  }
  /* The page behind the bar stays white; the bar itself is see-through. */
  body:has(#header.header-inner-pages) {
    background: #ffffff !important;
  }
}
@media (max-width: 991.98px) {
  #main > .breadcrumbs,
  body > main > .breadcrumbs,
  body > #main > .breadcrumbs {
    margin-top: 140px !important;
    position: relative !important;
  }
  body:has(#header.header-inner-pages) {
    background: #ffffff !important;
  }
}

/* ==========================================================================
   MOBILE LAYER — ONLY INSIDE max-width QUERIES
   Nothing below applies on a desktop screen. The desktop block at the top of
   this file holds your header, logo and hero exactly as you designed them.
   ========================================================================== */
@media (max-width: 991.98px) {
  /* 1. Invalid CSS in the inline block: `font-size: clamp(...) !important` is
        thrown away by every browser, so these headings fell back to the
        template's size and ran off the screen. Re-declared properly. */
  /* Section headings on a phone: 8vw (31px at 390px), the same for about,
     services and portfolio, and one step under the hero's 8.6vw. */
  #main h2,
  #about h2,
  #services h2,
  #portfolio h2,
  #people h2,
  #contact h2,
  #profile h2 {
    font-size: 7vw !important;
    line-height: 1.22 !important;
  }

  /* 2. The hero title uses the same broken pattern — give it a real size and
        let it wrap. No letter-spacing tricks, no clipping. */
  /* The h1's own rule in index.html uses `clamp(...) !important` — invalid,
     so it is dropped and the title renders at the template's default size.
     Restore the intended look at a size that fits a 320-430px screen. */
  /* clamp() is NOT used here on purpose: the inline rule in index.html contains
     `clamp(...) !important`, which is invalid, and some engines then treat the
     whole font-size declaration as invalid — including a valid clamp() here.
     A plain vw size is unambiguous and works everywhere. */
  .epangelia-typography-matrix h1 {
    font-family: 'English1766', 'Georgia', serif !important;
    font-style: italic !important;
    font-weight: normal !important;
    text-transform: none !important;
    color: #ffffff !important;
    /* One type scale on a phone: every section heading is 6.4vw (25px at
       390px) and the hero is one step above it at 7.4vw (29px). Measured:
       at 7.4vw the widest word "Communication." fits the 354px hero box. */
    /* One type scale on a phone: section headings are 8vw and the hero is the
       same 8vw (31px at 390px). Each sentence takes its own line, so nothing
       overflows whatever size the serif renders at. */
    font-size: 8vw !important;
    line-height: 1.22 !important;
    letter-spacing: 0 !important;
    margin: 0 0 18px 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
  /* Subtitle: readable, and broken at the "|" separators — never mid-phrase.
     Each separator is its own <span>, so the three lines are always:
     BUSINESS GROWTH / ORGANISATIONAL STRENGTH / PEOPLE DEVELOPMENT. */
  .epangelia-typography-matrix h2,
  .epangelia-typography-matrix .col-12 > h2 {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px 0 !important;
    font-size: 12px !important;
    letter-spacing: 1.2px !important;
    line-height: 1.9 !important;
    margin: 0 auto 28px auto !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    white-space: normal !important;
    text-align: center !important;
  }
  .epangelia-typography-matrix h2 .hero-sep {
    display: inline-block;
    margin: 0 7px;
    color: #2aa198;
  }
  .epangelia-typography-matrix h2 .hero-phrase {
    display: inline-block;
    white-space: nowrap;
  }

  /* CTA: full-bleed 52px of teal looked like a banner. A comfortable button. */
  .epangelia-typography-matrix .btn-get-started {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 13px 30px !important;
    font-size: 12.5px !important;
    letter-spacing: 1.4px !important;
    border-radius: 4px !important;
  }
  /* .container's own side padding (Bootstrap) is kept — overriding it shifted
     the hero text right and pushed the headline off screen. */
  /* The hero box was never too narrow — it was centred on a 100vw box that
     included the scrollbar, so every line drifted right and clipped. Anchor it
     to the real content width and let it wrap on words. */
  .epangelia-typography-matrix {
    padding: 0 18px !important;
    width: auto !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
    text-align: center !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
  }
  #hero {
    padding-left: 0 !important;
    padding-right: 0 !important;
    /* NO overflow-x:hidden here: it clipped the hero headline's swash at the
       right edge. The hero is sized to the screen by its own rules, so nothing
       can overflow sideways in the first place. */
    overflow: visible !important;
  }
  /* The hero headline breaks at the punctuation: "Growth. Communication."
     fits one line and "Learning." takes the next, instead of the serif
     squeezing three words into one line that overflows the box. */
  .epangelia-typography-matrix h1 {
    word-break: normal !important;
    overflow-wrap: break-word !important;
    hyphens: none !important;
    /* NOT max-width: the h1 is a block box the browser already shrinks to the
       .container — adding a cap here fought Bootstrap's own centring and was
       what pushed the first line past the right edge. */
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  .epangelia-typography-matrix .col-12,
  .epangelia-typography-matrix .row {
    overflow: visible !important;
  }
  /* the column inside the hero was still carrying Bootstrap's gutter, which
     stole ~24px from the headline on both sides */
  .epangelia-typography-matrix .row,
  .epangelia-typography-matrix .col-12,
  .epangelia-typography-matrix .row > [class*="col"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .epangelia-typography-matrix h1,
  .epangelia-typography-matrix h2 {
    text-align: center !important;
  }

  /* 3. Nothing may be wider than the phone. */
  #main, section, .container { max-width: 100% !important; }
  /* The hero subtitle is deliberately wide on desktop; on a phone let it wrap
     inside the screen instead of running off the right edge. */
  .epangelia-typography-matrix,
  .epangelia-typography-matrix .row,
  .epangelia-typography-matrix .col-12 {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .row { margin-left: 0 !important; margin-right: 0 !important; }
  /* Bootstrap's column gutters are negative-margined; drop them on the content
     sections only. The hero is excluded — resetting its column gutter is what
     shifted the headline right and pushed it off the screen. */
  #main .row > [class*="col"],
  #footer .row > [class*="col"] { padding-left: 0 !important; padding-right: 0 !important; }
  /* Hero: let the headline wrap on the word. NOTE: no overflow-wrap/word-break
     here — with a wide display serif those make the browser break mid-word
     ("Communicatio/n"), which is what pushed it past the edge. */
  .epangelia-typography-matrix h1,
  .epangelia-typography-matrix h2 {
    max-width: 100% !important;
  }
  body { overflow-wrap: break-word; }

  /* 4. Desktop section padding (95-110px) is enormous on a phone. */
  section,
  #about, #clients, #services, #profile, #portfolio, #people, #contact {
    padding-top: 56px !important;
    padding-bottom: 56px !important;
  }
  #footer { padding: 56px 0 calc(32px + env(safe-area-inset-bottom, 0px)) 0 !important; }

  /* 4b. Mobile header. ONE set of numbers for both states — the logo and the
       burger sit in exactly the same place before and after scrolling, and the
       only thing that changes is the translucent strip behind them. */
  #header,
  #header.header-scrolled {
    /* Same proportion as the desktop: a 140px bar with the logo inside it. */
    height: 140px !important;
    padding: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    transition: background 0.35s ease, box-shadow 0.35s ease !important;
  }
  /* Past the hero the bar gets the desktop's translucent blurred strip. */
  #header.header-scrolled {
    background: rgba(18, 30, 46, 0.75) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
  }
  #header .container,
  #header.header-scrolled .container {
    height: 140px !important;
    /* NO overflow:hidden — that is what sliced the logo's lower line
       ("Your Sales Team (Pty) Ltd" and the reg number) off. */
    overflow: visible !important;
    align-items: flex-start !important;
    transform: none !important;
    padding-top: calc(12px + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: 0 !important;
    box-sizing: border-box;
  }
  /* The desktop rule `.mobile-nav-toggle { display: none !important; }` comes
     first in this file, and main.css is loaded AFTER style.css — so on a phone
     the icon has to be switched back on with the same specificity, here. */
  /* Loaded after style.css, and its `.mobile-nav-toggle{display:none}` would
     otherwise still win — hence the extra specificity and the !important. */
  #header .mobile-nav-toggle,
  header .mobile-nav-toggle.mobile-nav-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    line-height: 1 !important;
    margin: 0 !important;
    margin-top: 2px !important;
    padding: 0 !important;
    flex: 0 0 auto;
    background: none !important;
    border: 0 !important;
    border-radius: 4px;
    -webkit-tap-highlight-color: transparent;
  }
  /* Header wordmark. `#header` is an id, so none of these can reach the
     footer's .logo link — header and footer are sized independently. The image
     box is taller than the bar because the SVG's viewBox is 2500x1700 with the
     wordmark floating in the middle: the artwork is never cropped, the empty
     space around it simply extends past the bar. */
  #header > .container > .logo {
    display: flex !important;
    align-items: flex-start !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  #header > .container > .logo > img {
    /* The bar is 140px and the logo box is 110px, so the whole logo — script,
       GROUP, the rule, the company name and the registration number — sits
       comfortably inside the strip at every scroll position. */
    height: 110px !important;
    max-height: 110px !important;
    width: auto !important;
    max-width: 74vw !important;
    object-fit: contain !important;
    /* MEASURED on the SVG itself: the first ink (the top of the "g" flourish)
       is at 13.5% of the image height. For a 110px box that is 14.9px — so the
       tops of e/a/n/g/e/a sit on the line 15px below the top of the bar, and
       the burger is placed on that same line. */
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
  }
  /* The burger is aligned to the TOP of the logo's visible letters, not to
     the bar. 44px tap area keeps it comfortable to press. */
  #header .mobile-nav-toggle,
  #header.header-scrolled .mobile-nav-toggle {
    /* The tops of e/a/n/g/e/a fall 27px below the top of the bar (12px of
       container padding + 15px of empty logo box). The burger's own top bar
       sits 7px inside its 44px tap target, so the target starts at 20px and
       the visible bars land on the letters' line. The extra 6px is optical:
       the script's ascender makes the mark read lower than it measures. */
    margin-top: 14px !important;
    align-self: flex-start !important;
  }

  /* Drawn with CSS instead of the icon font: assets/vendor/bootstrap-icons
     resolves the wrong family on this build, so the glyph never appeared. */
  .mobile-nav-toggle .burger-lines {
    display: block;
    position: relative;
    width: 24px;
    height: 18px;
  }
  /* Three bars: the element itself is the middle one, ::before and ::after
     are the top and bottom. Open state collapses the middle and crosses
     the other two into an X. */
  .mobile-nav-toggle .burger-lines,
  .mobile-nav-toggle .burger-lines::before,
  .mobile-nav-toggle .burger-lines::after {
    height: 2px;
    background: #ffffff !important;
    border-radius: 2px;
  }
  .mobile-nav-toggle .burger-lines::before,
  .mobile-nav-toggle .burger-lines::after {
    content: "";
    position: absolute;
    left: 0;
    width: 24px;
    transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
  }
  .mobile-nav-toggle .burger-lines::before { top: -7px; }
  .mobile-nav-toggle .burger-lines::after  { top: 7px; }
  body.mobile-nav-active .mobile-nav-toggle .burger-lines {
    background: transparent !important;
  }
  body.mobile-nav-active .mobile-nav-toggle .burger-lines::before {
    top: 0;
    transform: rotate(45deg);
  }
  body.mobile-nav-active .mobile-nav-toggle .burger-lines::after {
    top: 0;
    transform: rotate(-45deg);
  }
  /* 5. The desktop nav row (6 uppercase links, nowrap) cannot fit a phone.
        Hide the row and show the template's hamburger icon — the icon, the
        header height, the logo size and the translucent bar stay as you built
        them. The template's own JS opens `body.mobile-nav-active`. */
  #navbar ul { display: none !important; }
  #navbar {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(88vw, 380px);
    height: 100vh;
    height: 100dvh;
    background: #121e2e;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
    transition: right 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    /* the 75px header sits over the top of the panel, so start below it and
       leave a proper margin on every side (the old 24px looked cramped) */
    padding: calc(104px + 36px) 34px calc(48px + env(safe-area-inset-bottom, 0px)) 34px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    visibility: hidden;
  }
  /* The panel now slides over the header bar, so the bar itself goes
     transparent while the menu is open — nothing (logo, burger) shows through
     the panel, and the panel owns the whole screen edge to edge. */
  body.mobile-nav-active #header,
  body.mobile-nav-active #header.header-scrolled {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
  }
  body.mobile-nav-active #header .logo,
  body.mobile-nav-active #header .mobile-nav-toggle {
    visibility: hidden !important;
  }
  body.mobile-nav-active #navbar { right: 0 !important; visibility: visible !important; }
  /* The template's JS only toggles body.mobile-nav-active and swaps the icon;
     these two rules are what make the panel actually appear. */
  body.mobile-nav-active { overflow: hidden; }
  #navbar ul {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    position: static !important;
    top: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
  }
  #navbar li {
    display: block !important;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  #navbar a {
    display: flex !important;
    align-items: center;
    min-height: 58px;
    padding: 18px 22px !important;
    font-size: 13px !important;
    letter-spacing: 1.6px !important;
  }

  /* 5b. ONE BUTTON LANGUAGE on a phone.
        EVERY main button on the page uses the exact size of the portfolio
        "View Case Study" buttons, which is the reference: padding 8px 16px,
        font 12px, tracking 1px, radius 4px. Nothing may be bigger than that
        on a phone, whatever its inline style says. */
  #profile a[download],
  #contact form button[type="submit"],
  #hero .btn-get-started,
  #portfolio .portfolio-view-btn,
  .portfolio-wrap .portfolio-links a.portfolio-view-btn {
    font-size: 12px !important;
    letter-spacing: 1px !important;
    padding: 8px 16px !important;
    min-height: 0 !important;
    line-height: 1.4 !important;
    border-radius: 4px !important;
    width: auto !important;
    max-width: 100% !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px !important;
    box-shadow: none !important;
  }
  #profile a[download] i,
  #contact form button[type="submit"] i {
    font-size: 13px !important;
  }
  /* The download column centres its button instead of stretching it. */
  #profile .text-center, #profile .text-lg-start { text-align: center !important; }

  /* 6. About: the "Partner-Led" badge overlaps the image on desktop. On a phone
        it used to be pushed outside the box (-20px/-15px) and clipped, then it
        was detached below it. Keep it ON the image, overlapping the bottom-right
        corner exactly as on desktop, scaled down to the phone. */
  #about .col-lg-5 > div {
    position: relative !important;
    max-width: 100% !important;
    margin: 0 auto 26px auto !important;
  }
  #about .col-lg-5 > div > div:last-child {
    position: absolute !important;
    right: -6px !important;
    bottom: -6px !important;
    left: auto !important;
    top: auto !important;
    margin: 0 !important;
    width: auto !important;
    max-width: 68% !important;
    padding: 12px 16px !important;
    border-radius: 6px !important;
    box-sizing: border-box;
    text-align: left !important;
  }
  #about .col-lg-5 > div > div:last-child span:first-child {
    font-size: 19px !important;
    margin-bottom: 3px !important;
  }
  #about .col-lg-5 > div > div:last-child span:last-child {
    font-size: 9px !important;
    letter-spacing: 1px !important;
  }
  #about .col-lg-6 > div { padding-left: 0 !important; }

  /* 7. Capability cards */
  .capability-card { padding: 26px 22px !important; }

  /* 8. Company profile: fixed 205x290 thumbnail + a CTA that can overflow */
  #profile img[alt*="Company Profile"] { width: 168px !important; height: 236px !important; }
  #profile a[download] { width: 100%; justify-content: center; box-sizing: border-box; }

  /* 9. Portfolio: the overlay is :hover-only, which a phone cannot do. */
  #portfolio #portfolio-flters { gap: 8px !important; }
  #portfolio #portfolio-flters li {
    padding: 10px 14px !important;
    font-size: 11.5px !important;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }
  .portfolio-wrap .portfolio-info {
    opacity: 1 !important;
    background: linear-gradient(to top, rgba(18, 30, 46, 0.95) 0%, rgba(18, 30, 46, 0.7) 55%, rgba(18, 30, 46, 0.1) 100%) !important;
    padding: 18px 16px !important;
  }
  .portfolio-wrap .portfolio-info h4 { font-size: 15px !important; }
  .portfolio-wrap .portfolio-info p { font-size: 11px !important; margin-bottom: 10px !important; }
  /* The scope sentence stays readable on a phone: at most three lines. */
  .portfolio-wrap .portfolio-info p.portfolio-scope {
    font-size: 11.5px !important;
    line-height: 1.45 !important;
    margin-bottom: 10px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* 10. The People: flex-basis 380px is a desktop value. */
  #people [style*="flex: 1 1 380px"] { flex: 1 1 100% !important; max-width: 100% !important; }

  /* 11. Contact form: 16px inputs stop iOS zooming on focus. */
  #contact [style*="padding: 40px 36px"] { padding: 26px 20px !important; }
  #contact form input, #contact form textarea { font-size: 16px !important; min-height: 48px; }
  #contact form textarea { min-height: 130px; }
  #contact form button[type="submit"] { width: 100%; justify-content: center; min-height: 52px; }

  /* 12. Footer.
     Desktop is five fixed-width columns (220/145/175/195/170px + 50px gaps)
     in a centred flex row. On a phone that wraps into ragged pairs, so:
     two even columns per row on small tablets, one column on phones, and
     every column shares the same left edge instead of being individually
     centred — which is what looked crooked. */
  /* Real gutters: the columns were sitting almost against the screen edge. */
  #footer > .container {
    padding-left: 22px !important;
    padding-right: 22px !important;
  }
  #footer > .container > div:first-child {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 28px !important;
    align-items: start !important;
    width: 100% !important;
    margin: 0 auto !important;
  }
  #footer > .container > div:first-child > div ul li a { padding: 6px 0 !important; }
  #footer > .container > div:first-child > div h4 {
    font-size: 12.5px !important;
    letter-spacing: 1.4px !important;
    margin-bottom: 16px !important;
  }
  #footer > .container > div:first-child > div {
    flex: none !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    text-align: left !important;
    align-items: flex-start !important;
  }
  #footer > .container > div:first-child > div ul {
    align-items: flex-start !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  #footer > .container > div:first-child > div li { justify-content: flex-start !important; }
  #footer > .container > div:first-child > div a { white-space: normal !important; }
  #footer > .container > div:first-child > div h4 { margin-bottom: 14px !important; }

  /* The brand column keeps its logo and social row centred above its links */
  #footer > .container > div:first-child > div:first-child {
    grid-column: 1 / -1;
    align-items: center !important;
    text-align: center !important;
    padding-bottom: 6px;
  }
  /* FOOTER BRAND — exactly one logo. The footer link carries class="logo",
     the same class as the header, so for a long time the header's size rules
     reached into the footer and drew a second, misaligned copy. The scope
     everything below uses keeps the header rules out of the footer, and the
     footer logo keeps your own 3.2cm. */
  #footer .logo img {
    height: 3.2cm !important;
    max-height: none !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    display: block !important;
  }
  /* No second copy, whatever the markup ends up looking like. */
  #footer .logo img ~ img { display: none !important; }

  #footer > .container > div:last-child {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
    gap: 10px !important;
    margin-top: 36px !important;
  }

  /* 13. Anchor jumps clear the fixed header. */
  section[id], #hero, #about, #services, #portfolio, #people, #contact, #profile {
    scroll-margin-top: 140px;
  }
}

@media (max-width: 420px) {
  /* Was width:100% — a full-width 52px teal bar. A centred button instead. */
  .epangelia-typography-matrix .btn-get-started {
    width: auto !important;
    max-width: 100% !important;
    padding: 12px 26px !important;
    font-size: 12px !important;
    letter-spacing: 1.2px !important;
  }
}

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

/* ==========================================================================
   THE HEADER LEAVES WHEN THE FOOTER ARRIVES
   The header is fixed, so it kept floating over the footer and put a second
   logo right above the footer's own logo. When the footer is in view the
   header now slides away. `mobile-menu.js` sets body.footer-in-view.
   ========================================================================== */
#header {
  transition: transform 0.3s ease, background 0.35s ease,
              box-shadow 0.35s ease, backdrop-filter 0.35s ease !important;
}
body.footer-in-view #header {
  transform: translateY(-100%) !important;
  pointer-events: none !important;
}
body.footer-in-view #header .logo,
body.footer-in-view #header .mobile-nav-toggle {
  opacity: 0 !important;
}

/* ==========================================================================
   COMPANY PROFILE — thumbnail's left edge level with the text column's left
   edge. Only the image moves; the text column keeps its position.
   Measured at 1440px: column x=160, text column x=608, so +48px to align.
   ========================================================================== */
@media (min-width: 992px) {
  #profile .profile-thumb-wrap {
    display: inline-block !important;
    margin-left: 0 !important;
  }
}

/* Phone: thumbnail's left edge on the text column's left edge (x=12). */
@media (max-width: 991.98px) {
  #profile .profile-thumb-wrap {
    display: block !important;
    margin: 0 !important;
  }
  #profile .profile-thumb { margin: 0 !important; }
}


/* ==========================================================================
   CASE STUDY / INNER PAGES — logo only, no menu links on the strip.
   The burger stays below 992px so a phone visitor can still navigate.
   ========================================================================== */
#header.header-inner-pages .navbar,
#header.header-inner-pages #navbar {
  display: none !important;
}
@media (max-width: 991.98px) {
  #header.header-inner-pages .mobile-nav-toggle {
    display: inline-flex !important;
  }
}

/* Below 992px the nav is pulled out of the strip and into its own panel, so
   hiding it here does not reach the opened menu. */
@media (max-width: 991.98px) {
  #header.header-inner-pages .navmenu ul,
  #header.header-inner-pages.nav-active .navmenu ul {
    display: flex !important;
    flex-direction: column !important;
  }
}

/* The burger's glyph (bootstrap-icons) does not resolve on the inner pages,
   so the toggle rendered as an empty box — invisible on a light strip. Draw
   the three lines in CSS so it is always visible, like the home page. */
@media (max-width: 991.98px) {
  #header.header-inner-pages .mobile-nav-toggle {
    width: 40px !important;
    height: 40px !important;
    position: absolute !important;
    right: 14px !important;
    top: 20px !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    cursor: pointer !important;
    z-index: 100002 !important;
  }
  #header.header-inner-pages .mobile-nav-toggle span,
  #header.header-inner-pages .mobile-nav-toggle .burger-lines,
  #header.header-inner-pages .mobile-nav-toggle::before,
  #header.header-inner-pages .mobile-nav-toggle::after {
    content: "" !important;
    position: absolute !important;
    left: 8px !important;
    width: 24px !important;
    height: 2px !important;
    background: #ffffff !important;
    border-radius: 2px !important;
    display: block !important;
  }
  #header.header-inner-pages .mobile-nav-toggle::before { top: 12px !important; }
  #header.header-inner-pages .mobile-nav-toggle::after  { top: 25px !important; }
  #header.header-inner-pages .mobile-nav-toggle .burger-lines { top: 18.5px !important; }
  #header.header-inner-pages .mobile-nav-toggle i,
  #header.header-inner-pages .mobile-nav-toggle .bi { display: none !important; }
}

/* Inner-page block kept AFTER the mobile layer so its rules can never lose. */
#header.header-inner-pages .container {
  height: 118px !important;
  transform: none !important;
}

#header.header-inner-pages .logo img,
#header.header-inner-pages.header-scrolled .logo img {
  /* Bootstrap's .img-fluid sets max-width:100% + height:auto; both are beaten
     here, but the logo still needs an explicit box or it collapses to 0 high. */
  display: block !important;
  width: auto !important;
  height: 96px !important;
  max-height: 96px !important;
  max-width: 60vw !important;
  object-fit: contain !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@media (max-width: 991.98px) {
  #header.header-inner-pages,
  #header.header-inner-pages.header-scrolled {
    height: 140px !important;
    background: rgba(18, 30, 46, 0.75) !important;
    background-image: none !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    z-index: 99999 !important;
  }
  #header.header-inner-pages .container {
    height: 140px !important;
    align-items: flex-start !important;
    padding-top: calc(12px + env(safe-area-inset-top, 0px)) !important;
    overflow: visible !important;
  }
  #header.header-inner-pages .logo img,
  #header.header-inner-pages.header-scrolled .logo img {
    height: 110px !important;
    max-height: 110px !important;
    max-width: 74vw !important;
  }
  #header.header-inner-pages .mobile-nav-toggle {
    margin-top: 14px !important;
  }
  /* the burger and the panel behave as on the home page */
  #header.header-inner-pages .mobile-nav-toggle {
    display: inline-flex !important;
  }
  #header.header-inner-pages ~ main,
  body > main {
    padding-top: 0 !important;
  }
}

/* The burger must be VISIBLE on inner pages: an inherited `visibility:hidden`
   was collapsing it to a 0x0 box on phones. */
@media (max-width: 991.98px) {
  /* The burger lives INSIDE #navbar, and I had hidden #navbar to kill the
     desktop links — which took the burger with it. Keep the nav container,
     hide only the list of links; the panel re-shows that list when opened. */
  #header.header-inner-pages #navbar {
    display: block !important;
  }
  #header.header-inner-pages #navbar > ul {
    display: none !important;
  }
  body.mobile-nav-active #header.header-inner-pages #navbar > ul {
    display: flex !important;
    flex-direction: column !important;
  }
  #header.header-inner-pages .mobile-nav-toggle,
  header.header-inner-pages .mobile-nav-toggle {
    visibility: visible !important;
    opacity: 1 !important;
    display: inline-flex !important;
    flex: 0 0 auto !important;
  }
}
