/* =====================================================================
   nav.css — a faithful port of the Ditto brand-site navbar, dropped onto
   the Miravi page. Structure, spacing, the white sharp-cornered dropdown,
   the square icon tiles, the black / beige pill buttons and the cascading
   black-tile wordmark are all Ditto's. The ONLY change is the palette,
   nudged a few units off Ditto's originals so it isn't a 1:1 copy.
   Original Ditto values are noted inline for reference.
   ===================================================================== */

/* Knockout — heavy blocky display face for the masthead wordmark (Ditto-style) */
@font-face {
  font-family: "Knockout 91";
  src: url("../fonts/Knockout-91.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

.nv-root {
  /* dropdown-icon palette — Ditto's, each shifted a few units */
  --nv-red:      #f4572b;   /* Ditto #ff6137 */
  --nv-sky:      #a2d4ea;   /* Ditto #9bd1ee */
  --nv-pink:     #f6c7d5;   /* Ditto #f5c4cc */
  --nv-purple:   #a869c4;   /* Ditto #b26dc2 */
  --nv-blue:     #1391dd;   /* Ditto #0097e6 */
  --nv-lichen:   #dcd982;   /* Ditto #dfdd7c */
  --nv-lavender: #d8c4e2;   /* Ditto #dac3df */
  --nv-yellow:   #ffd83a;   /* Ditto #ffdd33 */
  --nv-green:    #3f6b1c;   /* Ditto #3e6b15 */
  --nv-green-2:  #5ea62e;   /* Ditto #64a727 */
  --nv-gold:     #cba60c;   /* Ditto #d0a901 */
  --nv-olive:    #b6b512;   /* Ditto #bbb809 */

  /* shell palette — Ditto's warm-white / black / beige, nudged */
  --nv-paper:    #f7f4ef;   /* Ditto warm-white #f7f5f3 */
  --nv-ink:      #191410;   /* Ditto black #000000 */
  --nv-graphite: #6a6458;   /* Ditto #6a6559 */
  --nv-beige:    #dcd7cd;   /* Ditto #dcd8cf */
  --nv-white:    #ffffff;   /* Ditto true-white */

  --nv-step: 8px;           /* per-layer offset of the wordmark cascade */

  display: block;
  background-color: transparent;
}

/* ---------- bar shell (Ditto .navbar / .nav-container) ---------- */
.nv-bar {
  position: relative;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 15px 0 0;                 /* Ditto: brand flush-left, 15px right */
  background-color: var(--nv-paper);
}
@media (max-width: 991px) { .nv-bar { padding-right: 0; align-items: stretch; } }
@media (max-width: 809px) { .nv-bar { min-height: 56px; } }

/* ---------- cascading black-tile wordmark (Ditto .nav-brand) ---------- */
.nv-brand {
  position: relative;
  display: flex;
  align-items: stretch;
  align-self: stretch;
  flex: none;
  text-decoration: none;
  padding: 0;
}
.nv-word {
  display: flex;
  align-items: center;
  font-family: "Knockout 91", var(--font-heavy), ui-sans-serif, sans-serif;
  font-weight: 900;
  font-size: 38px;                     /* Knockout is condensed — size up to fill the block */
  line-height: 1;
  letter-spacing: .002em;
  color: var(--nv-paper);
  background: var(--nv-ink);
  padding: 7px 14px 9px;               /* short, wide masthead block */
  border-radius: 2px;
  white-space: nowrap;
  will-change: transform;
}
.nv-word--g {
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: transform .3s cubic-bezier(.2, 1.3, .5, 1);
  pointer-events: none;
}
.nv-word--main { position: relative; z-index: 10; transition: transform .3s cubic-bezier(.2, 1.3, .5, 1); }
.nv-brand:hover .nv-word { transform: translateY(calc(var(--i) * var(--nv-step))); }
@media (max-width: 991px) { .nv-word { font-size: 28px; padding: 4px 10px 6px; } }

/* ---------- desktop menu (Ditto .nav-menu) ---------- */
.nv-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
@media (max-width: 991px) { .nv-menu { display: none; } }

/* top-level links (Ditto .nav-link — graphite, weight 700, pill) */
.nv-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-med), ui-sans-serif, sans-serif;
  font-weight: var(--fw-med);
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: .1px;
  color: var(--nv-graphite);
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 100px;
  padding: 8px 10px;
  cursor: pointer;
  transition: color .2s, background-color .2s;
}
.nv-link:hover { color: var(--nv-ink); }
.nv-dd[data-open] > .nv-link { color: var(--nv-ink); }   /* Ditto keeps the toggle flat when open */

