// Shared navigation with mega-menu for ContractControl

const LogoWordmark = ({ height = 20, color = "currentColor" }) => (
  <svg width={Math.round(height * 282 / 36)} height={height} viewBox="0 0 282 36" fill="none" xmlns="http://www.w3.org/2000/svg" aria-label="ContractControl">
    <path d="M18.7784 28.4696C17.2803 28.479 15.7969 28.1741 14.424 27.5745C13.098 26.9968 11.8955 26.1697 10.8817 25.1381C8.78184 22.974 7.60742 20.0771 7.60742 17.0617C7.60742 14.0463 8.78184 11.1494 10.8817 8.98531C11.8979 7.96109 13.1002 7.14006 14.424 6.56618C15.7969 5.96665 17.2803 5.66173 18.7784 5.67111C19.3577 5.67186 19.9358 5.72274 20.5063 5.82317C21.095 5.93032 21.6732 6.08874 22.2343 6.29662C22.8454 6.52761 23.4391 6.80249 24.0106 7.11913C24.2421 7.24699 24.4806 7.38177 24.719 7.52692C24.9404 7.66338 25.1323 7.84259 25.2836 8.05409C25.4348 8.26559 25.5424 8.50512 25.6 8.75869C25.6576 9.01225 25.6641 9.27475 25.619 9.53084C25.574 9.78693 25.4783 10.0315 25.3377 10.2502C25.1715 10.5102 24.9426 10.7244 24.6721 10.8729C24.4016 11.0215 24.098 11.0997 23.7894 11.1003C23.4402 11.0963 23.0995 10.9919 22.8079 10.7996C22.2746 10.4572 21.7071 10.1711 21.1146 9.94604C20.3553 9.66578 19.5531 9.51961 18.7438 9.51406C17.75 9.51045 16.7663 9.71285 15.8547 10.1085C14.9677 10.4878 14.1644 11.0387 13.4909 11.7293C12.8174 12.4316 12.2785 13.2515 11.9012 14.1484C11.513 15.0791 11.3131 16.0775 11.3131 17.0859C11.3131 18.0943 11.513 19.0927 11.9012 20.0234C12.2785 20.9203 12.8174 21.7403 13.4909 22.4425C14.1657 23.1316 14.9687 23.6822 15.8547 24.0633C16.7663 24.459 17.75 24.6614 18.7438 24.6578C19.1431 24.6564 19.5413 24.6159 19.9326 24.5368C20.3248 24.4568 20.7089 24.3411 21.08 24.1912C21.515 24.0162 21.9366 23.8094 22.3414 23.5726C22.4831 23.4931 22.6248 23.4067 22.7768 23.3169C23.0629 23.1382 23.3934 23.0436 23.7307 23.0439C24.0441 23.0441 24.3523 23.1242 24.6262 23.2766C24.9001 23.429 25.1307 23.6486 25.2962 23.9147C25.4351 24.134 25.5291 24.3786 25.5728 24.6344C25.6166 24.8903 25.6091 25.1522 25.551 25.4052C25.4928 25.6581 25.385 25.897 25.2339 26.108C25.0828 26.319 24.8914 26.498 24.6707 26.6345C24.4357 26.7762 24.2076 26.9075 23.9795 27.0285C23.4167 27.3406 22.8323 27.612 22.2308 27.8406C21.1267 28.258 19.9553 28.4689 18.7749 28.4627L18.7784 28.4696Z" fill={color}/>
    <path d="M104.845 28.6839C102.616 28.6839 100.48 27.7988 98.904 26.2232C97.3285 24.6477 96.4434 22.5108 96.4434 20.2826C96.4434 18.0545 97.3285 15.9176 98.904 14.342C100.48 12.7665 102.616 11.8814 104.845 11.8814C106.611 11.8767 108.333 12.4361 109.759 13.478C109.869 13.1009 110.111 12.7761 110.442 12.5631C110.772 12.3501 111.168 12.2631 111.557 12.3181C111.946 12.373 112.302 12.5663 112.56 12.8624C112.818 13.1586 112.961 13.5378 112.963 13.9307V26.6104C112.962 26.9332 112.866 27.2486 112.686 27.5169C112.506 27.7851 112.251 27.9941 111.953 28.1176C111.655 28.241 111.327 28.2734 111.01 28.2106C110.693 28.1478 110.402 27.9926 110.174 27.7646C109.985 27.57 109.845 27.333 109.766 27.0735C108.338 28.1191 106.614 28.6831 104.845 28.6839ZM104.845 15.244C104.202 15.2468 103.567 15.3895 102.985 15.6621C102.41 15.9283 101.89 16.2999 101.451 16.7576C101.014 17.2235 100.663 17.7629 100.414 18.3508C100.154 18.9542 100.021 19.6048 100.024 20.2619C100.018 20.9293 100.151 21.5906 100.414 22.2041C100.666 22.7968 101.017 23.3425 101.451 23.818C101.886 24.2807 102.406 24.656 102.982 24.9239C103.571 25.1927 104.211 25.3318 104.858 25.3318C105.506 25.3318 106.146 25.1927 106.735 24.9239C107.303 24.6601 107.819 24.2947 108.256 23.8457C108.692 23.3785 109.043 22.8381 109.292 22.249C109.551 21.6464 109.684 20.9972 109.683 20.3414C109.685 19.6687 109.552 19.0023 109.292 18.3819C109.046 17.7874 108.695 17.2419 108.256 16.7715C107.817 16.314 107.296 15.9425 106.721 15.6759C106.135 15.3995 105.496 15.2556 104.848 15.2543L104.845 15.244Z" fill={color}/>
    <path d="M126.195 28.684C125.05 28.6891 123.915 28.4609 122.861 28.0135C121.842 27.5854 120.912 26.9726 120.117 26.2061C119.328 25.4394 118.694 24.5276 118.25 23.5209C117.797 22.4646 117.562 21.3269 117.562 20.1773C117.562 19.0276 117.797 17.89 118.25 16.8337C118.925 15.29 120.038 13.978 121.45 13.0603C122.863 12.1426 124.514 11.6594 126.199 11.6706C126.9 11.6655 127.598 11.7585 128.272 11.9471C128.9 12.1325 129.504 12.3899 130.073 12.7143C130.644 13.0461 131.186 13.4253 131.694 13.8478C131.849 13.9757 132.005 14.107 132.157 14.2418C132.323 14.3878 132.457 14.5661 132.551 14.7658C132.646 14.9654 132.699 15.1822 132.706 15.403C132.713 15.6169 132.675 15.8298 132.595 16.0284C132.516 16.227 132.396 16.4071 132.243 16.5572L132.032 16.7715C131.715 17.0871 131.288 17.2674 130.841 17.2745C130.394 17.2816 129.961 17.1149 129.634 16.8095C129.314 16.5078 128.967 16.2359 128.597 15.9974C128.239 15.7688 127.855 15.5821 127.453 15.441C127.036 15.3016 126.598 15.2327 126.157 15.2371C125.495 15.2335 124.839 15.3652 124.229 15.6241C123.631 15.8735 123.086 16.2335 122.622 16.6851C122.161 17.1339 121.796 17.671 121.547 18.2644C121.285 18.8817 121.152 19.5463 121.157 20.217C121.153 20.8719 121.29 21.52 121.558 22.1178C121.82 22.7031 122.186 23.236 122.639 23.6902C123.096 24.1419 123.636 24.501 124.229 24.7477C124.44 24.841 124.658 24.9162 124.882 24.9723C125.242 25.0692 125.612 25.118 125.985 25.1175C127.113 25.0964 128.204 24.7108 129.095 24.0185C129.244 23.9045 129.392 23.787 129.534 23.6729C129.893 23.3723 130.347 23.2072 130.816 23.2064C131.327 23.2058 131.818 23.407 132.181 23.7662C132.343 23.9231 132.47 24.112 132.555 24.3209C132.639 24.5298 132.679 24.754 132.672 24.9792C132.666 25.2077 132.613 25.4324 132.516 25.6394C132.419 25.8464 132.28 26.031 132.108 26.1819C131.977 26.2959 131.846 26.41 131.711 26.5275C131.197 26.9475 130.648 27.3221 130.069 27.6472C129.502 27.9731 128.897 28.2306 128.269 28.4144C127.594 28.6009 126.896 28.6916 126.195 28.684Z" fill={color}/>
    <path d="M273.624 28.4489C273.155 28.4582 272.702 28.2817 272.364 27.9579C272.025 27.6341 271.828 27.1894 271.816 26.721V7.36801C271.845 6.90797 272.048 6.47609 272.383 6.1604C272.719 5.8447 273.163 5.66895 273.624 5.66895C274.085 5.66895 274.528 5.8447 274.864 6.1604C275.2 6.47609 275.403 6.90797 275.431 7.36801V26.721C275.419 27.1894 275.223 27.6341 274.884 27.9579C274.545 28.2817 274.092 28.4582 273.624 28.4489Z" fill={color}/>
    <path d="M232.51 28.5872C231.751 28.604 230.997 28.4737 230.288 28.2036C229.632 27.9352 229.035 27.5396 228.533 27.0395C228.03 26.5395 227.632 25.945 227.36 25.2903C227.093 24.5941 226.969 23.8514 226.994 23.1061V15.3995H225.114C224.635 15.3995 224.175 15.2091 223.836 14.8701C223.497 14.5312 223.307 14.0714 223.307 13.5921C223.307 13.1127 223.497 12.653 223.836 12.314C224.175 11.9751 224.635 11.7847 225.114 11.7847H226.994V7.72398C227.014 7.25784 227.214 6.81756 227.551 6.49492C227.888 6.17228 228.337 5.99219 228.803 5.99219C229.27 5.99219 229.718 6.17228 230.055 6.49492C230.393 6.81756 230.592 7.25784 230.612 7.72398V11.7847H232.527C233.006 11.7847 233.466 11.9751 233.805 12.314C234.144 12.653 234.334 13.1127 234.334 13.5921C234.334 14.0714 234.144 14.5312 233.805 14.8701C233.466 15.2091 233.006 15.3995 232.527 15.3995H230.612V23.1061C230.6 23.3619 230.647 23.617 230.749 23.8518C230.85 24.0867 231.005 24.2951 231.2 24.4609C231.691 24.8158 232.288 24.9958 232.893 24.9723H233.045C234.473 25.0967 234.524 26.3927 234.486 26.88C234.417 27.7681 233.854 28.5146 232.928 28.5837L232.51 28.5872Z" fill={color}/>
    <path d="M145.462 28.5178C144.704 28.5335 143.949 28.4021 143.24 28.1307C142.585 27.8639 141.988 27.4701 141.485 26.9719C140.982 26.4737 140.583 25.8809 140.31 25.2278C140.051 24.5263 139.933 23.7805 139.964 23.0333V15.3267H138.063C137.584 15.3267 137.124 15.1362 136.785 14.7973C136.446 14.4583 136.256 13.9986 136.256 13.5192C136.256 13.0399 136.446 12.5802 136.785 12.2412C137.124 11.9022 137.584 11.7118 138.063 11.7118H139.964V7.6546C139.964 7.41724 140.011 7.18221 140.102 6.96292C140.192 6.74364 140.326 6.54439 140.493 6.37655C140.661 6.20872 140.861 6.07558 141.08 5.98475C141.299 5.89392 141.534 5.84717 141.771 5.84717C142.009 5.84717 142.244 5.89392 142.463 5.98475C142.682 6.07558 142.882 6.20872 143.05 6.37655C143.217 6.54439 143.35 6.74364 143.441 6.96292C143.532 7.18221 143.579 7.41724 143.579 7.6546V11.7118H145.493C145.731 11.7118 145.966 11.7586 146.185 11.8494C146.404 11.9402 146.604 12.0734 146.772 12.2412C146.939 12.409 147.072 12.6083 147.163 12.8276C147.254 13.0469 147.301 13.2819 147.301 13.5192C147.301 13.7566 147.254 13.9916 147.163 14.2109C147.072 14.4302 146.939 14.6295 146.772 14.7973C146.604 14.9651 146.404 15.0983 146.185 15.1891C145.966 15.2799 145.731 15.3267 145.493 15.3267H143.579V23.0333C143.567 23.2893 143.615 23.5445 143.717 23.7793C143.819 24.0142 143.974 24.2224 144.17 24.388C144.661 24.7444 145.257 24.9246 145.863 24.8995H146.029C147.446 25.131 147.394 26.3371 147.36 26.8244C147.284 27.7126 146.824 28.4349 145.898 28.504L145.462 28.5178Z" fill={color}/>
    <path d="M208.809 28.5422C208.571 28.5437 208.335 28.4976 208.116 28.4067C207.896 28.3158 207.696 28.1819 207.529 28.0129C207.362 27.8439 207.23 27.6432 207.141 27.4226C207.052 27.2019 207.008 26.9657 207.012 26.7279V13.6957C207.008 13.4578 207.051 13.2214 207.14 13.0005C207.229 12.7797 207.361 12.5788 207.528 12.4097C207.695 12.2406 207.895 12.1068 208.115 12.016C208.335 11.9253 208.571 11.8795 208.809 11.8814C209.146 11.8809 209.477 11.974 209.764 12.1503C210.052 12.3267 210.284 12.5793 210.437 12.8802C211.473 12.2308 212.67 11.8848 213.893 11.8814C214.801 11.8841 215.7 12.0658 216.538 12.4161C217.376 12.7664 218.136 13.2784 218.776 13.9229C219.416 14.5674 219.923 15.3317 220.268 16.1721C220.612 17.0125 220.787 17.9126 220.784 18.8208V26.7244C220.79 27.1986 220.608 27.656 220.278 27.9962C219.947 28.3364 219.495 28.5315 219.021 28.5388C218.547 28.5238 218.096 28.3272 217.762 27.9896C217.429 27.652 217.237 27.1991 217.228 26.7244V18.8208C217.222 18.386 217.131 17.9566 216.96 17.557C216.788 17.1574 216.54 16.7954 216.229 16.4919C215.917 16.1883 215.549 15.949 215.146 15.7876C214.742 15.6263 214.31 15.5461 213.875 15.5516C213.448 15.551 213.025 15.6358 212.631 15.8011C212.237 15.9664 211.88 16.2087 211.581 16.514C211.282 16.8192 211.046 17.1811 210.889 17.5784C210.732 17.9758 210.656 18.4005 210.665 18.8277V26.7244C210.672 26.8426 210.652 26.961 210.606 27.07C210.512 27.4796 210.284 27.8463 209.959 28.1126C209.634 28.379 209.229 28.5301 208.809 28.5422Z" fill={color}/>
    <path d="M52.5086 28.5731C52.2715 28.5745 52.0365 28.5286 51.8174 28.4381C51.5982 28.3476 51.3993 28.2143 51.2323 28.046C51.0653 27.8777 50.9335 27.6778 50.8447 27.4579C50.7559 27.2381 50.7118 27.0027 50.715 26.7657V13.7992C50.7118 13.5621 50.7559 13.3267 50.8447 13.1069C50.9335 12.8871 51.0653 12.6871 51.2323 12.5188C51.3993 12.3505 51.5982 12.2172 51.8174 12.1267C52.0365 12.0362 52.2715 11.9903 52.5086 11.9917C52.8454 11.9909 53.1759 12.0835 53.4632 12.2592C53.7506 12.4349 53.9836 12.6868 54.1363 12.987C55.1688 12.3444 56.3589 11.9999 57.575 11.9917C59.4081 11.9917 61.1661 12.7199 62.4623 14.0161C63.7585 15.3124 64.4867 17.0704 64.4867 18.9035V26.7622C64.4914 27.2352 64.3086 27.6908 63.9783 28.0295C63.6481 28.3682 63.1972 28.5623 62.7242 28.5696C62.2503 28.5564 61.7997 28.3613 61.4658 28.0248C61.1318 27.6883 60.9402 27.2362 60.9306 26.7622V18.9001C60.9197 18.025 60.562 17.1901 59.9361 16.5784C59.3103 15.9668 58.4673 15.6285 57.5922 15.6377C57.1662 15.6372 56.7444 15.7216 56.3515 15.886C55.9585 16.0505 55.6023 16.2917 55.3037 16.5954C55.005 16.8992 54.77 17.2595 54.6123 17.6552C54.4546 18.0509 54.3773 18.4741 54.3852 18.9001V26.7622C54.3928 26.8804 54.3726 26.9987 54.3264 27.1078C54.2296 27.5194 53.9983 27.8871 53.669 28.1525C53.3398 28.4178 52.9314 28.5659 52.5086 28.5731Z" fill={color}/>
    <path d="M180.742 15.9319C180.709 13.2521 179.625 10.6925 177.723 8.80428C175.821 6.91602 173.254 5.85012 170.574 5.83608C167.894 5.82203 165.316 6.86097 163.395 8.72918C161.473 10.5974 160.362 13.1455 160.301 15.8247V15.9492L160.318 18.0711V24.5025C160.319 24.9713 160.504 25.4208 160.834 25.7539C161.164 26.087 161.612 26.2768 162.081 26.2823H162.191C162.662 26.2795 163.112 26.0909 163.444 25.7575C163.776 25.4242 163.963 24.973 163.964 24.5025V17.0931L163.988 15.5655C164.065 13.8523 164.811 12.2378 166.067 11.0698C167.323 9.90188 168.987 9.27406 170.702 9.32165C172.416 9.36925 174.043 10.0884 175.232 11.3243C176.421 12.5601 177.077 14.2136 177.058 15.9284C177.058 15.9975 177.058 16.0597 177.058 16.1289V21.0051V25.2559V26.8076C177.062 27.0448 177.113 27.2788 177.208 27.4962C177.303 27.7136 177.44 27.9101 177.612 28.0742C177.783 28.2384 177.985 28.367 178.206 28.4527C178.427 28.5384 178.663 28.5795 178.9 28.5735C179.138 28.5818 179.375 28.5424 179.597 28.4576C179.82 28.3727 180.023 28.2442 180.194 28.0796C180.366 27.9149 180.503 27.7175 180.597 27.4991C180.691 27.2806 180.741 27.0454 180.742 26.8076V16.5608C180.739 16.4891 180.732 16.4176 180.722 16.3466C180.718 16.2083 180.742 16.0701 180.742 15.9319Z" fill={color}/>
    <path d="M170.593 14.1106H170.468C170.235 14.1115 170.003 14.1585 169.788 14.2488C169.573 14.3391 169.377 14.471 169.213 14.637C169.049 14.8029 168.919 14.9997 168.83 15.2159C168.742 15.4322 168.697 15.6637 168.699 15.8973V24.6303C168.62 26.3348 167.878 27.9409 166.63 29.1051C165.383 30.2693 163.729 30.8991 162.024 30.8598C160.318 30.8205 158.695 30.1153 157.502 28.8949C156.31 27.6745 155.642 26.036 155.642 24.3297V16.0977V13.9965C155.639 13.7595 155.588 13.5255 155.494 13.3082C155.399 13.0908 155.262 12.8943 155.091 12.7301C154.92 12.5659 154.719 12.4372 154.498 12.3514C154.277 12.2657 154.041 12.2246 153.804 12.2306C153.566 12.2222 153.33 12.2617 153.108 12.3466C152.886 12.4316 152.683 12.5602 152.512 12.7249C152.341 12.8897 152.205 13.0871 152.111 13.3056C152.018 13.524 151.97 13.759 151.969 13.9965V16.0977V24.5888C151.971 24.6734 151.979 24.7576 151.993 24.8411C152.104 27.4283 153.197 29.8759 155.049 31.6861C156.901 33.4962 159.373 34.5329 161.962 34.5853C164.551 34.6377 167.063 33.7018 168.986 31.9681C170.91 30.2344 172.101 27.833 172.317 25.2524C172.345 24.6372 172.365 23.3413 172.365 23.3413V15.8973C172.366 15.4255 172.18 14.9726 171.848 14.6378C171.516 14.3029 171.064 14.1133 170.593 14.1106Z" fill={color}/>
    <path d="M240.413 28.4939C240.173 28.4957 239.936 28.4498 239.715 28.3588C239.494 28.2678 239.293 28.1336 239.124 27.9639C238.956 27.7943 238.823 27.5927 238.733 27.371C238.643 27.1492 238.598 26.9118 238.602 26.6726V13.7027C238.598 13.4635 238.643 13.226 238.733 13.0043C238.823 12.7826 238.956 12.581 239.124 12.4113C239.293 12.2417 239.494 12.1074 239.715 12.0165C239.936 11.9255 240.173 11.8795 240.413 11.8814C240.749 11.8791 241.08 11.9698 241.369 12.1436C241.657 12.3174 241.892 12.5675 242.047 12.8663C243.081 12.2299 244.269 11.8892 245.482 11.8814C246.165 11.8882 246.842 12.0049 247.487 12.227C247.72 12.2922 247.936 12.4045 248.124 12.5569C248.312 12.7094 248.466 12.8987 248.577 13.1131C248.689 13.3276 248.755 13.5627 248.772 13.8038C248.789 14.0449 248.756 14.2869 248.676 14.5148L248.586 14.7394C248.444 15.0537 248.214 15.3195 247.922 15.5038C247.631 15.6881 247.292 15.7829 246.948 15.7762C246.781 15.7761 246.616 15.7516 246.457 15.7036C246.14 15.6067 245.81 15.5577 245.479 15.5585C244.62 15.5784 243.804 15.936 243.206 16.5538C242.609 17.1716 242.28 17.9997 242.289 18.8588V26.6692C242.294 26.7882 242.27 26.9067 242.22 27.0147C242.129 27.4284 241.901 27.7992 241.573 28.0675C241.245 28.3358 240.836 28.486 240.413 28.4939Z" fill={color}/>
    <path d="M85.3269 28.5283C85.0884 28.5288 84.8523 28.4818 84.6322 28.3899C84.4122 28.298 84.2126 28.1632 84.0453 27.9933C83.8779 27.8234 83.7462 27.6218 83.6577 27.4004C83.5692 27.1789 83.5257 26.9421 83.5299 26.7036V13.592C83.5239 13.3522 83.5659 13.1137 83.6535 12.8905C83.7412 12.6672 83.8726 12.4638 84.0401 12.2921C84.2075 12.1205 84.4077 11.9841 84.6287 11.891C84.8497 11.7979 85.0871 11.7499 85.3269 11.75C85.6682 11.7526 86.0019 11.8512 86.2897 12.0345C86.5776 12.2179 86.808 12.4786 86.9546 12.7868C87.9815 12.1268 89.1727 11.7677 90.3933 11.75C91.0983 11.7557 91.798 11.8723 92.4668 12.0956C92.6913 12.1591 92.8982 12.2731 93.0719 12.4288C93.2456 12.5845 93.3814 12.7779 93.469 12.9941C93.6434 13.4349 93.6665 13.9211 93.5347 14.3765L93.4414 14.6046C93.3104 14.9176 93.0901 15.1852 92.808 15.3739C92.5259 15.5626 92.1945 15.664 91.8551 15.6655C91.69 15.6656 91.5258 15.6412 91.3678 15.5929C91.0496 15.4965 90.7189 15.4476 90.3863 15.4478C89.518 15.4713 88.694 15.8367 88.0934 16.4644C87.4929 17.0921 87.1644 17.9314 87.1793 18.8V26.7002C87.1833 26.8195 87.1584 26.9381 87.1067 27.0458C87.0216 27.4578 86.7992 27.8288 86.4759 28.0981C86.1526 28.3674 85.7476 28.5191 85.3269 28.5283Z" fill={color}/>
    <path d="M258.732 28.494C257.614 28.4937 256.508 28.2582 255.487 27.8028C254.488 27.3663 253.581 26.7435 252.815 25.9677C252.052 25.1899 251.436 24.2801 250.998 23.2825C250.551 22.2674 250.32 21.1706 250.32 20.0616C250.32 18.9526 250.551 17.8557 250.998 16.8407C251.44 15.8462 252.062 14.9417 252.833 14.1727C253.605 13.3989 254.516 12.7765 255.518 12.3377C256.53 11.8906 257.624 11.6597 258.73 11.6597C259.836 11.6597 260.931 11.8906 261.942 12.3377C262.942 12.7795 263.852 13.4002 264.628 14.1693C265.397 14.9372 266.015 15.8436 266.449 16.8407C266.896 17.8581 267.126 18.9573 267.126 20.0685C267.126 21.1797 266.896 22.2788 266.449 23.2963C266.012 24.2949 265.396 25.205 264.631 25.9815C263.865 26.7573 262.959 27.3801 261.96 27.8166C260.943 28.265 259.843 28.4957 258.732 28.494ZM258.732 15.2061C258.095 15.2054 257.465 15.3385 256.883 15.5966C256.303 15.8517 255.777 16.214 255.331 16.6644C254.89 17.1178 254.532 17.6454 254.274 18.223C254.013 18.8092 253.88 19.4442 253.883 20.0858C253.882 20.716 254.015 21.3392 254.274 21.9139C254.531 22.4921 254.889 23.0199 255.331 23.4725C255.776 23.9233 256.302 24.2846 256.883 24.537C257.465 24.7961 258.095 24.9303 258.732 24.9309C259.367 24.9329 259.995 24.7986 260.574 24.537C261.149 24.2799 261.67 23.9177 262.112 23.4691C262.554 23.0164 262.912 22.4886 263.169 21.9105C263.429 21.336 263.563 20.7128 263.563 20.0823C263.566 19.4405 263.432 18.8054 263.169 18.2196C262.911 17.6419 262.553 17.1143 262.112 16.661C261.67 16.2136 261.148 15.8526 260.574 15.5966C259.995 15.336 259.367 15.2029 258.732 15.2061Z" fill={color}/>
    <path d="M37.5557 28.7014C36.4295 28.703 35.3156 28.4675 34.2865 28.0102C33.2806 27.5691 32.3671 26.9418 31.5943 26.1613C30.8244 25.3788 30.2047 24.4616 29.7662 23.4553C29.315 22.4329 29.082 21.3277 29.082 20.2102C29.082 19.0927 29.315 17.9875 29.7662 16.9652C30.667 14.9431 32.29 13.3299 34.3176 12.4414C35.3362 11.9944 36.4365 11.7637 37.5488 11.7637C38.6612 11.7637 39.7615 11.9944 40.7801 12.4414C41.7843 12.8833 42.7 13.504 43.4826 14.273C44.2631 15.0458 44.8904 15.9593 45.3315 16.9652C45.788 17.9946 46.0235 19.1083 46.0227 20.2344C46.0217 21.3492 45.7862 22.4513 45.3315 23.4691C44.8908 24.4752 44.2701 25.3922 43.4999 26.1751C42.7277 26.9547 41.8155 27.582 40.8112 28.024C39.785 28.474 38.6762 28.7047 37.5557 28.7014ZM37.5557 15.3098C36.9138 15.3102 36.2792 15.4456 35.693 15.7072C35.1075 15.9625 34.5761 16.3273 34.1275 16.782C33.6818 17.2385 33.3213 17.771 33.0631 18.3544C32.798 18.9443 32.6625 19.5842 32.6656 20.231C32.6659 20.8673 32.8014 21.4964 33.0631 22.0764C33.3235 22.6576 33.6837 23.1886 34.1275 23.6454C34.5755 24.1008 35.107 24.4657 35.693 24.7202C36.2792 24.9817 36.9138 25.1171 37.5557 25.1176C38.1906 25.1169 38.8181 24.9826 39.3977 24.7236C39.9765 24.4639 40.5016 24.0982 40.946 23.6454C41.3915 23.1893 41.753 22.6582 42.0138 22.0764C42.2749 21.4963 42.4092 20.8671 42.4078 20.231C42.4121 19.5845 42.2777 18.9446 42.0138 18.3544C41.7531 17.7716 41.3916 17.2393 40.946 16.782C40.5018 16.3299 39.9766 15.9653 39.3977 15.7072C38.8187 15.446 38.1909 15.3106 37.5557 15.3098Z" fill={color}/>
    <path d="M193.875 28.5424C192.75 28.5437 191.637 28.3082 190.609 27.8512C189.602 27.4126 188.688 26.785 187.917 26.0023C187.148 25.2198 186.527 24.3041 186.085 23.2998C185.636 22.2769 185.404 21.1719 185.404 20.0547C185.404 18.9376 185.636 17.8326 186.085 16.8097C186.983 14.7812 188.608 13.1624 190.64 12.2721C191.659 11.8209 192.762 11.5879 193.877 11.5879C194.991 11.5879 196.094 11.8209 197.113 12.2721C198.119 12.7131 199.036 13.3338 199.819 14.1037C200.6 14.8746 201.228 15.787 201.668 16.7924C202.117 17.8183 202.349 18.9262 202.349 20.0461C202.349 21.166 202.117 22.2738 201.668 23.2998C201.226 24.3041 200.605 25.2198 199.836 26.0023C199.065 26.785 198.151 27.4126 197.144 27.8512C196.115 28.3085 195.001 28.544 193.875 28.5424ZM193.875 15.1508C193.232 15.1522 192.596 15.2888 192.009 15.5517C191.425 15.8095 190.895 16.1753 190.447 16.6299C190.002 17.0837 189.642 17.6126 189.382 18.192C189.118 18.7822 188.982 19.4219 188.985 20.0686C188.984 20.705 189.12 21.3342 189.382 21.914C189.638 22.503 189.998 23.0405 190.447 23.5003C190.894 23.9556 191.424 24.3215 192.009 24.5785C192.597 24.8331 193.233 24.9614 193.875 24.9552C194.511 24.9574 195.14 24.823 195.72 24.5612C196.299 24.3087 196.824 23.9487 197.268 23.5003C197.714 23.0447 198.074 22.5134 198.333 21.9313C198.596 21.3516 198.731 20.7223 198.73 20.0858C198.733 19.4391 198.598 18.7993 198.333 18.2093C198.074 17.6272 197.714 17.0959 197.268 16.6403C196.824 16.1834 196.298 15.8142 195.717 15.5517C195.138 15.288 194.51 15.1513 193.875 15.1508Z" fill={color}/>
    <path d="M76.8717 28.4628C76.1116 28.4809 75.3554 28.3494 74.6461 28.0757C73.9906 27.8074 73.3946 27.4122 72.8922 26.9128C72.3899 26.4134 71.9912 25.8198 71.719 25.1659C71.4517 24.4697 71.3272 23.727 71.3526 22.9817V15.2751H69.4623C68.9961 15.2547 68.5558 15.0552 68.2332 14.7182C67.9106 14.3811 67.7305 13.9325 67.7305 13.4659C67.7305 12.9994 67.9106 12.5508 68.2332 12.2137C68.5558 11.8767 68.9961 11.6772 69.4623 11.6568H71.3423V7.60303C71.3423 7.11909 71.5345 6.65496 71.8767 6.31277C72.2189 5.97057 72.683 5.77832 73.167 5.77832C73.6509 5.77832 74.115 5.97057 74.4572 6.31277C74.7994 6.65496 74.9917 7.11909 74.9917 7.60303V11.6568H76.9062C77.3724 11.6772 77.8127 11.8767 78.1353 12.2137C78.458 12.5508 78.638 12.9994 78.638 13.4659C78.638 13.9325 78.458 14.3811 78.1353 14.7182C77.8127 15.0552 77.3724 15.2547 76.9062 15.2751H74.9917V22.9817C74.9802 23.2373 75.0271 23.4922 75.1289 23.727C75.2307 23.9617 75.3847 24.1702 75.5792 24.3364C76.0706 24.6913 76.6668 24.8714 77.2726 24.8479H77.4385C78.8554 25.0829 78.8208 26.289 78.769 26.7728C78.6964 27.661 78.2333 28.3833 77.3071 28.4524L76.8717 28.4628Z" fill={color}/>
  </svg>
);

