/* The navbar's Shop and Tools menus (inc/nav-shop.php, inc/nav-tools.php, js/nav-menu.js) */
.ns-menu > .nav-link { display: inline-flex; align-items: center; gap: 5px; padding: 0; font-family: inherit; }
.ns-menu .caret { font-size: 0.6em; line-height: 1; transition: var(--transition); }
.ns-menu.open > .nav-link { color: var(--text); }
.ns-menu.open > .nav-link .caret { transform: rotate(180deg); }
.ns-expand { display: none; }

.ns-panel {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  max-height: calc(100vh - var(--nav-h));
  background: var(--bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 28px 48px -24px rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.2s;
}
/* Dims the page under the open menu */
.ns-panel::after {
  content: "";
  position: absolute;
  top: 100%; left: 0; right: 0;
  height: 100vh;
  background: rgba(12, 12, 12, 0.26);
  pointer-events: none;
}
.ns-menu.open .ns-panel { opacity: 1; visibility: visible; transform: none; }

.ns-grid { display: grid; grid-template-columns: 216px 306px minmax(0, 1fr); padding-top: 26px; padding-bottom: 28px; }
.ns-col { padding-right: 22px; }
.ns-types { padding-left: 22px; border-left: 1px solid var(--border); }
.ns-head {
  padding: 0 10px 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.ns-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  color: var(--text-muted);
  cursor: pointer;
}
.ns-row small { flex: none; font-size: 0.75rem; font-weight: 400; color: var(--text-faint); }
.ns-row:hover, .ns-row.is-on { color: var(--text); background: var(--bg-alt); }
.ns-row.is-soon { cursor: default; }
.ns-row.is-soon small { padding: 1px 7px; border: 1px solid var(--border); border-radius: var(--radius-full); font-size: 0.6875rem; }
.ns-row:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }

.ns-stage {
  --ns-tint: #d9d4cb;
  min-height: 362px;
  padding: 22px 26px 18px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--ns-tint) 15%, var(--bg));
  transition: background-color 0.35s ease;
}
.ns-stage-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.ns-title { font-size: 1.5rem; font-weight: 300; letter-spacing: -0.02em; line-height: 1.2; }
.ns-more { flex: none; font-size: 0.875rem; font-weight: 600; color: var(--text); }
.ns-more::after { content: " →"; display: inline-block; margin-left: 2px; transition: transform 0.2s ease; }
.ns-more:hover::after { transform: translateX(3px); }

.ns-shelf { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.ns-tile { display: block; min-width: 0; color: var(--text); animation: ns-rise 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--i) * 38ms); }
.ns-paper { display: flex; align-items: flex-end; justify-content: center; height: 212px; margin-bottom: 10px; }
.ns-paper img {
  max-height: 100%;
  opacity: 0;
  box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: opacity 0.25s ease, transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.28s ease;
}
.ns-paper img.in { opacity: 1; }
.ns-tile:hover img, .ns-tile:focus-visible img { transform: translateY(-7px) rotate(-1.2deg); box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.36), 0 1px 2px rgba(0, 0, 0, 0.1); }
.ns-name { display: block; font-size: 0.875rem; font-weight: 500; line-height: 1.3; }
.ns-meta { display: block; margin-top: 1px; font-size: 0.75rem; line-height: 1.35; color: var(--text-muted); }
@keyframes ns-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.ns-soon { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 20px; min-height: 322px; animation: ns-rise 0.3s ease both; }
.ns-eyebrow { margin-bottom: 8px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.ns-soon .ns-title { font-size: 2.125rem; margin-bottom: 10px; }
.ns-soon-copy { max-width: 34ch; margin-bottom: 18px; font-size: 0.9375rem; line-height: 1.55; }
.ns-fan { position: relative; height: 250px; }
.ns-fan span {
  position: absolute;
  top: 50%; left: 50%;
  width: 136px;
  aspect-ratio: 5 / 7;
  border-radius: 2px;
  background: color-mix(in srgb, var(--ns-tint) 42%, var(--bg));
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.28);
}
.ns-fan span:nth-child(1) { transform: translate(-96%, -50%) rotate(-8deg); }
.ns-fan span:nth-child(2) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  transform: translate(-50%, -53%);
  background: var(--bg);
  outline: 1px solid color-mix(in srgb, var(--ns-tint) 45%, var(--bg));
  outline-offset: -8px;
  font-size: 1.0625rem;
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-align: center;
  color: var(--text);
  z-index: 1;
}
.ns-fan span:nth-child(3) { transform: translate(-4%, -50%) rotate(8deg); }