.nv-arrow { width: 10px; height: 10px; transition: transform .3s cubic-bezier(.2, 1.3, .5, 1); }
.nv-dd[data-open] .nv-arrow { transform: rotate(180deg); }

/* ---------- dropdowns (Ditto .dropdown-list / .product-dropdown-grid) ---------- */
.nv-dd { position: relative; }
.nv-dd-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding-top: 6px;                     /* hug the bar like Ditto (small hover bridge) */
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, transform .3s cubic-bezier(.2, 1.3, .5, 1), visibility .3s;
}
.nv-dd[data-open] .nv-dd-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 590px;                         /* Ditto .dropdown-list width */
  padding: 20px;
  background: #ffffff;                  /* pure white panel */
  border: 0;
  border-radius: 0;                     /* sharp-cornered like Ditto */
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16);   /* soft grey lift, a touch stronger */
}
.nv-grid--one { grid-template-columns: 1fr; width: 300px; }

.nv-col-head {
  font-family: var(--font-med), ui-sans-serif, sans-serif;
  font-weight: var(--fw-med);
  font-size: 12px;
  letter-spacing: -.1px;
  color: var(--nv-ink);
  margin-bottom: 16px;
}
.nv-links { display: grid; gap: 9px; }

/* link row — Ditto .solutions-dropdown-link (weight 400, fills with pastel on hover) */
.nv-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px;
  border-radius: 0;
  text-decoration: none;
  color: var(--nv-ink);
  transition: background-color .5s, color .5s;
}
.nv-item:hover { background: var(--_c); }        /* fills with its own accent */
.nv-item-txt {
  font-family: var(--font-body), ui-sans-serif, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.2;
  color: var(--nv-ink);                          /* label stays ink on hover (Ditto .text-black) */
}

/* square icon tile — 27x27, sharp corners, BLACK glyph (Ditto) */
.nv-ic {
  flex: none;
  width: 27px;
  height: 27px;
  border-radius: 0;                     /* sharp square tiles like Ditto */
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--_c);
  transition: background-color .5s;
}
/* uniform near-black glyph on every tile (Ditto) */
.nv-root .nv-ic svg { width: 15px; height: 15px; color: var(--nv-ink); fill: none; stroke: var(--nv-ink); stroke-width: 2.3; display: block; }
.nv-root .nv-ic svg[fill="currentColor"] { fill: var(--nv-ink); stroke: none; }
.nv-item:hover .nv-ic { background: var(--nv-ink); }   /* tile flips to solid black on hover (Ditto) */

/* accent → shared --_c (row fill + tile share it) */
.nv-red      { --_c: var(--nv-red); }
.nv-sky      { --_c: var(--nv-sky); }
.nv-pink     { --_c: var(--nv-pink); }
.nv-purple   { --_c: var(--nv-purple); }
.nv-blue     { --_c: var(--nv-blue); }
.nv-lichen   { --_c: var(--nv-lichen); }
.nv-lavender { --_c: var(--nv-lavender); }
.nv-yellow   { --_c: var(--nv-yellow); }
.nv-green    { --_c: var(--nv-green); }
.nv-green-2  { --_c: var(--nv-green-2); }
.nv-gold     { --_c: var(--nv-gold); }
.nv-olive    { --_c: var(--nv-olive); }

/* ---------- CTAs (Ditto .nav-button) ---------- */
.nv-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: none;
  border-radius: 1000px;
  border: 0;
  font-family: var(--font-med), ui-sans-serif, sans-serif;
  font-weight: var(--fw-med);
  font-size: 14px;
  line-height: 1;
  padding: 11px 18px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}