const Icon = ({ name, size = 16, stroke = 1.6 }) => {
  const props = {
    width: size, height: size, viewBox: "0 0 24 24",
    fill: "none", stroke: "currentColor", strokeWidth: stroke,
    strokeLinecap: "round", strokeLinejoin: "round"
  };
  const paths = {
    chevron: <polyline points="6 9 12 15 18 9" />,
    arrow: <><line x1="5" y1="12" x2="19" y2="12" /><polyline points="12 5 19 12 12 19" /></>,
    intake: <><path d="M3 7h18" /><path d="M3 12h12" /><path d="M3 17h18" /></>,
    drafting: <><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" /><polyline points="14 2 14 8 20 8" /></>,
    review: <><circle cx="11" cy="11" r="7" /><line x1="21" y1="21" x2="16.65" y2="16.65" /></>,
    negotiation: <><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" /><circle cx="8.5" cy="7" r="4" /><path d="M20 8v6" /><path d="M23 11h-6" /></>,
    sign: <><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25z" /><path d="m14.06 6.19 3.75 3.75" /></>,
    repository: <><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" /><polyline points="3.27 6.96 12 12.01 20.73 6.96" /></>,
    analytics: <><line x1="12" y1="20" x2="12" y2="10" /><line x1="18" y1="20" x2="18" y2="4" /><line x1="6" y1="20" x2="6" y2="14" /></>,
    obligations: <><circle cx="12" cy="12" r="10" /><polyline points="12 6 12 12 16 14" /></>,
    dataroom: <><rect x="3" y="3" width="18" height="18" rx="2" /><path d="M3 9h18" /><path d="M9 21V9" /></>,
    docs: <><rect x="3" y="3" width="7" height="7" /><rect x="14" y="3" width="7" height="7" /><rect x="14" y="14" width="7" height="7" /><rect x="3" y="14" width="7" height="7" /></>,
    legal: <><path d="M3 6h18" /><path d="M16 10a4 4 0 0 1-8 0" /><path d="M12 2v4" /></>,
    permission: <><rect x="3" y="11" width="18" height="11" rx="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" /></>,
    workspace: <><rect x="3" y="3" width="18" height="18" rx="2" /><path d="M9 3v18M3 9h18" /></>,
    clickwrap: <><rect x="4" y="4" width="16" height="16" rx="2" /><path d="m9 12 2 2 4-4" /></>,
    "complaint-hub": <><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" /><line x1="12" y1="7" x2="12" y2="11" /><line x1="12" y1="14" x2="12.01" y2="14" /></>,
    bulk: <><rect x="9" y="9" width="11" height="11" rx="2" /><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" /></>,
    dealroom: <><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" /><circle cx="9" cy="7" r="4" /><path d="M23 21v-2a4 4 0 0 0-3-3.87" /><path d="M16 3.13a4 4 0 0 1 0 7.75" /></>,
    play: <polygon points="6 4 20 12 6 20 6 4" />
  };
  return <svg {...props}>{paths[name]}</svg>;
};

