/* Mobile menu (mobile-menu.php, Marker.io OTS-73): a cream panel that slides in from the right, inside
   Flatsome's off-canvas lightbox. Sizes use container units of the panel, so the whole menu, including the button,
   fits the visible height of the phone (320×568 and up) without scrolling; on lower screens the panel scrolls. */

/* Dimmed, blurred page behind the panel. */
.mfp-bg.main-menu-overlay {
  background: rgba(19, 18, 18, .42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: opacity .45s ease;
}

.mfp-bg.main-menu-overlay.mfp-ready {
  opacity: 1;
}

.mfp-bg.main-menu-overlay.mfp-removing {
  transition-duration: .28s;
}

/* The panel: Flatsome's drawer, flush with the top, right and bottom edges (Marker.io OTS-79); a strip of the page
   stays visible on the left. */
.mfp-wrap.off-canvas-right .mfp-content:has(> .ots-mobile-menu) {
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  width: min(calc(100vw - 36px), 428px);
  height: auto;
  container-type: size;
  overflow: hidden auto;
  overscroll-behavior: contain;
  background: var(--ots-cream, #fffcf5);
  box-shadow: none;
  opacity: 1;
  transform: translateX(100%);
  transition: transform .6s cubic-bezier(.22, 1, .36, 1);
}

.mfp-wrap.off-canvas-right.mfp-ready .mfp-content:has(> .ots-mobile-menu) {
  transform: none;
}

/* Slide out within Flatsome's 300 ms removal delay instead of its fade. */
.mfp-wrap.off-canvas.off-canvas-right.mfp-removing .mfp-content:has(> .ots-mobile-menu) {
  opacity: 1 !important;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4, 0, 1, 1);
}

/* Flatsome's own close button; the panel has its own where the burger was. */
.mfp-wrap:has(.ots-mobile-menu) > .mfp-close {
  display: none !important;
}

#main-menu.ots-mobile-menu {
  display: flex;
  flex-direction: column;
  width: auto;
  min-height: 100cqh;
  padding: 0 24px 22px;
  background: none;
  color: var(--ots-ink, #252324);
  font-family: "Neue Haas Unica", Helvetica, Arial, sans-serif;
  text-align: left;
}

#main-menu .ots-mobile-menu__top {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  height: 90px; /* close button centred where the burger is */
  margin-right: -14px;
}

#main-menu .ots-mobile-menu__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #8d8c88;
  font-size: 14px;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}

#main-menu .ots-mobile-menu__eyebrow::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ots-yellow, #ffe600);
  content: "";
}

#main-menu .ots-mobile-menu__tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

#main-menu .ots-mobile-menu__close {
  position: static;
  display: grid !important;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: none;
  color: var(--ots-ink, #252324);
  mix-blend-mode: normal;
  opacity: 1;
  transform: none;
  transition: background-color .35s ease, border-color .35s ease, color .35s ease; /* OTS-80 */
}

#main-menu .ots-mobile-menu__close:focus-visible {
  background: var(--ots-ink, #252324);
  color: var(--ots-cream, #fffcf5);
}

@media (hover: hover) {
  #main-menu .ots-mobile-menu__close:hover {
    background: var(--ots-ink, #252324);
    color: var(--ots-cream, #fffcf5);
  }
}

#main-menu .ots-mobile-menu__close svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

/* Language switch: a native disclosure, so it needs no script. */
#main-menu .ots-mobile-menu__languages {
  position: relative;
  font-size: 14px;
}

#main-menu .ots-mobile-menu__languages summary {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #8d8c88;
  cursor: pointer;
  list-style: none;
}

#main-menu .ots-mobile-menu__languages summary::-webkit-details-marker {
  display: none;
}

#main-menu .ots-mobile-menu__languages summary svg {
  width: 8px;
  height: 5px;
  transition: transform .2s ease;
}

#main-menu .ots-mobile-menu__languages[open] summary svg {
  transform: rotate(180deg);
}

#main-menu .ots-mobile-menu__languages ul {
  position: absolute;
  z-index: 2;
  top: calc(100% + 10px);
  right: 0;
  min-width: 170px;
  margin: 0;
  padding: 6px 0;
  border: 1px solid #e2ddd2;
  background: var(--ots-cream, #fffcf5);
  box-shadow: 0 10px 30px rgba(19, 18, 18, .14);
  list-style: none;
}

#main-menu .ots-mobile-menu__languages li {
  margin: 0;
}

#main-menu .ots-mobile-menu__languages a {
  display: block;
  padding: 12px 18px;
  color: var(--ots-ink, #252324);
  font-size: 15px;
  line-height: 20px;
}

#main-menu .ots-mobile-menu__languages a span {
  background: linear-gradient(var(--ots-yellow, #ffe600), var(--ots-yellow, #ffe600)) left / 0 100% no-repeat;
  transition: background-size .45s ease;
}

#main-menu .ots-mobile-menu__languages a:is(:hover, :focus-visible) span {
  background-size: 100% 100%;
}

/* As in the header: the trigger already names the current language. */
#main-menu .ots-mobile-menu__languages li:has(> a[aria-current]) {
  display: none;
}

/* Links: large and light like the headings; the desktop header's yellow fill sweeps in on hover/focus and marks
   the current page. */
#main-menu .ots-mobile-menu__nav {
  flex: 1 1 auto;
  margin-top: clamp(4px, 2cqh, 24px);
}

#main-menu .ots-mobile-menu__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

#main-menu .ots-mobile-menu__list > li {
  margin: 0;
  opacity: 0;
  transform: translateX(28px);
  transition: opacity .4s ease, transform .6s cubic-bezier(.22, 1, .36, 1);
}

