/*
Developed by HMD Developments
For Hushlead
www.hmddevs.org
*/

/* Cloned element-for-element from the reference design's header, captured
   2026-11-04. Structure, classes, breakpoints, states and motion are
   the reference design's own; only Hushlead's copy, links, the --primary accent swap and
   Inter in place of the reference design's serif and mono menu fonts are Hushlead's. See docs/decisions.md, 2026-11-04. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400.woff2") format("woff2");
}

:root {
  --header-h: 72px;
  --header-gutter: 80px;
  --header-stroke: #ebebeb;
  --header-line: rgba(0, 0, 0, 0.08);
  --header-text: #0c0a09;
  --header-text-secondary: #7f7474;
  --header-beige: #fbf9f5;
}

@media (max-width: 1199.98px) {
  :root { --header-gutter: 42px; }
}

@media (max-width: 809.98px) {
  :root { --header-h: 64px; --header-gutter: 16px; }
}

html {
  scroll-padding-top: var(--header-h);
}

#main-content {
  padding-top: var(--header-h);
}

html.nav-locked,
html.nav-locked body {
  overflow: hidden;
}

/* ---- Header shell (.nav) ---- */
#site-header.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
  box-shadow: inset 0 -1px 0 var(--header-stroke);
  padding-inline: var(--header-gutter);
}

#site-header .nav__inner {
  width: 100%;
  max-width: var(--content-w, min(1200px, 100vw - 2 * var(--header-gutter)));
  margin-inline: auto;
  padding: 16px var(--header-gutter);
  height: var(--header-h);
  display: flex;
  align-items: center;
}

#site-header .nav__bar {
  width: 100%;
  height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

#site-header .nav__logo {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  height: 32px;
  color: var(--header-text);
  text-decoration: none;
}

#site-header .header__logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

#site-header .header__logo-text {
  color: inherit;
  font-size: 21px;
  font-weight: 500;
  line-height: 0.95238;
}

@media (max-width: 809.98px) {
  #site-header .nav__logo {
    gap: 7px;
    height: 28px;
  }

  #site-header .header__logo-icon {
    width: 28px;
    height: 28px;
  }

  #site-header .header__logo-text {
    font-size: 18px;
  }
}

#site-header .nav__logo:focus-visible {
  outline: 2px solid var(--primary, #f8600a);
  outline-offset: 2px;
}

/* ---- Desktop links ---- */
.nav__links {
  display: flex;
  align-items: center;
}

.nav__dropdown {
  position: static;
}