const solutionsItems = {
  "By team": [
  { icon: "legal", title: "Legal", desc: "Stop being the bottleneck", href: "/solutions/team/legal" },
  { icon: "negotiation", title: "Sales", desc: "Close on your timeline", href: "/solutions/team/sales" },
  { icon: "obligations", title: "Procurement", desc: "Negotiate from leverage", href: "/solutions/team/procurement" },
  { icon: "workspace", title: "HR & People", desc: "Hire faster, onboard cleaner", href: "/solutions/team/hr" },
  { icon: "analytics", title: "Finance", desc: "Lock in revenue, plug leakage", href: "/solutions/team/finance" }],

  "By industry": [
  { icon: "repository", title: "SaaS & Software", desc: "MSAs, DPAs, order forms", href: "/solutions/industry/saas-software" },
  { icon: "dataroom", title: "Financial Services", desc: "DORA, MiFID, compliance-ready", href: "/solutions/industry/financial-services" },
  { icon: "drafting", title: "Real Estate", desc: "Leases, deeds, and property contracts", href: "/solutions/industry/real-estate" }]

};

const useCasesItems = [
  { icon: "analytics", title: "Contract monitoring", desc: "Centralize your contracts on a secure platform with automatic reminders.", href: "/solutions/use-cases/contract-monitoring" },
  { icon: "permission", title: "Autonomy and control", desc: "Simplify contract management with automated workflows and approvals.", href: "/solutions/use-cases/autonomy-control" },
  { icon: "negotiation", title: "Collaborative negotiation", desc: "Save time by reducing the number of e-mails and round-trips, and gain greater flexibility.", href: "/solutions/use-cases/collaborative-negotiation" }
];