/* Tools: a described list beside the chosen tool's words and its real screen */
.ns-grid.ns-grid-tools { grid-template-columns: 322px minmax(0, 1fr); }
.ns-tools { padding-right: 26px; }
.ns-tools .ns-head:not(:first-child) { margin-top: 12px; }
.ns-tool { display: block; padding: 8px 10px; }
.ns-tool b { display: block; font-weight: 500; color: var(--text); }
.ns-tool span { display: block; font-size: 0.8125rem; font-weight: 400; line-height: 1.35; color: var(--text-muted); }
.ns-stage.is-tool { position: relative; overflow: hidden; min-height: 392px; background: color-mix(in srgb, var(--ns-tint) 34%, var(--bg)); }
.ns-tool-text { position: relative; width: 40%; padding-top: 12px; animation: ns-rise 0.3s ease both; }
.ns-tool-text .ns-title { font-size: 1.75rem; margin-bottom: 8px; }
.ns-tool-lead { margin-bottom: 12px; font-size: 0.9375rem; line-height: 1.5; color: var(--text); }
.ns-tool-points { margin-bottom: 18px; }
.ns-tool-points li { position: relative; padding-left: 20px; margin-bottom: 5px; font-size: 0.875rem; line-height: 1.4; color: var(--text); }
.ns-tool-points li::before { content: "\2713"; position: absolute; left: 0; font-size: 0.8125rem; font-weight: 700; }
.ns-shot {
  position: absolute;
  top: 30px; right: -26px;
  width: 58%;
  max-width: 620px;
  border-radius: 10px;
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(0, 0, 0, 0.05);
  animation: ns-shot-in 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes ns-shot-in { from { opacity: 0; transform: translate(14px, 10px); } to { opacity: 1; transform: none; } }

@media (max-width: 1240px) {
  .ns-grid.ns-grid-tools { grid-template-columns: 276px minmax(0, 1fr); }
  .ns-tool-text { width: 46%; }
  .ns-shot { width: 52%; }
  .ns-grid { grid-template-columns: 196px 276px minmax(0, 1fr); }
  .ns-types .ns-row small { display: none; }
  .ns-shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ns-tile:nth-child(5) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ns-tile, .ns-soon, .ns-tool-text, .ns-shot { animation: none; }
  .ns-tile:hover img { transform: none; }
}

/* Inside the hamburger menu: a list that unfolds in place, with the designs in a row to swipe */
@media (max-width: 1100px) {
  .ns-menu { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .ns-menu > a.nav-link .caret { display: none; }
  .ns-menu > button.nav-link { flex: 1; justify-content: space-between; }
  .ns-menu > button.nav-link .caret { font-size: 0.8rem; }
  .ns-menu.unfolded > button.nav-link .caret { transform: rotate(180deg); }
  .ns-expand { display: flex; align-items: center; justify-content: center; width: 40px; height: 32px; margin: -6px -8px -6px 0; color: var(--text-muted); }
  .ns-expand .caret { font-size: 0.8rem; }
  .ns-menu.unfolded .ns-expand .caret { transform: rotate(180deg); }
  .ns-panel { display: none; position: static; flex: 0 0 100%; min-width: 0; max-height: none; margin-top: 10px; border: 0; border-radius: var(--radius); box-shadow: none; opacity: 1; visibility: visible; transform: none; background: var(--bg-alt); }
  .ns-panel::after { display: none; }
  .ns-menu.unfolded .ns-panel { display: block; }
  .ns-grid { display: flex; flex-direction: column; padding: 8px; }
  .ns-occasions, .ns-types .ns-head, .ns-grid-tools .ns-stage { display: none; }
  .ns-tools .ns-head { padding-top: 6px; }
  .ns-col { padding: 0; }
  .ns-types { padding-left: 0; border-left: 0; }
  .ns-row:hover, .ns-row.is-on { background: none; color: var(--text-muted); }
  .ns-types .ns-row small { display: inline; }
  .ns-stage { order: -1; min-width: 0; min-height: 0; margin: 0 0 12px; padding: 12px; border-radius: var(--radius); }
  .ns-stage-top { margin-bottom: 10px; }
  .ns-title { font-size: 1.0625rem; font-weight: 500; letter-spacing: 0; }
  .ns-shelf { display: flex; gap: 12px; overflow-x: auto; padding: 8px 2px 2px; scrollbar-width: none; }
  .ns-shelf::-webkit-scrollbar { display: none; }
  .ns-tile, .ns-tile:nth-child(5) { display: block; flex: 0 0 112px; animation: none; }
  .ns-paper { height: 140px; }
  .ns-tile:hover img { transform: none; }
}

/* Platform: a small menu under its link (Overview, Features, Pricing, About) */
.nd-menu { position: relative; }
.nd-menu > .nav-link { display: inline-flex; align-items: center; gap: 5px; }
.nd-menu .caret { font-size: 0.6em; line-height: 1; transition: var(--transition); }
.nd-menu.open > .nav-link { color: var(--text); }
.nd-menu.open > .nav-link .caret { transform: rotate(180deg); }
.nd-list { position: absolute; top: calc(100% + 16px); left: -16px; z-index: 60; min-width: 280px; margin: 0; padding: 8px; list-style: none; background: var(--bg); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .28); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .16s ease, transform .16s ease, visibility .16s; }
.nd-list::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 18px; }   /* keeps the hover on the way down */
.nd-menu.open .nd-list { opacity: 1; visibility: visible; transform: none; }
.nd-list a { display: block; padding: 10px 12px; border-radius: 9px; color: var(--text); text-decoration: none; }
.nd-list a:hover, .nd-list a:focus-visible, .nd-list a[aria-current] { background: var(--bg-alt); }
.nd-list b { display: block; font-weight: 600; font-size: .9375rem; }
.nd-list span { display: block; margin-top: 2px; color: var(--text-muted); font-size: .8125rem; }
@media (max-width: 1100px) {
  .nd-menu { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .nd-menu > .nav-link .caret { display: none; }
  .nd-menu.unfolded .nd-expand .caret { transform: rotate(180deg); }
  .nd-list { display: none; position: static; flex: 0 0 100%; min-width: 0; margin-top: 8px; padding: 4px; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; background: var(--bg-alt); }
  .nd-list::before { display: none; }
  .nd-menu.unfolded .nd-list { display: block; }
}
@media (prefers-reduced-motion: reduce) { .nd-list { transition: none; } }
