/* =========================================================
   Mavisoft — Mobile-native layer
   Loaded on top of styles.css. Desktop (>1024px) untouched;
   ≤1024px gets the redesigned menu, ≤768px gets the full
   mobile-native experience (rhythm, sticky CTA, patterns).
   ========================================================= */

/* =========================================================
   1 · Redesigned mobile menu (any width where hamburger shows)
   ========================================================= */

.mv-menu {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s;
}
.mv-menu.is-open { opacity: 1; visibility: visible; }

.mv-menu__bar {
  height: 60px;
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-inline: var(--gutter);
  border-bottom: 1px solid var(--border);
}
.mv-menu__close {
  width: 44px;
  height: 44px;
  margin-right: -10px;
  display: grid;
  place-items: center;
  color: var(--fg);
}
.mv-menu__close svg { width: 20px; height: 20px; }

.mv-menu__scroll {
  overflow-y: auto;
  flex: 1;
  padding: 4px var(--gutter) 28px;
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
}

.mv-menu__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 0;
  border-bottom: 1px solid var(--border);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.mv-menu__link[aria-current="page"] { color: var(--accent); }
.mv-menu__arrow { color: var(--fg-muted); flex-shrink: 0; }
.mv-menu__arrow svg { width: 16px; height: 16px; }

.mv-menu__eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 28px 0 4px;
}

.mv-menu__prod {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  row-gap: 3px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}
.mv-menu__prod-label { font-size: 17px; font-weight: 600; color: var(--fg); }
.mv-menu__prod-hint {
  grid-column: 1;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.mv-menu__prod .mv-menu__arrow { grid-row: 1 / span 2; }
.mv-menu__prod[aria-current="page"] .mv-menu__prod-label { color: var(--accent); }
.mv-menu__prod[aria-current="page"] .mv-menu__arrow { color: var(--accent); }

.mv-menu__ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 30px;
}
.mv-menu__ctas .btn { justify-content: center; min-height: 50px; }

.mv-menu__prefs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.mv-menu__pref {
  display: flex;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-mono);
  padding: 3px;
}
.mv-menu__pref button {
  flex: 1;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  border-radius: 2px;
  padding: 0 6px;
}
.mv-menu__pref button svg { width: 14px; height: 14px; flex-shrink: 0; }
.mv-menu__pref button.is-active {
  background: var(--bg-raised);
  color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.mv-menu__legal {
  margin-top: auto;
  padding-top: 32px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* Staggered rise on open */
@media (prefers-reduced-motion: no-preference) {
  .mv-menu__scroll > * { opacity: 0; transform: translateY(10px); }
  .mv-menu.is-open .mv-menu__scroll > * {
    animation: mvMenuRise 0.4s cubic-bezier(0.22, 0.8, 0.3, 1) both;
  }
  .mv-menu.is-open .mv-menu__scroll > :nth-child(1)  { animation-delay: 0.02s; }
  .mv-menu.is-open .mv-menu__scroll > :nth-child(2)  { animation-delay: 0.05s; }
  .mv-menu.is-open .mv-menu__scroll > :nth-child(3)  { animation-delay: 0.08s; }
  .mv-menu.is-open .mv-menu__scroll > :nth-child(4)  { animation-delay: 0.11s; }
  .mv-menu.is-open .mv-menu__scroll > :nth-child(5)  { animation-delay: 0.14s; }
  .mv-menu.is-open .mv-menu__scroll > :nth-child(6)  { animation-delay: 0.17s; }
  .mv-menu.is-open .mv-menu__scroll > :nth-child(7)  { animation-delay: 0.20s; }
  .mv-menu.is-open .mv-menu__scroll > :nth-child(8)  { animation-delay: 0.23s; }
  .mv-menu.is-open .mv-menu__scroll > :nth-child(9)  { animation-delay: 0.26s; }
  .mv-menu.is-open .mv-menu__scroll > :nth-child(10) { animation-delay: 0.29s; }
  .mv-menu.is-open .mv-menu__scroll > :nth-child(n+11) { animation-delay: 0.32s; }
}
@keyframes mvMenuRise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
  /* The redesigned menu carries EN/NL — hide the nav pill so the bar
     is just logo + menu button. (Login page's fixed switcher unaffected.) */
  .nav .lang-switch { display: none !important; }
}

/* =========================================================
   2 · Sticky bottom CTA bar (≤768px only)
   ========================================================= */

.mv-ctabar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  display: none;
  align-items: center;
  gap: 14px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(10, 13, 8, 0.92);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  border-top: 1px solid var(--border);
  transform: translateY(110%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0.28, 1);
}
.mv-ctabar.is-visible { transform: none; }
.mv-ctabar__meta { flex: 1; min-width: 0; }
.mv-ctabar__title {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--fg);
  line-height: 1.2;
}
.mv-ctabar__sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mv-ctabar .btn {
  flex-shrink: 0;
  padding: 13px 22px;
  font-size: 14.5px;
}
[data-theme="light"] .mv-ctabar { background: rgba(245, 243, 238, 0.94); }

@media (max-width: 768px) {
  .mv-ctabar { display: flex; }
}

/* =========================================================
   3 · Mobile pattern kit (≤768px; inert on desktop)
   ========================================================= */

