/* Additions to the site: the hero showcase (real renders of the app) and the download page's install box.
   The site toggles dark mode with a .dark class, so dark styles key off that. */

/* --- Hero showcase --- */
.nubble-showcase {
  width: 100%;
}

.ns-screen {
  container-type: inline-size;
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border-radius: 2.5rem;
  background: #11143f url(/images/wallpaper.webp) center / cover no-repeat;
  box-shadow: 0 30px 80px -30px rgb(20 26 58 / 0.45);
}

.ns-menubar {
  position: absolute;
  inset: 0 0 auto 0;
  height: 2.45cqw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.4cqw;
  font-size: 0.86cqw;
  font-weight: 500;
  color: rgb(255 255 255 / 0.92);
  background: rgb(10 12 40 / 0.28);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

.ns-menubar span + span { margin-left: 1.5cqw; }
.ns-menubar b { font-weight: 700; }

/* Each render is 680pt wide; on a 1512pt MacBook screen that's 45%, shown a touch larger to stay legible. */
.ns-shot {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  transform: translateX(-50%) scale(0.94);
  transform-origin: 50% 0;
  opacity: 0;
  filter: blur(8px);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.3, 1.3, 0.5, 1), filter 0.5s ease;
  pointer-events: none;
  user-select: none;
}

.ns-shot.is-active {
  opacity: 1;
  filter: none;
  transform: translateX(-50%) scale(1);
}

.ns-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.ns-tab {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
  padding: 0.7rem 1rem;
  border-radius: 1rem;
  color: var(--color-stone-800);
  background: transparent;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ns-tab:hover { background: rgb(20 26 58 / 0.06); }
.ns-tab:active { transform: scale(0.97); }

.ns-tab strong {
  display: block;
  font-weight: 700;
  font-size: 1rem;
}

.ns-tab small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  line-height: 1.3;
  opacity: 0.6;
}

.ns-tab.is-active {
  color: var(--color-orange-75);
  background: var(--color-stone-800);
}

.ns-tab.is-active small { opacity: 0.75; }

@media (max-width: 640px) {
  .ns-screen { aspect-ratio: 4 / 3; border-radius: 1.75rem; }
  .ns-menubar { height: 5.2cqw; font-size: 2.6cqw; padding: 0 4cqw; }
  .ns-menubar > div { visibility: hidden; } /* the notch covers most of the bar at this size */
  .ns-shot { width: 92%; }
  .ns-tabs { display: flex; overflow-x: auto; padding-bottom: 0.25rem; scrollbar-width: none; }
  .ns-tab { flex: none; width: 11rem; }
}

.dark .ns-tab { color: var(--color-orange-75); }
.dark .ns-tab:hover { background: rgb(255 255 255 / 0.06); }
.dark .ns-tab.is-active { color: var(--color-stone-900); background: var(--color-orange-75); }

@media (prefers-reduced-motion: reduce) {
  .ns-shot { transition: opacity 0.2s ease; transform: translateX(-50%); filter: none; }
}

/* --- Download page: one-line install --- */
.nb-install {
  margin-top: 2.5rem;
  /* Wider than the page's narrow column so the command fits on one line on desktop. */
  width: min(38rem, calc(100vw - 2.5rem));
  margin-left: 50%;
  transform: translateX(-50%);
  text-align: left;
}

.nb-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-orange-500);
}

.nb-heading {
  margin-top: 0.25rem;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nb-lead {
  margin-top: 0.6rem;
  font-size: 1.15rem;
  line-height: 1.55;
  opacity: 0.75;
}

.nb-command {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.5rem 0.5rem 1.25rem;
  border-radius: 1.1rem;
  color: var(--color-orange-75);
  background: var(--color-stone-800);
  box-shadow: 0 18px 40px -22px rgb(20 26 58 / 0.6);
}

.nb-command code {
  flex: 1;
  min-width: 0;
  /* Wrap rather than hide part of the command; it's copied whole either way. */
  overflow-wrap: anywhere;
  font: 500 0.9rem/1.4 ui-monospace, "SF Mono", Menlo, monospace;
  scrollbar-width: none;
}

.nb-copy {
  flex: none;
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 0.55rem 1rem;
  border-radius: 0.8rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-stone-800);
  background: var(--color-rose-300);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.nb-copy:hover { filter: brightness(1.05); }
.nb-copy:active { transform: scale(0.96); }

.nb-note {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  opacity: 0.65;
}

.nb-gatekeeper {
  margin-bottom: 2.5rem;
  max-width: 30rem;
  padding: 1.1rem 1.25rem;
  border-radius: 1.25rem;
  text-align: left;
  font-size: 1rem;
  line-height: 1.55;
  background: rgb(20 26 58 / 0.04);
  border: 2px solid rgb(20 26 58 / 0.05);
}

.nb-heading-small {
  margin-bottom: 0.3rem;
  font-weight: 700;
}

.dark .nb-command { color: var(--color-stone-900); background: var(--color-orange-75); }
.dark .nb-gatekeeper { background: rgb(255 255 255 / 0.04); border-color: rgb(255 255 255 / 0.08); }

@media (max-width: 640px) {
  .nb-heading { font-size: 1.5rem; }
  .nb-command code { font-size: 0.82rem; }
}

.nb-after-dmg {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Spacing between paragraphs on the privacy page. */
.nb-stack > * + * { margin-top: 1.1rem; }