const resourcesItems = {
  "Learn": [
  { icon: "docs", title: "Blog", desc: "Playbooks, opinion, product news", href: "/blog" },
  { icon: "review", title: "Guides", desc: "Deep dives on CLM done right", href: "/guides" },
  { icon: "analytics", title: "Webinars", desc: "Live sessions & on-demand replays", href: "/webinars" },
  { icon: "workspace", title: "Customer stories", desc: "How teams put us to work", href: "/customers" }],

  "Tools": [
  { icon: "obligations", title: "Contract templates", desc: "Free MSAs, NDAs, DPAs, SOWs", href: "/templates" },
  { icon: "negotiation", title: "Glossary", desc: "CLM terms in plain language", href: "/glossary" }]

};

const companyItems = {
  "About us": [
  { icon: "workspace", title: "About ContractControl", desc: "Mission, principles, team", href: "/company" },
  { icon: "legal", title: "Careers", desc: "Come build the future of contracts with us", href: "https://jobs.simplesign.io/" },
  { icon: "docs", title: "Press & brand", desc: "Logos, screenshots, press kit", href: "/press" },
  { icon: "negotiation", title: "Contact", desc: "Sales, support, partnerships", href: "/contact" }],

  "Trust & policy": [
  { icon: "permission", title: "Security", desc: "SOC 2, ISO 27001, EU-only", href: "/security" },
  { icon: "obligations", title: "Trust Center", desc: "Live status, audits, DPA", href: "/security" }]

};