/* ---- Horizontal snap carousel -------------------------- */
@media (max-width: 768px) {
  .mv-swipe {
    display: flex !important;
    grid-template-columns: none !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px !important;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .mv-swipe::-webkit-scrollbar { display: none; }
  .mv-swipe > * {
    flex: 0 0 82%;
    scroll-snap-align: start;
    min-width: 0;
  }
}
.mv-dots {
  display: none;
  gap: 4px;
  justify-content: center;
  margin-top: 14px;
}
.mv-dots button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
}
.mv-dots button span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: background-color 0.18s, transform 0.18s;
}
.mv-dots button.is-active span {
  background: var(--accent);
  transform: scale(1.3);
}
@media (max-width: 768px) {
  .mv-dots { display: flex; }
}

/* ---- Vertical timeline (steps) -------------------------- */
@media (max-width: 768px) {
  .mv-timeline {
    display: flex !important;
    flex-direction: column;
    grid-template-columns: none !important;
    gap: 0 !important;
  }
  .mv-timeline > * {
    position: relative;
    display: grid !important;
    grid-template-columns: 38px 1fr;
    column-gap: 18px;
    align-items: start;
    padding: 0 0 34px;
  }
  .mv-timeline > *:last-child { padding-bottom: 0; }
  /* connector line from this marker down to the next */
  .mv-timeline > *:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 19px;
    top: 42px;
    bottom: -2px;
    width: 1px;
    background: rgba(130, 218, 168, 0.16);
  }
  [data-theme="light"] .mv-timeline > *:not(:last-child)::before {
    background: rgba(28, 26, 23, 0.14);
  }
  /* first child of each step = the marker */
  .mv-timeline > * > :first-child {
    grid-column: 1;
    grid-row: 1 / span 8;
    width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
    position: relative;
    z-index: 1;
  }
  .mv-timeline > * > :not(:first-child) { grid-column: 2; }
}

/* ---- Segmented control ---------------------------------- */
.mv-seg__tabs {
  display: none;
  gap: 3px;
  background: var(--bg-mono);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px;
  margin-bottom: 18px;
}
.mv-seg__tabs button {
  flex: 1;
  min-height: 48px;
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.35;
  color: var(--fg-secondary);
  border-radius: 2px;
  transition: background-color 0.15s, color 0.15s;
}
.mv-seg__tabs button.is-active {
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}
[data-theme="light"] .mv-seg__tabs button.is-active { color: #FFFFFF; }
@media (max-width: 768px) {
  .mv-seg__tabs { display: flex; }
  .mv-seg__panes > * { display: none; }
  .mv-seg__panes > *.is-active { display: block; animation: mvPaneIn 0.25s ease both; }
}
@keyframes mvPaneIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Collapsible section (fold) -------------------------- */
.mv-fold__head {
  width: 100%;
  text-align: left;
  padding: 0;
  display: block;
}
.mv-fold__toggle { display: none; }
@media (max-width: 768px) {
  .mv-fold { border-bottom: 1px solid var(--border); }
  .mv-fold__head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 20px 0;
    cursor: pointer;
  }
  .mv-fold__toggle {
    display: block;
    position: relative;
    width: 18px;
    height: 18px;
    color: var(--accent);
    transition: transform 0.25s ease;
    flex: none;
  }
  .mv-fold__toggle::before,
  .mv-fold__toggle::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background: currentColor;
    border-radius: 1px;
  }
  .mv-fold__toggle::before { width: 18px; height: 2px; transform: translate(-50%, -50%); }
  .mv-fold__toggle::after  { width: 2px; height: 18px; transform: translate(-50%, -50%); }
  .mv-fold.is-open .mv-fold__toggle { transform: rotate(45deg); }
  .mv-fold__body {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    transition: grid-template-rows 0.34s cubic-bezier(0.32, 0.72, 0.28, 1);
  }
  .mv-fold__body > * { overflow: hidden; min-width: 0; }
  .mv-fold.is-open .mv-fold__body { grid-template-rows: 1fr; }
}

/* =========================================================
   4 · Mobile rhythm & shared element tuning (≤768px)
   ========================================================= */

@media (max-width: 768px) {
  :root {
    --gutter: 20px;
    --section-py: 64px;
    --section-py-dyn: 64px;
  }

  .nav { height: 60px; }
  .nav__logo img, .nav__logo svg { height: 16px; }

  section.hero { padding-top: 48px; padding-bottom: 56px; }

  .hero__ctas {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .hero__ctas .btn { justify-content: center; min-height: 52px; }

  .section-head { margin-bottom: 36px; }
  h2.section-headline { line-height: 1.18; }

  .faq__q { font-size: 16.5px; }
  .faq__q-row { padding: 20px 0; }

  .footer { padding: 64px 0 28px; }
  .footer__grid { padding-bottom: 48px; gap: 32px; }
  .footer__legal { font-size: 10px; gap: 10px; }

  /* Logo proof bars (Home, Airport Inspector): one swipeable row
     instead of a wrapped jumble clipped by the bar's fixed height */
  .proofbar { min-height: 0 !important; padding: 0 !important; display: block !important; }
  .proofbar__row { flex-direction: column; align-items: stretch; gap: 0; flex-wrap: nowrap; }
  .proofbar__label { padding-top: 18px; }
  .proofbar__marks--logos {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 36px;
    align-items: center;
    margin-inline: calc(-1 * var(--gutter));
    padding: 16px var(--gutter) 20px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .proofbar__marks--logos::-webkit-scrollbar { display: none; }

  /* Breadcrumb strip */
  .mv-crumb { padding-block: 11px !important; }
}

@media (max-width: 380px) {
  :root { --gutter: 16px; }
}