.mfp-ready #main-menu .ots-mobile-menu__list > li {
  opacity: 1;
  transform: none;
}

.mfp-ready #main-menu .ots-mobile-menu__list > li:nth-child(1) { transition-delay: 120ms; }
.mfp-ready #main-menu .ots-mobile-menu__list > li:nth-child(2) { transition-delay: 160ms; }
.mfp-ready #main-menu .ots-mobile-menu__list > li:nth-child(3) { transition-delay: 200ms; }
.mfp-ready #main-menu .ots-mobile-menu__list > li:nth-child(4) { transition-delay: 240ms; }
.mfp-ready #main-menu .ots-mobile-menu__list > li:nth-child(5) { transition-delay: 280ms; }
.mfp-ready #main-menu .ots-mobile-menu__list > li:nth-child(6) { transition-delay: 320ms; }
.mfp-ready #main-menu .ots-mobile-menu__list > li:nth-child(7) { transition-delay: 360ms; }
.mfp-ready #main-menu .ots-mobile-menu__list > li:nth-child(8) { transition-delay: 400ms; }
.mfp-ready #main-menu .ots-mobile-menu__list > li:nth-child(n+9) { transition-delay: 440ms; }

.mfp-removing #main-menu .ots-mobile-menu__list > li {
  opacity: 1;
  transform: none;
}

#main-menu .ots-mobile-menu__list a {
  display: flex;
  padding: .08em 0;
  color: inherit;
  font-size: clamp(24px, min(10.6cqw, 5cqh), 38px);
  font-weight: 300;
  letter-spacing: -.01em;
  line-height: 1.15;
}

#main-menu .ots-mobile-menu__list a span {
  line-height: 1.2;
  background: linear-gradient(var(--ots-yellow, #ffe600), var(--ots-yellow, #ffe600)) left / 0 100% no-repeat;
  transition: background-size .45s ease;
}

#main-menu .ots-mobile-menu__list a:is(:hover, :focus-visible) span,
#main-menu .ots-mobile-menu__list > li:is(.current-menu-item, .current-menu-ancestor, .current-page-ancestor) > a span {
  background-size: 100% 100%;
}

#main-menu .ots-mobile-menu__list a:focus-visible {
  outline: 2px solid var(--ots-ink, #252324);
  outline-offset: 2px;
}

/* Contact row and the quote button stay at the bottom of the panel. */
#main-menu .ots-mobile-menu__meta {
  flex: none;
  margin-top: auto;
  padding-top: clamp(12px, 2.6cqh, 28px);
  opacity: 0;
  transition: opacity .5s ease .45s;
}

.mfp-ready #main-menu .ots-mobile-menu__meta,
.mfp-removing #main-menu .ots-mobile-menu__meta {
  opacity: 1;
}

#main-menu .ots-mobile-menu__contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: clamp(12px, 2cqh, 20px);
  border-top: 1px solid #e2ddd2;
  font-size: clamp(13px, 4.5cqw, 15px);
  line-height: 1.45;
}

#main-menu .ots-mobile-menu__contact a {
  display: block;
  color: var(--ots-ink, #252324);
}

#main-menu .ots-mobile-menu__contact > div:first-child a:is(:hover, :focus-visible) {
  color: #850a2b;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#main-menu .ots-mobile-menu__social {
  display: flex;
  flex: none;
  gap: 8px;
}

#main-menu .ots-mobile-menu__social a {
  display: grid;
  place-items: center;
  width: clamp(38px, 12.8cqw, 44px);
  height: clamp(38px, 12.8cqw, 44px);
  border: 1px solid var(--ots-ink, #252324);
  border-radius: 50%;
  font-size: 18px;
  transition: background-color .35s ease, border-color .35s ease, color .35s ease; /* OTS-80 */
}

#main-menu .ots-mobile-menu__social a:focus-visible {
  background: var(--ots-ink, #252324);
  color: var(--ots-cream, #fffcf5);
}

@media (hover: hover) {
  #main-menu .ots-mobile-menu__social a:hover {
    background: var(--ots-ink, #252324);
    color: var(--ots-cream, #fffcf5);
  }
}

#main-menu .ots-mobile-menu__social :is(i, svg) {
  margin: 0;
  font-size: 18px;
  line-height: 1;
}

#main-menu .ots-mobile-menu__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  margin-top: clamp(12px, 2cqh, 20px);
  border: 1px solid var(--ots-ink, #252324);
  border-radius: 999px;
  background: var(--ots-ink, #252324);
  color: var(--ots-cream, #fffcf5);
  font-size: 17px;
  transition: background-color .35s ease, border-color .35s ease, color .35s ease; /* OTS-80 */
}

#main-menu .ots-mobile-menu__cta:focus-visible {
  background: none;
  color: var(--ots-ink, #252324);
}

@media (hover: hover) {
  #main-menu .ots-mobile-menu__cta:hover {
    background: none;
    color: var(--ots-ink, #252324);
  }
}


@media (prefers-reduced-motion: reduce) {
  .mfp-wrap.off-canvas-right .mfp-content:has(> .ots-mobile-menu),
  .mfp-wrap.off-canvas.off-canvas-right.mfp-removing .mfp-content:has(> .ots-mobile-menu),
  #main-menu .ots-mobile-menu__list > li,
  #main-menu .ots-mobile-menu__meta {
    transition-duration: .01s !important;
    transition-delay: 0s !important;
  }
}

/* Marker.io OTS-84: behind the quote panel the menu closes without sliding out (mobile-menu.js); the dimmed page
   still fades, so a tablet's uncovered strip does not jump. */
.ots-mobile-menu-instant .mfp-wrap.off-canvas.off-canvas-right.mfp-removing .mfp-content:has(> .ots-mobile-menu) {
  transition: none;
}