const platformItems = {
  "The lifecycle": [
  { icon: "intake", title: "Intake", desc: "Self-serve request portal", href: "/platform/intake" },
  { icon: "drafting", title: "Drafting", desc: "First drafts in 60 seconds", href: "/platform/drafting" },
  { icon: "review", title: "Review", desc: "Redlines on third-party paper", href: "/platform/review" },
  { icon: "negotiation", title: "Negotiation", desc: "Counterparty collaboration", href: "/platform/negotiation" }],

  " ": [
  { icon: "sign", title: "eSignature", desc: "eIDAS AES & QES", href: "/platform/esignature" },
  { icon: "repository", title: "Repository", desc: "Search every contract", href: "/platform/repository" },
  { icon: "obligations", title: "Obligations", desc: "Renewals & alerts", href: "/platform/obligations" },
  { icon: "analytics", title: "Analytics", desc: "Cycle time & bottlenecks", href: "/platform/analytics" }],

  "Power modules": [
  { icon: "dataroom", title: "Dataroom", desc: "Secure deal & due diligence rooms", href: "/platform/power-modules/dataroom", badge: "Coming soon" },
  { icon: "legal", title: "Legal Hub", desc: "Contract risk & playbooks", href: "/platform/power-modules/legal-hub", badge: "Coming soon" },
  { icon: "review", title: "Unlimited Viewer", desc: "Free read-only seats for everyone", href: "/platform/power-modules/unlimited-viewer" },
  { icon: "docs", title: "Document Hub", desc: "One home for every file", href: "/platform/power-modules/document-hub" },
  { icon: "permission", title: "Advanced Permissions", desc: "Granular access control", href: "/platform/power-modules/permissions" },
  { icon: "workspace", title: "Workspaces", desc: "Team & entity workspaces", href: "/platform/power-modules/workspaces" }]

};

function MegaTrigger({ id, label, href, current, items, feature, useCases, open, enter, leave, cols = 2 }) {
  return (
    <div onMouseEnter={() => enter(id)} onMouseLeave={leave}>
      {href ? (
        <a className="nav-link" href={href} style={{ opacity: current ? 0.5 : undefined }}>
          {label} <Icon name="chevron" size={14} />
        </a>
      ) : (
        <span className="nav-link" style={{ cursor: "default", opacity: current ? 0.5 : undefined }}>
          {label} <Icon name="chevron" size={14} />
        </span>
      )}
      <div className={"mega" + (open === id ? " open" : "")}>
        <div className="mega-grid" style={{ gridTemplateColumns: (feature || useCases) ? `repeat(${Object.keys(items).length}, 1fr) 0.9fr` : `repeat(${Object.keys(items).length}, 1fr)` }}>
          {Object.entries(items).map(([col, list]) =>
          <div className="mega-col" key={col}>
              <h5 style={{ visibility: col.trim() === "" ? "hidden" : undefined }}>{col}</h5>
              {list.map((it) =>
                it.disabled ? (
                  <div className="mega-item" key={it.title} style={{ cursor: "default", opacity: 0.65, pointerEvents: "none" }}>
                    <span className="ic"><Icon name={it.icon} size={15} /></span>
                    <div style={{ flex: 1 }}>
                      <div className="t" style={{ display: "flex", alignItems: "center", gap: 7 }}>
                        {it.title}
                        {it.badge && <span style={{ fontSize: 10, fontWeight: 600, letterSpacing: "0.04em", padding: "2px 7px", borderRadius: 99, background: "var(--accent-soft)", color: "var(--accent)", border: "1px solid rgba(110,86,207,0.2)", lineHeight: 1.5 }}>{it.badge}</span>}
                      </div>
                      <div className="d">{it.desc}</div>
                    </div>
                  </div>
                ) : (
                  <a className="mega-item" key={it.title} href={it.href || "#"}>
                    <span className="ic"><Icon name={it.icon} size={15} /></span>
                    <div style={{ flex: 1 }}>
                      <div className="t" style={{ display: "flex", alignItems: "center", gap: 7 }}>
                        {it.title}
                        {it.badge && <span style={{ fontSize: 10, fontWeight: 600, letterSpacing: "0.04em", padding: "2px 7px", borderRadius: 99, background: "var(--accent-soft)", color: "var(--accent)", border: "1px solid rgba(110,86,207,0.2)", lineHeight: 1.5 }}>{it.badge}</span>}
                      </div>
                      <div className="d">{it.desc}</div>
                    </div>
                  </a>
                )
              )}
              {col === "Power modules" && (
                <a href="/platform/power-modules" style={{ display: "inline-flex", alignItems: "center", gap: 5, marginTop: 10, fontSize: 13, fontWeight: 500, color: "var(--accent)", textDecoration: "none", paddingLeft: 2 }}>
                  All Power Modules <Icon name="arrow" size={12} />
                </a>
              )}
            </div>
          )}
          {feature &&
          <div className="mega-feature">
              <div className="eyebrow no-dot" style={{ color: "var(--accent)" }}>{feature.eyebrow}</div>
              <div style={{ fontSize: 16, fontWeight: 500, lineHeight: 1.3, marginTop: 4 }}>{feature.title}</div>
              <div style={{ fontSize: 12.5, color: "var(--ink-3)", lineHeight: 1.5 }}>{feature.desc}</div>
              <a href={feature.href || "#"} style={{ marginTop: "auto", paddingTop: 8, fontSize: 13, fontWeight: 500, color: "var(--accent)", display: "inline-flex", alignItems: "center", gap: 6 }}>
                {feature.cta} <Icon name="arrow" size={13} />
              </a>
            </div>
          }
          {useCases &&
          <div className="mega-use-cases" style={{ display: "flex", flexDirection: "column", gap: 16, paddingLeft: 24, borderLeft: "1px solid var(--line)" }}>
              <h5 style={{ fontSize: 11, fontWeight: 500, letterSpacing: "0.16em", textTransform: "uppercase", color: "var(--ink-4)", margin: "0 0 2px" }}>Use cases</h5>
              <div style={{ display: "flex", flexDirection: "column", gap: 14 }}>
                {useCases.map((uc) => (
                  <a key={uc.title} href={uc.href} className="mega-uc-item">
                    <div className="uc-title" style={{ fontSize: 13.5, fontWeight: 600, color: "var(--ink-1)", marginBottom: 3, transition: "color 140ms ease" }}>
                      {uc.title}
                    </div>
                    <div style={{ fontSize: 11.5, color: "var(--ink-3)", lineHeight: 1.45 }}>
                      {uc.desc}
                    </div>
                  </a>
                ))}
              </div>
            </div>
          }
        </div>
      </div>
    </div>);
}

