/* =========================================================
   MORR Consulting — stylesheet
   Fonts: IBM Plex Sans (body), Space Grotesk (headings/labels)
   ========================================================= */

/* ---------- IBM Plex Sans ---------- */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 600;
  font-stretch: 100%;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-cyrillic-ext.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 600;
  font-stretch: 100%;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-cyrillic.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 600;
  font-stretch: 100%;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-greek.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 600;
  font-stretch: 100%;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-vietnamese.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 600;
  font-stretch: 100%;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 600;
  font-stretch: 100%;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Space Grotesk ---------- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/space-grotesk-vietnamese.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/space-grotesk-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/space-grotesk-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Global ---------- */
body {
  margin: 0;
  background: oklch(0.16 0.012 255);
  font-family: 'IBM Plex Sans', sans-serif;
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
#director, #services, #digital, #sectors, #why { scroll-margin-top: 120px; }

@keyframes drift {
  0% { transform: translate(0,0); }
  50% { transform: translate(-2%,2%); }
  100% { transform: translate(0,0); }
}
@keyframes sketchIn {
  from { stroke-dashoffset: 240; }
  to { stroke-dashoffset: 0; }
}
@keyframes gridDrift {
  0% { background-position: 0 0; }
  100% { background-position: 64px 64px; }
}
@keyframes floatSlow {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(-52%) translateX(-6px); }
}

.morr-sketch path,
.morr-sketch polyline,
.morr-sketch line,
.morr-sketch rect,
.morr-sketch polygon {
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: sketchIn 1.6s ease forwards;
}

/* ---------- Nav interactivity (was inline style bindings, now class-driven) ---------- */
.morr-nav a { position: relative; }
.morr-nav a .morr-underline {
  position: absolute; left: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, oklch(0.68 0.14 200), transparent);
  box-shadow: 0 0 8px 1px oklch(0.68 0.14 200 / 0.6);
  width: 0%; opacity: 0;
  transition: width 0.35s ease, opacity 0.35s ease;
}
.morr-nav a.is-active,
.morr-nav a.is-hovered { font-weight: 700; }
.morr-nav a:not(.is-active) { font-weight: 400; }
.morr-nav a.is-active .morr-underline,
.morr-nav a.is-hovered .morr-underline { width: 100%; opacity: 1; }

.morr-cta .morr-underline {
  position: absolute; left: 22px; bottom: 4px; height: 2px;
  background: linear-gradient(90deg, transparent, oklch(0.68 0.14 200), transparent);
  box-shadow: 0 0 8px 1px oklch(0.68 0.14 200 / 0.6);
  width: 0px; opacity: 0;
  transition: width 0.35s ease, opacity 0.35s ease;
}
.morr-cta.is-active { font-weight: 700; }
.morr-cta.is-active .morr-underline { width: calc(100% - 44px); opacity: 1; }

#mobile-menu { display: none; }
#mobile-menu.is-open { display: flex; }

/* Mobile menu is removed from normal document flow so it opens at the
   current scroll position rather than back at the top of the page. */
@media (max-width: 860px) {
  header {
    padding: 12px 20px !important;
  }
  #mobile-menu {
    position: fixed;
    top: var(--morr-mobile-menu-top, 105px);
    left: 0;
    right: 0;
    z-index: 49;
    max-height: calc(100dvh - var(--morr-mobile-menu-top, 105px));
    overflow-y: auto;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  }
  header button.morr-menu-btn {
    position: relative;
    z-index: 51;
    cursor: pointer;
  }
}



/* ---------- Director responsive layout ---------- */
.director-layout > * { min-width: 0; }
.director-portrait { max-width: 100%; }

@media (max-width: 860px) {
  #director.director-section { padding: 72px 28px !important; }
  #director .director-layout {
    flex-direction: column !important;
    gap: 36px !important;
    align-items: stretch !important;
  }
  #director .director-media {
    width: 100% !important;
    flex-shrink: 1 !important;
    gap: 24px !important;
  }
  #director .director-image {
    width: min(100%, 420px) !important;
    height: auto !important;
    aspect-ratio: 2 / 3;
    margin: 0 auto;
  }
  #director .director-portrait {
    width: 100% !important;
    height: 100% !important;
  }
  #director .director-copy { width: 100% !important; }
}

@media (max-width: 480px) {
  #director.director-section { padding: 56px 20px !important; }
  #director .director-layout { gap: 30px !important; }
  #director .director-image { width: 100% !important; }
  #director .director-media span { max-width: 100%; }
}


/* ---------- Legal sections ---------- */
.morr-legal-section {
  min-height: 100svh;
  display: flex;
  align-items: center;
  scroll-margin-top: 110px;
}
.morr-legal-section > div {
  width: 100%;
}
@media (max-width: 640px) {
  .morr-legal-section {
    min-height: 100svh;
    padding: 64px 20px !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  header nav.morr-nav, header a.morr-cta { display: none !important; }
  header button.morr-menu-btn { display: inline-flex !important; }
}
@media (max-width: 640px) {
  #sectors .morr-sectors-grid { grid-template-columns: repeat(2,1fr) !important; }
  #digital > div > div:last-child > div { grid-template-columns: 1fr !important; }
}
@media (min-width: 861px) {
  .morr-pipeline-line { display: block !important; }
}