.nav__link {
  color: var(--header-text);
  white-space: nowrap;
  border-radius: 8px;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.2;
  transition: background-color 0.2s;
  display: flex;
  position: relative;
  text-decoration: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav__link:hover,
.nav__dropdown:is(:hover, :focus-within, [data-state="open"]):not([data-state="dismissed"]) .nav__link--menu {
  background: #f5f2ee;
}

.nav__chevron {
  width: 16px;
  height: 16px;
  color: var(--header-text-secondary);
  flex-shrink: 0;
  transition: rotate 0.2s;
}

.nav__dropdown:is(:hover, :focus-within, [data-state="open"]):not([data-state="dismissed"]) .nav__chevron {
  rotate: 180deg;
}

.nav__link--menu:focus-visible {
  outline: 2px solid var(--primary, #f8600a);
  outline-offset: 4px;
}

.nav__menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: min(1200px, 100% - 2 * var(--header-gutter));
  margin-inline: auto;
  opacity: 0;
  visibility: hidden;
  translate: 0 -4px;
  background: #fff;
  border: 1px solid var(--header-line);
  border-top: 0;
  box-shadow: 0 12px 24px -12px rgba(12, 10, 9, 0.08);
  padding: 24px 42px 32px;
  transition: opacity 0.2s, translate 0.2s, visibility 0.2s;
}

.nav__dropdown:is(:hover, :focus-within, [data-state="open"]):not([data-state="dismissed"]) .nav__menu {
  opacity: 1;
  visibility: visible;
  translate: none;
}

.nav__menu::before {
  content: "";
  height: 1px;
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
}

/* ---- Mega menu grid (.ml) ---- */
.ml {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  column-gap: 32px;
}

.ml__group--side {
  border-left: 1px solid var(--header-line);
  padding-left: 32px;
}

.ml__label {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6f6666;
  margin: 0 0 10px 10px;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.33333;
}

.ml__list {
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
}

.ml__group:not(.ml__group--side) .ml__list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ml-row {
  color: var(--header-text);
  border-radius: 8px;
  align-items: center;
  gap: 14px;
  padding: 10px;
  transition: background-color 0.2s;
  display: flex;
  text-decoration: none;
}

.ml-row:hover,
.ml-row:focus-visible {
  background: var(--header-beige);
}

.ml-row:focus-visible {
  outline: 2px solid var(--primary, #f8600a);
  outline-offset: 0;
}

.ml-row__art {
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  flex: none;
  width: 88px;
  transition: box-shadow 0.25s;
  display: block;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--header-line);
}

.ml-row__art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ml-row:hover .ml-row__art,
.ml-row:focus-visible .ml-row__art {
  box-shadow: 0 8px 18px -10px rgba(92, 58, 30, 0.4);
}

.ml-row__text {
  flex-direction: column;
  flex: 1;
  gap: 3px;
  min-width: 0;
  display: flex;
}

.ml-row__title {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.44;
  letter-spacing: -0.01em;
  color: var(--header-text);
  transition: color 0.2s;
}

.ml-row:hover .ml-row__title,
.ml-row:focus-visible .ml-row__title {
  color: var(--primary, #f8600a);
}

.ml-row__desc {
  font-family: "Inter", sans-serif;
  color: var(--header-text-secondary);
  text-wrap: pretty;
  font-size: 13px;
  line-height: 1.4;
}

.ml-row__arrow {
  color: var(--primary, #f8600a);
  opacity: 0;
  flex: none;
  transition: opacity 0.2s, translate 0.2s;
  translate: -4px;
}

.ml-row:hover .ml-row__arrow,
.ml-row:focus-visible .ml-row__arrow {
  opacity: 1;
  translate: none;
}

/* Three-column variant with icon chips (the reference design's Resources menu) */
.ml--resources {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ml--resources .ml__group:not(.ml__group--side) .ml__list {
  grid-template-columns: minmax(0, 1fr);
}

.ml--resources .ml-row {
  align-items: flex-start;
}

.ml--resources .ml-row__arrow {
  align-self: center;
}

.ml-row__icon {
  width: 44px;
  height: 44px;
  color: var(--header-text);
  background: #fff;
  border-radius: 10px;
  flex: none;
  place-items: center;
  transition: color 0.2s, box-shadow 0.25s;
  display: grid;
  box-shadow: inset 0 0 0 1px var(--header-line), 0 1px 2px rgba(12, 10, 9, 0.04);
}

.ml-row:hover .ml-row__icon,
.ml-row:focus-visible .ml-row__icon {
  color: var(--primary, #f8600a);
  background: linear-gradient(132.71deg, #ffe9d2 0%, #ffe3d2 50%, #ffe0d9 100%);
  box-shadow: inset 0 0 0 1px rgba(248, 96, 10, 0.16), 0 8px 18px -10px rgba(92, 58, 30, 0.4);
}

/* ---- CTAs ---- */
.nav__buttons {
  flex: 1 1 0;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  display: flex;
}

.nav__cta {
  color: #fff;
  white-space: nowrap;
  background: var(--header-text);
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  height: 40px;
  padding: 0 20px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.2;
  display: inline-flex;
  text-decoration: none;
}

.nav__cta:hover {
  background: #2a2624;
}

.nav__cta:focus-visible,
.nav__link:focus-visible {
  outline: 2px solid var(--primary, #f8600a);
  outline-offset: 2px;
}

/* ---- Mobile toggle + panel ---- */
.nav__toggle {
  display: none;
}

.nav__mobile[hidden] {
  display: none !important;
}

@media (max-width: 1199.98px) {
  .nav__inner {
    max-width: 1000px;
    padding: 20px 42px;
  }

  .nav__links,
  .nav__buttons {
    display: none;
  }

  .nav__logo {
    margin-block: -12px;
    padding-block: 12px;
  }

  .nav__toggle {
    -webkit-tap-highlight-color: transparent;
    border-radius: 8px;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    margin: -6px;
    display: block;
    position: relative;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .nav__toggle:focus-visible {
    outline: 2px solid var(--primary, #f8600a);
    outline-offset: -2px;
  }

  .nav__toggle span {
    background: var(--header-text);
    width: 20px;
    height: 1.5px;
    transition: translate 0.18s ease 0.12s, rotate 0.18s ease;
    border-radius: 1px;
    position: absolute;
    left: 12px;
  }

  .nav__toggle span:first-child { top: 18px; }
  .nav__toggle span:last-child { top: 24.5px; }

  .nav__toggle[aria-expanded="true"] span {
    transition: translate 0.18s ease, rotate 0.22s ease 0.12s;
  }

  .nav__toggle[aria-expanded="true"] span:first-child {
    translate: 0 3.25px;
    rotate: 45deg;
  }

  .nav__toggle[aria-expanded="true"] span:last-child {
    translate: 0 -3.25px;
    rotate: -45deg;
  }

  .nav__mobile {
    top: var(--header-h);
    padding-inline: var(--header-gutter);
    opacity: 0;
    transition: opacity 0.2s ease;
    background: #fff;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  }

  .nav[data-open="true"] .nav__mobile {
    opacity: 1;
    transition-duration: 0.28s;
  }

  .nm {
    flex-direction: column;
    max-width: 1000px;
    height: 100%;
    margin-inline: auto;
    display: flex;
  }

  .nm__scroll {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    flex: auto;
    min-height: 0;
    overflow-y: auto;
  }

  .nm__grid {
    grid-template-columns: minmax(0, 1fr) 232px;
    display: grid;
  }

  .nm__cases {
    padding: 28px 42px 32px;
    box-shadow: inset -1px 0 rgba(0, 0, 0, 0.08);
  }

  .nm__more {
    padding: 28px 24px 32px;
  }

  .nm__item {
    opacity: 0;
    transition: opacity 0.16s ease, translate 0.16s ease;
    translate: 0 6px;
  }

  .nav[data-open="true"] .nm__item {
    opacity: 1;
    transition-duration: 0.34s;
    transition-delay: calc(40ms + var(--i, 0) * 22ms);
    translate: none;
  }

  .nm__label {
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6f6666;
    margin: 0 0 12px;
    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.33333;
  }

  .nm__case-list,
  .nm__links {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .nm__sublabel {
    font-family: "Inter", sans-serif;
    color: var(--header-text);
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.38462;
  }

  .nm__case-list + .nm__sublabel {
    margin-top: 24px;
  }

  .nm__case-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    display: grid;
  }

  .nm-case {
    height: 100%;
    color: var(--header-text);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    border-radius: 6px;
    flex-direction: column;
    margin: -8px -8px 0;
    padding: 8px 8px 14px;
    transition: background-color 0.2s;
    display: flex;
    position: relative;
  }

  .nm-case__art {
    height: 136px;
    transition: box-shadow 0.25s, scale 0.25s ease;
    border-radius: 4px;
    display: block;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px var(--header-line);
  }

  .nm-case__art svg {
    width: 100%;
    height: 100%;
    display: block;
  }

  .nm-case__text {
    flex-direction: column;
    gap: 4px;
    margin-top: 12px;
    padding-inline: 2px;
    display: flex;
  }

  .nm-case__title {
    color: var(--header-text);
    font-family: "Inter", sans-serif;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.2;
  }

  .nm-case__desc {
    font-family: "Inter", sans-serif;
    color: #6f6666;
    text-wrap: pretty;
    font-size: 14px;
    line-height: 1.4;
  }

  .nm-case:active .nm-case__art {
    scale: 0.98;
  }

  .nm-case > .nm__arrow {
    box-sizing: content-box;
    opacity: 0;
    background: #fff;
    border-radius: 50%;
    padding: 4px;
    position: absolute;
    top: 16px;
    right: 14px;
  }

  .nm__links {
    flex-direction: column;
    display: flex;
  }

  .nm__links--sm {
    margin-bottom: 28px;
  }

  .nm__links > li:first-child .nm-link {
    box-shadow: inset 0 1px rgba(0, 0, 0, 0.08), inset 0 -1px rgba(0, 0, 0, 0.08);
  }

  .nm__links--sm + .nm__links:not(.nm__links--sm) > li:first-child .nm-link {
    box-shadow: inset 0 -1px rgba(0, 0, 0, 0.08);
  }

  .nm-link {
    min-height: 56px;
    font-family: "Inter", sans-serif;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--header-text);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s, padding 0.25s ease;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 19px;
    line-height: 1.2;
    display: flex;
    box-shadow: inset 0 -1px var(--header-line);
  }

  .nm-link--sm {
    min-height: 46px;
    font-size: 16px;
  }

  .nm-link:active {
    color: var(--primary, #f8600a);
    padding-left: 4px;
  }

  @media (hover: hover) {
    .nm-case:hover {
      background: var(--header-beige);
    }

    .nm-case:hover .nm-case__title,
    .nm-link:hover {
      color: var(--primary, #f8600a);
    }
  }

  .nm__arrow {
    color: var(--header-text-secondary);
    transition: translate 0.25s ease, color 0.2s;
    flex-shrink: 0;
  }

  .nm-link:hover .nm__arrow {
    color: var(--primary, #f8600a);
    translate: 3px;
  }

  .nm-case:focus-visible,
  .nm-link:focus-visible,
  .nm__btn:focus-visible {
    outline: 2px solid var(--primary, #f8600a);
    outline-offset: 2px;
  }

  .nm-link:focus-visible {
    outline-offset: -2px;
  }

  .nm__foot {
    padding: 16px 42px calc(16px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    box-shadow: 0 -1px var(--header-line);
  }

  .nm__btn {
    height: 48px;
    font-family: "Inter", sans-serif;
    letter-spacing: -0.01em;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    transition: scale 0.2s ease, background-color 0.2s;
    border-radius: 8px;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 0 12px;
    font-size: 16px;
    line-height: 1.25;
    display: flex;
    text-decoration: none;
  }

  .nm__btn:active {
    scale: 0.98;
  }

  .nm__btn--demo {
    color: var(--header-text);
    background: var(--header-beige);
  }

  .nm__btn--sales {
    color: #fff;
    background: var(--header-text);
  }

  .nm__btn--sales:hover {
    background: #2a2624;
  }
}

@media (max-width: 809.98px) {
  .nm__cases,
  .nm__more {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .nm__foot {
    padding-top: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .nm__btn {
    height: 44px;
  }

  .nav__inner {
    max-width: 500px;
    padding: 16px;
  }

  .nm {
    max-width: 500px;
  }

  .nm__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .nm__cases {
    box-shadow: none;
    padding: 24px 16px 20px;
  }

  .nm__more {
    padding: 4px 16px 28px;
  }

  .nm__label {
    margin-bottom: 8px;
  }

  .nm__case-list {
    flex-direction: column;
    gap: 0;
    display: flex;
  }

  .nm-case {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    min-height: 68px;
    margin: 0 -8px;
    padding: 8px;
    display: flex;
  }

  .nm-case__art {
    flex-shrink: 0;
    width: 72px;
    height: 52px;
  }

  .nm-case__text {
    flex: auto;
    gap: 2px;
    min-width: 0;
    margin: 0;
    padding: 0;
  }

  .nm-case__title {
    font-size: 18px;
  }

  .nm-case__desc {
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.35;
    display: -webkit-box;
    overflow: hidden;
  }

  .nm-case > .nm__arrow {
    opacity: 1;
    background: none;
    padding: 0;
    position: static;
  }

  .nm__foot {
    gap: 8px;
  }

  .nm__btn {
    padding: 0 8px;
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav__link,
  .nav__menu,
  .nav__chevron,
  .ml-row,
  .ml-row__art,
  .ml-row__icon,
  .ml-row__arrow,
  .nav__toggle span,
  .nav__mobile,
  .nm__item,
  .nm-case,
  .nm-case__art,
  .nm-link,
  .nm__arrow,
  .nm__btn {
    transition: none !important;
  }
}