function Nav({ current = "home", darkHero = false }) {
  const [open, setOpen] = React.useState(null); // 'platform' | null
  const [mobileOpen, setMobileOpen] = React.useState(false);
  const closeTimer = React.useRef(null);
  const [isDark, setIsDark] = React.useState(darkHero);

  const enter = (key) => {clearTimeout(closeTimer.current);setOpen(key);};
  const leave = () => {closeTimer.current = setTimeout(() => setOpen(null), 120);};

  // Scroll-aware dark/light switch: dark while nav overlaps any [data-dark] section
  React.useEffect(() => {
    const check = () => {
      const navEl = document.querySelector(".nav");
      if (!navEl) return;
      const navRect = navEl.getBoundingClientRect();
      const navMid = navRect.top + navRect.height / 2;
      // Check all sections marked with data-dark or that have dark hero backgrounds
      const darkSections = document.querySelectorAll("[data-dark]");
      let overDark = false;
      darkSections.forEach((sec) => {
        const r = sec.getBoundingClientRect();
        if (navMid >= r.top && navMid <= r.bottom) overDark = true;
      });
      // Also check darkHero: first section on pages with dark heroes
      if (darkHero && !overDark) {
        const hero = document.querySelector("#root > main > section:first-of-type");
        if (hero) {
          const heroBottom = hero.getBoundingClientRect().bottom;
          if (heroBottom > navMid) overDark = true;
        }
      }
      setIsDark(overDark);
    };
    check();
    window.addEventListener("scroll", check, { passive: true });
    return () => window.removeEventListener("scroll", check);
  }, [darkHero]);

  const orgSchema = {
    "@context": "https://schema.org",
    "@type": "Organization",
    "name": "ContractControl",
    "url": "https://www.contractcontrol.co",
    "logo": "https://www.contractcontrol.co/logo.svg",
    "description": "A modern Contract Lifecycle Management (CLM) platform that helps legal, procurement, finance, IT, and sales teams manage requests, drafting, review, negotiation, signing, and obligations.",
    "sameAs": [
      "https://twitter.com/contractcontrol",
      "https://www.linkedin.com/company/simple-sign/",
      "https://github.com/contractcontrol"
    ]
  };

  const productSchema = {
    "@context": "https://schema.org",
    "@type": "Product",
    "name": "ContractControl CLM Platform",
    "description": "Stop managing contracts in email and Word. ContractControl gives your team one place to intake, sign, renew and track obligations, from chaos to control.",
    "brand": {
      "@type": "Brand",
      "name": "ContractControl"
    },
    "offers": {
      "@type": "AggregateOffer",
      "priceCurrency": "EUR",
      "lowPrice": "49",
      "offerCount": "3",
      "url": "https://www.contractcontrol.co/pricing"
    }
  };

  // --- Page-level schema (auto-detected from URL) ---
  const path = window.location.pathname.replace(/\/index\.html$/, "").replace(/\.html$/, "").replace(/\/$/, "") || "/";
  const fullUrl = "https://www.contractcontrol.co" + path;

  // Inject/update canonical tag in <head>
  React.useEffect(() => {
    let link = document.querySelector('link[rel="canonical"]');
    if (!link) {
      link = document.createElement("link");
      link.setAttribute("rel", "canonical");
      document.head.appendChild(link);
    }
    link.setAttribute("href", fullUrl);
  }, [fullUrl]);
  const pageSchemas = [];

  // WebSite schema (homepage only)
  if (path === "/" || path === "") {
    pageSchemas.push({
      "@context": "https://schema.org",
      "@type": "WebSite",
      "name": "ContractControl",
      "url": "https://www.contractcontrol.co",
      "description": "A modern Contract Lifecycle Management (CLM) platform for legal, procurement, finance, and sales teams.",
      "publisher": { "@type": "Organization", "name": "ContractControl" },
      "potentialAction": {
        "@type": "SearchAction",
        "target": "https://www.contractcontrol.co/glossary?q={search_term_string}",
        "query-input": "required name=search_term_string"
      }
    });
  }

  // Article schema (blog posts)
  if (path.startsWith("/blog/") && path !== "/blog") {
    pageSchemas.push({
      "@context": "https://schema.org",
      "@type": "Article",
      "headline": document.title.split(" | ")[0] || document.title,
      "url": fullUrl,
      "datePublished": "2026-05-01",
      "dateModified": "2026-06-11",
      "author": { "@type": "Person", "name": "Johan Montelius Hedberg" },
      "publisher": {
        "@type": "Organization",
        "name": "ContractControl",
        "logo": { "@type": "ImageObject", "url": "https://www.contractcontrol.co/logo.svg" }
      },
      "mainEntityOfPage": { "@type": "WebPage", "@id": fullUrl }
    });
  }

  // Event schema (webinar detail pages)
  if (path.startsWith("/webinars/") && path !== "/webinars") {
    pageSchemas.push({
      "@context": "https://schema.org",
      "@type": "Event",
      "name": document.title.split(" | ")[0] || "ContractControl Webinar",
      "url": fullUrl,
      "startDate": "2026-08-28T15:00:00+02:00",
      "endDate": "2026-08-28T15:50:00+02:00",
      "eventAttendanceMode": "https://schema.org/OnlineEventAttendanceMode",
      "eventStatus": "https://schema.org/EventScheduled",
      "location": { "@type": "VirtualLocation", "url": fullUrl },
      "organizer": { "@type": "Organization", "name": "ContractControl", "url": "https://www.contractcontrol.co" },
      "offers": { "@type": "Offer", "price": "0", "priceCurrency": "EUR", "availability": "https://schema.org/InStock" }
    });
  }

  // SoftwareApplication for platform module pages
  const platformModules = {
    "/platform/intake": "Contract Intake",
    "/platform/drafting": "Contract Drafting",
    "/platform/negotiation": "Contract Negotiation",
    "/platform/review": "Contract Review",
    "/platform/esignature": "Electronic Signatures",
    "/platform/repository": "Contract Repository",
    "/platform/obligations": "Obligation Tracking",
    "/platform/analytics": "Contract Analytics",
    "/platform/workspaces": "Workspaces",
    "/platform/permissions": "Permissions",
    "/platform/dataroom": "Data Room",
    "/platform/document-hub": "Document Hub",
    "/platform/unlimited-viewer": "Unlimited Viewer",
  };
  if (platformModules[path]) {
    pageSchemas.push({
      "@context": "https://schema.org",
      "@type": "SoftwareApplication",
      "name": "ContractControl " + platformModules[path],
      "url": fullUrl,
      "applicationCategory": "BusinessApplication",
      "operatingSystem": "Web",
      "offers": { "@type": "AggregateOffer", "priceCurrency": "EUR", "lowPrice": "49", "url": "https://www.contractcontrol.co/pricing" },
      "publisher": { "@type": "Organization", "name": "ContractControl" }
    });
  }

  // BreadcrumbList for nested pages
  const segments = path.split("/").filter(Boolean);
  if (segments.length >= 1 && path !== "/" && path !== "") {
    const breadcrumbs = [{ "@type": "ListItem", "position": 1, "name": "Home", "item": "https://www.contractcontrol.co/" }];
    let built = "";
    segments.forEach((seg, i) => {
      built += "/" + seg;
      breadcrumbs.push({
        "@type": "ListItem",
        "position": i + 2,
        "name": seg.replace(/-/g, " ").replace(/\b\w/g, c => c.toUpperCase()),
        "item": "https://www.contractcontrol.co" + built
      });
    });
    pageSchemas.push({
      "@context": "https://schema.org",
      "@type": "BreadcrumbList",
      "itemListElement": breadcrumbs
    });
  }

  // Generic WebPage for all non-homepage, non-article, non-event pages
  if (!path.startsWith("/blog/") && !(path.startsWith("/webinars/") && path !== "/webinars") && path !== "/" && path !== "") {
    pageSchemas.push({
      "@context": "https://schema.org",
      "@type": "WebPage",
      "name": document.title.split(" | ")[0] || document.title,
      "url": fullUrl,
      "isPartOf": { "@type": "WebSite", "name": "ContractControl", "url": "https://www.contractcontrol.co" },
      "publisher": { "@type": "Organization", "name": "ContractControl" }
    });
  }

  return (
    <nav className={"nav" + (isDark ? " nav-dark" : "")}>
      <script
        type="application/ld+json"
        dangerouslySetInnerHTML={{ __html: JSON.stringify(orgSchema) }}
      />
      <script
        type="application/ld+json"
        dangerouslySetInnerHTML={{ __html: JSON.stringify(productSchema) }}
      />
      {pageSchemas.map((schema, i) => (
        <script
          key={i}
          type="application/ld+json"
          dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}
        />
      ))}
      <div className="container nav-inner">
        <a href="/" className="nav-logo" aria-label="ContractControl">
          <img src="/logo.svg" alt="ContractControl" />
        </a>

        <div className="nav-links">
          <div onMouseEnter={() => enter("platform")} onMouseLeave={leave}>
            <span className="nav-link" style={{ cursor: "default", color: current === "platform" ? "var(--ink-1)" : undefined }}>
              Platform <Icon name="chevron" size={14} />
            </span>
            <div className={"mega" + (open === "platform" ? " open" : "")}>
              <div className="mega-grid">
                {Object.entries(platformItems).map(([col, items]) =>
                <div className="mega-col" key={col}>
                    <h5>{col.trim() === "" ? "The lifecycle" : col}</h5>
                    {items.map((it) =>
                      it.disabled ? (
                        <div className="mega-item" key={it.title} style={{ cursor: "default", opacity: 0.65, pointerEvents: "none" }}>
                          <span className="ic"><Icon name={it.icon} size={15} /></span>
                          <div style={{ flex: 1 }}>
                            <div className="t" style={{ display: "flex", alignItems: "center", gap: 7 }}>
                              {it.title}
                              {it.badge && <span style={{ fontSize: 10, fontWeight: 600, letterSpacing: "0.04em", padding: "2px 7px", borderRadius: 99, background: "var(--accent-soft)", color: "var(--accent)", border: "1px solid rgba(110,86,207,0.2)", lineHeight: 1.5 }}>{it.badge}</span>}
                            </div>
                            <div className="d">{it.desc}</div>
                          </div>
                        </div>
                      ) : (
                        <a className="mega-item" key={it.title} href={it.href || (it.title === "Intake" ? "/platform/intake" : "#")}>
                          <span className="ic"><Icon name={it.icon} size={15} /></span>
                          <div style={{ flex: 1 }}>
                            <div className="t" style={{ display: "flex", alignItems: "center", gap: 7 }}>
                              {it.title}
                              {it.badge && <span style={{ fontSize: 10, fontWeight: 600, letterSpacing: "0.04em", padding: "2px 7px", borderRadius: 99, background: "var(--accent-soft)", color: "var(--accent)", border: "1px solid rgba(110,86,207,0.2)", lineHeight: 1.5 }}>{it.badge}</span>}
                            </div>
                            <div className="d">{it.desc}</div>
                          </div>
                        </a>
                      )
                    )}
                    {col === "Power modules" && (
                      <a href="/platform/power-modules" style={{ display: "inline-flex", alignItems: "center", gap: 5, marginTop: 10, fontSize: 13, fontWeight: 500, color: "var(--accent)", textDecoration: "none", paddingLeft: 2 }}>
                        All Power Modules <Icon name="arrow" size={12} />
                      </a>
                    )}
                  </div>
                )}
                <div className="mega-feature">
                  <div className="eyebrow no-dot" style={{ color: "var(--accent)" }}>From the team</div>
                  <div style={{ fontSize: 16, fontWeight: 500, lineHeight: 1.3, marginTop: 4 }}>From SimpleSign to ContractControl</div>
                  <div style={{ fontSize: 12.5, color: "var(--ink-3)", lineHeight: 1.5 }}>
                    Why we rebranded, what changed, and what it means for the product.
                  </div>
                  <a href="/blog/from-simplesign-to-contractcontrol" style={{ marginTop: "auto", paddingTop: 8, fontSize: 13, fontWeight: 500, color: "var(--accent)", display: "inline-flex", alignItems: "center", gap: 6 }}>
                    Read the story <Icon name="arrow" size={13} />
                  </a>
                </div>
              </div>
            </div>
          </div>
          <MegaTrigger
            id="solutions" label="Solutions" current={current === "solutions"}
            items={solutionsItems} open={open} enter={enter} leave={leave}
            useCases={useCasesItems}
            cols={2} />

          <MegaTrigger
            id="resources" label="Resources" current={current === "resources"}
            items={resourcesItems} open={open} enter={enter} leave={leave}
            feature={{ eyebrow: "FREE TOOL", title: "Contract management health check", desc: "Find out how good control you have of your contracts. Assess risk & friction in 3 minutes.", cta: "Take health check", href: "/health-check" }}
            cols={2} />
          <MegaTrigger
            id="company" label="Company" current={current === "company"}
            href="/company" items={companyItems} open={open} enter={enter} leave={leave}
            feature={{ eyebrow: "We're hiring", title: "Join the team building the future of contracts.", desc: "See what's open across engineering, design, GTM, and CS.", cta: "See open roles", href: "https://jobs.simplesign.io/" }}
            cols={2} />

          <a className="nav-link" href="/pricing" style={{ opacity: current === "pricing" ? 0.5 : undefined }}>Pricing</a>
        </div>

        <div className="nav-actions">
          <a className="btn btn-primary" href="/book-demo">
            Book demo <Icon name="arrow" size={14} />
          </a>
        </div>

        <button
          className={"nav-hamburger" + (mobileOpen ? " open" : "")}
          onClick={() => setMobileOpen(!mobileOpen)}
          aria-label="Toggle menu"
        >
          <span /><span /><span />
        </button>
      </div>

      <div className={"nav-mobile" + (mobileOpen ? " open" : "")}>
        <div className="nav-mobile-scroll">
          <details className="nav-mobile-details">
            <summary className="nav-mobile-link">Platform <Icon name="chevron" size={14} /></summary>
            <div className="nav-mobile-sub">
              {Object.entries(platformItems).map(([col, items]) => (
                <div key={col}>
                  <div className="nav-mobile-sub-title">{col.trim() === "" ? "The lifecycle" : col}</div>
                  {items.map(it => (
                    it.disabled ? (
                      <div className="nav-mobile-sub-link" key={it.title} style={{ opacity: 0.6, cursor: "default", pointerEvents: "none", display: "flex", alignItems: "center", gap: 8 }}>
                        <Icon name={it.icon} size={14} /> {it.title}
                        {it.badge && <span style={{ fontSize: 9, fontWeight: 600, letterSpacing: "0.04em", padding: "1px 5px", borderRadius: 99, background: "var(--accent-soft)", color: "var(--accent)", border: "1px solid rgba(110,86,207,0.2)", marginLeft: "auto" }}>{it.badge}</span>}
                      </div>
                    ) : (
                      <a className="nav-mobile-sub-link" key={it.title} href={it.href || "#"}>
                        <Icon name={it.icon} size={14} /> {it.title}
                      </a>
                    )
                  ))}
                </div>
              ))}
            </div>
          </details>
          <details className="nav-mobile-details">
            <summary className="nav-mobile-link">Solutions <Icon name="chevron" size={14} /></summary>
            <div className="nav-mobile-sub">
              {Object.entries(solutionsItems).map(([col, items]) => (
                <div key={col}>
                  <div className="nav-mobile-sub-title">{col}</div>
                  {items.map(it => (
                    it.disabled ? (
                      <div className="nav-mobile-sub-link" key={it.title} style={{ opacity: 0.6, cursor: "default", pointerEvents: "none", display: "flex", alignItems: "center", gap: 8 }}>
                        <Icon name={it.icon} size={14} /> {it.title}
                        {it.badge && <span style={{ fontSize: 9, fontWeight: 600, letterSpacing: "0.04em", padding: "1px 5px", borderRadius: 99, background: "var(--accent-soft)", color: "var(--accent)", border: "1px solid rgba(110,86,207,0.2)", marginLeft: "auto" }}>{it.badge}</span>}
                      </div>
                    ) : (
                      <a className="nav-mobile-sub-link" key={it.title} href={it.href || "#"}>
                        <Icon name={it.icon} size={14} /> {it.title}
                      </a>
                    )
                  ))}
                </div>
              ))}
              <div>
                <div className="nav-mobile-sub-title">Use cases</div>
                {useCasesItems.map(it => (
                  <a className="nav-mobile-sub-link" key={it.title} href={it.href}>
                    <Icon name={it.icon} size={14} /> {it.title}
                  </a>
                ))}
              </div>
            </div>
          </details>

          <details className="nav-mobile-details">
            <summary className="nav-mobile-link">Resources <Icon name="chevron" size={14} /></summary>
            <div className="nav-mobile-sub">
              {Object.entries(resourcesItems).map(([col, items]) => (
                <div key={col}>
                  <div className="nav-mobile-sub-title">{col}</div>
                  {items.map(it => (
                    it.disabled ? (
                      <div className="nav-mobile-sub-link" key={it.title} style={{ opacity: 0.6, cursor: "default", pointerEvents: "none", display: "flex", alignItems: "center", gap: 8 }}>
                        <Icon name={it.icon} size={14} /> {it.title}
                        {it.badge && <span style={{ fontSize: 9, fontWeight: 600, letterSpacing: "0.04em", padding: "1px 5px", borderRadius: 99, background: "var(--accent-soft)", color: "var(--accent)", border: "1px solid rgba(110,86,207,0.2)", marginLeft: "auto" }}>{it.badge}</span>}
                      </div>
                    ) : (
                      <a className="nav-mobile-sub-link" key={it.title} href={it.href || "#"}>
                        <Icon name={it.icon} size={14} /> {it.title}
                      </a>
                    )
                  ))}
                </div>
              ))}
            </div>
          </details>

          <details className="nav-mobile-details">
            <summary className="nav-mobile-link">Company <Icon name="chevron" size={14} /></summary>
            <div className="nav-mobile-sub">
              {Object.entries(companyItems).map(([col, items]) => (
                <div key={col}>
                  <div className="nav-mobile-sub-title">{col}</div>
                  {items.map(it => (
                    it.disabled ? (
                      <div className="nav-mobile-sub-link" key={it.title} style={{ opacity: 0.6, cursor: "default", pointerEvents: "none", display: "flex", alignItems: "center", gap: 8 }}>
                        <Icon name={it.icon} size={14} /> {it.title}
                        {it.badge && <span style={{ fontSize: 9, fontWeight: 600, letterSpacing: "0.04em", padding: "1px 5px", borderRadius: 99, background: "var(--accent-soft)", color: "var(--accent)", border: "1px solid rgba(110,86,207,0.2)", marginLeft: "auto" }}>{it.badge}</span>}
                      </div>
                    ) : (
                      <a className="nav-mobile-sub-link" key={it.title} href={it.href || "#"}>
                        <Icon name={it.icon} size={14} /> {it.title}
                      </a>
                    )
                  ))}
                </div>
              ))}
            </div>
          </details>

          <a className="nav-mobile-link" href="/pricing">Pricing</a>
        </div>
        
        <div className="nav-mobile-actions">
          <a className="btn btn-primary" href="/book-demo">Book demo <Icon name="arrow" size={14} /></a>
        </div>
      </div>
    </nav>);

}