/* primary = black pill, with Ditto's layered-text fan */
.nv-cta--primary { background: var(--nv-ink); color: var(--nv-paper); }
.nv-cta--primary:hover { background: #2c261d; }
.nv-cta--primary .nv-lyr { display: inline-block; transition: transform .3s cubic-bezier(.2, 1.3, .5, 1); }
.nv-cta--primary .nv-lyr-1,
.nv-cta--primary .nv-lyr-2 {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nv-ink);
  color: var(--nv-paper);
}
.nv-cta--primary:hover .nv-lyr-0 { transform: scale(1.1); }
.nv-cta--primary:hover .nv-lyr-1 { transform: translateY(-9px); }
.nv-cta--primary:hover .nv-lyr-2 { transform: translateY(9px); }

/* demo = beige pill, warms to ember on hover (Ditto .getdemo energy, brand accent) */
.nv-cta--demo { background: var(--nv-beige); color: var(--nv-ink); }
.nv-cta--demo:hover { background: var(--nv-ember, #d83a12); color: var(--nv-paper); }
.nv-cta:focus-visible { outline: 2px solid var(--nv-ink); outline-offset: 2px; }

/* ---------- hamburger (Ditto .menu-button — black square → yellow) ---------- */
.nv-burger {
  display: none;
  position: relative;
  z-index: 1002;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 1000px;
  background: var(--nv-ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  align-self: center;
}
@media (max-width: 991px) { .nv-burger { display: inline-flex; } }
.nv-burger-bars { position: relative; width: 30px; height: 12px; }
.nv-burger-bars span {
  position: absolute;
  left: 0;
  height: 3px;
  background: var(--nv-paper);
  transition: transform .3s, opacity .2s, width .3s;
}
.nv-burger-bars span:nth-child(1) { top: 0;   width: 30px; }
.nv-burger-bars span:nth-child(2) { top: 6px; width: 30px; }
.nv-burger-bars span:nth-child(3) { top: 12px; width: 15px; }
.nv-root[data-mobile-open] .nv-burger { background: var(--nv-ember, #d83a12); }
.nv-root[data-mobile-open] .nv-burger-bars span { background: var(--nv-paper); }
.nv-root[data-mobile-open] .nv-burger-bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nv-root[data-mobile-open] .nv-burger-bars span:nth-child(2) { opacity: 0; }
.nv-root[data-mobile-open] .nv-burger-bars span:nth-child(3) { top: 6px; width: 30px; transform: rotate(-45deg); }

/* ---------- mobile overlay (Ditto .nav-menu full-screen) ---------- */
.nv-mobile {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: var(--nv-paper);
  overflow-y: auto;
}
.nv-mobile[hidden] { display: none; }
.nv-mobile-inner { display: flex; flex-direction: column; flex: 1; padding: 100px 20px 32px; }

.nv-m-link,
.nv-m-acc-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 0;
  border: 0;
  border-bottom: 1px solid var(--nv-beige);
  background: transparent;
  font-family: var(--font-med), ui-sans-serif, sans-serif;
  font-weight: var(--fw-med);
  font-size: 20px;                      /* Ditto mobile 1.625rem, sized down for the tighter scale */
  color: var(--nv-ink);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}
.nv-m-acc-btn .nv-arrow { width: 16px; height: 16px; color: var(--nv-beige); }
.nv-m-acc[data-open] .nv-arrow { transform: rotate(180deg); }
.nv-m-acc-panel { overflow: hidden; max-height: 0; transition: max-height .4s ease; }
.nv-m-acc[data-open] .nv-m-acc-panel { max-height: 900px; }
.nv-m-sub { display: flex; align-items: center; gap: 12px; padding: 16px 0; text-decoration: none; }
.nv-m-sub .nv-ic { width: 30px; height: 30px; }
.nv-m-sub-txt { font-family: var(--font-body), ui-sans-serif, sans-serif; font-weight: 400; font-size: 17px; color: var(--nv-ink); }
.nv-m-ctas { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.nv-m-ctas .nv-cta { padding: 13px 20px; font-size: 15px; }
.nv-m-foot { margin-top: auto; padding-top: 32px; text-align: center; font-family: var(--font-body), ui-sans-serif, sans-serif; font-size: 13px; color: var(--nv-graphite); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .nv-brand:hover .nv-word,
  .nv-cta--primary:hover .nv-lyr-0,
  .nv-cta--primary:hover .nv-lyr-1,
  .nv-cta--primary:hover .nv-lyr-2 { transform: none; }
  .nv-word--g, .nv-word--main, .nv-arrow, .nv-dd-panel, .nv-lyr { transition: none; }
}