function Footer() {
  const [email, setEmail] = React.useState("");
  const [submitting, setSubmitting] = React.useState(false);
  const [done, setDone] = React.useState(false);

  const handleSubscribe = (e) => {
    e.preventDefault();
    if (email) {
      setSubmitting(true);
      const portalId = "144265445";
      const formGuid = "040963f9-9eef-445d-966c-c8e8078d4130";
      const submitUrl = `https://api-eu1.hsforms.com/submissions/v3/integration/submit/${portalId}/${formGuid}`;
      const hutkMatch = document.cookie.match(/(?:^|; )hubspotutk=([^;]*)/);
      const hutk = hutkMatch ? hutkMatch[1] : undefined;
      fetch(submitUrl, {
        method: "POST",
        headers: { "Content-Type": "application/json" },
        body: JSON.stringify({
          fields: [{ name: "email", value: email }],
          context: { hutk, pageUri: window.location.href, pageName: document.title }
        })
      })
      .then(() => { setSubmitting(false); setDone(true); })
      .catch(() => { setSubmitting(false); setDone(true); });
    }
  };


  return (
    <footer data-dark style={{ background: "var(--ink-1)", position: "relative", overflow: "hidden" }}>
      {/* Top section: brand + links */}
      <div className="container" style={{ position: "relative", zIndex: 2, paddingTop: 56, paddingBottom: 40 }}>
        <div className="mob-stack" style={{ display: "grid", gridTemplateColumns: "1.3fr 1fr", gap: 64, alignItems: "start" }}>
          {/* Left: brand */}
          <div>
            <a href="/" aria-label="ContractControl" style={{ display: "inline-block", marginBottom: 16 }}>
              <img src="/logo-white.svg" alt="ContractControl" style={{ height: 22 }} onError={(e) => { e.target.style.display = "none"; e.target.parentElement.innerHTML = '<span style="font-size:17px;font-weight:600;color:#fff;letter-spacing:-0.02em">ContractControl</span>'; }} />
            </a>
            <p style={{ fontSize: 14, color: "rgba(255,255,255,0.45)", maxWidth: 300, lineHeight: 1.6, margin: "0 0 24px" }}>
              The contract lifecycle platform for growing companies. From request to obligation, on one platform.
            </p>
            {/* Social icons */}
            <div style={{ display: "flex", gap: 12 }}>
              {[
                { label: "LinkedIn", href: "https://www.linkedin.com/company/simple-sign/", icon: <svg width="15" height="15" viewBox="0 0 24 24" fill="currentColor"><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg> }
              ].map((s) => (
                <a key={s.label} href={s.href} target="_blank" rel="noopener noreferrer" aria-label={s.label}
                  style={{
                    width: 30, height: 30, borderRadius: 6,
                    border: "1px solid rgba(255,255,255,0.12)", display: "grid", placeItems: "center",
                    color: "rgba(255,255,255,0.4)", transition: "color 150ms, border-color 150ms"
                  }}
                  onMouseEnter={(e) => { e.currentTarget.style.color = "#fff"; e.currentTarget.style.borderColor = "rgba(255,255,255,0.3)"; }}
                  onMouseLeave={(e) => { e.currentTarget.style.color = "rgba(255,255,255,0.4)"; e.currentTarget.style.borderColor = "rgba(255,255,255,0.12)"; }}
                >{s.icon}</a>
              ))}
            </div>

            {/* Newsletter signup */}
            <div style={{ marginTop: 28 }}>
              <h4 style={{ fontSize: 11, fontWeight: 600, letterSpacing: "0.1em", textTransform: "uppercase", color: "rgba(255,255,255,0.4)", margin: "0 0 12px" }}>Newsletter</h4>
              {done ? (
                <div style={{ padding: "10px 14px", borderRadius: 8, background: "rgba(123,97,255,0.15)", border: "1px solid rgba(123,97,255,0.3)", fontSize: 13, fontWeight: 500, color: "#C7B4FF", maxWidth: 300 }}>
                  Thanks for subscribing!
                </div>
              ) : (
                <form onSubmit={handleSubscribe} style={{ display: "flex", gap: 8, maxWidth: 300 }}>
                  <input
                    type="email"
                    required
                    placeholder="you@company.com"
                    value={email}
                    onChange={e => setEmail(e.target.value)}
                    style={{
                      flex: 1, height: 36, padding: "0 12px", borderRadius: 8,
                      border: "1px solid rgba(255,255,255,0.12)", background: "rgba(255,255,255,0.06)",
                      color: "#fff", fontFamily: "inherit", fontSize: 13, outline: "none",
                      boxSizing: "border-box"
                    }}
                  />
                  <button
                    type="submit"
                    className="btn btn-accent"
                    disabled={submitting}
                    style={{ height: 36, paddingInline: 14, flexShrink: 0, fontSize: 12.5 }}>
                    {submitting ? "..." : "Subscribe"}
                  </button>
                </form>
              )}
              <p style={{ fontSize: 10.5, color: "rgba(255,255,255,0.25)", marginTop: 8, maxWidth: 300 }}>
                Contract insights, compliance updates, and product news. No spam.
              </p>
            </div>
          </div>

          {/* Right: Link columns */}
          <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr 1fr", gap: 32 }}>
            <div>
              <h4 style={{ fontSize: 11, fontWeight: 600, letterSpacing: "0.1em", textTransform: "uppercase", color: "rgba(255,255,255,0.4)", margin: "0 0 16px" }}>Platform</h4>
              <ul style={{ listStyle: "none", padding: 0, margin: 0, display: "flex", flexDirection: "column", gap: 10 }}>
                {[
                  ["Intake", "/platform/intake"], ["Drafting", "/platform/drafting"], ["Review", "/platform/review"],
                  ["Negotiation", "/platform/negotiation"], ["eSignature", "/platform/esignature"],
                  ["Repository", "/platform/repository"], ["Obligations", "/platform/obligations"]
                ].map(([label, href]) => (
                  <li key={label}><a href={href} style={{ fontSize: 13.5, color: "rgba(255,255,255,0.55)", textDecoration: "none", transition: "color 150ms" }}
                    onMouseEnter={(e) => e.currentTarget.style.color = "#fff"}
                    onMouseLeave={(e) => e.currentTarget.style.color = "rgba(255,255,255,0.55)"}
                  >{label}</a></li>
                ))}
              </ul>
            </div>
            <div>
              <h4 style={{ fontSize: 11, fontWeight: 600, letterSpacing: "0.1em", textTransform: "uppercase", color: "rgba(255,255,255,0.4)", margin: "0 0 16px" }}>Company</h4>
              <ul style={{ listStyle: "none", padding: 0, margin: 0, display: "flex", flexDirection: "column", gap: 10 }}>
                {[
                  ["Customer stories", "/customers"], ["Blog", "/blog"], ["Guides", "/guides"],
                  ["Pricing", "/pricing"], ["About", "/company"], ["Contact", "/contact"], ["Security", "/security"]
                ].map(([label, href]) => (
                  <li key={label}><a href={href} style={{ fontSize: 13.5, color: "rgba(255,255,255,0.55)", textDecoration: "none", transition: "color 150ms" }}
                    onMouseEnter={(e) => e.currentTarget.style.color = "#fff"}
                    onMouseLeave={(e) => e.currentTarget.style.color = "rgba(255,255,255,0.55)"}
                  >{label}</a></li>
                ))}
              </ul>
            </div>
            <div>
              <h4 style={{ fontSize: 11, fontWeight: 600, letterSpacing: "0.1em", textTransform: "uppercase", color: "rgba(255,255,255,0.4)", margin: "0 0 16px" }}>Compare</h4>
              <ul style={{ listStyle: "none", padding: 0, margin: 0, display: "flex", flexDirection: "column", gap: 10 }}>
                {[
                  ["vs Oneflow", "/compare/oneflow"], ["vs House of Control", "/compare/house-of-control"],
                  ["vs Scrive", "/compare/scrive"], ["vs Ironclad", "/compare/ironclad"],
                  ["vs Spotdraft", "/compare/spotdraft"], ["vs Juro", "/compare/juro"],
                  ["vs Tomorro", "/compare/tomorro"],
                  ["All alternatives", "/compare"]
                ].map(([label, href]) => (
                  <li key={label}><a href={href} style={{ fontSize: 13.5, color: "rgba(255,255,255,0.55)", textDecoration: "none", transition: "color 150ms" }}
                    onMouseEnter={(e) => e.currentTarget.style.color = "#fff"}
                    onMouseLeave={(e) => e.currentTarget.style.color = "rgba(255,255,255,0.55)"}
                  >{label}</a></li>
                ))}
              </ul>
            </div>
          </div>
        </div>
      </div>


      {/* Bottom bar */}
      <div className="container" style={{ position: "relative", zIndex: 2 }}>
        <div style={{
          padding: "20px 0", borderTop: "1px solid rgba(255,255,255,0.08)",
          display: "flex", justifyContent: "space-between", alignItems: "center",
          fontSize: 12, color: "rgba(255,255,255,0.3)"
        }} className="mob-stack">
          <div>© 2026 ContractControl. All rights reserved.</div>
          <div style={{ display: "flex", gap: 20 }}>
            <a href="/security" style={{ color: "rgba(255,255,255,0.3)", textDecoration: "none" }}>Privacy Policy</a>
            <a href="/security" style={{ color: "rgba(255,255,255,0.3)", textDecoration: "none" }}>Terms</a>
            <a href="/security" style={{ color: "rgba(255,255,255,0.3)", textDecoration: "none" }}>Cookies</a>
          </div>
        </div>
      </div>
    </footer>);

}

Object.assign(window, { Nav, Footer, Icon });